diff --git a/build/cool/lib/eps/config.ts b/build/cool/lib/eps/config.ts index 138c8d3..316a126 100644 --- a/build/cool/lib/eps/config.ts +++ b/build/cool/lib/eps/config.ts @@ -12,19 +12,19 @@ export default { }, { type: "string", - includes: ["varchar", "text"] + test: ["varchar", "text"] }, { type: "Date", - includes: ["datetime", "date"] + test: ["datetime", "date"] }, { type: "number", - includes: ["tinyint", "int", "decimal"] + test: ["tinyint", "int", "decimal"] }, { type: "BigInt", - includes: ["bigint"] + test: ["bigint"] } ] } diff --git a/build/cool/lib/eps/index.ts b/build/cool/lib/eps/index.ts index 5c2a2b4..38cfd67 100644 --- a/build/cool/lib/eps/index.ts +++ b/build/cool/lib/eps/index.ts @@ -15,7 +15,9 @@ function getType({ entityName, propertyName, type }) { const resType = map.custom({ entityName, propertyName, type }); if (resType) return resType; } - if (map.includes?.includes(type)) return map.type; + if (map.test) { + if (map.test.includes(type)) return map.type; + } } return type; } diff --git a/build/cool/lib/menu/index.ts b/build/cool/lib/menu/index.ts index 20bbd98..f18baf6 100644 --- a/build/cool/lib/menu/index.ts +++ b/build/cool/lib/menu/index.ts @@ -106,9 +106,9 @@ const handler = { // 创建组件 function createComponent(item: any) { - const { propertyName: prop, comment: label } = item; - - let d: any = null; + const prop = item.propertyName; + let label = item.comment; + let d: any; rules.forEach((r: any) => { const s = r.test.find((e: any) => { @@ -145,6 +145,8 @@ function createComponent(item: any) { }); function parse(v: any) { + label = label.split(" ")[0]; + if (v?.name) { return { prop, diff --git a/package.json b/package.json index ef44792..44f03ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "5.7.0", + "version": "5.7.1", "scripts": { "dev": "vite --host", "build": "vite build", diff --git a/src/modules/base/views/components/menu/create.vue b/src/modules/base/views/components/menu/create.vue index 1b149b4..879e950 100644 --- a/src/modules/base/views/components/menu/create.vue +++ b/src/modules/base/views/components/menu/create.vue @@ -113,7 +113,10 @@ async function create() { prop: "parentId", label: "上级节点", component: { - vm: MenuSelect + vm: MenuSelect, + props: { + type: 1 + } } }, { diff --git a/src/modules/base/views/components/menu/select.vue b/src/modules/base/views/components/menu/select.vue index 7f23f01..6f92ee4 100644 --- a/src/modules/base/views/components/menu/select.vue +++ b/src/modules/base/views/components/menu/select.vue @@ -2,7 +2,7 @@