@unizhen/ui 0.1.115 → 0.1.117

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.
@@ -8,6 +8,7 @@ export interface InstallOptions {
8
8
  language?: boolean;
9
9
  local?: 'en-US' | 'zh-CN' | 'fr-FR';
10
10
  icons?: any;
11
+ iconDefault?: string;
11
12
  }
12
13
  export interface UzInstance {
13
14
  version: string;
@@ -7,21 +7,12 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
7
7
  type: PropType<string | any>;
8
8
  default: string;
9
9
  };
10
- defaultIcon: {
11
- type: PropType<any>;
12
- default: undefined;
13
- };
14
10
  }>, () => any, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
15
11
  icon: {
16
12
  required: true;
17
13
  type: PropType<string | any>;
18
14
  default: string;
19
15
  };
20
- defaultIcon: {
21
- type: PropType<any>;
22
- default: undefined;
23
- };
24
16
  }>> & Readonly<{}>, {
25
17
  icon: any;
26
- defaultIcon: any;
27
18
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -7,6 +7,7 @@ export declare const commonStore: {
7
7
  language: boolean;
8
8
  lang: Lang;
9
9
  icons: any;
10
+ iconDefault: string;
10
11
  };
11
12
  export declare function fnSetIcons(val: any): void;
12
13
  export declare function fnSetLanguage(val: boolean): void;
@@ -84,23 +84,14 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
84
84
  type: PropType<string | any>;
85
85
  default: string;
86
86
  };
87
- defaultIcon: {
88
- type: PropType<any>;
89
- default: undefined;
90
- };
91
87
  }>, () => any, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
92
88
  icon: {
93
89
  required: true;
94
90
  type: PropType<string | any>;
95
91
  default: string;
96
92
  };
97
- defaultIcon: {
98
- type: PropType<any>;
99
- default: undefined;
100
- };
101
93
  }>> & Readonly<{}>, {
102
94
  icon: any;
103
- defaultIcon: any;
104
95
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
105
96
  NSpin: DefineComponent<ExtractPropTypes<{
106
97
  strokeWidth: NumberConstructor;
@@ -104,23 +104,14 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
104
104
  type: PropType<string | any>;
105
105
  default: string;
106
106
  };
107
- defaultIcon: {
108
- type: PropType<any>;
109
- default: undefined;
110
- };
111
107
  }>, () => any, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
112
108
  icon: {
113
109
  required: true;
114
110
  type: PropType<string | any>;
115
111
  default: string;
116
112
  };
117
- defaultIcon: {
118
- type: PropType<any>;
119
- default: undefined;
120
- };
121
113
  }>> & Readonly<{}>, {
122
114
  icon: any;
123
- defaultIcon: any;
124
115
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
125
116
  NDropdown: DefineComponent<ExtractPropTypes<{
126
117
  readonly theme: PropType< DropdownTheme>;
@@ -145,6 +145,7 @@ declare const __VLS_export: DefineComponent<{}, {
145
145
  language: boolean;
146
146
  lang: "zh-CN" | "en-US" | "fr-FR";
147
147
  icons: any;
148
+ iconDefault: string;
148
149
  };
149
150
  lightTheme: GlobalThemeOverrides;
150
151
  darkTheme: BuiltInGlobalTheme;
package/lib/ui.js CHANGED
@@ -359,10 +359,11 @@ var K = Ge({
359
359
  isMobile: !1,
360
360
  language: !1,
361
361
  lang: "zh-CN",
362
- icons: void 0
362
+ icons: void 0,
363
+ iconDefault: ""
363
364
  });
364
365
  function Vt(e) {
365
- q.icons = e;
366
+ q.icons = e.icons, q.iconDefault = e.iconDefault;
366
367
  }
367
368
  function Ht(e) {
368
369
  q.language = e;
@@ -395,30 +396,24 @@ window.addEventListener("resize", qt), qt();
395
396
  //#region components/icon/index.vue
396
397
  var Jt = d({
397
398
  name: "UzIcon",
398
- props: {
399
- icon: {
400
- required: !0,
401
- type: [String, Object],
402
- default: ""
403
- },
404
- defaultIcon: {
405
- type: [Object],
406
- default: void 0
407
- }
408
- },
399
+ props: { icon: {
400
+ required: !0,
401
+ type: [String, Object],
402
+ default: ""
403
+ } },
409
404
  setup(e) {
410
- let t = w(!0), n = w(), r = (r) => {
411
- if (t.value = !1, r && typeof r == "string") {
405
+ let t = w(!0), n = w(), r = (e) => {
406
+ if (t.value = !1, e && typeof e == "string") {
412
407
  try {
413
408
  let t = q.icons;
414
- Object.keys(t).length > 0 && (t[r] ? n.value = t[r] : t[e.defaultIcon] && (n.value = t[e.defaultIcon]));
409
+ Object.keys(t).length > 0 && (t[e] ? n.value = t[e] : t[q.iconDefault] && (n.value = t[q.iconDefault]));
415
410
  } catch {}
416
411
  h(() => {
417
412
  t.value = !0;
418
413
  });
419
414
  return;
420
415
  }
421
- n.value = r;
416
+ n.value = e;
422
417
  };
423
418
  return r(e.icon), j(() => e.icon, (e) => {
424
419
  r(e);
@@ -7532,7 +7527,7 @@ function Bs(e, t, n) {
7532
7527
  }
7533
7528
  //#endregion
7534
7529
  //#region package.json
7535
- var Vs = "0.1.115", Hs;
7530
+ var Vs = "0.1.117", Hs;
7536
7531
  async function Us() {
7537
7532
  let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
7538
7533
  method: "HEAD",
@@ -7563,8 +7558,11 @@ function Ks({ components: e = [] } = {}) {
7563
7558
  n(r, t, e);
7564
7559
  });
7565
7560
  }), i)) {
7566
- let { title: e = "杭州宇臻智能", monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0 } = i, l = G("theme", !1), u = G("lang", s);
7567
- Kt(e), Ht(o), Ut(u), Wt(l), Vt(c), K.global.locale.value = u, a && Gs(), t && Nn(r, t, n);
7561
+ let { title: e = "杭州宇臻智能", monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u = G("theme", !1), d = G("lang", s);
7562
+ Kt(e), Ht(o), Ut(d), Wt(u), Vt({
7563
+ icons: c,
7564
+ iconDefault: l
7565
+ }), K.global.locale.value = d, a && Gs(), t && Nn(r, t, n);
7568
7566
  }
7569
7567
  }
7570
7568
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unizhen/ui",
3
- "version": "0.1.115",
3
+ "version": "0.1.117",
4
4
  "author": {
5
5
  "name": "Donovan"
6
6
  },