Przeglądaj źródła

fix: 😀修复模板内容为空时无法打卡新增对话框的bug

喵你个旺呀 1 rok temu
rodzic
commit
a694ac7603

+ 1 - 1
Web/src/views/system/template/component/editTemplate.vue

@@ -174,7 +174,7 @@ const submit = () => {
 watch(
 		() => state.ruleForm.content,
 		() => {
-			state.ruleForm.content.match(/@\((.*?)\)/g)?.forEach((pa: string, index) => {
+			state.ruleForm.content?.match(/@\((.*?)\)/g)?.forEach((pa: string, index) => {
 				const key = pa.substring(2, pa.length - 1);
 				if (!state.renderData.find((e: [string, string]) => e[0] === key)) {
 					state.renderData.push([key, '参数' + (index + 1)]);