From 216ad338ede566ceb455f60d76cd8fafa7ff178a Mon Sep 17 00:00:00 2001 From: zengjunhong <1213276609@qq.com> Date: Thu, 17 Apr 2025 15:30:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=A7=AF?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-admin-vue3/.env.local | 4 +- .../components/mobile/CarouselLong/config.ts | 51 +++++ .../components/mobile/CarouselLong/index.vue | 33 +++ .../mobile/CarouselLong/property.vue | 106 +++++++++ .../mobile/PromotionPoint/config.ts | 2 +- .../mobile/PromotionPoint/index.vue | 134 +++++------- .../mobile/PromotionPoint/property.vue | 35 +-- .../components/mobile/Richtext/config.ts | 57 +++++ .../components/mobile/Richtext/index.vue | 202 ++++++++++++++++++ .../components/mobile/Richtext/property.vue | 55 +++++ .../src/components/DiyEditor/util.ts | 8 +- .../mall/promotion/diy/template/decorate.vue | 2 +- 12 files changed, 581 insertions(+), 108 deletions(-) create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/config.ts create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/index.vue create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/property.vue create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/Richtext/config.ts create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/Richtext/index.vue create mode 100644 yudao-admin-vue3/src/components/DiyEditor/components/mobile/Richtext/property.vue diff --git a/yudao-admin-vue3/.env.local b/yudao-admin-vue3/.env.local index 120bda0..99bbe56 100644 --- a/yudao-admin-vue3/.env.local +++ b/yudao-admin-vue3/.env.local @@ -4,8 +4,8 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -#VITE_BASE_URL='https://zysc.fjptzykj.com' -VITE_BASE_URL='http://192.168.1.12:6127' +VITE_BASE_URL='https://zysc.fjptzykj.com' +# VITE_BASE_URL='http://192.168.1.12:6127' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 VITE_UPLOAD_TYPE=server diff --git a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/config.ts b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/config.ts new file mode 100644 index 0000000..0d36b80 --- /dev/null +++ b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/config.ts @@ -0,0 +1,51 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 轮播图属性 */ +export interface CarouselProperty { + // 类型:默认 | 卡片 + type: 'default' | 'card' + // 指示器样式:点 | 数字 + indicator: 'dot' | 'number' + // 是否自动播放 + autoplay: boolean + // 播放间隔 + interval: number + // 轮播内容 + items: CarouselItemProperty[] + // 组件样式 + style: ComponentStyle +} +// 轮播内容属性 +export interface CarouselItemProperty { + // 类型:图片 | 视频 + type: 'img' | 'video' + // 图片链接 + imgUrl: string + // 视频链接 + videoUrl: string + // 跳转链接 + url: string +} +import logo from '@/assets/imgs/DiyEditorImges/组件图标-09.png' +// 定义组件 +export const component = { + id: 'CarouselLong', + name: '长轮播图', + // icon: 'system-uicons:carousel', + icon: logo, + property: { + type: 'default', + indicator: 'dot', + autoplay: false, + interval: 3, + items: [ + { type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-01.jpg', videoUrl: '' }, + { type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-02.jpg', videoUrl: '' } + ] as CarouselItemProperty[], + style: { + bgType: 'color', + bgColor: '#fff', + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/index.vue b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/index.vue new file mode 100644 index 0000000..3f640fb --- /dev/null +++ b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/index.vue @@ -0,0 +1,33 @@ + + + + diff --git a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/property.vue b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/property.vue new file mode 100644 index 0000000..c3a5154 --- /dev/null +++ b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/CarouselLong/property.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts index c8ac992..eb2ce08 100644 --- a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts +++ b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/config.ts @@ -3,7 +3,7 @@ import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util' /** 积分商城属性 */ export interface PromotionPointProperty { // 布局类型:单列 | 三列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' + layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' | 'oneColSwiper' // 商品字段 fields: { // 商品名称 diff --git a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue index 4acd93f..df66bc4 100644 --- a/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue +++ b/yudao-admin-vue3/src/components/DiyEditor/components/mobile/PromotionPoint/index.vue @@ -1,90 +1,66 @@