@mayaxxp/cueui 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cueui.common.js +14 -6
- package/dist/cueui.common.js.map +1 -1
- package/dist/cueui.umd.js +14 -6
- package/dist/cueui.umd.js.map +1 -1
- package/dist/cueui.umd.min.js +1 -1
- package/dist/cueui.umd.min.js.map +1 -1
- package/package.json +2 -2
package/dist/cueui.umd.js
CHANGED
|
@@ -26660,19 +26660,27 @@ const components = [Select/* default */.A, Table/* default */.A, DynTable, ListS
|
|
|
26660
26660
|
// DragButton
|
|
26661
26661
|
];
|
|
26662
26662
|
const packages_install = function (Vue, options) {
|
|
26663
|
+
if (packages_install.installed) return;
|
|
26664
|
+
// 创建一个新的组件数组副本
|
|
26665
|
+
let allComponents = [...components]; // 不要直接修改原数组
|
|
26663
26666
|
if (options && options.components) {
|
|
26664
|
-
|
|
26667
|
+
allComponents = [...allComponents, ...options.components]; // 使用副本进行扩展
|
|
26665
26668
|
}
|
|
26666
26669
|
if (options.axios) {
|
|
26667
26670
|
Vue.prototype.$cuRequest = options.axios;
|
|
26668
26671
|
}
|
|
26669
26672
|
Vue.use(dic, options);
|
|
26670
26673
|
// 循环全局注册组件
|
|
26671
|
-
|
|
26672
|
-
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26674
|
+
allComponents.forEach(item => {
|
|
26675
|
+
// 修改组件命名逻辑,确保组件名称正确
|
|
26676
|
+
let componentName = item.name;
|
|
26677
|
+
if (componentName && !componentName.startsWith('Cu')) {
|
|
26678
|
+
componentName = "Cu" + componentName;
|
|
26679
|
+
} else if (!componentName) {
|
|
26680
|
+
// 如果组件没有定义name属性,从组件导出获取
|
|
26681
|
+
componentName = item.__file ? 'Cu' + item.__file.split('/').pop().replace('.vue', '') : 'CuComponent';
|
|
26682
|
+
}
|
|
26683
|
+
Vue.component(componentName, item);
|
|
26676
26684
|
});
|
|
26677
26685
|
};
|
|
26678
26686
|
|