sunyard-szyy-ui 0.2.5 → 0.2.6
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/utils/index.cjs +12 -4
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +12 -4
- package/es/components.d.ts +8 -0
- package/es/components.d.ts.map +1 -0
- package/es/defaults.d.ts +10 -0
- package/es/defaults.d.ts.map +1 -0
- package/es/index.d.ts +12 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.mjs +1 -1
- package/es/make-installer.d.ts +16 -0
- package/es/make-installer.d.ts.map +1 -0
- package/es/make-installer.mjs +1 -0
- package/lib/components.d.ts +8 -0
- package/lib/defaults.d.ts +10 -0
- package/lib/index.d.ts +12 -1
- package/lib/index.js +1 -1
- package/lib/make-installer.d.ts +16 -0
- package/lib/make-installer.js +1 -0
- package/package.json +4 -4
- package/es/components/search-bar/index.mjs +0 -1
- package/es/components/search-bar/style/index.mjs +0 -1
- package/es/search-bar/index.d.ts +0 -2
- package/es/search-bar/index.d.ts.map +0 -1
- package/es/search-bar/style/index.d.ts +0 -4
- package/es/search-bar/style/index.d.ts.map +0 -1
- package/lib/components/search-bar/index.js +0 -1
- package/lib/components/search-bar/style/index.js +0 -1
- package/lib/search-bar/index.d.ts +0 -2
- package/lib/search-bar/style/index.d.ts +0 -4
package/dist/utils/index.cjs
CHANGED
|
@@ -43,8 +43,16 @@ function SunyardSzyyUIResolver(options = {}) {
|
|
|
43
43
|
devMode = false,
|
|
44
44
|
importMetaUrl,
|
|
45
45
|
fileURLToPath,
|
|
46
|
-
dirResolver
|
|
46
|
+
dirResolver,
|
|
47
|
+
disableElementPlusTip = false
|
|
47
48
|
} = options;
|
|
49
|
+
let hasShownTip = false;
|
|
50
|
+
if (!disableElementPlusTip && !hasShownTip) {
|
|
51
|
+
hasShownTip = true;
|
|
52
|
+
console.warn(
|
|
53
|
+
'\n\u26A0\uFE0F [SunyardSzyyUIResolver] \u91CD\u8981\u63D0\u793A\uFF1A\n sunyard-szyy-ui \u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\u4E86 Element Plus \u7EC4\u4EF6\uFF08\u5982 ElButton\u3001ElInput \u7B49\uFF09\n \u4E3A\u4E86\u6B63\u786E\u52A0\u8F7D Element Plus \u7EC4\u4EF6\u7684\u6837\u5F0F\uFF0C\u8BF7\u540C\u65F6\u914D\u7F6E ElementPlusResolver\uFF1A\n\n import { ElementPlusResolver } from "unplugin-vue-components/resolvers";\n\n Components({\n resolvers: [\n ElementPlusResolver(), // Element Plus \u7EC4\u4EF6\n SunyardSzyyUIResolver() // sunyard-szyy-ui \u7EC4\u4EF6\n ]\n })\n\n \u5982\u679C\u5DF2\u914D\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7 disableElementPlusTip: true \u7981\u7528\u6B64\u63D0\u793A\n'
|
|
54
|
+
);
|
|
55
|
+
}
|
|
48
56
|
if (devMode && !dirResolver) {
|
|
49
57
|
if (!importMetaUrl || !fileURLToPath) {
|
|
50
58
|
throw new Error(
|
|
@@ -83,11 +91,11 @@ function SunyardSzyyUIResolver(options = {}) {
|
|
|
83
91
|
};
|
|
84
92
|
if (importStyle) {
|
|
85
93
|
if (importStyle === "css") {
|
|
86
|
-
result.sideEffects = `${
|
|
94
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
|
|
87
95
|
} else if (importStyle === "scss") {
|
|
88
|
-
result.sideEffects = `${
|
|
96
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style`;
|
|
89
97
|
} else if (importStyle === true) {
|
|
90
|
-
result.sideEffects = `${
|
|
98
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
return result;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -99,6 +99,15 @@ interface SunyardSzyyUIResolverOptions {
|
|
|
99
99
|
*/
|
|
100
100
|
stylePath?: string;
|
|
101
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* 是否禁用 Element Plus 依赖提示
|
|
104
|
+
*
|
|
105
|
+
* sunyard-szyy-ui 的组件内部使用了 Element Plus 组件,
|
|
106
|
+
* 需要同时配置 ElementPlusResolver 来按需加载 Element Plus 的样式
|
|
107
|
+
*
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
disableElementPlusTip?: boolean;
|
|
102
111
|
}
|
|
103
112
|
/**
|
|
104
113
|
* sunyard-szyy-ui 组件自动导入 resolver
|
package/dist/utils/index.js
CHANGED
|
@@ -12,8 +12,16 @@ function SunyardSzyyUIResolver(options = {}) {
|
|
|
12
12
|
devMode = false,
|
|
13
13
|
importMetaUrl,
|
|
14
14
|
fileURLToPath,
|
|
15
|
-
dirResolver
|
|
15
|
+
dirResolver,
|
|
16
|
+
disableElementPlusTip = false
|
|
16
17
|
} = options;
|
|
18
|
+
let hasShownTip = false;
|
|
19
|
+
if (!disableElementPlusTip && !hasShownTip) {
|
|
20
|
+
hasShownTip = true;
|
|
21
|
+
console.warn(
|
|
22
|
+
'\n\u26A0\uFE0F [SunyardSzyyUIResolver] \u91CD\u8981\u63D0\u793A\uFF1A\n sunyard-szyy-ui \u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\u4E86 Element Plus \u7EC4\u4EF6\uFF08\u5982 ElButton\u3001ElInput \u7B49\uFF09\n \u4E3A\u4E86\u6B63\u786E\u52A0\u8F7D Element Plus \u7EC4\u4EF6\u7684\u6837\u5F0F\uFF0C\u8BF7\u540C\u65F6\u914D\u7F6E ElementPlusResolver\uFF1A\n\n import { ElementPlusResolver } from "unplugin-vue-components/resolvers";\n\n Components({\n resolvers: [\n ElementPlusResolver(), // Element Plus \u7EC4\u4EF6\n SunyardSzyyUIResolver() // sunyard-szyy-ui \u7EC4\u4EF6\n ]\n })\n\n \u5982\u679C\u5DF2\u914D\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7 disableElementPlusTip: true \u7981\u7528\u6B64\u63D0\u793A\n'
|
|
23
|
+
);
|
|
24
|
+
}
|
|
17
25
|
if (devMode && !dirResolver) {
|
|
18
26
|
if (!importMetaUrl || !fileURLToPath) {
|
|
19
27
|
throw new Error(
|
|
@@ -52,11 +60,11 @@ function SunyardSzyyUIResolver(options = {}) {
|
|
|
52
60
|
};
|
|
53
61
|
if (importStyle) {
|
|
54
62
|
if (importStyle === "css") {
|
|
55
|
-
result.sideEffects = `${
|
|
63
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
|
|
56
64
|
} else if (importStyle === "scss") {
|
|
57
|
-
result.sideEffects = `${
|
|
65
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style`;
|
|
58
66
|
} else if (importStyle === true) {
|
|
59
|
-
result.sideEffects = `${
|
|
67
|
+
result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
70
|
return result;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC;;;GAGG;wBAIE,MAAM,EAAE;AAHb,wBAGc"}
|
package/es/defaults.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAGA;;;GAGG;;;;;AACH,wBAA8C"}
|
package/es/index.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
export { SySearchBar } from '@sunyard-szyy-ui/components';
|
|
3
|
+
export * from '@sunyard-szyy-ui/hooks';
|
|
4
|
+
export * from '@sunyard-szyy-ui/utils';
|
|
5
|
+
export { makeInstaller } from './make-installer';
|
|
6
|
+
export declare const version = "0.2.5";
|
|
7
|
+
export declare const install: (app: App) => void;
|
|
8
|
+
declare const _default: {
|
|
9
|
+
version: string;
|
|
10
|
+
install: (app: App) => void;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
2
13
|
//# sourceMappingURL=index.d.ts.map
|
package/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,eAAO,MAAM,OAAO,UAAU,CAAC;AAM/B,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,SAE/B,CAAC;;;mBAF2B,GAAG;;AAKhC,wBAGE"}
|
package/es/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SySearchBar as e}from"
|
|
1
|
+
import{SySearchBar as e}from"@sunyard-szyy-ui/components";import{SySearchBar as p}from"@sunyard-szyy-ui/components";export*from"@sunyard-szyy-ui/hooks";export*from"@sunyard-szyy-ui/utils";import{makeInstaller as S}from"./make-installer.mjs";const t="0.2.5",a=[e],n=o=>{a.forEach(r=>o.use(r))},c={version:t,install:n};export{p as SySearchBar,c as default,n as install,S as makeInstaller,t as version};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App, Plugin } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 创建组件库安装器
|
|
4
|
+
*
|
|
5
|
+
* @param components - 组件列表
|
|
6
|
+
* @returns 包含 install 方法的插件对象
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const installer = makeInstaller([SySearchBar, SyButton]);
|
|
10
|
+
* app.use(installer);
|
|
11
|
+
*/
|
|
12
|
+
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
13
|
+
version: string;
|
|
14
|
+
install: (app: App) => void;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=make-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-installer.d.ts","sourceRoot":"","sources":["../src/make-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAIvC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAI,aAAY,MAAM,EAAO;;mBAC/B,GAAG;CAc1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),l=(r=[])=>({version:"0.2.5",install:t=>{t[n]||(t[n]=!0,r.forEach(e=>t.use(e)))}});export{l as makeInstaller};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
export { SySearchBar } from '@sunyard-szyy-ui/components';
|
|
3
|
+
export * from '@sunyard-szyy-ui/hooks';
|
|
4
|
+
export * from '@sunyard-szyy-ui/utils';
|
|
5
|
+
export { makeInstaller } from './make-installer';
|
|
6
|
+
export declare const version = "0.2.5";
|
|
7
|
+
export declare const install: (app: App) => void;
|
|
8
|
+
declare const _default: {
|
|
9
|
+
version: string;
|
|
10
|
+
install: (app: App) => void;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
2
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@sunyard-szyy-ui/components"),t=require("@sunyard-szyy-ui/hooks"),r=require("@sunyard-szyy-ui/utils"),c=require("./make-installer.js"),a="0.2.5",l=[o.SySearchBar],n=e=>{l.forEach(s=>e.use(s))},u={version:a,install:n};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>o.SySearchBar});exports.makeInstaller=c.makeInstaller;exports.default=u;exports.install=n;exports.version=a;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App, Plugin } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 创建组件库安装器
|
|
4
|
+
*
|
|
5
|
+
* @param components - 组件列表
|
|
6
|
+
* @returns 包含 install 方法的插件对象
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const installer = makeInstaller([SySearchBar, SyButton]);
|
|
10
|
+
* app.use(installer);
|
|
11
|
+
*/
|
|
12
|
+
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
13
|
+
version: string;
|
|
14
|
+
install: (app: App) => void;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=make-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=Symbol("SUNYARD_SZYY_UI_INSTALLED"),n=(r=[])=>({version:"0.2.5",install:e=>{e[t]||(e[t]=!0,r.forEach(l=>e.use(l)))}});exports.makeInstaller=n;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunyard-szyy-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"vue": "^3.0.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@sunyard-szyy-ui/components": "0.2.
|
|
77
|
-
"@sunyard-szyy-ui/
|
|
78
|
-
"@sunyard-szyy-ui/
|
|
76
|
+
"@sunyard-szyy-ui/components": "0.2.6",
|
|
77
|
+
"@sunyard-szyy-ui/hooks": "0.2.6",
|
|
78
|
+
"@sunyard-szyy-ui/utils": "0.2.6"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SySearchBar as e}from"../../search-bar/src/search-bar.mjs";export{e as SySearchBar};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"element-plus/es/components/button/style/css";import"element-plus/es/components/input/style/css";import"sunyard-szyy-ui/theme-chalk/src/search-bar.scss";
|
package/es/search-bar/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search-bar/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/search-bar/style/index.ts"],"names":[],"mappings":"AAEA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,iDAAiD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../search-bar/src/search-bar.js");exports.SySearchBar=e.SySearchBar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");require("sunyard-szyy-ui/theme-chalk/src/search-bar.scss");
|