From ebc1bf5c343dcb407465108cff56cb34b1036c77 Mon Sep 17 00:00:00 2001 From: Huangzhe Date: Mon, 17 Mar 2025 15:57:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A2=84=E8=A7=88=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 订正预览样式内容 - 分页逻辑变更 - style lint --- components.d.ts | 2 + src/stores/Questions/useQuestionStore.ts | 2 +- .../Design/components/Questions/Choice.vue | 4 - .../components/Questions/MartrixQuestion.vue | 27 +- .../components/Questions/MatrixRadio.vue | 2 +- .../Home/components/LastSurvey/Index.vue | 2 +- src/views/Home/components/Market/Index.vue | 4 +- src/views/Survey/views/Create/Index.vue | 48 +--- src/views/Survey/views/Preview/Index.vue | 260 +++++++++--------- .../components/PfePagination/Index.vue | 133 ++------- .../components/questions/PreviewChoice.vue | 37 +-- .../Preview/components/questions/QLast.vue | 8 +- .../Preview/components/questions/Question.vue | 215 +++------------ src/views/Survey/views/Publish/Index.vue | 50 ++-- 14 files changed, 243 insertions(+), 551 deletions(-) diff --git a/components.d.ts b/components.d.ts index 8457d1e..fbd6036 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,11 +9,13 @@ declare module 'vue' { export interface GlobalComponents { Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCol: typeof import('element-plus/es')['ElCol'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] + ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSpace: typeof import('element-plus/es')['ElSpace'] ElText: typeof import('element-plus/es')['ElText'] diff --git a/src/stores/Questions/useQuestionStore.ts b/src/stores/Questions/useQuestionStore.ts index f10748c..50705f9 100644 --- a/src/stores/Questions/useQuestionStore.ts +++ b/src/stores/Questions/useQuestionStore.ts @@ -7,7 +7,7 @@ export const useQuestionStore = defineStore('questionStore', () => { // styleInfo 主题样式 const styleInfo = computed(() => questionsData.value?.survey?.style || {}); // 当前页数 - const page = ref(0); + const page = ref(1); // 分页 const pages = computed(() => questionsData.value?.answer?.pages || []); // 加载 diff --git a/src/views/Design/components/Questions/Choice.vue b/src/views/Design/components/Questions/Choice.vue index cd79316..de1dee7 100644 --- a/src/views/Design/components/Questions/Choice.vue +++ b/src/views/Design/components/Questions/Choice.vue @@ -137,10 +137,6 @@ const emitValue = () => { }; diff --git a/src/views/Survey/views/Preview/components/PfePagination/Index.vue b/src/views/Survey/views/Preview/components/PfePagination/Index.vue index 6d8bf85..8acc73e 100644 --- a/src/views/Survey/views/Preview/components/PfePagination/Index.vue +++ b/src/views/Survey/views/Preview/components/PfePagination/Index.vue @@ -1,40 +1,25 @@ diff --git a/src/views/Survey/views/Preview/components/questions/PreviewChoice.vue b/src/views/Survey/views/Preview/components/questions/PreviewChoice.vue index 2ffc839..6e691f6 100644 --- a/src/views/Survey/views/Preview/components/questions/PreviewChoice.vue +++ b/src/views/Survey/views/Preview/components/questions/PreviewChoice.vue @@ -42,39 +42,4 @@ watch( emit('changeAnswer', res); } ); - - + \ No newline at end of file diff --git a/src/views/Survey/views/Preview/components/questions/QLast.vue b/src/views/Survey/views/Preview/components/questions/QLast.vue index 81e734f..8b47847 100644 --- a/src/views/Survey/views/Preview/components/questions/QLast.vue +++ b/src/views/Survey/views/Preview/components/questions/QLast.vue @@ -1,11 +1,11 @@