File tree Expand file tree Collapse file tree 4 files changed +56
-1
lines changed
src/components/DiyEditor/components/mobile Expand file tree Collapse file tree 4 files changed +56
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { ComponentStyle , DiyComponent } from '@/components/DiyEditor/util'
2
+
3
+ /** 用户卡券属性 */
4
+ export interface UserCouponProperty {
5
+ // 组件样式
6
+ style : ComponentStyle
7
+ }
8
+
9
+ // 定义组件
10
+ export const component = {
11
+ id : 'UserCoupon' ,
12
+ name : '用户卡券' ,
13
+ icon : 'ep:ticket' ,
14
+ property : {
15
+ style : {
16
+ bgType : 'color' ,
17
+ bgColor : '' ,
18
+ marginLeft : 8 ,
19
+ marginRight : 8 ,
20
+ marginBottom : 8
21
+ } as ComponentStyle
22
+ }
23
+ } as DiyComponent < UserCouponProperty >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <el-image
3
+ src =" https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle.png"
4
+ />
5
+ </template >
6
+ <script setup lang="ts">
7
+ import { UserCouponProperty } from ' ./config'
8
+
9
+ /** 用户卡券 */
10
+ defineOptions ({ name: ' UserCoupon' })
11
+ // 定义属性
12
+ defineProps <{ property: UserCouponProperty }>()
13
+ </script >
14
+
15
+ <style scoped lang="scss"></style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <ComponentContainerProperty v-model =" formData.style" />
3
+ </template >
4
+
5
+ <script setup lang="ts">
6
+ import { UserCouponProperty } from ' ./config'
7
+ import { usePropertyForm } from ' @/components/DiyEditor/util'
8
+
9
+ // 用户卡券属性面板
10
+ defineOptions ({ name: ' UserCouponProperty' })
11
+
12
+ const props = defineProps <{ modelValue: UserCouponProperty }>()
13
+ const emit = defineEmits ([' update:modelValue' ])
14
+ const { formData } = usePropertyForm (props .modelValue , emit )
15
+ </script >
16
+
17
+ <style scoped lang="scss"></style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<el-image
3
- src =" https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle .png"
3
+ src =" https://shopro.sheepjs.com/admin/static/images/shop/decorate/walletCardStyle .png"
4
4
/>
5
5
</template >
6
6
<script setup lang="ts">
You can’t perform that action at this time.
0 commit comments