refactor(css): 优化 CSS 文件引用和样式定义
- 移除 CSS 文件名中的 .scss后缀 - 调整 YLSelect 组件样式 - 优化 QuestionBefore 组件布局- 统一 ActionCompoents 样式 - 调整 Survey 创建页面样式 - 更新 components.d.ts 文件
This commit is contained in:
2
components.d.ts
vendored
2
components.d.ts
vendored
@@ -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']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@import 'base.scss';
|
||||
@import 'base';
|
||||
@import '../../fonts/iconfont.css';
|
||||
@import 'vant.scss';
|
||||
@import 'vant';
|
||||
|
||||
a,
|
||||
.green {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-select
|
||||
v-model="selectedValue"
|
||||
class="yl-select-wrapper"
|
||||
@change="handleChange"
|
||||
popper-class="yl-select"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-option>
|
||||
<template #label="{ label }">
|
||||
<!-- {{ option }}-->
|
||||
<div v-html="format(label)" class="yl-select-label"></div>
|
||||
<div class="yl-select-label" v-html="format(label)"></div>
|
||||
</template>
|
||||
</el-select>
|
||||
</template>
|
||||
@@ -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({
|
||||
|
||||
<style>
|
||||
.yl-select {
|
||||
max-width: 80%;
|
||||
overflow: hidden;
|
||||
max-width: 80%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<van-action-sheet
|
||||
v-model:show="moveShow"
|
||||
cancel-text="取消"
|
||||
:actions="actions"
|
||||
@select="optionMove"
|
||||
@cancel="moveShow = false"
|
||||
:actions="actions"
|
||||
>
|
||||
<!-- <template #description>-->
|
||||
<!-- <div class="flex flex-start">操作选项</div>-->
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
<van-action-sheet
|
||||
v-model:show="questionShow"
|
||||
title=""
|
||||
@select="questionMove"
|
||||
:actions="actions"
|
||||
cancel-text="取消"
|
||||
@select="questionMove"
|
||||
>
|
||||
<!-- <van-cell-group :border="false" class="ml10">-->
|
||||
<!-- <van-cell title="下移题目" :border="false" @click="questionMove('down')"></van-cell>-->
|
||||
@@ -81,11 +81,7 @@
|
||||
</header>
|
||||
<!-- 题前 题后逻辑 本来打算拆成两个 但是 只有最后的处理不一样-->
|
||||
<div class="before-or-after">
|
||||
<question-before
|
||||
v-model="questionsInfo.logics"
|
||||
:skipType="skipType"
|
||||
:activeQuestion="activeQuestion"
|
||||
></question-before>
|
||||
<question-before :skipType="skipType" :activeQuestion="activeQuestion"></question-before>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -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: {
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<div v-if="skipType === 0" class="flex align-center space-between">
|
||||
<div class="jump-text mr10">跳转到</div>
|
||||
<yl-select
|
||||
class="skip-select"
|
||||
v-model="item.skip_question_index"
|
||||
class="skip-select"
|
||||
:options="skipOption"
|
||||
></yl-select>
|
||||
</div>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<van-row class="ques_title">
|
||||
<van-col :span="6">添加题目</van-col>
|
||||
<van-col :span="6" :offset="12" @click="show = false">
|
||||
<van-icon name="close"
|
||||
/></van-col>
|
||||
<van-icon name="close" />
|
||||
</van-col>
|
||||
</van-row>
|
||||
<ul>
|
||||
<li v-for="item in quesList" :key="item.type">
|
||||
|
||||
Reference in New Issue
Block a user