From a06d48db30bdd34d0af28632814573292a9a38b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Wed, 5 Mar 2025 19:46:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(css):=20=E4=BC=98=E5=8C=96=20CSS=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=BC=95=E7=94=A8=E5=92=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 CSS 文件名中的 .scss后缀 - 调整 YLSelect 组件样式 - 优化 QuestionBefore 组件布局- 统一 ActionCompoents 样式 - 调整 Survey 创建页面样式 - 更新 components.d.ts 文件 --- components.d.ts | 2 +- src/assets/css/main.scss | 4 ++-- src/components/YLSelect.vue | 9 +++++---- .../Design/components/ActionCompoents/OptionAction.vue | 2 +- .../components/ActionCompoents/QuestionAction.vue | 10 +++------- .../ActionCompoents/components/QuestionBefore.vue | 5 ++++- src/views/Survey/views/Create/Index.vue | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/components.d.ts b/components.d.ts index 293ab83..4a2e464 100644 --- a/components.d.ts +++ b/components.d.ts @@ -16,11 +16,11 @@ declare module 'vue' { VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] VanCol: typeof import('vant/es')['Col'] + VanDialog: typeof import('vant/es')['Dialog'] VanDivider: typeof import('vant/es')['Divider'] VanField: typeof import('vant/es')['Field'] VanIcon: typeof import('vant/es')['Icon'] VanPopup: typeof import('vant/es')['Popup'] - VanRate: typeof import('vant/es')['Rate'] VanRow: typeof import('vant/es')['Row'] VanSearch: typeof import('vant/es')['Search'] VanSwitch: typeof import('vant/es')['Switch'] diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index fcd2f48..9c41435 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -1,6 +1,6 @@ -@import 'base.scss'; +@import 'base'; @import '../../fonts/iconfont.css'; -@import 'vant.scss'; +@import 'vant'; a, .green { diff --git a/src/components/YLSelect.vue b/src/components/YLSelect.vue index c92ebf7..a663699 100644 --- a/src/components/YLSelect.vue +++ b/src/components/YLSelect.vue @@ -2,8 +2,8 @@ @@ -65,7 +65,7 @@ export default defineComponent({ }; const format = (html) => { - let div = document.createElement('div'); + const div = document.createElement('div'); div.innerHTML = html; return div.innerText; }; @@ -85,6 +85,7 @@ export default defineComponent({ font-size: 16px; /* 增加字体大小 */ line-height: 1.5; /* 增加行高 */ } + .yl-select-label { //width: 80%; //overflow: hidden; @@ -95,7 +96,7 @@ export default defineComponent({ diff --git a/src/views/Design/components/ActionCompoents/OptionAction.vue b/src/views/Design/components/ActionCompoents/OptionAction.vue index ea3fcbf..92bcc63 100644 --- a/src/views/Design/components/ActionCompoents/OptionAction.vue +++ b/src/views/Design/components/ActionCompoents/OptionAction.vue @@ -47,9 +47,9 @@ diff --git a/src/views/Design/components/ActionCompoents/QuestionAction.vue b/src/views/Design/components/ActionCompoents/QuestionAction.vue index 7707dc1..b6c7ff7 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -53,9 +53,9 @@ @@ -81,11 +81,7 @@
- +
@@ -96,10 +92,10 @@ import { ref } from 'vue'; import { useCounterStore } from '@/stores/counter'; import { storeToRefs } from 'pinia'; import QuestionBefore from '@/views/Design/components/ActionCompoents/components/QuestionBefore.vue'; +import { v4 as uuidv4 } from 'uuid'; const store = useCounterStore(); const { questionsInfo } = storeToRefs(store); const logics = questionsInfo.value.logics; -import { v4 as uuidv4 } from 'uuid'; const props = defineProps({ index: { diff --git a/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue b/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue index 756f2e6..6dfb78b 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue @@ -84,8 +84,8 @@
跳转到
@@ -354,9 +354,11 @@ const logicIf = (value, index) => { flex: none; width: 40px; } + .jump-text { width: 50px; } + .question-before { & .if { flex: none; @@ -386,6 +388,7 @@ const logicIf = (value, index) => { & .option { width: 100%; } + & .skip-select { width: 200px; } diff --git a/src/views/Survey/views/Create/Index.vue b/src/views/Survey/views/Create/Index.vue index 99d2518..5133bce 100644 --- a/src/views/Survey/views/Create/Index.vue +++ b/src/views/Survey/views/Create/Index.vue @@ -20,8 +20,8 @@ 添加题目 - + +