feat: 完成画布拖拽交互开发
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import type { MaterialDefinition } from '../types'
|
||||
import TextMaterial from './component.vue'
|
||||
|
||||
const textMaterial: MaterialDefinition = {
|
||||
name: '文本',
|
||||
icon: '',
|
||||
group: 'info',
|
||||
schema: {
|
||||
type: 'text',
|
||||
name: '文本',
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 200,
|
||||
height: 50,
|
||||
},
|
||||
style: {
|
||||
color: 'red',
|
||||
},
|
||||
props: {
|
||||
content: '文本内容123123',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export function install(register: (material: MaterialDefinition, component: Component) => void) {
|
||||
// 注册文本物料
|
||||
register(textMaterial, TextMaterial)
|
||||
}
|
||||
Reference in New Issue
Block a user