Skip to content

Commit 3c8ffc8

Browse files
committed
营销:适配商城装修组件【用户卡券】
1 parent c058048 commit 3c8ffc8

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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>

src/components/DiyEditor/components/mobile/UserWallet/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<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"
44
/>
55
</template>
66
<script setup lang="ts">

0 commit comments

Comments
 (0)