@ibiz-template/vue3-util 0.3.5-alpha.0 → 0.3.5
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/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/es/common/code-list/code-list.mjs +2 -1
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +4 -3
- package/package.json +4 -4
- package/src/common/code-list/code-list.tsx +1 -1
- package/src/plugin/plugin-factory/plugin-factory.ts +4 -3
|
@@ -50,13 +50,14 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
watch(() => props.value, (newVal, oldVal) => {
|
|
53
|
+
var _a;
|
|
53
54
|
if (newVal !== oldVal) {
|
|
54
55
|
if (isNil(newVal) || newVal === "") {
|
|
55
56
|
items.value = [];
|
|
56
57
|
} else {
|
|
57
58
|
let values;
|
|
58
59
|
if (typeof newVal === "string") {
|
|
59
|
-
values = newVal.split(",");
|
|
60
|
+
values = newVal.split(((_a = props.codeList) == null ? void 0 : _a.valueSeparator) || ",");
|
|
60
61
|
} else {
|
|
61
62
|
values = [newVal];
|
|
62
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EAEX,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;;;;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,OAAO,CAAC,OAAO,CAAC;IAiBxD;;;;;;;OAOG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC;IAwCnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2DzE;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAuB3C"}
|
|
@@ -221,8 +221,7 @@ class PluginFactory {
|
|
|
221
221
|
);
|
|
222
222
|
if (this.devPackages.has(name)) {
|
|
223
223
|
const fn = this.devPackages.get(name);
|
|
224
|
-
|
|
225
|
-
this.setPluginCode(pluginModule.default);
|
|
224
|
+
data = await fn();
|
|
226
225
|
this.cache.set(scriptUrl, true);
|
|
227
226
|
} else if (ibiz.env.dev) {
|
|
228
227
|
data = await import(
|
|
@@ -284,7 +283,9 @@ class PluginFactory {
|
|
|
284
283
|
if (pathname.endsWith("/") && url.startsWith("/")) {
|
|
285
284
|
url = url.substring(1);
|
|
286
285
|
}
|
|
287
|
-
url
|
|
286
|
+
if (this.urlReg.test(url) === false) {
|
|
287
|
+
url = `${origin}${pathname}${url}`;
|
|
288
|
+
}
|
|
288
289
|
return url;
|
|
289
290
|
}
|
|
290
291
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.3.5
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@ibiz-template/cli": "0.3.2",
|
|
34
|
-
"@ibiz-template/core": "^0.3.
|
|
35
|
-
"@ibiz-template/runtime": "^0.3.5
|
|
34
|
+
"@ibiz-template/core": "^0.3.5",
|
|
35
|
+
"@ibiz-template/runtime": "^0.3.5",
|
|
36
36
|
"@ibiz-template/theme": "^0.3.0",
|
|
37
37
|
"@ibiz/model-core": "^0.0.20",
|
|
38
38
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"vue": "^3.3.4",
|
|
62
62
|
"vue-router": "^4.2.4"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "63087e7d7a9566137cdad2d40b2d37263194a752"
|
|
65
65
|
}
|
|
@@ -69,7 +69,7 @@ export const IBizCodeList = defineComponent({
|
|
|
69
69
|
// 非空值解析代码表
|
|
70
70
|
let values: string[] | number[];
|
|
71
71
|
if (typeof newVal === 'string') {
|
|
72
|
-
values = newVal.split(',');
|
|
72
|
+
values = newVal.split(props.codeList?.valueSeparator || ',');
|
|
73
73
|
} else {
|
|
74
74
|
values = [newVal];
|
|
75
75
|
}
|
|
@@ -255,8 +255,7 @@ export class PluginFactory implements IPluginFactory {
|
|
|
255
255
|
if (this.devPackages.has(name)) {
|
|
256
256
|
const fn = this.devPackages.get(name)!;
|
|
257
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
258
|
-
|
|
259
|
-
this.setPluginCode(pluginModule.default);
|
|
258
|
+
data = (await fn()) as any;
|
|
260
259
|
this.cache.set(scriptUrl, true);
|
|
261
260
|
} else if (ibiz.env.dev) {
|
|
262
261
|
data = await import(scriptUrl /* @vite-ignore */);
|
|
@@ -316,7 +315,9 @@ export class PluginFactory implements IPluginFactory {
|
|
|
316
315
|
if (pathname.endsWith('/') && url.startsWith('/')) {
|
|
317
316
|
url = url.substring(1);
|
|
318
317
|
}
|
|
319
|
-
url
|
|
318
|
+
if (this.urlReg.test(url) === false) {
|
|
319
|
+
url = `${origin}${pathname}${url}`;
|
|
320
|
+
}
|
|
320
321
|
return url;
|
|
321
322
|
}
|
|
322
323
|
}
|