fix: 修复 属性冲突的问题, 依赖为引用的问题

- 修复属性合并时重复的问题
- 增加对应的依赖 cos-js-sdk-v5 | shrinkpng
This commit is contained in:
Huangzhe
2025-03-17 09:44:46 +08:00
parent 0d103ca12f
commit 74b544cc35
4 changed files with 20 additions and 48 deletions

4
auto-imports.d.ts vendored
View File

@@ -5,4 +5,6 @@
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
// biome-ignore lint: disable // biome-ignore lint: disable
export {} export {}
declare global {} declare global {
}

11
components.d.ts vendored
View File

@@ -8,15 +8,9 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] Contenteditable: typeof import('./src/components/contenteditable.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
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'] ElInput: typeof import('element-plus/es')['ElInput']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElText: typeof import('element-plus/es')['ElText']
RichText: typeof import('./src/components/RichText.vue')['default'] RichText: typeof import('./src/components/RichText.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
@@ -29,8 +23,6 @@ declare module 'vue' {
VanCol: typeof import('vant/es')['Col'] VanCol: typeof import('vant/es')['Col']
VanDivider: typeof import('vant/es')['Divider'] VanDivider: typeof import('vant/es')['Divider']
VanField: typeof import('vant/es')['Field'] VanField: typeof import('vant/es')['Field']
VanGrid: typeof import('vant/es')['Grid']
VanGridItem: typeof import('vant/es')['GridItem']
VanIcon: typeof import('vant/es')['Icon'] VanIcon: typeof import('vant/es')['Icon']
VanNavBar: typeof import('vant/es')['NavBar'] VanNavBar: typeof import('vant/es')['NavBar']
VanPicker: typeof import('vant/es')['Picker'] VanPicker: typeof import('vant/es')['Picker']
@@ -38,12 +30,9 @@ declare module 'vue' {
VanRadio: typeof import('vant/es')['Radio'] VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanRow: typeof import('vant/es')['Row'] VanRow: typeof import('vant/es')['Row']
VanSearch: typeof import('vant/es')['Search']
VanStepper: typeof import('vant/es')['Stepper'] VanStepper: typeof import('vant/es')['Stepper']
VanSwitch: typeof import('vant/es')['Switch'] VanSwitch: typeof import('vant/es')['Switch']
VanTab: typeof import('vant/es')['Tab'] VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs'] VanTabs: typeof import('vant/es')['Tabs']
YLCascader: typeof import('./src/components/YLCascader.vue')['default'] YLCascader: typeof import('./src/components/YLCascader.vue')['default']
YLInput: typeof import('./src/components/YLInput.vue')['default'] YLInput: typeof import('./src/components/YLInput.vue')['default']

View File

@@ -19,11 +19,13 @@
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"axios": "^1.8.2", "axios": "^1.8.2",
"cos-js-sdk-v5": "^1.8.7",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"element-plus": "^2.7.8", "element-plus": "^2.7.8",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"shrinkpng": "^1.2.0-beta.1",
"sortablejs": "^1.15.6", "sortablejs": "^1.15.6",
"uuid": "^11.1.0", "uuid": "^11.1.0",
"vant": "^4.9.17", "vant": "^4.9.17",

View File

@@ -1,42 +1,25 @@
<template> <template>
<van-field <van-field v-model="element.stem" :label="element.stem" :required="element.config.is_required === 1" label-align="top"
v-model="element.stem" :label="element.stem" :required="element.config.is_required === 1" label-align="top" class="contenteditable-question-title base-select">
class="base-select"
v-model="element.stem"
:label="element.stem"
:required="element.config.is_required === 1"
label-align="top"
class="contenteditable-question-title base-select"
>
<template #left-icon> <template #left-icon>
{{ index + 1 }} {{ index + 1 }}
</template> </template>
<template #label> <template #label>
<contenteditable <contenteditable v-model="element.stem" className="contenteditable-label" :active="active" @blur="emitValue">
v-model="element.stem" </contenteditable>
className="contenteditable-label"
:active="active"
@blur="emitValue"
></contenteditable>
</template> </template>
<template #input> <template #input>
<template v-for="(item, optionIndex) in element.options" :key="item.id"> <template v-for="(item, optionIndex) in element.options" :key="item.id">
<van-radio-group v-if="element.question_type === 1" v-model="choiceValue"> <van-radio-group v-if="element.question_type === 1" v-model="choiceValue">
<option-action :data="isPreview ? item.options : item" :active="active" :question="element"handle=".moverQues" <option-action :data="isPreview ? item.options : item" :active="active" :question="element"
> handle=".moverQues">
<template #item="{ element: it, index: itIndex }"> <template #item="{ element: it, index: itIndex }">
<van-radio <van-radio :key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
:key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled" icon-size="0.45rem">
icon-size="0.45rem"
>
<!-- 自定义文本 --> <!-- 自定义文本 -->
<template #default> <template #default>
<div class="flex align-center van-cell"> <div class="flex align-center van-cell">
<contenteditable <contenteditable v-model="it.option" className="contenteditable-input" :active="active">
v-model="it.option"
className="contenteditable-input"
:active="active"
>
<template #right-icon> <template #right-icon>
<div v-if="active" class="moverQues"> <div v-if="active" class="moverQues">
<van-icon class-prefix="mobilefont" name="option "></van-icon> <van-icon class-prefix="mobilefont" name="option "></van-icon>
@@ -54,19 +37,14 @@
</van-radio-group> </van-radio-group>
<van-checkbox-group v-if="element.question_type === 2" v-model="value" shape="square"> <van-checkbox-group v-if="element.question_type === 2" v-model="value" shape="square">
<option-action v-model:data="element.options[optionIndex]"handle=".moverQues" :active="active" :question="element"> <option-action v-model:data="element.options[optionIndex]" handle=".moverQues" :active="active"
:question="element">
<template #item="{ element: it, index: itIndex }"> <template #item="{ element: it, index: itIndex }">
<van-checkbox <van-checkbox :key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
:key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled" icon-size="0.45rem">
icon-size="0.45rem"
>
<template #default> <template #default>
<div class="flex align-center van-cell"> <div class="flex align-center van-cell">
<contenteditable <contenteditable v-model="it.option" className="contenteditable-input" :active="active">
v-model="it.option"
className="contenteditable-input"
:active="active"
>
<template #right-icon> <template #right-icon>
<div v-if="active" class="moverQues"> <div v-if="active" class="moverQues">
<van-icon class-prefix="mobilefont" name="option "></van-icon> <van-icon class-prefix="mobilefont" name="option "></van-icon>
@@ -128,6 +106,7 @@ const emitValue = () => {
} }
.base-select { .base-select {
& .van-checkbox-group, & .van-checkbox-group,
.van-radio-group { .van-radio-group {
width: 100%; width: 100%;