dpzvc3-ui 3.1.1 → 3.1.3

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/dpzvc3.js CHANGED
@@ -4494,6 +4494,7 @@ __webpack_require__.d(__webpack_exports__, {
4494
4494
  Progress: () => (/* reexport */ components_progress),
4495
4495
  Prompt: () => (/* reexport */ components_prompt),
4496
4496
  RadioBox: () => (/* reexport */ _RadioBox),
4497
+ RadioBoxGroup: () => (/* reexport */ _RadioBoxGroup),
4497
4498
  Rater: () => (/* reexport */ rater),
4498
4499
  SlideBar: () => (/* reexport */ components_slideBar),
4499
4500
  Spinner: () => (/* reexport */ components_spinner),
@@ -4503,10 +4504,8 @@ __webpack_require__.d(__webpack_exports__, {
4503
4504
  TextBar: () => (/* reexport */ Text),
4504
4505
  ToTop: () => (/* reexport */ components_toTop),
4505
4506
  Upload: () => (/* reexport */ components_upload),
4506
- components: () => (/* binding */ components),
4507
4507
  "default": () => (/* binding */ src),
4508
- install: () => (/* binding */ install),
4509
- services: () => (/* binding */ services)
4508
+ install: () => (/* binding */ install)
4510
4509
  });
4511
4510
 
4512
4511
  // EXTERNAL MODULE: external "vue"
@@ -13529,9 +13528,8 @@ var _Number = number_Number;
13529
13528
 
13530
13529
 
13531
13530
 
13532
- var components = {};
13533
13531
  /* ========= 组件集合 ========= */
13534
- var _components = {
13532
+ var components = {
13535
13533
  DpButton: components_button,
13536
13534
  CheckBox: _CheckBox,
13537
13535
  CheckBoxGroup: _CheckBoxGroup,
@@ -13558,35 +13556,6 @@ var _components = {
13558
13556
  Badge: components_badge,
13559
13557
  Card: components_card
13560
13558
  };
13561
- /* typeof _component在ts输出
13562
- // {
13563
- // VButton: typeof VButton
13564
- // CheckBox: typeof CheckBox
13565
- // CheckBoxGroup: typeof CheckBoxGroup
13566
- // }
13567
- 如果直接写[K in keyof _components]报错Type '_components' is not a type. 原因就是 _components 是 值,不是类型。
13568
- • keyof 只能作用在 类型上。
13569
- • 所以必须先用 typeof 变成类型:keyof typeof _components。
13570
- */
13571
- /* ========= 生成 Installable 类型组件集合 ========= */
13572
- // export const components: {
13573
- // [K in keyof typeof _components]: Installable<typeof _components[K]>
13574
- // } = {} as any
13575
- // 遍历给组件加 install
13576
- Object.keys(_components).forEach(function (key) {
13577
- // const component = _components[key as keyof typeof _components] as Installable<
13578
- // typeof _components[keyof typeof _components]
13579
- // >
13580
- var component = _components[key];
13581
- if (component && !component.install) {
13582
- component.install = function (app) {
13583
- // console.log(key, component, '----component----')
13584
- app.component(key, component);
13585
- };
13586
- }
13587
- components[key] = component;
13588
- // console.log(components, '----components----')
13589
- });
13590
13559
  /* ========= 服务组件 ========= */
13591
13560
  var services = {
13592
13561
  Message: components_message,
@@ -13594,40 +13563,41 @@ var services = {
13594
13563
  Prompt: components_prompt,
13595
13564
  Indicator: components_Indicator
13596
13565
  };
13597
- Object.keys(services).forEach(function (key) {
13598
- var service = services[key];
13599
- if (service && !service.install) {
13600
- service.install = function (app) {
13601
- app.config.globalProperties["$".concat(key)] = service;
13566
+ /* ========= 遍历注册组件 ========= */
13567
+ Object.values(components).forEach(function (comp) {
13568
+ if (comp && !comp.install) {
13569
+ comp.install = function (app) {
13570
+ app.component(comp.name, comp);
13571
+ };
13572
+ }
13573
+ });
13574
+ /* ========= 遍历注册服务 ========= */
13575
+ Object.values(services).forEach(function (srv, idx) {
13576
+ if (srv && !srv.install) {
13577
+ var key = Object.keys(services)[idx];
13578
+ srv.install = function (app) {
13579
+ app.config.globalProperties["$".concat(key)] = srv;
13602
13580
  };
13603
13581
  }
13604
13582
  });
13605
13583
  /* ========= 全量 install ========= */
13606
13584
  var install = function install(app) {
13607
- if (!app) {
13608
- console.warn('dpzvc3 install: app is undefined, ensure you are using Vue 3 createApp');
13609
- return;
13610
- }
13611
- // 注册组件
13612
13585
  Object.values(components).forEach(function (comp) {
13613
- if (comp.install) {
13614
- comp.install(app);
13615
- }
13586
+ var _a;
13587
+ (_a = comp.install) === null || _a === void 0 ? void 0 : _a.call(comp, app);
13616
13588
  });
13617
- // 注册服务
13618
13589
  Object.values(services).forEach(function (srv) {
13619
- if (srv.install) {
13620
- srv.install(app);
13621
- }
13590
+ var _a;
13591
+ (_a = srv.install) === null || _a === void 0 ? void 0 : _a.call(srv, app);
13622
13592
  });
13623
13593
  };
13624
13594
  /* ========= 按需导出 ========= */
13625
13595
 
13626
- var DpzVc3 = {
13596
+ /* ========= 默认导出 ========= */
13597
+ var Dpzvc3UI = {
13627
13598
  install: install
13628
13599
  };
13629
- /* ========= 默认导出 ========= */
13630
- /* harmony default export */ const src = (DpzVc3);
13600
+ /* harmony default export */ const src = (Dpzvc3UI);
13631
13601
  })();
13632
13602
 
13633
13603
  /******/ return __webpack_exports__;