From dae1217dabafbe687560e81ef24fb7457cc2619b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Sat, 15 Mar 2025 13:25:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(Design):=20=E6=96=B0=E5=A2=9E=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E9=A2=98=E5=9E=8B=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 BeforeMartrixRadio、BeforeMartrixCheckbox 和 BeforeMartrixComplation 组件 - 更新 QuestionBefore组件以支持矩阵题型 - 优化逻辑配置的添加和删除功能 - 调整样式,包括图标和渐变效果 --- auto-imports.d.ts | 4 +- components.d.ts | 2 + src/App.vue | 2 +- src/components/YLInput.vue | 1 - src/layouts/index.vue | 27 +- src/views/Design/Index.vue | 2 - .../ActionCompoents/QuestionAction.vue | 3 +- .../BeforComponent/BeforeCheckbox.vue | 5 +- .../BeforComponent/BeforeCompletion.vue | 4 +- .../BeforComponent/BeforeMartrixCheckbox.vue | 48 +++ .../BeforeMartrixComplation.vue | 43 +++ .../BeforComponent/BeforeMartrixRadio.vue | 49 +++ .../BeforComponent/BeforeRadio.vue | 39 +-- .../BeforComponent/BeforeRate.vue | 17 + .../QuestionItemAction/QuestionBefore.vue | 323 +++++++++++++++--- .../Design/components/ChooseQuestion.vue | 9 +- src/views/Home/components/Market/Index.vue | 6 +- src/views/Survey/views/Publish/Index.vue | 32 +- 18 files changed, 495 insertions(+), 121 deletions(-) create mode 100644 src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixCheckbox.vue create mode 100644 src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixComplation.vue create mode 100644 src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixRadio.vue create mode 100644 src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeRate.vue 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/components.d.ts b/components.d.ts index 407e547..4038da1 100644 --- a/components.d.ts +++ b/components.d.ts @@ -35,8 +35,10 @@ declare module 'vue' { VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] + VanTab: typeof import('vant/es')['Tab'] VanTabbar: typeof import('vant/es')['Tabbar'] VanTabbarItem: typeof import('vant/es')['TabbarItem'] + VanTabs: typeof import('vant/es')['Tabs'] YLCascader: typeof import('./src/components/YLCascader.vue')['default'] YLInput: typeof import('./src/components/YLInput.vue')['default'] YLPicker: typeof import('./src/components/YLPicker.vue')['default'] diff --git a/src/App.vue b/src/App.vue index aee81b0..1301bf3 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/components/YLInput.vue b/src/components/YLInput.vue index 4d0cfe7..0f3ee3d 100644 --- a/src/components/YLInput.vue +++ b/src/components/YLInput.vue @@ -40,7 +40,6 @@ export default defineComponent({ ); const handleChange = (event) => { - console.log(event); emit('update:modelValue', event); emit('change', event); }; diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 67aa4d6..036b0a5 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -2,14 +2,29 @@
- - + +
- + {{ tab.title }} @@ -25,9 +40,9 @@ + diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixComplation.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixComplation.vue new file mode 100644 index 0000000..8f58ce3 --- /dev/null +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixComplation.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixRadio.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixRadio.vue new file mode 100644 index 0000000..f9e8f23 --- /dev/null +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeMartrixRadio.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeRadio.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeRadio.vue index c9c8e36..9f92aaa 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeRadio.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/BeforComponent/BeforeRadio.vue @@ -16,51 +16,24 @@ v-if="logic.is_option_group === 0" v-model="logic.option_index" class="ml10" - :options="changeQuestionIndex(logic.question_index, logic)" + :options="changeQuestionIndex()" >
- - - +
+ diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue index d15ec75..a8f250c 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue @@ -1,5 +1,5 @@