Parcourir la source

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

喵你个旺呀 il y a 1 an
Parent
commit
a694ac7603
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Web/src/views/system/template/component/editTemplate.vue

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

@@ -174,7 +174,7 @@ const submit = () => {
 watch(
 watch(
 		() => state.ruleForm.content,
 		() => 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);
 				const key = pa.substring(2, pa.length - 1);
 				if (!state.renderData.find((e: [string, string]) => e[0] === key)) {
 				if (!state.renderData.find((e: [string, string]) => e[0] === key)) {
 					state.renderData.push([key, '参数' + (index + 1)]);
 					state.renderData.push([key, '参数' + (index + 1)]);