Skip to content

Commit c058048

Browse files
committed
营销:适配商城装修组件【用户资产】
1 parent 2c1edfa commit c058048

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
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 UserWalletProperty {
5+
// 组件样式
6+
style: ComponentStyle
7+
}
8+
9+
// 定义组件
10+
export const component = {
11+
id: 'UserWallet',
12+
name: '用户资产',
13+
icon: 'ep:wallet-filled',
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<UserWalletProperty>
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 { UserWalletProperty } from './config'
8+
9+
/** 用户资产 */
10+
defineOptions({ name: 'UserWallet' })
11+
// 定义属性
12+
defineProps<{ property: UserWalletProperty }>()
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 { UserWalletProperty } from './config'
7+
import { usePropertyForm } from '@/components/DiyEditor/util'
8+
9+
// 用户资产属性面板
10+
defineOptions({ name: 'UserWalletProperty' })
11+
12+
const props = defineProps<{ modelValue: UserWalletProperty }>()
13+
const emit = defineEmits(['update:modelValue'])
14+
const { formData } = usePropertyForm(props.modelValue, emit)
15+
</script>
16+
17+
<style scoped lang="scss"></style>

0 commit comments

Comments
 (0)