nubomed-ui 2.0.29 → 2.0.31

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.

Potentially problematic release.


This version of nubomed-ui might be problematic. Click here for more details.

@@ -4403,6 +4403,65 @@ var esnext_iterator_for_each = __webpack_require__(3949);
4403
4403
  function camelToKebab(camelCaseStr) {
4404
4404
  return camelCaseStr.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
4405
4405
  }
4406
+ ;// external "ELEMENT"
4407
+ var external_ELEMENT_namespaceObject = require("ELEMENT");
4408
+ ;// ./packages/feedback/nb-notify.js
4409
+ /*
4410
+ * @Author: chenghuan.dong
4411
+ * @Date: 2024-11-12 17:58:53
4412
+ * @LastEditTime: 2024-11-14 09:27:35
4413
+ * @LastEditors: chenghuan.dong
4414
+ * @Description: 对应样式styles/element-ui/notification.scss
4415
+ * @FilePath: \nubomed-ui\packages\feedback\nb-notify.js
4416
+ */
4417
+
4418
+
4419
+ // console.log('1')
4420
+
4421
+ /**
4422
+ * @param {string} obj.type 图标类型, 可选值: success warning error
4423
+ * @param {string} obj.title 标题,支持换行显示,用<br>隔开
4424
+ * @param {string} obj.customClass 自定义样式
4425
+ * @param {string} obj.duration 显示时间, 毫秒。设为 0 则不会自动关闭
4426
+ */
4427
+
4428
+ const nbNotify = obj => {
4429
+ console.log('nbNotify', obj);
4430
+ return (0,external_ELEMENT_namespaceObject.Notification)({
4431
+ duration: obj.duration === undefined ? 2000 : obj.duration,
4432
+ center: true,
4433
+ dangerouslyUseHTMLString: true,
4434
+ showClose: false,
4435
+ customClass: `nb-notification nb-notification--${obj.type} ${obj.customClass ? obj.customClass : ''}`,
4436
+ position: 'top-left',
4437
+ message: obj.message,
4438
+ type: obj.type,
4439
+ offset: 284,
4440
+ onClose: () => {
4441
+ if (obj.onClose) {
4442
+ obj.onClose();
4443
+ }
4444
+ }
4445
+ });
4446
+ };
4447
+
4448
+ // 可直接通过$notify[type]的形式调用
4449
+ const types = ['success', 'warning', 'error'];
4450
+ types.forEach(type => {
4451
+ nbNotify[type] = obj => {
4452
+ if (typeof obj === 'string') {
4453
+ obj = {
4454
+ message: obj
4455
+ };
4456
+ }
4457
+ if (typeof obj === 'object' && obj.title) {
4458
+ obj.message = obj.title;
4459
+ }
4460
+ obj.type = type;
4461
+ return nbNotify(obj);
4462
+ };
4463
+ });
4464
+ /* harmony default export */ var nb_notify = (nbNotify);
4406
4465
  // EXTERNAL MODULE: ./packages/iconfont/iconfont.css
4407
4466
  var iconfont = __webpack_require__(1970);
4408
4467
  ;// ./locale/lang/zh-CN.js
@@ -4535,14 +4594,14 @@ const i18n = function (fn) {
4535
4594
  /*
4536
4595
  * @Author: chenghuan.dong
4537
4596
  * @Date: 2024-11-08 17:23:47
4538
- * @LastEditTime: 2024-11-13 20:24:15
4597
+ * @LastEditTime: 2024-11-13 20:47:32
4539
4598
  * @LastEditors: chenghuan.dong
4540
4599
  * @Description: 主index.js导出全部组件
4541
4600
  * @FilePath: \nubomed-ui\packages\index.js
4542
4601
  */
4543
4602
 
4544
4603
 
4545
- // import nbNotify from './feedback/nb-notify.js'
4604
+
4546
4605
 
4547
4606
  // 使用iconfont图标
4548
4607
 
@@ -4563,7 +4622,7 @@ const install = function (Vue, options = {}) {
4563
4622
  if (install.installed) return;
4564
4623
  components.forEach(component => {
4565
4624
  const name = 'nb-' + camelToKebab(component.name.slice(2));
4566
- const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar']; // , 'nb-header'
4625
+ const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination']; //
4567
4626
  console.log((installNames.includes(name) ? '√ ' : '? ') + name);
4568
4627
  if (installNames.includes(name)) {
4569
4628
  Vue.component('nb-' + camelToKebab(component.name.slice(2)), component);
@@ -4571,7 +4630,7 @@ const install = function (Vue, options = {}) {
4571
4630
  });
4572
4631
 
4573
4632
  // 全局
4574
- // Vue.prototype.$nbNotify = nbNotify
4633
+ Vue.prototype.$nbNotify = nb_notify;
4575
4634
  };
4576
4635
 
4577
4636
  // if (typeof window !== 'undefined' && window.Vue) {
@@ -4583,7 +4642,8 @@ const packages_i18n = locale.i18n;
4583
4642
  install,
4584
4643
  ...components,
4585
4644
  locale: locale,
4586
- i18n: packages_i18n
4645
+ i18n: packages_i18n,
4646
+ nbNotify: nb_notify
4587
4647
  });
4588
4648
  ;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
4589
4649