@wfrog/vc-ui 1.1.0 → 1.1.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/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
 
6
6
  组件开发时,依赖的 `vue` 版本是 `^3.5.22`
7
7
 
8
- 组件库所使用 CDN 源为 [jsdelivr](https://www.jsdelivr.com/),并使用了一个自用的函数库 `@wfrog/vc-utils`
8
+ 组件库所使用 CDN 默认源为 [jsdelivr](https://www.jsdelivr.com/),并使用了一个自用的函数库 `@wfrog/vc-utils`
9
9
 
10
- **!!!如果 jsdelivr 无法访问,会导致部分组件失效。解决办法:todo**
10
+ **!!!如果 jsdelivr 无法访问,会导致部分组件失效。解决办法:将 cdn 文件放到自己的服务器上,通过 config-provider 指定地址**
11
11
 
12
12
  ## 组件库依赖
13
13
 
@@ -0,0 +1,209 @@
1
+ const isClient = typeof window !== "undefined";
2
+ const defaultWindow = isClient ? window : void 0;
3
+
4
+ function baseCdnUrl() {
5
+ return {
6
+ jsdelivr: "//cdn.jsdelivr.net/npm",
7
+ // jsdelivr.net
8
+ defaultBase: defaultWindow?.VC?.cdn?.host || "//cdn.staticfile.org",
9
+ localCDN: defaultWindow?.VC?.cdn?.path || "/local-cdn"
10
+ };
11
+ }
12
+ const cdnMapping = {
13
+ // 全屏
14
+ screenfull: (version = "5.2.0") => ({
15
+ version,
16
+ instance: () => defaultWindow && defaultWindow.screenfull,
17
+ source: {
18
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/screenfull@${version}`] },
19
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/screenfull.js/${version}/screenfull.min.js`] },
20
+ localCDN: { js: [`${baseCdnUrl().localCDN}/screenfull/${version}/screenfull.min.js`] }
21
+ }
22
+ }),
23
+ // 复制黏贴
24
+ clipboard: (version = "2.0.8") => ({
25
+ version,
26
+ instance: () => defaultWindow && defaultWindow.ClipboardJS,
27
+ source: {
28
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/clipboard@${version}`] },
29
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/clipboard.js/${version}/clipboard.min.js`] },
30
+ localCDN: { js: [`${baseCdnUrl().localCDN}/clipboard/${version}/clipboard.min.js`] }
31
+ }
32
+ }),
33
+ // 富文本编辑器
34
+ tinymce: (version = "5.8.1") => ({
35
+ version,
36
+ instance: () => defaultWindow && defaultWindow.tinyMCE,
37
+ source: {
38
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/tinymce@${version}`] },
39
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/tinymce/${version}/tinymce.min.js`] },
40
+ localCDN: { js: [`${baseCdnUrl().localCDN}/tinymce/${version}/tinymce.min.js`] }
41
+ }
42
+ }),
43
+ // 二维码生成
44
+ QRCode: (version = "1.5.1") => ({
45
+ version,
46
+ instance: () => defaultWindow && defaultWindow.QRCode,
47
+ source: {
48
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/qrcode@${version}/build/qrcode.min.js`] },
49
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/qrcodejs/${version}/qrcode.min.js`] },
50
+ localCDN: { js: [`${baseCdnUrl().localCDN}/qrcode/${version}/qrcode.min.js`] }
51
+ }
52
+ }),
53
+ // 千分位
54
+ cleave: (version = "1.6.0") => ({
55
+ version,
56
+ instance: () => defaultWindow && defaultWindow.Cleave,
57
+ source: {
58
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/cleave.js@${version}`] },
59
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/cleave.js/${version}/cleave.min.js`] },
60
+ localCDN: { js: [`${baseCdnUrl().localCDN}/cleave/${version}/cleave.min.js`] }
61
+ }
62
+ }),
63
+ // fontawesome 全量css版本
64
+ fontawesomeCss: (version = "7.1.0") => ({
65
+ version,
66
+ instance: () => window,
67
+ source: {
68
+ jsdelivr: { js: [], css: [`${baseCdnUrl().jsdelivr}/@fortawesome/fontawesome-free@${version}/css/all.min.css`] },
69
+ defaultBase: { js: [], css: [`${baseCdnUrl().defaultBase}/font-awesome/${version}/css/all.min.css`] },
70
+ localCDN: { js: [], css: [`${baseCdnUrl().localCDN}/font-awesome/${version}/css/all.min.css`] }
71
+ }
72
+ }),
73
+ // fontawesome 全量js版本
74
+ fontawesomeJs: (version = "7.1.0") => ({
75
+ version,
76
+ instance: () => window,
77
+ source: {
78
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/@fortawesome/fontawesome-free@${version}/js/all.min.js`] },
79
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/font-awesome/${version}/js/all.min.js`] },
80
+ localCDN: { js: [`${baseCdnUrl().localCDN}/font-awesome/${version}/js/all.min.js`] }
81
+ }
82
+ }),
83
+ cropper: (version = "1.5.12") => ({
84
+ version,
85
+ instance: () => defaultWindow && defaultWindow.Cropper,
86
+ source: {
87
+ jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/cropperjs@${version}`], css: [`${baseCdnUrl().jsdelivr}/cropperjs@${version}/dist/cropper.min.css`] },
88
+ defaultBase: { js: [`${baseCdnUrl().defaultBase}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl().defaultBase}/cropperjs/${version}/cropper.min.css`] },
89
+ localCDN: { js: [`${baseCdnUrl().localCDN}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl().localCDN}/cropperjs/${version}/cropper.min.css`] }
90
+ }
91
+ }),
92
+ // flagIcons
93
+ flagIcons: (version = "6.6.6") => ({
94
+ version,
95
+ instance: () => window,
96
+ source: {
97
+ jsdelivr: { js: [], css: [`${baseCdnUrl().jsdelivr}/flag-icons@${version}/css/flag-icons.min.css`] },
98
+ defaultBase: { js: [], css: [`${baseCdnUrl().defaultBase}/flag-icons/${version}/css/flag-icons.min.css`] },
99
+ localCDN: { js: [], css: [`${baseCdnUrl().localCDN}/flag-icons/${version}/css/flag-icons.min.css`] }
100
+ }
101
+ })
102
+ };
103
+ function cdnSource(name, version) {
104
+ const cdnName = defaultWindow?.VC?.cdn?.name || "jsdelivr";
105
+ const resource = cdnMapping[name];
106
+ if (!resource) {
107
+ const defaultResource = {
108
+ instance: () => ({}),
109
+ js: [`${baseCdnUrl().defaultBase}/${cdnName}.js/${version}/${cdnName}.min.js`],
110
+ css: [`${baseCdnUrl().defaultBase}/${cdnName}/${version}/${cdnName}.min.css`]
111
+ };
112
+ return defaultResource;
113
+ }
114
+ const item = resource(version);
115
+ return Object.assign({ instance: void 0, js: [], css: [], version: "" }, { ...item.source[cdnName], instance: item.instance, version: item.version });
116
+ }
117
+
118
+ const FLAG_LOADEED = "yes";
119
+ function isScriptLoaded(url) {
120
+ const script = url && document.querySelector(`script[src="${url}"]`);
121
+ return !!(script && script.dataset.loader === FLAG_LOADEED);
122
+ }
123
+ function getScript(url) {
124
+ const script = url && document.querySelector(`script[src="${url}"]`);
125
+ return script && !script.dataset.loader ? script : null;
126
+ }
127
+ const isCssLoaded = (url) => !!(url && document.querySelector(`link[href="${url}"]`));
128
+ function loadScriptSingle(url) {
129
+ return new Promise((resolve, reject) => {
130
+ if (isScriptLoaded(url)) {
131
+ resolve(true);
132
+ } else {
133
+ const myScript = getScript(url);
134
+ if (!myScript) {
135
+ const head = document.getElementsByTagName("head")[0];
136
+ const script = document.createElement("script");
137
+ script.type = "text/javascript";
138
+ script.src = url;
139
+ script.onload = () => {
140
+ script.dataset.loaded = FLAG_LOADEED;
141
+ resolve(true);
142
+ };
143
+ script.onerror = () => {
144
+ head.removeChild(script);
145
+ reject(new Error("load failed"));
146
+ };
147
+ head.appendChild(script);
148
+ } else {
149
+ const timeout = 1e4;
150
+ const interval = 10;
151
+ let times = 0;
152
+ const timer = setInterval(() => {
153
+ times += interval;
154
+ if (times >= timeout) {
155
+ clearInterval(timer);
156
+ reject(new Error("time out!"));
157
+ }
158
+ if (myScript.dataset.loaded === FLAG_LOADEED) {
159
+ clearInterval(timer);
160
+ resolve(true);
161
+ }
162
+ }, interval);
163
+ }
164
+ }
165
+ });
166
+ }
167
+ async function loadScript(urls, options = { sequence: true }) {
168
+ if (options.sequence) {
169
+ try {
170
+ for (let i = 0; i < urls.length; i += 1) {
171
+ await loadScriptSingle(urls[i]);
172
+ }
173
+ return Promise.resolve(true);
174
+ } catch (e) {
175
+ return Promise.reject(e);
176
+ }
177
+ }
178
+ return Promise.all(urls.map((url) => loadScriptSingle(url)));
179
+ }
180
+ function loadCss(urls) {
181
+ const head = document.getElementsByTagName("head")[0];
182
+ urls.filter((url) => !isCssLoaded(url)).forEach((url) => {
183
+ const link = document.createElement("link");
184
+ link.type = "text/css";
185
+ link.rel = "stylesheet";
186
+ link.href = url;
187
+ head.appendChild(link);
188
+ });
189
+ }
190
+ function loadCdnSingle(name, version) {
191
+ const { js = [], css, instance } = cdnSource(name, version) || {};
192
+ Array.isArray(css) && css.length > 0 && loadCss(css);
193
+ return new Promise((resolve, reject) => {
194
+ loadScript(js).then(() => resolve(instance?.())).catch(() => reject(new Error(`加载 ${name} 失败`)));
195
+ });
196
+ }
197
+ const loadCdn = (names) => Promise.all(names.map((name) => loadCdnSingle(name)));
198
+ const index = {
199
+ loadScriptSingle,
200
+ loadScript,
201
+ loadCss,
202
+ loadCdnSingle,
203
+ loadCdn,
204
+ baseCdnUrl,
205
+ cdnMapping,
206
+ cdnSource
207
+ };
208
+
209
+ export { index as i };
@@ -1,209 +1,3 @@
1
- const isClient = typeof window !== "undefined";
2
- const defaultWindow = isClient ? window : void 0;
3
-
4
- const baseCdnUrl = {
5
- jsdelivr: "//cdn.jsdelivr.net/npm",
6
- // jsdelivr.net
7
- defaultBase: defaultWindow?.vc?.cdn?.host || "//cdn.staticfile.org",
8
- localCDN: defaultWindow?.vc?.cdn?.path || "/local-cdn"
9
- };
10
- const cdnMapping = {
11
- // 全屏
12
- screenfull: (version = "5.2.0") => ({
13
- version,
14
- instance: () => defaultWindow && defaultWindow.screenfull,
15
- source: {
16
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/screenfull@${version}`] },
17
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/screenfull.js/${version}/screenfull.min.js`] },
18
- localCDN: { js: [`${baseCdnUrl.localCDN}/screenfull/${version}/screenfull.min.js`] }
19
- }
20
- }),
21
- // 复制黏贴
22
- clipboard: (version = "2.0.8") => ({
23
- version,
24
- instance: () => defaultWindow && defaultWindow.ClipboardJS,
25
- source: {
26
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/clipboard@${version}`] },
27
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/clipboard.js/${version}/clipboard.min.js`] },
28
- localCDN: { js: [`${baseCdnUrl.localCDN}/clipboard/${version}/clipboard.min.js`] }
29
- }
30
- }),
31
- // 富文本编辑器
32
- tinymce: (version = "5.8.1") => ({
33
- version,
34
- instance: () => defaultWindow && defaultWindow.tinyMCE,
35
- source: {
36
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/tinymce@${version}`] },
37
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/tinymce/${version}/tinymce.min.js`] },
38
- localCDN: { js: [`${baseCdnUrl.localCDN}/tinymce/${version}/tinymce.min.js`] }
39
- }
40
- }),
41
- // 二维码生成
42
- QRCode: (version = "1.5.1") => ({
43
- version,
44
- instance: () => defaultWindow && defaultWindow.QRCode,
45
- source: {
46
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/qrcode@${version}/build/qrcode.min.js`] },
47
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/qrcodejs/${version}/qrcode.min.js`] },
48
- localCDN: { js: [`${baseCdnUrl.localCDN}/qrcode/${version}/qrcode.min.js`] }
49
- }
50
- }),
51
- // 千分位
52
- cleave: (version = "1.6.0") => ({
53
- version,
54
- instance: () => defaultWindow && defaultWindow.Cleave,
55
- source: {
56
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/cleave.js@${version}`] },
57
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/cleave.js/${version}/cleave.min.js`] },
58
- localCDN: { js: [`${baseCdnUrl.localCDN}/cleave/${version}/cleave.min.js`] }
59
- }
60
- }),
61
- // fontawesome 全量css版本
62
- fontawesomeCss: (version = "6.1.2") => ({
63
- version,
64
- instance: () => window,
65
- source: {
66
- jsdelivr: { js: [], css: [`${baseCdnUrl.jsdelivr}/@fortawesome/fontawesome-free@${version}/css/all.min.css`] },
67
- defaultBase: { js: [], css: [`${baseCdnUrl.defaultBase}/font-awesome/${version}/css/all.min.css`] },
68
- localCDN: { js: [], css: [`${baseCdnUrl.localCDN}/font-awesome/${version}/css/all.min.css`] }
69
- }
70
- }),
71
- // fontawesome 全量js版本
72
- fontawesomeJs: (version = "6.1.2") => ({
73
- version,
74
- instance: () => window,
75
- source: {
76
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/@fortawesome/fontawesome-free@${version}/js/all.min.js`] },
77
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/font-awesome/${version}/js/all.min.js`] },
78
- localCDN: { js: [`${baseCdnUrl.localCDN}/font-awesome/${version}/js/all.min.js`] }
79
- }
80
- }),
81
- cropper: (version = "1.5.12") => ({
82
- version,
83
- instance: () => defaultWindow && defaultWindow.Cropper,
84
- source: {
85
- jsdelivr: { js: [`${baseCdnUrl.jsdelivr}/cropperjs@${version}`], css: [`${baseCdnUrl.jsdelivr}/cropperjs@${version}/dist/cropper.min.css`] },
86
- defaultBase: { js: [`${baseCdnUrl.defaultBase}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl.defaultBase}/cropperjs/${version}/cropper.min.css`] },
87
- localCDN: { js: [`${baseCdnUrl.localCDN}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl.localCDN}/cropperjs/${version}/cropper.min.css`] }
88
- }
89
- }),
90
- // flagIcons
91
- flagIcons: (version = "6.6.6") => ({
92
- version,
93
- instance: () => window,
94
- source: {
95
- jsdelivr: { js: [], css: [`${baseCdnUrl.jsdelivr}/flag-icons@${version}/css/flag-icons.min.css`] },
96
- defaultBase: { js: [], css: [`${baseCdnUrl.defaultBase}/flag-icons/${version}/css/flag-icons.min.css`] },
97
- localCDN: { js: [], css: [`${baseCdnUrl.localCDN}/flag-icons/${version}/css/flag-icons.min.css`] }
98
- }
99
- })
100
- };
101
- function cdnSource(name, version) {
102
- const cdnName = defaultWindow?.vc?.cdn?.name || "jsdelivr";
103
- const resource = cdnMapping[name];
104
- if (!resource) {
105
- const defaultResource = {
106
- instance: () => ({}),
107
- js: [`${baseCdnUrl.defaultBase}/${cdnName}.js/${version}/${cdnName}.min.js`],
108
- css: [`${baseCdnUrl.defaultBase}/${cdnName}/${version}/${cdnName}.min.css`]
109
- };
110
- return defaultResource;
111
- }
112
- const item = resource(version);
113
- return Object.assign({ instance: void 0, js: [], css: [], version: "" }, { ...item.source[cdnName], instance: item.instance, version: item.version });
114
- }
115
-
116
- const FLAG_LOADEED = "yes";
117
- function isScriptLoaded(url) {
118
- const script = url && document.querySelector(`script[src="${url}"]`);
119
- return !!(script && script.dataset.loader === FLAG_LOADEED);
120
- }
121
- function getScript(url) {
122
- const script = url && document.querySelector(`script[src="${url}"]`);
123
- return script && !script.dataset.loader ? script : null;
124
- }
125
- const isCssLoaded = (url) => !!(url && document.querySelector(`link[href="${url}"]`));
126
- function loadScriptSingle(url) {
127
- return new Promise((resolve, reject) => {
128
- if (isScriptLoaded(url)) {
129
- resolve(true);
130
- } else {
131
- const myScript = getScript(url);
132
- if (!myScript) {
133
- const head = document.getElementsByTagName("head")[0];
134
- const script = document.createElement("script");
135
- script.type = "text/javascript";
136
- script.src = url;
137
- script.onload = () => {
138
- script.dataset.loaded = FLAG_LOADEED;
139
- resolve(true);
140
- };
141
- script.onerror = () => {
142
- head.removeChild(script);
143
- reject(new Error("load failed"));
144
- };
145
- head.appendChild(script);
146
- } else {
147
- const timeout = 1e4;
148
- const interval = 10;
149
- let times = 0;
150
- const timer = setInterval(() => {
151
- times += interval;
152
- if (times >= timeout) {
153
- clearInterval(timer);
154
- reject(new Error("time out!"));
155
- }
156
- if (myScript.dataset.loaded === FLAG_LOADEED) {
157
- clearInterval(timer);
158
- resolve(true);
159
- }
160
- }, interval);
161
- }
162
- }
163
- });
164
- }
165
- async function loadScript(urls, options = { sequence: true }) {
166
- if (options.sequence) {
167
- try {
168
- for (let i = 0; i < urls.length; i += 1) {
169
- await loadScriptSingle(urls[i]);
170
- }
171
- return Promise.resolve(true);
172
- } catch (e) {
173
- return Promise.reject(e);
174
- }
175
- }
176
- return Promise.all(urls.map((url) => loadScriptSingle(url)));
177
- }
178
- function loadCss(urls) {
179
- const head = document.getElementsByTagName("head")[0];
180
- urls.filter((url) => !isCssLoaded(url)).forEach((url) => {
181
- const link = document.createElement("link");
182
- link.type = "text/css";
183
- link.rel = "stylesheet";
184
- link.href = url;
185
- head.appendChild(link);
186
- });
187
- }
188
- function loadCdnSingle(name, version) {
189
- const { js = [], css, instance } = cdnSource(name, version) || {};
190
- Array.isArray(css) && css.length > 0 && loadCss(css);
191
- return new Promise((resolve, reject) => {
192
- loadScript(js).then(() => resolve(instance?.())).catch(() => reject(new Error(`加载 ${name} 失败`)));
193
- });
194
- }
195
- const loadCdn = (names) => Promise.all(names.map((name) => loadCdnSingle(name)));
196
- const index$1 = {
197
- loadScriptSingle,
198
- loadScript,
199
- loadCss,
200
- loadCdnSingle,
201
- loadCdn,
202
- baseCdnUrl,
203
- cdnMapping,
204
- cdnSource
205
- };
206
-
207
1
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
208
2
 
209
3
  function getDefaultExportFromCjs (x) {
@@ -3446,4 +3240,4 @@ const index = {
3446
3240
  info
3447
3241
  };
3448
3242
 
3449
- export { index as a, index$1 as i };
3243
+ export { index as i };
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed, onMounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref } from 'vue';
2
- import { i as index } from '../../chunk/DaCDeO95.mjs';
2
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
3
+ import '../../chunk/D9iEroQw.mjs';
3
4
 
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "awesome-icon",
@@ -11,6 +11,7 @@ export interface IConfigProviderProps {
11
11
  iconfontUrl?: string;
12
12
  pcaBaseUrl?: string;
13
13
  crosProxy?: string;
14
+ localCdn?: string;
14
15
  }
15
16
  export declare const KEY_NAME: unique symbol;
16
17
  export declare const injectConfig: () => IConfigProviderProps;
@@ -1,5 +1,6 @@
1
- import { defineComponent, onMounted, renderSlot } from 'vue';
2
- import { i as index } from '../../chunk/DaCDeO95.mjs';
1
+ import { defineComponent, onBeforeMount, renderSlot } from 'vue';
2
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
3
+ import '../../chunk/D9iEroQw.mjs';
3
4
  import { useProvide } from '../../use/useStore/index.mjs';
4
5
  import { K as KEY_NAME } from './config-provider2.mjs';
5
6
 
@@ -9,13 +10,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  button: {},
10
11
  iconfontUrl: {},
11
12
  pcaBaseUrl: {},
12
- crosProxy: {}
13
+ crosProxy: {},
14
+ localCdn: {}
13
15
  },
14
16
  setup(__props) {
15
17
  const props = __props;
16
18
  useProvide(KEY_NAME, props);
17
- onMounted(() => {
18
- if (!window.VC?.isSVGIconLock && props.iconfontUrl) {
19
+ onBeforeMount(() => {
20
+ if (!window.VC) {
21
+ window.VC = {};
22
+ }
23
+ if (props.localCdn) {
24
+ window.VC.cdn = { name: "localCDN", path: props.localCdn };
25
+ }
26
+ if (!window.VC.isSVGIconLock && props.iconfontUrl) {
19
27
  window.VC = { ...window.VC, isSVGIconLock: true };
20
28
  index.loadScriptSingle(props.iconfontUrl);
21
29
  }
@@ -4,7 +4,8 @@ import { v as vLoading } from '../../chunk/BHsNc7jl.mjs';
4
4
  import { E as ElSpace } from '../../chunk/Cu6erWl4.mjs';
5
5
  import { E as ElButton } from '../../chunk/D0LB3gF-.mjs';
6
6
  import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createBlock, createCommentVNode, renderSlot, withCtx, resolveDynamicComponent, ref, useTemplateRef, shallowRef, watch, nextTick, onMounted, onUnmounted, withDirectives, isRef, createElementVNode, normalizeStyle, createVNode, createTextVNode } from 'vue';
7
- import { i as index$1 } from '../../chunk/DaCDeO95.mjs';
7
+ import { i as index$1 } from '../../chunk/BaJ7k5Lg.mjs';
8
+ import '../../chunk/D9iEroQw.mjs';
8
9
  import { C as Component$1 } from '../dialog/dialog.mjs';
9
10
  import { defaultWindow } from '@vueuse/core';
10
11
  import { E as ElIcon } from '../../chunk/cPBw23yt.mjs';
@@ -11,7 +11,7 @@ import { E as ElImage } from '../../chunk/09Ec85_u.mjs';
11
11
  import { ref, defineComponent, useTemplateRef, reactive, computed, watch, createBlock, openBlock, unref, isRef, withCtx, withDirectives, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createVNode, vShow, createElementVNode, Transition, Fragment, renderList, createTextVNode } from 'vue';
12
12
  import { Camera, Upload } from '@element-plus/icons-vue';
13
13
  import { C as Component$3, i as index } from '../cropper/cropper.mjs';
14
- import '../../chunk/DaCDeO95.mjs';
14
+ import '../../chunk/D9iEroQw.mjs';
15
15
  import { C as Component$1 } from '../dialog/dialog.mjs';
16
16
  import { C as Component$2 } from '../upload-file/upload-file.mjs';
17
17
  import { useUserMedia } from '@vueuse/core';
@@ -4,7 +4,8 @@ import { E as ElInput } from '../../chunk/C7wQNvSS.mjs';
4
4
  import { E as ElButton } from '../../chunk/D0LB3gF-.mjs';
5
5
  import { defineComponent, useTemplateRef, ref, computed, watch, nextTick, onMounted, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeStyle, normalizeClass, createVNode, withKeys, createTextVNode } from 'vue';
6
6
  import { Search } from '@element-plus/icons-vue';
7
- import { i as index } from '../../chunk/DaCDeO95.mjs';
7
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
8
+ import '../../chunk/D9iEroQw.mjs';
8
9
  import { C as Component$1 } from '../dialog/dialog.mjs';
9
10
  import { defaultDocument } from '@vueuse/core';
10
11
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
@@ -3,7 +3,7 @@ import { defineComponent, useCssVars, unref, computed, ref, createElementBlock,
3
3
  import { useVModel } from '@vueuse/core';
4
4
  import '../../chunk/DRoyW749.mjs';
5
5
  import { CircleCheck, DArrowRight, Refresh } from '@element-plus/icons-vue';
6
- import '../../chunk/DaCDeO95.mjs';
6
+ import '../../chunk/D9iEroQw.mjs';
7
7
  import { E as ElIcon } from '../../chunk/cPBw23yt.mjs';
8
8
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
9
9
 
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed, onBeforeMount, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref } from 'vue';
2
- import { i as index } from '../../chunk/DaCDeO95.mjs';
2
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
3
+ import '../../chunk/D9iEroQw.mjs';
3
4
 
4
5
  const codeMapping = { AFG: "AF", ALB: "AL", DZA: "DZ", ASM: "AS", AND: "AD", AGO: "AO", AIA: "AI", ATA: "AQ", ATG: "AG", ARG: "AR", ARM: "AM", ABW: "AW", AUS: "AU", AUT: "AT", AZE: "AZ", BHS: "BS", BHR: "BH", BGD: "BD", BRB: "BB", BLR: "BY", BEL: "BE", BLZ: "BZ", BEN: "BJ", BMU: "BM", BTN: "BT", BOL: "BO", BES: "BQ", BIH: "BA", BWA: "BW", BVT: "BV", BRA: "BR", IOT: "IO", BRN: "BN", BGR: "BG", BFA: "BF", BDI: "BI", CPV: "CV", KHM: "KH", CMR: "CM", CAN: "CA", CYM: "KY", CAF: "CF", TCD: "TD", CHL: "CL", CHN: "CN", CXR: "CX", CCK: "CC", COL: "CO", COM: "KM", COD: "CD", COG: "CG", COK: "CK", CRI: "CR", HRV: "HR", CUB: "CU", CUW: "CW", CYP: "CY", CZE: "CZ", CIV: "CI", DNK: "DK", DJI: "DJ", DMA: "DM", DOM: "DO", ECU: "EC", EGY: "EG", SLV: "SV", GNQ: "GQ", ERI: "ER", EST: "EE", SWZ: "SZ", ETH: "ET", FLK: "FK", FRO: "FO", FJI: "FJ", FIN: "FI", FRA: "FR", GUF: "GF", PYF: "PF", ATF: "TF", GAB: "GA", GMB: "GM", GEO: "GE", DEU: "DE", GHA: "GH", GIB: "GI", GRC: "GR", GRL: "GL", GRD: "GD", GLP: "GP", GUM: "GU", GTM: "GT", GGY: "GG", GIN: "GN", GNB: "GW", GUY: "GY", HTI: "HT", HMD: "HM", VAT: "VA", HND: "HN", HKG: "HK", HUN: "HU", ISL: "IS", IND: "IN", IDN: "ID", IRN: "IR", IRQ: "IQ", IRL: "IE", IMN: "IM", ISR: "IL", ITA: "IT", JAM: "JM", JPN: "JP", JEY: "JE", JOR: "JO", KAZ: "KZ", KEN: "KE", KIR: "KI", PRK: "KP", KOR: "KR", KWT: "KW", KGZ: "KG", LAO: "LA", LVA: "LV", LBN: "LB", LSO: "LS", LBR: "LR", LBY: "LY", LIE: "LI", LTU: "LT", LUX: "LU", MAC: "MO", MDG: "MG", MWI: "MW", MYS: "MY", MDV: "MV", MLI: "ML", MLT: "MT", MHL: "MH", MTQ: "MQ", MRT: "MR", MUS: "MU", MYT: "YT", MEX: "MX", FSM: "FM", MDA: "MD", MCO: "MC", MNG: "MN", MNE: "ME", MSR: "MS", MAR: "MA", MOZ: "MZ", MMR: "MM", NAM: "NA", NRU: "NR", NPL: "NP", NLD: "NL", NCL: "NC", NZL: "NZ", NIC: "NI", NER: "NE", NGA: "NG", NIU: "NU", NFK: "NF", MKD: "MK", MNP: "MP", NOR: "NO", OMN: "OM", PAK: "PK", PLW: "PW", PSE: "PS", PAN: "PA", PNG: "PG", PRY: "PY", PER: "PE", PHL: "PH", PCN: "PN", POL: "PL", PRT: "PT", PRI: "PR", QAT: "QA", ROU: "RO", RUS: "RU", RWA: "RW", REU: "RE", BLM: "BL", SHN: "SH", KNA: "KN", LCA: "LC", MAF: "MF", SPM: "PM", VCT: "VC", WSM: "WS", SMR: "SM", STP: "ST", SAU: "SA", SEN: "SN", SRB: "RS", SYC: "SC", SLE: "SL", SGP: "SG", SXM: "SX", SVK: "SK", SVN: "SI", SLB: "SB", SOM: "SO", ZAF: "ZA", SGS: "GS", SSD: "SS", ESP: "ES", LKA: "LK", SDN: "SD", SUR: "SR", SJM: "SJ", SWE: "SE", CHE: "CH", SYR: "SY", TJK: "TJ", TZA: "TZ", THA: "TH", TLS: "TL", TGO: "TG", TKL: "TK", TON: "TO", TTO: "TT", TUN: "TN", TKM: "TM", TCA: "TC", TUV: "TV", TUR: "TR", UGA: "UG", UKR: "UA", ARE: "AE", GBR: "GB", UMI: "UM", USA: "US", URY: "UY", UZB: "UZ", VUT: "VU", VEN: "VE", VNM: "VN", VGB: "VG", VIR: "VI", WLF: "WF", ESH: "EH", YEM: "YE", ZMB: "ZM", ZWE: "ZW", ALA: "AX" };
5
6
 
@@ -11,7 +11,7 @@ import { defineComponent, inject, computed, createBlock, openBlock, resolveDynam
11
11
  import { useInject, useProvide } from '../../use/useStore/index.mjs';
12
12
  import { i as injectConfig } from '../config-provider/config-provider2.mjs';
13
13
  import { isClient, useEventListener, useStorage, useVModel, useToggle, onClickOutside, useThrottleFn } from '@vueuse/core';
14
- import { a as index } from '../../chunk/DaCDeO95.mjs';
14
+ import { i as index } from '../../chunk/D9iEroQw.mjs';
15
15
  import { b as baseFlatten } from '../../chunk/BpqBBo4z.mjs';
16
16
  import { a as arrayMap, b as isArray } from '../../chunk/NQBKROII.mjs';
17
17
  import { b as baseIteratee } from '../../chunk/DZD-YnCt.mjs';
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, useTemplateRef, onMounted, createBlock, openBlock, resolveDynamicComponent } from 'vue';
2
- import { i as index } from '../../chunk/DaCDeO95.mjs';
2
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
3
+ import '../../chunk/D9iEroQw.mjs';
3
4
 
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "qr-code",
@@ -2,7 +2,8 @@ import './index.css'
2
2
  import '../../chunk/DRoyW749.mjs';
3
3
  import { v as vLoading } from '../../chunk/BHsNc7jl.mjs';
4
4
  import { defineComponent, computed, ref, shallowRef, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, renderSlot, createBlock, withCtx, createElementVNode } from 'vue';
5
- import { i as index } from '../../chunk/DaCDeO95.mjs';
5
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
6
+ import '../../chunk/D9iEroQw.mjs';
6
7
  import { C as Component$1 } from '../svg-icon/svg-icon.mjs';
7
8
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
8
9
 
@@ -1,6 +1,7 @@
1
1
  import './index.css'
2
2
  import { defineComponent, useTemplateRef, computed, ref, watch, nextTick, withDirectives, createCommentVNode, unref, createBlock, openBlock, mergeProps, isRef, createSlots, withCtx, renderSlot } from 'vue';
3
- import { i as index } from '../../chunk/DaCDeO95.mjs';
3
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
4
+ import '../../chunk/D9iEroQw.mjs';
4
5
  import { C as Component$1 } from '../input/input.mjs';
5
6
  import { i as isEqual } from '../../chunk/BsLJxiSC.mjs';
6
7
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
@@ -1,7 +1,7 @@
1
1
  /* source: src/components/tinymce/tinymce.vue */
2
2
  ._tinymce_aa7a3_1 {
3
3
  width: 100%;
4
- height: var(--v495b57ca);
4
+ height: var(--v5564112e);
5
5
  }
6
6
  ._textarea_aa7a3_6 {
7
7
  z-index: -1;
@@ -2,7 +2,8 @@ import './index.css'
2
2
  import '../../chunk/DRoyW749.mjs';
3
3
  import { v as vLoading } from '../../chunk/BHsNc7jl.mjs';
4
4
  import { defineComponent, useCssVars, shallowRef, ref, computed, watch, onMounted, onBeforeUnmount, withDirectives, createElementBlock, openBlock, normalizeClass, createElementVNode, unref } from 'vue';
5
- import { i as index } from '../../chunk/DaCDeO95.mjs';
5
+ import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
6
+ import '../../chunk/D9iEroQw.mjs';
6
7
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
7
8
 
8
9
  const mini = {
@@ -49,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
50
  emits: ["update:modelValue"],
50
51
  setup(__props, { expose: __expose, emit: __emit }) {
51
52
  useCssVars((_ctx) => ({
52
- "v495b57ca": _ctx.height
53
+ "v5564112e": _ctx.height
53
54
  }));
54
55
  const props = __props;
55
56
  const emits = __emit;
@@ -60,8 +61,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
61
  loading.value = true;
61
62
  Tinymce.value = await index.loadCdnSingle("tinymce");
62
63
  }
63
- const cdnName = window.vc?.cdn.name || "jsdelivr";
64
- const cdnUrl = index.baseCdnUrl[cdnName];
64
+ const cdnName = window.VC?.cdn?.name || "jsdelivr";
65
+ const cdnUrl = index.baseCdnUrl()[cdnName];
65
66
  const version = "5.8.1";
66
67
  let base_url = "";
67
68
  let language_url = "";
@@ -1,7 +1,7 @@
1
1
  import './index.css'
2
2
  import { defineComponent, ref, computed, withDirectives, createBlock, openBlock, unref, normalizeClass, withCtx, createElementBlock, createCommentVNode, renderSlot, Fragment, normalizeStyle, createTextVNode, createVNode, toDisplayString, nextTick } from 'vue';
3
3
  import { C as Component$3, i as index } from '../cropper/cropper.mjs';
4
- import '../../chunk/DaCDeO95.mjs';
4
+ import '../../chunk/D9iEroQw.mjs';
5
5
  import { ElUpload, ElImage, vLoading } from 'element-plus';
6
6
  import { C as Component$2 } from '../button/button.mjs';
7
7
  import { C as Component$1 } from '../el-icon/el-icon.mjs';
package/dist/es/index.mjs CHANGED
@@ -101,7 +101,7 @@ const __vite_glob_0_24 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
101
101
  default: _sfc_main$6
102
102
  }, Symbol.toStringTag, { value: 'Module' }));
103
103
 
104
- const version = "1.1.0";
104
+ const version = "1.1.1";
105
105
 
106
106
  const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/config-provider/config-provider.vue": __vite_glob_0_6,"./components/cropper/cropper.vue": __vite_glob_0_7,"./components/currency/currency.vue": __vite_glob_0_8,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_9,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_10,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_11,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_12,"./components/dialog/dialog.vue": __vite_glob_0_13,"./components/drag-verify/drag-verify.vue": __vite_glob_0_14,"./components/drawer/drawer.vue": __vite_glob_0_15,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_16,"./components/el-icon/el-icon.vue": __vite_glob_0_17,"./components/flag/flag.vue": __vite_glob_0_18,"./components/icon/icon.vue": __vite_glob_0_19,"./components/image/image.vue": __vite_glob_0_20,"./components/input-number/input-number.vue": __vite_glob_0_21,"./components/input/input.vue": __vite_glob_0_22,"./components/pca-picker/pca-picker.vue": __vite_glob_0_23,"./components/qr-code/qr-code.vue": __vite_glob_0_24,"./components/screenfull/screenfull.vue": __vite_glob_0_25,"./components/select/select.vue": __vite_glob_0_26,"./components/single-player/single-player.vue": __vite_glob_0_27,"./components/svg-icon/svg-icon.vue": __vite_glob_0_28,"./components/switch/switch.vue": __vite_glob_0_29,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_30,"./components/tags/tags.vue": __vite_glob_0_31,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_32,"./components/thousand-input/thousand-input.vue": __vite_glob_0_33,"./components/tinymce/tinymce.vue": __vite_glob_0_34,"./components/tree-picker/tree-picker.vue": __vite_glob_0_35,"./components/upload-file/upload-file.vue": __vite_glob_0_36});
107
107
  const upper = (_, letter) => letter.toUpperCase();
package/dist/index.css CHANGED
@@ -907,7 +907,7 @@ span._draggable_1tp7v_5 > * {
907
907
  /* source: src/components/tinymce/tinymce.vue */
908
908
  ._tinymce_aa7a3_1 {
909
909
  width: 100%;
910
- height: var(--v495b57ca);
910
+ height: var(--v5564112e);
911
911
  }
912
912
  ._textarea_aa7a3_6 {
913
913
  z-index: -1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfrog/vc-ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "packageManager": "pnpm@10.20.0",
5
5
  "description": "vue3 组件库 vc-ui",
6
6
  "author": "wellfrog",