Skip to content

Commit eb046f5

Browse files
committed
feat: 移除dymanicComponent功能模块
affects: @vue-async/module-loader-typing, @vue-async/module-loader BREAKING CHANGE: dymanicComponent功能将不可用
1 parent b54b1b9 commit eb046f5

File tree

24 files changed

+65
-509
lines changed

24 files changed

+65
-509
lines changed

dev-modules/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
"license": "MIT",
66
"scripts": {
77
"serve": "node src/server.js",
8-
"build": "concurrently --raw \"yarn build:dymanicRouter\" \"yarn build:dymanicComponent\" \"yarn build:components\"",
8+
"build": "concurrently --raw \"yarn build:dymanicRouter\" \"yarn build:components\" \"yarn build:js-test\"",
99
"build:dymanicRouter": "node scripts/buildModule.js src/dymanicRouter",
10-
"build:dymanicComponent": "node scripts/buildModule.js src/dymanicComponent",
1110
"build:components": "node scripts/buildModule.js src/componentA src/componentB.vue",
1211
"build:js-test": "node scripts/buildModule.js src/module-js",
13-
"build:ts-test": "node scripts/buildModule.js src/module-ts",
1412
"test:unit": "vue-cli-service test:unit",
1513
"lint": "vue-cli-service lint"
1614
},

dev-modules/src/dymanicComponent/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

dev-modules/src/dymanicComponent/components/componentA.vue

Lines changed: 0 additions & 9 deletions
This file was deleted.

dev-modules/src/dymanicComponent/components/componentB.vue

Lines changed: 0 additions & 9 deletions
This file was deleted.

dev-modules/src/dymanicComponent/index.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

dev-modules/src/dymanicComponent/index.less

Lines changed: 0 additions & 7 deletions
This file was deleted.

dev-modules/src/module-js/index.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import routes from './router';
33
// store是以vuex module的形式进行导入使用
44
import storeModule, { namespace } from './store';
55

6-
// layout
7-
import layout from './layout/default';
8-
96
// component(sync)
107
import componentA from './components/componentA';
118
import componentB from './components/componentB';
@@ -19,7 +16,6 @@ import './styles/index.less';
1916
// 参数Vue: vue构造对象
2017
// 本函数中的this指向主程序 vue root实例的引用
2118
export default function (Vue) {
22-
this.$moduleLoadManager.addLayouts('remote', layout);
2319
// 合并路由
2420
this.$moduleLoadManager.addRoutes(routes);
2521

@@ -72,24 +68,6 @@ export default function (Vue) {
7268
// 主程序调用前需要检查是否已经被加载成功
7369
Vue.component('component-a', componentA);
7470

75-
// 动态添加组件
76-
// 组件为对象时 component 为必须的,其它参数与主程序协议一致
77-
this.$dynamicComponent.add(componentA, 'dashboard');
78-
this.$dynamicComponent.add(
79-
{ component: componentB, cols: 2, icon: 'mdi-home', title: '自定义标题', type: 'card' },
80-
'dashboard',
81-
);
82-
// 通过自定义 name 添加重复组件
83-
this.$dynamicComponent.add(
84-
{ component: componentB, name: 'copy-plugin-b', icon: 'mdi-menu', type: 'card' },
85-
'dashboard',
86-
);
87-
this.$dynamicComponent.add({ component: componentTwitter, cols: 4, type: 'none', index: 0 }, 'dashboard');
88-
this.$dynamicComponent.add(
89-
{ component: componentExtend, title: 'JS-Vue.extend', cols: 4, type: 'card', index: 1 },
90-
'dashboard',
91-
);
92-
9371
// 注册vuex module
9472
this.$store.registerModule(namespace, storeModule);
9573

dev-modules/src/module-js/layout/default.vue

Lines changed: 0 additions & 12 deletions
This file was deleted.

dev-modules/src/module-ts/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

dev-modules/src/module-ts/components/componentA.tsx

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)