diff --git a/designer-demo/package.json b/designer-demo/package.json index 69a54f99e..ee717a529 100644 --- a/designer-demo/package.json +++ b/designer-demo/package.json @@ -11,7 +11,8 @@ "vue": "^3.4.21", "@opentiny/tiny-engine": "workspace:^", "@opentiny/tiny-engine-entry": "workspace:^", - "@opentiny/tiny-engine-canvas": "workspace:^" + "@opentiny/tiny-engine-canvas": "workspace:^", + "@opentiny/tiny-engine-configurator": "workspace:*" }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", diff --git a/designer-demo/src/MetaInput.vue b/designer-demo/src/MyInputConfigurator.vue similarity index 97% rename from designer-demo/src/MetaInput.vue rename to designer-demo/src/MyInputConfigurator.vue index d68edbcaa..7f76338ad 100644 --- a/designer-demo/src/MetaInput.vue +++ b/designer-demo/src/MyInputConfigurator.vue @@ -9,7 +9,7 @@ import { ref } from 'vue' import { Input } from '@opentiny/vue' export default { - name: 'MetaInput', + name: 'MyInputConfigurator', components: { TinyInput: Input }, diff --git a/designer-demo/src/configurators.js b/designer-demo/src/configurators.js new file mode 100644 index 000000000..3f76596d7 --- /dev/null +++ b/designer-demo/src/configurators.js @@ -0,0 +1,11 @@ +import { InputConfigurator, SelectConfigurator } from '@opentiny/tiny-engine-configurator' +import MyInputConfigurator from './MyInputConfigurator.vue' + +export const configurators = [ + { + name: 'MyInputConfigurator', + component: MyInputConfigurator + }, + InputConfigurator, + SelectConfigurator +] diff --git a/designer-demo/src/main.js b/designer-demo/src/main.js index 78f5256c0..01e6d4f16 100644 --- a/designer-demo/src/main.js +++ b/designer-demo/src/main.js @@ -13,6 +13,6 @@ // 导入@opentiny/tiny-engine时,内部的依赖包也会逐个导入,可能会执行useComplie,此时需要templateHashMap。所以需要先执行一次defineEntry import { registry } from './defineEntry.js' import { init } from '@opentiny/tiny-engine' -import { metaComponents } from './metaComponents' +import { configurators } from './configurators.js' -init({ registry, metaComponents }) +init({ registry, configurators }) diff --git a/designer-demo/src/metaComponents.js b/designer-demo/src/metaComponents.js deleted file mode 100644 index 2ae21ec0f..000000000 --- a/designer-demo/src/metaComponents.js +++ /dev/null @@ -1,12 +0,0 @@ -// import { addMetaComponents } from '@opentiny/tiny-engine-entry' -import CustomMetaInput from './MetaInput.vue' -import { MetaInput, MetaSelect } from '@opentiny/tiny-engine-meta-components' - -export const metaComponents = [ - { - name: 'meta-input-custom', - component: CustomMetaInput - }, - MetaInput, - MetaSelect -] diff --git a/packages/builtinComponent/src/meta/CanvasCol.json b/packages/builtinComponent/src/meta/CanvasCol.json index 33c68b5df..540bdb901 100644 --- a/packages/builtinComponent/src/meta/CanvasCol.json +++ b/packages/builtinComponent/src/meta/CanvasCol.json @@ -56,7 +56,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -72,7 +72,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -88,7 +88,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -104,7 +104,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { "value": "flex-start", "label": "头部对齐" }, @@ -128,7 +128,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { "value": "flex-start", "label": "头部对齐" }, diff --git a/packages/builtinComponent/src/meta/CanvasRow.json b/packages/builtinComponent/src/meta/CanvasRow.json index 5033b30ba..0ee26acbf 100644 --- a/packages/builtinComponent/src/meta/CanvasRow.json +++ b/packages/builtinComponent/src/meta/CanvasRow.json @@ -34,7 +34,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -50,7 +50,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -66,7 +66,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -82,7 +82,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { "value": "flex-start", "label": "头部对齐" }, @@ -106,7 +106,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { "value": "flex-start", "label": "头部对齐" }, diff --git a/packages/builtinComponent/src/meta/CanvasRowColContainer.json b/packages/builtinComponent/src/meta/CanvasRowColContainer.json index e363530f6..5ee884cdf 100644 --- a/packages/builtinComponent/src/meta/CanvasRowColContainer.json +++ b/packages/builtinComponent/src/meta/CanvasRowColContainer.json @@ -34,7 +34,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } } diff --git a/packages/canvas/src/components/builtin/builtin.json b/packages/canvas/src/components/builtin/builtin.json index 79c678294..560a90016 100644 --- a/packages/canvas/src/components/builtin/builtin.json +++ b/packages/canvas/src/components/builtin/builtin.json @@ -94,7 +94,7 @@ }, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -256,7 +256,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "type": "textarea", "autosize": true @@ -399,7 +399,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } } diff --git a/packages/meta-components/README.md b/packages/configurator/README.md similarity index 100% rename from packages/meta-components/README.md rename to packages/configurator/README.md diff --git a/packages/meta-components/package.json b/packages/configurator/package.json similarity index 92% rename from packages/meta-components/package.json rename to packages/configurator/package.json index 2e929fb57..b2b822788 100644 --- a/packages/meta-components/package.json +++ b/packages/configurator/package.json @@ -1,5 +1,5 @@ { - "name": "@opentiny/tiny-engine-meta-components", + "name": "@opentiny/tiny-engine-configurator", "version": "1.0.0", "description": "", "main": "dist/index.js", diff --git a/packages/configurator/src/index.js b/packages/configurator/src/index.js new file mode 100644 index 000000000..dabd62d79 --- /dev/null +++ b/packages/configurator/src/index.js @@ -0,0 +1,2 @@ +export { default as InputConfigurator } from './input-configurator' +export { default as SelectConfigurator } from './select-configurator' diff --git a/packages/meta-components/src/meta-input/MetaInput.vue b/packages/configurator/src/input-configurator/InputConfigurator.vue similarity index 98% rename from packages/meta-components/src/meta-input/MetaInput.vue rename to packages/configurator/src/input-configurator/InputConfigurator.vue index f44e0bc9f..5e58cb2df 100644 --- a/packages/meta-components/src/meta-input/MetaInput.vue +++ b/packages/configurator/src/input-configurator/InputConfigurator.vue @@ -14,7 +14,7 @@ import { Input } from '@opentiny/vue' import { useProperties } from '@opentiny/tiny-engine-controller' export default { - name: 'MetaInput', + name: 'InputConfigurator', components: { TinyInput: Input }, diff --git a/packages/configurator/src/input-configurator/index.js b/packages/configurator/src/input-configurator/index.js new file mode 100644 index 000000000..94a933b6e --- /dev/null +++ b/packages/configurator/src/input-configurator/index.js @@ -0,0 +1,6 @@ +import InputConfigurator from './InputConfigurator.vue' + +export default { + name: 'InputConfigurator', + component: InputConfigurator +} diff --git a/packages/meta-components/src/meta-select/MetaSelect.vue b/packages/configurator/src/select-configurator/SelectConfigurator.vue similarity index 100% rename from packages/meta-components/src/meta-select/MetaSelect.vue rename to packages/configurator/src/select-configurator/SelectConfigurator.vue diff --git a/packages/configurator/src/select-configurator/index.js b/packages/configurator/src/select-configurator/index.js new file mode 100644 index 000000000..685f88bd5 --- /dev/null +++ b/packages/configurator/src/select-configurator/index.js @@ -0,0 +1,6 @@ +import SelectConfigurator from './SelectConfigurator.vue' + +export default { + name: 'SelectConfigurator', + component: SelectConfigurator +} diff --git a/packages/meta-components/vite.config.js b/packages/configurator/vite.config.js similarity index 100% rename from packages/meta-components/vite.config.js rename to packages/configurator/vite.config.js diff --git a/packages/design-core/public/mock/bundle.json b/packages/design-core/public/mock/bundle.json index 66780af4e..d4e06792e 100644 --- a/packages/design-core/public/mock/bundle.json +++ b/packages/design-core/public/mock/bundle.json @@ -79,7 +79,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "meta-input-custom", + "component": "MyInputConfigurator", "props": {} } }, @@ -101,7 +101,7 @@ "type": "string", "defaultValue": "default", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -137,7 +137,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -360,7 +360,7 @@ "type": "string", "defaultValue": "default", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -396,7 +396,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -748,7 +748,7 @@ "type": "string", "defaultValue": "right", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -784,7 +784,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -806,7 +806,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -850,7 +850,7 @@ "type": "string", "defaultValue": "left", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -971,7 +971,7 @@ "type": "string", "defaultValue": "default", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1137,7 +1137,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1158,7 +1158,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1179,7 +1179,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1244,7 +1244,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1308,7 +1308,7 @@ "type": "string", "defaultValue": "default", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1344,7 +1344,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1365,7 +1365,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1525,7 +1525,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1578,7 +1578,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1597,7 +1597,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1616,7 +1616,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1673,7 +1673,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1846,7 +1846,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1881,7 +1881,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -1916,7 +1916,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -1936,7 +1936,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -2017,7 +2017,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -2141,7 +2141,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -2208,7 +2208,7 @@ "type": "string", "defaultValue": "default", "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -2310,7 +2310,7 @@ "labelPosition": "top", "type": "string", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -2331,7 +2331,7 @@ "cols": 12, "labelPosition": "top", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -2373,7 +2373,7 @@ "cols": 12, "labelPosition": "top", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "device": [] @@ -2395,7 +2395,7 @@ "labelPosition": "top", "defaultValue": "fixed", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "options": [ { @@ -2766,7 +2766,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -2785,7 +2785,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -2804,7 +2804,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -2900,7 +2900,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "options": [ { @@ -2975,7 +2975,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -2994,7 +2994,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "options": [ { @@ -3100,7 +3100,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "options": [ { @@ -3130,7 +3130,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "options": [ { @@ -3245,7 +3245,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -3264,7 +3264,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -3579,7 +3579,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -3681,7 +3681,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -3851,7 +3851,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -3870,7 +3870,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -3889,7 +3889,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4027,7 +4027,7 @@ "cols": 12, "rules": [], "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -4187,7 +4187,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4206,7 +4206,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4419,7 +4419,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4438,7 +4438,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4457,7 +4457,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -4548,7 +4548,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4567,7 +4567,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -4656,7 +4656,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -4810,7 +4810,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -4962,7 +4962,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -5021,7 +5021,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -5040,7 +5040,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -5297,7 +5297,7 @@ "defaultValue": "标签", "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -5317,7 +5317,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -5431,7 +5431,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -5738,7 +5738,7 @@ "readOnly": false, "disabled": false, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -5796,7 +5796,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -6069,7 +6069,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -6176,7 +6176,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -6468,7 +6468,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6505,7 +6505,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6572,7 +6572,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6591,7 +6591,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6707,7 +6707,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6727,7 +6727,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -6876,7 +6876,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7135,7 +7135,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7154,7 +7154,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7174,7 +7174,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7317,7 +7317,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7357,7 +7357,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7596,7 +7596,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7655,7 +7655,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7702,7 +7702,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7721,7 +7721,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7855,7 +7855,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -7914,7 +7914,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8046,7 +8046,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "dataType": "Array" } @@ -8114,7 +8114,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -8257,7 +8257,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8297,7 +8297,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8356,7 +8356,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8579,7 +8579,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8639,7 +8639,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -8822,7 +8822,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8841,7 +8841,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8935,7 +8935,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -8976,7 +8976,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } } @@ -9073,7 +9073,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -9166,7 +9166,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -9298,7 +9298,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -9318,7 +9318,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -9464,7 +9464,7 @@ } }, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} } }, @@ -9506,7 +9506,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -9594,7 +9594,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -9677,7 +9677,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -9802,7 +9802,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "placeholder": "比如:id" } @@ -10061,7 +10061,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -10415,7 +10415,7 @@ "cols": 12, "defaultValue": "total,sizes,prev, pager, next", "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "type": "textarea" } @@ -10572,7 +10572,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -10592,7 +10592,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -10987,7 +10987,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -11007,7 +11007,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "disabled": true, "placeholder": "请使用变量绑定来绑定函数" @@ -11485,7 +11485,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -11557,7 +11557,7 @@ "defaultValue": "提示信息", "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -11576,7 +11576,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": { "disabled": true, "placeholder": "请使用变量绑定来绑定函数" @@ -11727,7 +11727,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -11798,7 +11798,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -11836,7 +11836,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -11932,7 +11932,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -12027,7 +12027,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -12065,7 +12065,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaInput", + "component": "InputConfigurator", "props": {} }, "description": { @@ -12209,7 +12209,7 @@ } }, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -12329,7 +12329,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -12687,7 +12687,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { @@ -12740,7 +12740,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "MetaSelect", + "component": "SelectConfigurator", "props": { "options": [ { diff --git a/packages/design-core/src/init.js b/packages/design-core/src/init.js index 217b92289..86113fb73 100644 --- a/packages/design-core/src/init.js +++ b/packages/design-core/src/init.js @@ -81,10 +81,10 @@ const defaultLifeCycles = { } } -export const init = ({ selector = '#app', registry = defaultRegistry, lifeCycles = {}, metaComponents = [] } = {}) => { +export const init = ({ selector = '#app', registry = defaultRegistry, lifeCycles = {}, configurators = [] } = {}) => { const { beforeAppCreate, appCreated, appMounted } = lifeCycles - registerMetaComponents(metaComponents) + registerMetaComponents(configurators) defaultLifeCycles.beforeAppCreate({ registry }) beforeAppCreate?.({ registry }) diff --git a/packages/design-core/src/registerMetaComponents.js b/packages/design-core/src/registerMetaComponents.js index 3c2ac8d47..93165e90c 100644 --- a/packages/design-core/src/registerMetaComponents.js +++ b/packages/design-core/src/registerMetaComponents.js @@ -6,8 +6,6 @@ import { addMetaComponents } from '@opentiny/tiny-engine-entry' * 注册TinyEngine默认的 metaComponents */ export const registerMetaComponents = (metaComponents) => { - const { MetaInput, MetaSelect, ...otherComponents } = MetaComponents - - addMetaComponents(Object.entries(otherComponents).map(([name, component]) => ({ name, component }))) + addMetaComponents(Object.entries(MetaComponents).map(([name, component]) => ({ name, component }))) addMetaComponents(metaComponents) } diff --git a/packages/design-core/vite.config.js b/packages/design-core/vite.config.js index 05fe3ca4f..fb728de8e 100644 --- a/packages/design-core/vite.config.js +++ b/packages/design-core/vite.config.js @@ -200,7 +200,7 @@ const devAlias = { '@opentiny/tiny-engine-builtin-component': path.resolve(__dirname, '../builtinComponent/index.js'), '@opentiny/tiny-engine-entry': path.resolve(__dirname, '../entry/src/index.js'), '@opentiny/tiny-engine-layout': path.resolve(__dirname, '../layout/index.js'), - '@opentiny/tiny-engine-meta-components': path.resolve(__dirname, '../meta-components/src/index.js') + '@opentiny/tiny-engine-configurator': path.resolve(__dirname, '../configurator/src/index.js') } const prodAlias = { diff --git a/packages/meta-components/src/index.js b/packages/meta-components/src/index.js deleted file mode 100644 index bfd0efc9f..000000000 --- a/packages/meta-components/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { default as MetaInput } from './meta-input' -export { default as MetaSelect } from './meta-select' diff --git a/packages/meta-components/src/meta-input/index.js b/packages/meta-components/src/meta-input/index.js deleted file mode 100644 index f84a89546..000000000 --- a/packages/meta-components/src/meta-input/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import MetaInput from './MetaInput.vue' - -export default { - name: 'MetaInput', - component: MetaInput -} diff --git a/packages/meta-components/src/meta-select/index.js b/packages/meta-components/src/meta-select/index.js deleted file mode 100644 index 67341cf82..000000000 --- a/packages/meta-components/src/meta-select/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import MetaSelect from './MetaSelect.vue' - -export default { - name: 'MetaSelect', - component: MetaSelect -}