营销:适配商城装修组件【用户资产】

(cherry picked from commit c058048fac)
This commit is contained in:
owen 2023-12-01 23:40:07 +08:00 committed by shizhong
parent 848091ea6f
commit 6c96749d18
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,23 @@
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
/** 用户资产属性 */
export interface UserWalletProperty {
// 组件样式
style: ComponentStyle
}
// 定义组件
export const component = {
id: 'UserWallet',
name: '用户资产',
icon: 'ep:wallet-filled',
property: {
style: {
bgType: 'color',
bgColor: '',
marginLeft: 8,
marginRight: 8,
marginBottom: 8
} as ComponentStyle
}
} as DiyComponent<UserWalletProperty>

View File

@ -0,0 +1,15 @@
<template>
<el-image
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle.png"
/>
</template>
<script setup lang="ts">
import { UserWalletProperty } from './config'
/** 用户资产 */
defineOptions({ name: 'UserWallet' })
//
defineProps<{ property: UserWalletProperty }>()
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,17 @@
<template>
<ComponentContainerProperty v-model="formData.style" />
</template>
<script setup lang="ts">
import { UserWalletProperty } from './config'
import { usePropertyForm } from '@/components/DiyEditor/util'
//
defineOptions({ name: 'UserWalletProperty' })
const props = defineProps<{ modelValue: UserWalletProperty }>()
const emit = defineEmits(['update:modelValue'])
const { formData } = usePropertyForm(props.modelValue, emit)
</script>
<style scoped lang="scss"></style>