From e1c1429a47d1e74c28054cb046c7777b157c4509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Tue, 18 Mar 2025 19:28:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor(survey):=20=E4=BC=98=E5=8C=96=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E9=97=AE=E5=8D=B7=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改问卷列表展示逻辑,移除 parentCode 判断条件 - 更新问卷列表项的图片和标题字段- 优化投放设置弹窗的样式和结构 - 调整全局样式,增加 van-cell 的样式 - 添加 babel 配置文件,配置 preset-env --- auto-imports.d.ts | 4 +- babel.config.json | 15 ++++++ components.d.ts | 5 -- src/App.vue | 2 +- .../Home/components/CreateSurvey/Index.vue | 12 ++--- src/views/Survey/views/Create/Index.vue | 47 +++++++++---------- 6 files changed, 47 insertions(+), 38 deletions(-) create mode 100644 babel.config.json diff --git a/auto-imports.d.ts b/auto-imports.d.ts index b0b0357..9d24007 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -5,4 +5,6 @@ // Generated by unplugin-auto-import // biome-ignore lint: disable export {} -declare global {} +declare global { + +} diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..1b93517 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,15 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "useBuiltIns": "usage", + "corejs": 3, + "targets": { + "chrome": "58", + "ie": "11" + } + } + ] + ] +} diff --git a/components.d.ts b/components.d.ts index be642d8..bda15c9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -26,11 +26,8 @@ declare module 'vue' { VanCellGroup: typeof import('vant/es')['CellGroup'] VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] - VanCol: typeof import('vant/es')['Col'] VanDivider: typeof import('vant/es')['Divider'] VanField: typeof import('vant/es')['Field'] - VanGrid: typeof import('vant/es')['Grid'] - VanGridItem: typeof import('vant/es')['GridItem'] VanIcon: typeof import('vant/es')['Icon'] VanList: typeof import('vant/es')['List'] VanNavBar: typeof import('vant/es')['NavBar'] @@ -38,9 +35,7 @@ declare module 'vue' { VanPopup: typeof import('vant/es')['Popup'] VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanRow: typeof import('vant/es')['Row'] VanSearch: typeof import('vant/es')['Search'] - VanStep: typeof import('vant/es')['Step'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] VanTab: typeof import('vant/es')['Tab'] diff --git a/src/App.vue b/src/App.vue index 1301bf3..aee81b0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import { onMounted } from 'vue'; import appBridge from '@/assets/js/appBridge'; import utils from '@/assets/js/common'; -onMounted(async() => { +onMounted(async () => { if (utils.getParameter('digitalYiliToken')) { // 隐藏/显示 header appBridge.setHeaderShown(false); diff --git a/src/views/Home/components/CreateSurvey/Index.vue b/src/views/Home/components/CreateSurvey/Index.vue index 8dd9b12..fd66b01 100644 --- a/src/views/Home/components/CreateSurvey/Index.vue +++ b/src/views/Home/components/CreateSurvey/Index.vue @@ -87,12 +87,12 @@ const getList = () => { if (res.data.code === 0) { if (res.data.data) { res.data.data.forEach((item) => { - if (item.parentCode && item.parentCode === 1) { - surveys.value.push(item); - } + // if (item.parentCode && item.parentCode === 1) { + surveys.value.push(item); + // } }); - surveys.value.push({}); + // surveys.value.push({}); } } }); @@ -118,8 +118,8 @@ onMounted(() => { class="survey" @click="createdQuestion(survey)" > - - {{ survey.title }} + + {{ survey.h5Title }} diff --git a/src/views/Survey/views/Create/Index.vue b/src/views/Survey/views/Create/Index.vue index de2e58a..26f3a31 100644 --- a/src/views/Survey/views/Create/Index.vue +++ b/src/views/Survey/views/Create/Index.vue @@ -146,11 +146,9 @@ - - - +
投放设置
+ + - + + - - +
+ + +