feat:【mall】diy editor 的 notice-bar 优化
This commit is contained in:
@@ -2,27 +2,20 @@ import type { ComponentStyle, DiyComponent } from '../../../util';
|
||||
|
||||
/** 公告栏属性 */
|
||||
export interface NoticeBarProperty {
|
||||
// 图标地址
|
||||
iconUrl: string;
|
||||
// 公告内容列表
|
||||
contents: NoticeContentProperty[];
|
||||
// 背景颜色
|
||||
backgroundColor: string;
|
||||
// 文字颜色
|
||||
textColor: string;
|
||||
// 组件样式
|
||||
style: ComponentStyle;
|
||||
iconUrl: string; // 图标地址
|
||||
contents: NoticeContentProperty[]; // 公告内容列表
|
||||
backgroundColor: string; // 背景颜色
|
||||
textColor: string; // 文字颜色
|
||||
style: ComponentStyle; // 组件样式
|
||||
}
|
||||
|
||||
/** 内容属性 */
|
||||
export interface NoticeContentProperty {
|
||||
// 内容文字
|
||||
text: string;
|
||||
// 链接地址
|
||||
url: string;
|
||||
text: string; // 内容文字
|
||||
url: string; // 链接地址
|
||||
}
|
||||
|
||||
// 定义组件
|
||||
/** 定义组件 */
|
||||
export const component = {
|
||||
id: 'NoticeBar',
|
||||
name: '公告栏',
|
||||
|
||||
@@ -13,18 +13,17 @@ import {
|
||||
|
||||
import ComponentContainerProperty from '../../component-container-property.vue';
|
||||
|
||||
// 通知栏属性面板
|
||||
/** 公告栏属性面板 */
|
||||
defineOptions({ name: 'NoticeBarProperty' });
|
||||
|
||||
const props = defineProps<{ modelValue: NoticeBarProperty }>();
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
// 表单校验
|
||||
const formData = useVModel(props, 'modelValue', emit);
|
||||
const rules = {
|
||||
content: [{ required: true, message: '请输入公告', trigger: 'blur' }],
|
||||
};
|
||||
|
||||
const formData = useVModel(props, 'modelValue', emit);
|
||||
}; // 表单校验
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -59,6 +58,4 @@ const formData = useVModel(props, 'modelValue', emit);
|
||||
</ElCard>
|
||||
</ElForm>
|
||||
</ComponentContainerProperty>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
</template>
|
||||
Reference in New Issue
Block a user