|
@@ -1,6 +1,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
import {defineComponent} from "vue";
|
|
import {defineComponent} from "vue";
|
|
|
|
|
+import fieldIsAllow from "../../../until/fieldIsAllow"
|
|
|
import RoundedTitle from "../../../components/public/roundedTitle.vue";
|
|
import RoundedTitle from "../../../components/public/roundedTitle.vue";
|
|
|
import {rCode} from "../../../map/rcodeMap_esm";
|
|
import {rCode} from "../../../map/rcodeMap_esm";
|
|
|
import handle from "../../../until/handle";
|
|
import handle from "../../../until/handle";
|
|
@@ -8,12 +9,23 @@ import ImageViewer from "../../../components/public/imageViewer.vue";
|
|
|
import ImageTable from "../../../components/public/imageTable.vue";
|
|
import ImageTable from "../../../components/public/imageTable.vue";
|
|
|
import Pop from "../../../components/public/pop.vue";
|
|
import Pop from "../../../components/public/pop.vue";
|
|
|
import PopCard from "../../../components/public/popCard.vue";
|
|
import PopCard from "../../../components/public/popCard.vue";
|
|
|
|
|
+import InputRow from "../../../components/public/form/inputRow.vue";
|
|
|
|
|
+import dbField_esm from "../../../map/dbField_esm";
|
|
|
|
|
+import {apiMap} from "../../../map/apiMap";
|
|
|
|
|
+import SearchBox from "../../../components/search/searchBox.vue";
|
|
|
|
|
+import {pTypes} from "../../../map/productMap";
|
|
|
|
|
+import {newsType} from "../../../map/newMap";
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'carousel',
|
|
name: 'carousel',
|
|
|
- components: {PopCard, Pop, ImageTable, ImageViewer, RoundedTitle},
|
|
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ dbField_esm() {
|
|
|
|
|
+ return dbField_esm
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ components: {SearchBox, InputRow, PopCard, Pop, ImageTable, ImageViewer, RoundedTitle},
|
|
|
async asyncData(ctx){
|
|
async asyncData(ctx){
|
|
|
// 加载轮播图数据
|
|
// 加载轮播图数据
|
|
|
- let [err,res] = await handle(axios.get('/api/base/carousel'));
|
|
|
|
|
|
|
+ let [err,res] = await handle(axios.get(apiMap.carouselList.path));
|
|
|
if(err){
|
|
if(err){
|
|
|
return {};
|
|
return {};
|
|
|
}
|
|
}
|
|
@@ -28,6 +40,7 @@ export default defineComponent({
|
|
|
},
|
|
},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
|
|
+ limit: 10,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
carouselList: [],
|
|
carouselList: [],
|
|
|
popShow: false,
|
|
popShow: false,
|
|
@@ -35,6 +48,85 @@ export default defineComponent({
|
|
|
carouselPopShow: true,
|
|
carouselPopShow: true,
|
|
|
carouselPopLoading: false,
|
|
carouselPopLoading: false,
|
|
|
isEditCarousel: false,
|
|
isEditCarousel: false,
|
|
|
|
|
+ carouselData: {},
|
|
|
|
|
+ form: {
|
|
|
|
|
+ // 排序
|
|
|
|
|
+ sort: {
|
|
|
|
|
+ val:0,
|
|
|
|
|
+ init: 0,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ // 状态 0:禁用,1:启用
|
|
|
|
|
+ status: {
|
|
|
|
|
+ val: 0,
|
|
|
|
|
+ init: 0,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ // 图像资源id, 0为无图
|
|
|
|
|
+ file: {
|
|
|
|
|
+ val: 0,
|
|
|
|
|
+ init: 0,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ // 轮播类型 '0:product','1:news','2:page','3:href'
|
|
|
|
|
+ type: {
|
|
|
|
|
+ val: 0,
|
|
|
|
|
+ init: 0,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ options: [
|
|
|
|
|
+ {label: '直接链接', value: 0},
|
|
|
|
|
+ {label: '内部产品', value: 1},
|
|
|
|
|
+ {label: '指向新闻', value: 2},
|
|
|
|
|
+ {label: '内部页面', value: 3},
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ // 具体值
|
|
|
|
|
+ value: {
|
|
|
|
|
+ val: '',
|
|
|
|
|
+ init: '',
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ showText: '',// 展示用字段
|
|
|
|
|
+ oldShowText: '',
|
|
|
|
|
+ },
|
|
|
|
|
+ // file
|
|
|
|
|
+ fileData: {
|
|
|
|
|
+ val: '',
|
|
|
|
|
+ init: '',
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ state: 0,
|
|
|
|
|
+ showText: '',// 展示用字段
|
|
|
|
|
+ oldShowText: '',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ productSelectVisible: false,
|
|
|
|
|
+ productSearch: {
|
|
|
|
|
+ type: {
|
|
|
|
|
+ val: pTypes[0].key,
|
|
|
|
|
+ oldVal: pTypes[0].key,
|
|
|
|
|
+ init: pTypes[0].key,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ options: pTypes,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ newsSelectVisible: false,
|
|
|
|
|
+ newsVisible: false,
|
|
|
|
|
+ newsSearch: {
|
|
|
|
|
+ type: {
|
|
|
|
|
+ val: newsType[0].key,
|
|
|
|
|
+ oldVal: newsType[0].key,
|
|
|
|
|
+ init: newsType[0].key,
|
|
|
|
|
+ msg: '',
|
|
|
|
|
+ options: pTypes,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ imageSelectVisible: false,
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -45,14 +137,13 @@ export default defineComponent({
|
|
|
methods: {
|
|
methods: {
|
|
|
async getCarouselList(){
|
|
async getCarouselList(){
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- let [err,res] = await handle(this.$axios.get('/api/base/carousel'));
|
|
|
|
|
|
|
+ let [err,res] = await handle(this.$axios.get(apiMap.carouselList.path));
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
if(err){
|
|
if(err){
|
|
|
if(this.NotificationKey){
|
|
if(this.NotificationKey){
|
|
|
this.$notification.close(this.NotificationKey);
|
|
this.$notification.close(this.NotificationKey);
|
|
|
}
|
|
}
|
|
|
this.NotificationKey = `open${Date.now()}`;
|
|
this.NotificationKey = `open${Date.now()}`;
|
|
|
-
|
|
|
|
|
return this.$notification.error({
|
|
return this.$notification.error({
|
|
|
message: '轮播数据加载失败',
|
|
message: '轮播数据加载失败',
|
|
|
description:`异常: ${err.message}`,
|
|
description:`异常: ${err.message}`,
|
|
@@ -88,22 +179,142 @@ export default defineComponent({
|
|
|
return {}
|
|
return {}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async addCarouselItem(){
|
|
|
|
|
- // 打开弹窗. 选择图片,填写链接地址,排序
|
|
|
|
|
|
|
+ // 搜索产品,只需要产品名等信息
|
|
|
|
|
+ async getProductSearch(searchParam){
|
|
|
|
|
+ console.log(searchParam)
|
|
|
|
|
+ if(this.productSearch.type.val !== this.productSearch.type.oldVal){
|
|
|
|
|
+ searchParam.p = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ searchParam.type = this.productSearch.type.val;
|
|
|
|
|
+ searchParam.l = this.limit;
|
|
|
|
|
+ searchParam.p = searchParam.page;
|
|
|
|
|
+ let [err,res] = await handle(
|
|
|
|
|
+ this.$axios.get(
|
|
|
|
|
+ apiMap.searchProductMini.path,
|
|
|
|
|
+ {params:searchParam})
|
|
|
|
|
+ );
|
|
|
|
|
+ if(err){
|
|
|
|
|
+ console.log(err);
|
|
|
|
|
+ return [{message:'请求数据失败'},null];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ let result = res.data;
|
|
|
|
|
+ if(result.code === rCode.OK){
|
|
|
|
|
+ this.productSearch.type.oldVal = this.productSearch.type.val;
|
|
|
|
|
+ // data 转换
|
|
|
|
|
+ result.data = result.data.map(item=>{
|
|
|
|
|
+ item.showText=item.name;
|
|
|
|
|
+ return item;
|
|
|
|
|
+ });
|
|
|
|
|
+ return [null,result];
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // 可捕获的服务器错误
|
|
|
|
|
+ return [{message:result.msg},null];
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 加载轮播默认数据
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ checkFormItem(field,enumOptions,reCheckField){
|
|
|
|
|
+ let formItem = this.form[field];
|
|
|
|
|
+ if (formItem){
|
|
|
|
|
+ if (enumOptions){
|
|
|
|
|
+ // 遍历枚举
|
|
|
|
|
+ for (let i = 0; i < enumOptions.length; i++) {
|
|
|
|
|
+ let enumOption = enumOptions[i];
|
|
|
|
|
+ if (enumOption.value === formItem.val){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ formItem.msg = '选项不在范围内';
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(reCheckField){
|
|
|
|
|
+ // 检查用字段
|
|
|
|
|
+ formItem.msg = fieldIsAllow({
|
|
|
|
|
+ [reCheckField]:formItem.val,
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ formItem.msg = fieldIsAllow({
|
|
|
|
|
+ [field]:formItem.val,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ let r = true;
|
|
|
|
|
+ for (const fieldKey in this.form) {
|
|
|
|
|
+ this.form[fieldKey].msg = fieldIsAllow({
|
|
|
|
|
+ [fieldKey]:this.form[fieldKey].val,
|
|
|
|
|
+ })
|
|
|
|
|
+ if (this.form[fieldKey].msg){
|
|
|
|
|
+ r = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return r
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
+ initCarouseForm(){
|
|
|
|
|
+ this.carouselData = {};
|
|
|
|
|
+ let keys = Object.keys(this.form);
|
|
|
|
|
+ for(let i = 0; i < keys.length; i++){
|
|
|
|
|
+ let key = keys[i];
|
|
|
|
|
+ this.form[key].val = this.form[key].init;
|
|
|
|
|
+ this.form[key].msg = '';
|
|
|
|
|
+ this.form[key].state = 0;
|
|
|
|
|
+ this.form.value.showText = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ openAddCarouselModal(){
|
|
|
|
|
+ // 初始化表单
|
|
|
|
|
+ this.initCarouseForm();
|
|
|
|
|
+ // 打开弹窗. 选择图片,填写链接地址,排序
|
|
|
|
|
+ this.carouselPopShow = true;
|
|
|
|
|
+ this.isEditCarousel = false;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
showPop(){
|
|
showPop(){
|
|
|
this.popShow = true;
|
|
this.popShow = true;
|
|
|
this.popLoading = false;
|
|
this.popLoading = false;
|
|
|
},
|
|
},
|
|
|
cancelPop(){
|
|
cancelPop(){
|
|
|
- this.popShow = false;
|
|
|
|
|
- this.popLoading = false;
|
|
|
|
|
|
|
+ this.imageSelectVisible = false;
|
|
|
},
|
|
},
|
|
|
okHandle(fileItem){
|
|
okHandle(fileItem){
|
|
|
|
|
+ console.log('文件列表');
|
|
|
console.log(fileItem);
|
|
console.log(fileItem);
|
|
|
this.cancelPop();
|
|
this.cancelPop();
|
|
|
- }
|
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
|
+ this.form.fileData.val = fileItem.filePath;
|
|
|
|
|
+ this.form.fileData.state = 1;
|
|
|
|
|
+ this.form.fileData.msg = '';
|
|
|
|
|
+ this.form.fileData.showText = fileItem.filePath;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ onProductSearchHandle(e){
|
|
|
|
|
+ console.log(`onProductSearchHandle ${e}`);
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ console.log(this.productSearch.type.val);
|
|
|
|
|
+ // this.productSearch.type
|
|
|
|
|
+ },
|
|
|
|
|
+ onSelectedItemHandle(item){
|
|
|
|
|
+ console.log(`selected item ${item}`);
|
|
|
|
|
+ console.log(item);
|
|
|
|
|
+ this.form.value.val = item.id;
|
|
|
|
|
+ this.form.value.showText = item.showText;
|
|
|
|
|
+ },
|
|
|
|
|
+ onTypeChangeHandle(e){
|
|
|
|
|
+ console.log(`type change ${e}`);
|
|
|
|
|
+ // 清除其他值
|
|
|
|
|
+ this.form.value.msg = '';
|
|
|
|
|
+ this.form.value.showText = '';
|
|
|
|
|
+ },
|
|
|
|
|
+ loadDefaultProductItem(){
|
|
|
|
|
+ this.productSearch.type.val = pTypes[0].key;
|
|
|
|
|
+ this.$refs.productSearch.loadData(1,true);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -118,7 +329,7 @@ export default defineComponent({
|
|
|
<div class="py-1 border-b border-cyan-300 flex justify-between">
|
|
<div class="py-1 border-b border-cyan-300 flex justify-between">
|
|
|
点击下方快进行管理轮播图数据,一次性不要添加过多轮播图
|
|
点击下方快进行管理轮播图数据,一次性不要添加过多轮播图
|
|
|
<!-- 新增按钮-->
|
|
<!-- 新增按钮-->
|
|
|
- <a-button type="primary" class="ant-icon-btn" icon="plus" @click="addCarouselItem" :loading="loading"></a-button>
|
|
|
|
|
|
|
+ <a-button type="primary" class="ant-icon-btn" icon="plus" @click="openAddCarouselModal" :loading="loading"></a-button>
|
|
|
<!-- 刷新按钮-->
|
|
<!-- 刷新按钮-->
|
|
|
<a-button type="primary" class="ant-icon-btn" icon="reload" @click="getCarouselList" :loading="loading"></a-button>
|
|
<a-button type="primary" class="ant-icon-btn" icon="reload" @click="getCarouselList" :loading="loading"></a-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -147,18 +358,138 @@ export default defineComponent({
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <pop :show="popShow" :loading="popLoading">
|
|
|
|
|
- <image-table @cancel="cancelPop" @ok="okHandle"></image-table>
|
|
|
|
|
- <!-- <choose-to-sit></choose-to-sit>-->
|
|
|
|
|
- </pop>
|
|
|
|
|
|
|
+
|
|
|
<pop :show="carouselPopShow" :loading="carouselPopLoading">
|
|
<pop :show="carouselPopShow" :loading="carouselPopLoading">
|
|
|
<pop-card>
|
|
<pop-card>
|
|
|
<template slot="header" class="w-full">
|
|
<template slot="header" class="w-full">
|
|
|
{{isEditCarousel ? '编辑轮播图' : '新增轮播图'}}
|
|
{{isEditCarousel ? '编辑轮播图' : '新增轮播图'}}
|
|
|
</template>
|
|
</template>
|
|
|
- <template slot="close-group">取消</template>
|
|
|
|
|
|
|
+ <template slot="close-group">
|
|
|
|
|
+ <a-button icon="close" @click="carouselPopShow = false"></a-button>
|
|
|
|
|
+ </template>
|
|
|
<div class="w-full">
|
|
<div class="w-full">
|
|
|
- 内容
|
|
|
|
|
|
|
+ <input-row :msg="form.sort.msg"
|
|
|
|
|
+ label="排序">
|
|
|
|
|
+ <a-input-number v-model="form.sort.val"
|
|
|
|
|
+ @focus="form.password.msg=''"
|
|
|
|
|
+ @blur="checkFormItem('sort')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </input-row>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 轮播类型选择 -->
|
|
|
|
|
+ <input-row :msg="form.type.msg"
|
|
|
|
|
+ label="轮播类型">
|
|
|
|
|
+ <a-radio-group v-model="form.type.val" @change="onTypeChangeHandle">
|
|
|
|
|
+ <a-radio-button v-for="opt in form.type.options"
|
|
|
|
|
+ :key="'cType'+opt.value"
|
|
|
|
|
+ :value="opt.value">
|
|
|
|
|
+ {{ opt.label }}
|
|
|
|
|
+ </a-radio-button>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </input-row>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 轮播具体值 -->
|
|
|
|
|
+<!-- 链接-->
|
|
|
|
|
+ <input-row
|
|
|
|
|
+ v-show="form.type.val === dbField_esm.db_base.carouselType.href"
|
|
|
|
|
+ :msg="form.value.msg"
|
|
|
|
|
+ label="输入链接">
|
|
|
|
|
+ <a-input v-model="form.value.val"
|
|
|
|
|
+ placeholder="输入要指向的链接地址"
|
|
|
|
|
+ @focus="form.value.msg=''"
|
|
|
|
|
+ @blur="checkFormItem('value', null,'href')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </input-row>
|
|
|
|
|
+<!-- 产品选择-->
|
|
|
|
|
+ <input-row
|
|
|
|
|
+ v-show="form.type.val === dbField_esm.db_base.carouselType.production"
|
|
|
|
|
+ :msg="form.value.msg"
|
|
|
|
|
+ label="选择产品">
|
|
|
|
|
+ {{ form.value.showText }}
|
|
|
|
|
+ <a-popover v-model="productSelectVisible" title="选择产品" trigger="click">
|
|
|
|
|
+ <div slot="content" class="searchBox" >
|
|
|
|
|
+ <search-box
|
|
|
|
|
+ class="h-72"
|
|
|
|
|
+ :loadDataApi="getProductSearch"
|
|
|
|
|
+ :limit="limit"
|
|
|
|
|
+ search-placeholder="请输入产品名称关键字"
|
|
|
|
|
+ loadTip="正在搜索产品中..."
|
|
|
|
|
+ ref="productSearch"
|
|
|
|
|
+ @onSelectedItem="onSelectedItemHandle"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="w-full" slot="otherSearchItem">
|
|
|
|
|
+ <a-radio-group v-model="productSearch.type.val"
|
|
|
|
|
+ @change="onProductSearchHandle">
|
|
|
|
|
+ <a-radio-button v-for="opt in productSearch.type.options"
|
|
|
|
|
+ :key="'cType'+opt.key"
|
|
|
|
|
+ :value="opt.key">
|
|
|
|
|
+ {{ opt.text }}
|
|
|
|
|
+ </a-radio-button>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </search-box>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <a-button type="primary" @click="loadDefaultProductItem">
|
|
|
|
|
+ 选择产品
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </a-popover>
|
|
|
|
|
+ </input-row>
|
|
|
|
|
+<!-- 新闻选择-->
|
|
|
|
|
+ <input-row
|
|
|
|
|
+ v-show="form.type.val === dbField_esm.db_base.carouselType.production"
|
|
|
|
|
+ :msg="form.value.msg"
|
|
|
|
|
+ label="文章选择">
|
|
|
|
|
+ {{ form.value.showText }}
|
|
|
|
|
+ <a-popover v-model="productSelectVisible" title="选择你需要的文章" trigger="click">
|
|
|
|
|
+ <div slot="content" class="searchBox" >
|
|
|
|
|
+ <search-box
|
|
|
|
|
+ class="h-72"
|
|
|
|
|
+ :loadDataApi="getProductSearch"
|
|
|
|
|
+ :limit="limit"
|
|
|
|
|
+ search-placeholder="请输入产品名称关键字"
|
|
|
|
|
+ loadTip="正在搜索产品中..."
|
|
|
|
|
+ ref="productSearch"
|
|
|
|
|
+ @onSelectedItem="onSelectedItemHandle"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="w-full" slot="otherSearchItem">
|
|
|
|
|
+ <a-radio-group v-model="productSearch.type.val"
|
|
|
|
|
+ @change="onProductSearchHandle">
|
|
|
|
|
+ <a-radio-button v-for="opt in productSearch.type.options"
|
|
|
|
|
+ :key="'cType'+opt.key"
|
|
|
|
|
+ :value="opt.key">
|
|
|
|
|
+ {{ opt.text }}
|
|
|
|
|
+ </a-radio-button>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </search-box>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <a-button type="primary" @click="loadDefaultProductItem">
|
|
|
|
|
+ 选择产品
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </a-popover>
|
|
|
|
|
+ </input-row>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 选择图片 -->
|
|
|
|
|
+ <input-row label="轮播图片">
|
|
|
|
|
+ <a-popover v-model="imageSelectVisible"
|
|
|
|
|
+ class="w-full"
|
|
|
|
|
+ trigger="click">
|
|
|
|
|
+ <image-table slot="content"
|
|
|
|
|
+ class="w-full h-full"
|
|
|
|
|
+ @cancel="imageSelectVisible = false"
|
|
|
|
|
+ @ok="okHandle"></image-table>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="w-full h-60 rounded relative">
|
|
|
|
|
+ <image-viewer class="" :src="form.fileData.showText"></image-viewer>
|
|
|
|
|
+ <div class="absolute w-full h-full left-0 top-0
|
|
|
|
|
+ justify-center text-white bg-gray-400
|
|
|
|
|
+ items-center text-2xl flex opacity-0 hover:opacity-70">
|
|
|
|
|
+ 点击选择图片
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </a-popover>
|
|
|
|
|
+ </input-row>
|
|
|
</div>
|
|
</div>
|
|
|
<template class="w-full" slot="footer">
|
|
<template class="w-full" slot="footer">
|
|
|
<a-button>{{isEditCarousel? '保存': '新增'}}</a-button>
|
|
<a-button>{{isEditCarousel? '保存': '新增'}}</a-button>
|
|
@@ -169,5 +500,8 @@ export default defineComponent({
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-
|
|
|
|
|
|
|
+.searchBox{
|
|
|
|
|
+ width: 420px;
|
|
|
|
|
+ height: 520px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|