diff --git a/components.d.ts b/components.d.ts index 4ab1d797e95b4af9f659a0d743bd8e3a04bfa86f..7edf44a6c661662630918baee0ec2201f9641bab 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,8 +9,6 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { Components: typeof import('./src/components/Components.vue')['default'] ComponentsOptions: typeof import('./src/components/ComponentsOptions.vue')['default'] - Componets: typeof import('./src/components/Componets.vue')['default'] - DrawingBoard: typeof import('./src/components/DrawingBoard.vue')['default'] DrawingBroad: typeof import('./src/components/DrawingBroad.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] @@ -21,6 +19,7 @@ declare module '@vue/runtime-core' { ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] diff --git a/src/components/Components.vue b/src/components/Components.vue index 5af78188885e5630329f42cbe4907d37bb987da1..8453cbed9f25c48e8856fc6d1aa3a89400906751 100644 --- a/src/components/Components.vue +++ b/src/components/Components.vue @@ -35,6 +35,7 @@ let sortComponentByKey = ref(""); .box { width: 100%; box-sizing: border-box; + padding: 10px; &-top { margin-bottom: 20px; @@ -42,8 +43,6 @@ let sortComponentByKey = ref(""); &-content { width: 100%; - text-align: center; - .item { width: 97%; height: 120px; diff --git a/src/components/DrawingBroad.vue b/src/components/DrawingBroad.vue index 8864936ec915c76932e6ec263b704b4d3512ba09..47af5e588a35ff1effcefa6e5b952bc6d3c07295 100644 --- a/src/components/DrawingBroad.vue +++ b/src/components/DrawingBroad.vue @@ -1,20 +1,69 @@ - - - - - + + + + + + + + + - \ No newline at end of file diff --git a/src/config/comp.config.ts b/src/config/comp.config.ts deleted file mode 100644 index 6abb530f21fc8ecd732f5f87e23a56d7085e9e84..0000000000000000000000000000000000000000 --- a/src/config/comp.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - "container": { - "width": 900, - "height": 570 - }, - "blocks": [ - - ], - "style": [ - - ] -} \ No newline at end of file diff --git a/src/config/component.config.json b/src/config/component.config.json new file mode 100644 index 0000000000000000000000000000000000000000..af5d994d94feab960c1d20803facae346d05bc66 --- /dev/null +++ b/src/config/component.config.json @@ -0,0 +1,34 @@ +// 组件的属性 写好的组件需要在这里填写 +{ + "button":{ + "content":"", + "layout":{ + "display":"", + "width":"", + "height":"" + }, + "styles":{ + + }, + "animates":{ + "show":{ + + }, + "hide":{ + + } + }, + "methods":{ + + }, + "data":{ + + }, + "slots":{ + + } + }, + "text":{ + + } +} \ No newline at end of file diff --git a/src/config/data.json b/src/config/data.json new file mode 100644 index 0000000000000000000000000000000000000000..607ac6be87709bb0f7059d9478f8a4c7461c4014 --- /dev/null +++ b/src/config/data.json @@ -0,0 +1,14 @@ +{ + "mode":"PC", + "title":"", + "container": { + "width": "1436", + "height": "100%" + }, + "styles":{ + + }, + "components": [ + + ] +} \ No newline at end of file diff --git a/src/config/editor.config.ts b/src/config/editor.config.ts index f177506cd0775d1637ae1f158248d3186ced7250..cf43a3ddb7dd1a708697279289c58de6762e3d7e 100644 --- a/src/config/editor.config.ts +++ b/src/config/editor.config.ts @@ -1,3 +1,4 @@ +//注册组件 interface componentType { label: string, preview: string, @@ -22,7 +23,6 @@ class createEditorConfig { const registerConfig = new createEditorConfig(); - registerConfig.register({ label: '按钮', preview: `ElButton`, diff --git a/src/store/index.ts b/src/store/index.ts index a77295516dfd4a9e1038625a472fe613d6fd4a40..54ba93acf3e9eb66992bf3529779d78dca7855af 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,6 +1,7 @@ import { reactive } from 'vue'; import { defineStore } from 'pinia'; import config from "@/config/editor.config"; +import data from "@/config/data.json"; interface componentType { label: string, preview: string, @@ -12,11 +13,9 @@ interface componentType { export const userMainStore = defineStore('mainStore', () => { const list: Array = reactive(config.componentList); const tList: Array = reactive([]); - function increment() { //相当于 Actions - } - function doubleCount() { - } + //json schema + const tree = reactive(data); - return {list,tList,increment, doubleCount }; //暴露 + return {list,tList,tree}; //暴露 }); \ No newline at end of file diff --git a/src/views/Panel.vue b/src/views/Panel.vue index 308adaee13b1a5f60698b19d356ef6751d43dfc5..18a75837576ca2dc709faf72b71534d14d63527d 100644 --- a/src/views/Panel.vue +++ b/src/views/Panel.vue @@ -28,9 +28,10 @@ - - px - + + @@ -53,105 +54,119 @@ - - - + + + - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + - - - + + + + + - - - - - + + + + + + + + + 自定义组件 + + + 页面结构 + + - + - - - 组件库 - - - - - - 自定义组件 - - - 自定义组件 - - - - 页面结构 - - 页面结构 - + \ No newline at end of file
组件库
自定义组件
页面结构