feat:【mall】diy editor 的 page-config 优化
This commit is contained in:
@@ -2,15 +2,12 @@ import type { DiyComponent } from '../../../util';
|
|||||||
|
|
||||||
/** 页面设置属性 */
|
/** 页面设置属性 */
|
||||||
export interface PageConfigProperty {
|
export interface PageConfigProperty {
|
||||||
// 页面描述
|
description: string; // 页面描述
|
||||||
description: string;
|
backgroundColor: string; // 页面背景颜色
|
||||||
// 页面背景颜色
|
backgroundImage: string; // 页面背景图片
|
||||||
backgroundColor: string;
|
|
||||||
// 页面背景图片
|
|
||||||
backgroundImage: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定义页面组件
|
/** 定义页面组件 */
|
||||||
export const component = {
|
export const component = {
|
||||||
id: 'PageConfig',
|
id: 'PageConfig',
|
||||||
name: '页面设置',
|
name: '页面设置',
|
||||||
|
|||||||
@@ -7,24 +7,22 @@ import { ElForm, ElFormItem, ElInput } from 'element-plus';
|
|||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
import { ColorInput } from '#/views/mall/promotion/components';
|
import { ColorInput } from '#/views/mall/promotion/components';
|
||||||
|
|
||||||
// 导航栏属性面板
|
/** 导航栏属性面板 */
|
||||||
defineOptions({ name: 'PageConfigProperty' });
|
defineOptions({ name: 'PageConfigProperty' });
|
||||||
|
|
||||||
const props = defineProps<{ modelValue: PageConfigProperty }>();
|
const props = defineProps<{ modelValue: PageConfigProperty }>();
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
// 表单校验
|
|
||||||
const rules = {};
|
|
||||||
|
|
||||||
const formData = useVModel(props, 'modelValue', emit);
|
const formData = useVModel(props, 'modelValue', emit);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ElForm label-width="80px" :model="formData" :rules="rules">
|
<ElForm label-width="80px" :model="formData">
|
||||||
<ElFormItem label="页面描述" prop="description">
|
<ElFormItem label="页面描述" prop="description">
|
||||||
<ElInput
|
<ElInput
|
||||||
type="textarea"
|
|
||||||
v-model="formData!.description"
|
v-model="formData!.description"
|
||||||
|
type="textarea"
|
||||||
placeholder="用户通过微信分享给朋友时,会自动显示页面描述"
|
placeholder="用户通过微信分享给朋友时,会自动显示页面描述"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
@@ -42,5 +40,3 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user