yuang-framework-ui-pc 1.1.84 → 1.1.86
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/es/utils/resolvers.js +27 -6
- package/lib/utils/resolvers.cjs +27 -6
- package/package.json +34 -36
package/es/utils/resolvers.js
CHANGED
|
@@ -20,29 +20,50 @@ function getStylePath(namePath, packageName, path) {
|
|
|
20
20
|
}
|
|
21
21
|
return `${packageName}${path}/${namePath}`;
|
|
22
22
|
}
|
|
23
|
+
const componentDependencyMap = {
|
|
24
|
+
YuFrameworkAttachmentUpload: ["EleUploadList"]
|
|
25
|
+
// 你的核心依赖:上传组件依赖文件列表组件
|
|
26
|
+
// 后续如果有其他组件有内部依赖,直接加在这里即可,比如:
|
|
27
|
+
// EleForm: ['EleInput', 'EleSelect', 'EleButton']
|
|
28
|
+
};
|
|
23
29
|
function EleAdminResolver(options) {
|
|
24
30
|
return {
|
|
25
31
|
type: "component",
|
|
26
32
|
resolve: (name) => {
|
|
27
33
|
var _a;
|
|
28
34
|
const { path, exclude } = options || {};
|
|
29
|
-
const isMatch = (
|
|
35
|
+
const isMatch = /^(Ele|Yu)/.test(name) && !((_a = exclude == null ? void 0 : exclude.includes) == null ? void 0 : _a.call(exclude, name));
|
|
30
36
|
console.log("按需加载插件:" + name + ",是否匹配:" + isMatch);
|
|
31
37
|
if (isMatch) {
|
|
32
38
|
const packageName = "yuang-framework-ui-pc";
|
|
33
39
|
const namePath = name.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
|
|
34
40
|
const stylePath = getStylePath(namePath, packageName, path);
|
|
41
|
+
let resolveResult;
|
|
35
42
|
if (!path || path === "/es/core" || path === "/lib/core") {
|
|
36
|
-
|
|
43
|
+
resolveResult = {
|
|
37
44
|
name,
|
|
38
45
|
from: `${packageName}${path ?? "/es"}`,
|
|
39
46
|
sideEffects: getSideEffects(stylePath, options)
|
|
40
47
|
};
|
|
48
|
+
} else {
|
|
49
|
+
resolveResult = {
|
|
50
|
+
from: `${packageName}${path}/${namePath}/index`,
|
|
51
|
+
sideEffects: getSideEffects(stylePath, options)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const dependencyList = componentDependencyMap[name];
|
|
55
|
+
if (dependencyList && dependencyList.length) {
|
|
56
|
+
resolveResult.imports = dependencyList.map((depName) => {
|
|
57
|
+
const dependencyPath = depName.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
|
|
58
|
+
const dependencyStylePath = getStylePath(dependencyPath, packageName, path);
|
|
59
|
+
return {
|
|
60
|
+
name: depName,
|
|
61
|
+
from: !path || path === "/es/core" || path === "/lib/core" ? `${packageName}${path ?? "/es"}` : `${packageName}${path}/${dependencyPath}/index`,
|
|
62
|
+
sideEffects: getSideEffects(dependencyStylePath, options)
|
|
63
|
+
};
|
|
64
|
+
});
|
|
41
65
|
}
|
|
42
|
-
return
|
|
43
|
-
from: `${packageName}${path}/${namePath}/index`,
|
|
44
|
-
sideEffects: getSideEffects(stylePath, options)
|
|
45
|
-
};
|
|
66
|
+
return resolveResult;
|
|
46
67
|
}
|
|
47
68
|
}
|
|
48
69
|
};
|
package/lib/utils/resolvers.cjs
CHANGED
|
@@ -22,29 +22,50 @@ function getStylePath(namePath, packageName, path) {
|
|
|
22
22
|
}
|
|
23
23
|
return `${packageName}${path}/${namePath}`;
|
|
24
24
|
}
|
|
25
|
+
const componentDependencyMap = {
|
|
26
|
+
YuFrameworkAttachmentUpload: ["EleUploadList"]
|
|
27
|
+
// 你的核心依赖:上传组件依赖文件列表组件
|
|
28
|
+
// 后续如果有其他组件有内部依赖,直接加在这里即可,比如:
|
|
29
|
+
// EleForm: ['EleInput', 'EleSelect', 'EleButton']
|
|
30
|
+
};
|
|
25
31
|
function EleAdminResolver(options) {
|
|
26
32
|
return {
|
|
27
33
|
type: "component",
|
|
28
34
|
resolve: (name) => {
|
|
29
35
|
var _a;
|
|
30
36
|
const { path, exclude } = options || {};
|
|
31
|
-
const isMatch = (
|
|
37
|
+
const isMatch = /^(Ele|Yu)/.test(name) && !((_a = exclude == null ? void 0 : exclude.includes) == null ? void 0 : _a.call(exclude, name));
|
|
32
38
|
console.log("按需加载插件:" + name + ",是否匹配:" + isMatch);
|
|
33
39
|
if (isMatch) {
|
|
34
40
|
const packageName = "yuang-framework-ui-pc";
|
|
35
41
|
const namePath = name.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
|
|
36
42
|
const stylePath = getStylePath(namePath, packageName, path);
|
|
43
|
+
let resolveResult;
|
|
37
44
|
if (!path || path === "/es/core" || path === "/lib/core") {
|
|
38
|
-
|
|
45
|
+
resolveResult = {
|
|
39
46
|
name,
|
|
40
47
|
from: `${packageName}${path ?? "/es"}`,
|
|
41
48
|
sideEffects: getSideEffects(stylePath, options)
|
|
42
49
|
};
|
|
50
|
+
} else {
|
|
51
|
+
resolveResult = {
|
|
52
|
+
from: `${packageName}${path}/${namePath}/index`,
|
|
53
|
+
sideEffects: getSideEffects(stylePath, options)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const dependencyList = componentDependencyMap[name];
|
|
57
|
+
if (dependencyList && dependencyList.length) {
|
|
58
|
+
resolveResult.imports = dependencyList.map((depName) => {
|
|
59
|
+
const dependencyPath = depName.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
|
|
60
|
+
const dependencyStylePath = getStylePath(dependencyPath, packageName, path);
|
|
61
|
+
return {
|
|
62
|
+
name: depName,
|
|
63
|
+
from: !path || path === "/es/core" || path === "/lib/core" ? `${packageName}${path ?? "/es"}` : `${packageName}${path}/${dependencyPath}/index`,
|
|
64
|
+
sideEffects: getSideEffects(dependencyStylePath, options)
|
|
65
|
+
};
|
|
66
|
+
});
|
|
43
67
|
}
|
|
44
|
-
return
|
|
45
|
-
from: `${packageName}${path}/${namePath}/index`,
|
|
46
|
-
sideEffects: getSideEffects(stylePath, options)
|
|
47
|
-
};
|
|
68
|
+
return resolveResult;
|
|
48
69
|
}
|
|
49
70
|
}
|
|
50
71
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuang-framework-ui-pc",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite --host --config vite.global.ts --mode dev",
|
|
@@ -17,12 +17,7 @@
|
|
|
17
17
|
"vue": ">=3.1.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
21
|
-
"@ant-design/colors": "^7.1.0",
|
|
22
20
|
"@babel/types": "^7.25.4",
|
|
23
|
-
"@bytemd/plugin-gfm": "^1.21.0",
|
|
24
|
-
"@bytemd/plugin-highlight": "^1.21.0",
|
|
25
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
26
21
|
"@types/fs-extra": "^11.0.4",
|
|
27
22
|
"@types/node": "^22.5.0",
|
|
28
23
|
"@types/nprogress": "^0.2.3",
|
|
@@ -32,51 +27,58 @@
|
|
|
32
27
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
33
28
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
34
29
|
"@vue/compiler-sfc": "^3.4.38",
|
|
35
|
-
"@vueuse/core": "^11.0.3",
|
|
36
|
-
"axios": "^1.7.5",
|
|
37
|
-
"bytemd": "^1.21.0",
|
|
38
30
|
"chalk": "^5.3.0",
|
|
39
|
-
"
|
|
40
|
-
"cropperjs": "^1.6.2",
|
|
41
|
-
"dayjs": "^1.11.13",
|
|
42
|
-
"echarts": "^5.5.1",
|
|
43
|
-
"echarts-wordcloud": "^2.1.0",
|
|
44
|
-
"element-plus": "^2.8.4",
|
|
31
|
+
"element-plus": "^2.13.1",
|
|
45
32
|
"eslint": "^8.57.0",
|
|
46
33
|
"eslint-config-prettier": "^9.1.0",
|
|
47
34
|
"eslint-plugin-prettier": "^5.2.1",
|
|
48
35
|
"eslint-plugin-vue": "^9.27.0",
|
|
49
36
|
"esno": "^4.7.0",
|
|
50
|
-
"exceljs": "^4.4.0",
|
|
51
37
|
"execa": "^9.3.1",
|
|
52
|
-
"github-markdown-css": "^5.6.1",
|
|
53
|
-
"highlight.js": "^11.10.0",
|
|
54
|
-
"jsbarcode": "^3.11.6",
|
|
55
|
-
"lodash-es": "^4.17.21",
|
|
56
|
-
"monaco-editor": "^0.51.0",
|
|
57
|
-
"nprogress": "^0.2.0",
|
|
58
38
|
"p-limit": "^6.1.0",
|
|
59
|
-
"pinia": "^2.2.2",
|
|
60
39
|
"postcss": "^8.4.41",
|
|
61
40
|
"prettier": "^3.3.3",
|
|
62
41
|
"rimraf": "^6.0.1",
|
|
63
42
|
"sass": "^1.77.8",
|
|
64
|
-
"sortablejs": "^1.15.2",
|
|
65
|
-
"tinymce": "^5.10.9",
|
|
66
43
|
"typescript": "^5.5.4",
|
|
67
44
|
"unplugin-vue-components": "^0.27.4",
|
|
68
45
|
"vite": "^5.4.2",
|
|
69
46
|
"vite-plugin-dts": "^3.9.1",
|
|
70
47
|
"vue": "^3.4.38",
|
|
71
|
-
"vue-echarts": "^7.0.3",
|
|
72
48
|
"vue-eslint-parser": "^9.4.3",
|
|
49
|
+
"vue-tsc": "^2.0.29"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@amap/amap-jsapi-loader": "~1.0.1",
|
|
53
|
+
"@ant-design/colors": "~7.1.0",
|
|
54
|
+
"@bytemd/plugin-gfm": "~1.21.0",
|
|
55
|
+
"@bytemd/plugin-highlight": "~1.21.0",
|
|
56
|
+
"@element-plus/icons-vue": "~2.3.1",
|
|
57
|
+
"@vueuse/core": "~11.0.3",
|
|
58
|
+
"axios": "~1.7.5",
|
|
59
|
+
"bytemd": "~1.21.0",
|
|
60
|
+
"countup.js": "~2.8.0",
|
|
61
|
+
"cropperjs": "~1.6.2",
|
|
62
|
+
"dayjs": "~1.11.13",
|
|
63
|
+
"echarts": "~5.5.1",
|
|
64
|
+
"echarts-wordcloud": "~2.1.0",
|
|
65
|
+
"exceljs": "~4.4.0",
|
|
66
|
+
"github-markdown-css": "~5.6.1",
|
|
67
|
+
"highlight.js": "~11.10.0",
|
|
68
|
+
"image-conversion": "^2.1.1",
|
|
69
|
+
"jsbarcode": "~3.11.6",
|
|
70
|
+
"lodash-es": "^4.17.21",
|
|
71
|
+
"monaco-editor": "^0.51.0",
|
|
72
|
+
"nprogress": "^0.2.0",
|
|
73
|
+
"sortablejs": "^1.15.2",
|
|
74
|
+
"tinymce": "^5.10.9",
|
|
75
|
+
"vue-echarts": "^7.0.3",
|
|
73
76
|
"vue-i18n": "^9.14.0",
|
|
74
|
-
"vue-router": "^4.4.3",
|
|
75
|
-
"vue-tsc": "^2.0.29",
|
|
76
77
|
"vuedraggable": "^4.1.0",
|
|
77
78
|
"xgplayer": "^3.0.20",
|
|
78
79
|
"xgplayer-hls": "^3.0.20",
|
|
79
|
-
"xgplayer-music": "^3.0.20"
|
|
80
|
+
"xgplayer-music": "^3.0.20",
|
|
81
|
+
"yuang-framework-ui-common": "^1.0.93"
|
|
80
82
|
},
|
|
81
83
|
"main": "lib/index.cjs",
|
|
82
84
|
"module": "es/index.js",
|
|
@@ -101,11 +103,11 @@
|
|
|
101
103
|
"require": "./lib/index.cjs"
|
|
102
104
|
},
|
|
103
105
|
"./es/icons": {
|
|
104
|
-
"types": "./es/
|
|
106
|
+
"types": "./es/index.d.ts",
|
|
105
107
|
"import": "./es/icons/index.js"
|
|
106
108
|
},
|
|
107
109
|
"./lib/icons": {
|
|
108
|
-
"types": "./lib/
|
|
110
|
+
"types": "./lib/index.d.ts",
|
|
109
111
|
"require": "./lib/icons/index.cjs"
|
|
110
112
|
},
|
|
111
113
|
"./es/icons/*": {
|
|
@@ -186,9 +188,5 @@
|
|
|
186
188
|
"author": "yuang",
|
|
187
189
|
"homepage": "",
|
|
188
190
|
"repository": "",
|
|
189
|
-
"license": ""
|
|
190
|
-
"dependencies": {
|
|
191
|
-
"image-conversion": "^2.1.1",
|
|
192
|
-
"yuang-framework-ui-common": "^1.0.86"
|
|
193
|
-
}
|
|
191
|
+
"license": ""
|
|
194
192
|
}
|