diff --git a/magic-admin/setup.sh b/magic-admin/setup.sh index 403f138e..e36ac4b1 100755 --- a/magic-admin/setup.sh +++ b/magic-admin/setup.sh @@ -10,7 +10,7 @@ npm i pnpm -g # magic依赖安装和构建 cd ${WORKSPACE} npm run reinstall -# npm run build +npm run build:admin echo "magic依赖安装完毕 & 打包完毕" diff --git a/magic-admin/web/package.json b/magic-admin/web/package.json index d9b2ceed..d409060f 100644 --- a/magic-admin/web/package.json +++ b/magic-admin/web/package.json @@ -9,15 +9,15 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "@tmagic/editor": "1.1.0-beta.4", - "@tmagic/form": "1.1.0-beta.4", - "@tmagic/schema": "1.1.0-beta.4", - "@tmagic/stage": "1.1.0-beta.4", - "@tmagic/utils": "1.1.0-beta.4", + "@tmagic/editor": "1.1.0-beta.5", + "@tmagic/form": "1.1.0-beta.5", + "@tmagic/schema": "1.1.0-beta.5", + "@tmagic/stage": "1.1.0-beta.5", + "@tmagic/utils": "1.1.0-beta.5", "axios": "^0.27.2", "axios-jsonp": "^1.0.4", "core-js": "^3.20.0", - "element-plus": "^2.2.6", + "element-plus": "^2.2.12", "js-cookie": "^3.0.0", "moment": "^2.29.3", "moment-timezone": "^0.5.34", @@ -54,7 +54,6 @@ "sass": "^1.32.7", "sass-loader": "^12.0.0", "ts-jest": "^27.0.4", - "typescript": "~4.5.5", - "vue-jest": "^3.0.7" + "typescript": "~4.5.5" } } diff --git a/magic-admin/web/src/components/act-list.vue b/magic-admin/web/src/components/act-list.vue index e1d66844..eef74862 100644 --- a/magic-admin/web/src/components/act-list.vue +++ b/magic-admin/web/src/components/act-list.vue @@ -6,7 +6,7 @@ 活动列表 - 新建活动 + 新建活动 @@ -58,13 +58,13 @@ diff --git a/magic-admin/web/src/config/blank-act-config.ts b/magic-admin/web/src/config/blank-act-config.ts index 4cc20cc9..fd6a1af2 100644 --- a/magic-admin/web/src/config/blank-act-config.ts +++ b/magic-admin/web/src/config/blank-act-config.ts @@ -19,31 +19,36 @@ // 新建活动表单配置 // eslint-disable-next-line @typescript-eslint/naming-convention export const BlankActFormConfig = [ - { name: 'actName', text: '活动名称', rules: [{ required: true, message: '请输入活动名称', trigger: 'blur' }] }, { - names: ['actBeginTime', 'actEndTime'], - text: '活动时间', - type: 'daterange', - rules: [ - { required: true, message: '请输入活动时间', trigger: 'blur' }, + labelWidth: '120px', + items: [ + { name: 'actName', text: '活动名称', rules: [{ required: true, message: '请输入活动名称', trigger: 'blur' }] }, { - trigger: 'blur', - validator: ( - args: { callback: (arg0?: string | undefined) => void }, - data: { model: { c_b_time: string | number | Date; c_e_time: string | number | Date } }, - ) => { - const start = new Date(data.model.c_b_time); - const end = new Date(data.model.c_e_time); - if (start > end) args.callback('结束有效期不能小于开始期'); - else args.callback(); - }, + names: ['actBeginTime', 'actEndTime'], + text: '活动时间', + type: 'daterange', + rules: [ + { required: true, message: '请输入活动时间', trigger: 'blur' }, + { + trigger: 'blur', + validator: ( + args: { callback: (arg0?: string | undefined) => void }, + data: { model: { c_b_time: string | number | Date; c_e_time: string | number | Date } }, + ) => { + const start = new Date(data.model.c_b_time); + const end = new Date(data.model.c_e_time); + if (start > end) args.callback('结束有效期不能小于开始期'); + else args.callback(); + }, + }, + ], + }, + { + name: 'operator', + text: '创建人', + rules: [{ required: true }], + disabled: true, }, ], }, - { - name: 'operator', - text: '创建人', - rules: [{ required: true }], - disabled: true, - }, ]; diff --git a/magic-admin/web/src/use/use-publish.ts b/magic-admin/web/src/use/use-publish.ts index 12009a32..ab5b73a7 100644 --- a/magic-admin/web/src/use/use-publish.ts +++ b/magic-admin/web/src/use/use-publish.ts @@ -51,12 +51,13 @@ export const initConfigByActId = async ({ actId }: { actId: number }) => { name: page.pageTitle, title: page.pageTitle, style: { - height: '728', + height: '100%', width: '375', position: 'relative', layout: 'absolute', left: 0, top: 0, + backgroundColor: '#fff', }, items: [], });