浏览代码

修改表单

zhaoke 1 年之前
父节点
当前提交
b92d8f5086
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/publicPageForm/index.vue

+ 1 - 1
src/components/publicPageForm/index.vue

@@ -163,7 +163,7 @@ export default {
     fromDataReq () {
       return function (item) {
         const { dropdownlist, datatype, pagename, isrequired, formatrule } = item
-        const itemType = datatype.replace(/\([^\)]*\)/g, "")
+        const itemType = datatype ? datatype.replace(/\([^\)]*\)/g, "") : datatype
         const itemReq = isrequired ? true : false
         const itemRule = formatrule ? true : false
         if (dropdownlist || dropdownlist == 0) return [{ required: itemReq, message: `${pagename}不能为空`, trigger: 'change' }]