Skip to content

Commit 2c1edfa

Browse files
committed
营销:适配商城装修组件【用户订单】
1 parent af67db5 commit 2c1edfa

File tree

5 files changed

+54
-3
lines changed

5 files changed

+54
-3
lines changed

src/components/DiyEditor/components/mobile/UserCard/config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export const component = {
1515
style: {
1616
bgType: 'color',
1717
bgColor: '',
18-
marginLeft: 8,
19-
marginRight: 8,
2018
marginBottom: 8
2119
} as ComponentStyle
2220
}
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 UserOrderProperty {
5+
// 组件样式
6+
style: ComponentStyle
7+
}
8+
9+
// 定义组件
10+
export const component = {
11+
id: 'UserOrder',
12+
name: '用户订单',
13+
icon: 'ep:list',
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<UserOrderProperty>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<el-image src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/orderCardStyle.png" />
3+
</template>
4+
<script setup lang="ts">
5+
import { UserOrderProperty } from './config'
6+
7+
/** 用户订单 */
8+
defineOptions({ name: 'UserOrder' })
9+
// 定义属性
10+
defineProps<{ property: UserOrderProperty }>()
11+
</script>
12+
13+
<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 { UserOrderProperty } from './config'
7+
import { usePropertyForm } from '@/components/DiyEditor/util'
8+
9+
// 用户订单属性面板
10+
defineOptions({ name: 'UserOrderProperty' })
11+
12+
const props = defineProps<{ modelValue: UserOrderProperty }>()
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/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const PAGE_LIBS = [
109109
},
110110
{ name: '商品组件', extended: true, components: ['ProductCard', 'ProductList'] },
111111
{
112-
name: '会员组件',
112+
name: '用户组件',
113113
extended: true,
114114
components: ['UserCard', 'UserOrder', 'UserWallet', 'UserCoupon']
115115
},

0 commit comments

Comments
 (0)