feat:新增装饰组件

This commit is contained in:
MTrun 2022-03-30 08:06:59 +08:00
parent 8f419cbbbb
commit a4c1b08ca1
8 changed files with 66 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,15 @@
import { publicConfig } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { Decorates01Config } from './index'
import cloneDeep from 'lodash/cloneDeep'
export const option = {
colors: ['#4fd2dd', '#235fa7'],
backgroundColor: '#00000000'
}
export default class Config extends publicConfig implements CreateComponentType {
public key = Decorates01Config.key
public chartConfig = cloneDeep(Decorates01Config)
public option = option
}

View File

@ -0,0 +1,6 @@
<template>
</template>
<script setup lang="ts">
</script>

View File

@ -0,0 +1,14 @@
import image from '@/assets/images/chart/decorates/decorates01.png'
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
export const Decorates01Config: ConfigType = {
key: 'Decorates01',
chartKey: 'VDecorates01',
conKey: 'VCDecorates01',
title: '装饰组件-01',
category: ChatCategoryEnum.DECORATES,
categoryName: ChatCategoryEnumName.DECORATES,
package: PackagesCategoryEnum.DECORATES,
image
}

View File

@ -0,0 +1,24 @@
<template>
<div>
装饰
</div>
</template>
<script setup lang="ts">
import { PropType, toRefs } from 'vue'
import { CreateComponentType } from '@/packages/index.d'
const props = defineProps({
chartConfig: {
type: Object as PropType<CreateComponentType>,
required: true
}
})
const { w, h } = toRefs(props.chartConfig.attr)
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,3 @@
import { Decorates01Config } from './Decorates01/index'
export default [Decorates01Config]

View File

@ -1,9 +1,11 @@
export enum ChatCategoryEnum { export enum ChatCategoryEnum {
BORDER = 'Borders', BORDER = 'Borders',
DECORATES = 'Decorates',
MORE = 'Mores' MORE = 'Mores'
} }
export enum ChatCategoryEnumName { export enum ChatCategoryEnumName {
BORDER = '边框', BORDER = '边框',
DECORATES = '装饰',
MORE = '更多' MORE = '更多'
} }

View File

@ -1,4 +1,5 @@
import Borders from './Borders' import Borders from './Borders'
import Decorates from './Decorates'
import Mores from './Mores' import Mores from './Mores'
export const DecorateList = [...Borders, ...Mores] export const DecorateList = [...Borders, ...Decorates, ...Mores]