营销:适配商城装修组件【用户卡券】

(cherry picked from commit 3c8ffc8c21)
This commit is contained in:
owen 2023-12-01 23:58:57 +08:00 committed by shizhong
parent 6c96749d18
commit e39918d794
4 changed files with 56 additions and 1 deletions

View File

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

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 { UserCouponProperty } from './config'
/** 用户卡券 */
defineOptions({ name: 'UserCoupon' })
//
defineProps<{ property: UserCouponProperty }>()
</script>
<style scoped lang="scss"></style>

View File

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

View File

@ -1,6 +1,6 @@
<template>
<el-image
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle.png"
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/walletCardStyle.png"
/>
</template>
<script setup lang="ts">