营销:适配商城装修组件【用户订单】

(cherry picked from commit 2c1edfa781)
This commit is contained in:
owen 2023-12-01 23:34:19 +08:00 committed by shizhong
parent adfb2469de
commit 848091ea6f
5 changed files with 54 additions and 3 deletions

View File

@ -15,8 +15,6 @@ export const component = {
style: {
bgType: 'color',
bgColor: '',
marginLeft: 8,
marginRight: 8,
marginBottom: 8
} as ComponentStyle
}

View File

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

View File

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

View File

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

View File

@ -109,7 +109,7 @@ export const PAGE_LIBS = [
},
{ name: '商品组件', extended: true, components: ['ProductCard', 'ProductList'] },
{
name: '会员组件',
name: '用户组件',
extended: true,
components: ['UserCard', 'UserOrder', 'UserWallet', 'UserCoupon']
},