nubomed-ui 2.0.30 → 2.0.31
Sign up to get free protection for your applications and to get access to all the features.
- package/nubomed-ui.common.js +64 -4
- package/nubomed-ui.common.js.map +1 -1
- package/nubomed-ui.umd.js +77 -9
- package/nubomed-ui.umd.js.map +1 -1
- package/nubomed-ui.umd.min.js +1 -1
- package/nubomed-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
package/nubomed-ui.umd.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
-
module.exports = factory();
|
3
|
+
module.exports = factory(require("ELEMENT"));
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
|
-
define([], factory);
|
5
|
+
define(["ELEMENT"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["nubomed-ui"] = factory();
|
7
|
+
exports["nubomed-ui"] = factory(require("ELEMENT"));
|
8
8
|
else
|
9
|
-
root["nubomed-ui"] = factory();
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function() {
|
9
|
+
root["nubomed-ui"] = factory(root["ELEMENT"]);
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__2956__) {
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
12
12
|
/******/ var __webpack_modules__ = ({
|
13
13
|
|
@@ -1906,6 +1906,14 @@ module.exports = __webpack_require__.p + "fonts/iconfont.c068c01a.woff";
|
|
1906
1906
|
|
1907
1907
|
/***/ }),
|
1908
1908
|
|
1909
|
+
/***/ 2956:
|
1910
|
+
/***/ (function(module) {
|
1911
|
+
|
1912
|
+
"use strict";
|
1913
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__2956__;
|
1914
|
+
|
1915
|
+
/***/ }),
|
1916
|
+
|
1909
1917
|
/***/ 9306:
|
1910
1918
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1911
1919
|
|
@@ -4413,6 +4421,65 @@ var esnext_iterator_for_each = __webpack_require__(3949);
|
|
4413
4421
|
function camelToKebab(camelCaseStr) {
|
4414
4422
|
return camelCaseStr.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
4415
4423
|
}
|
4424
|
+
// EXTERNAL MODULE: external "ELEMENT"
|
4425
|
+
var external_ELEMENT_ = __webpack_require__(2956);
|
4426
|
+
;// ./packages/feedback/nb-notify.js
|
4427
|
+
/*
|
4428
|
+
* @Author: chenghuan.dong
|
4429
|
+
* @Date: 2024-11-12 17:58:53
|
4430
|
+
* @LastEditTime: 2024-11-14 09:27:35
|
4431
|
+
* @LastEditors: chenghuan.dong
|
4432
|
+
* @Description: 对应样式styles/element-ui/notification.scss
|
4433
|
+
* @FilePath: \nubomed-ui\packages\feedback\nb-notify.js
|
4434
|
+
*/
|
4435
|
+
|
4436
|
+
|
4437
|
+
// console.log('1')
|
4438
|
+
|
4439
|
+
/**
|
4440
|
+
* @param {string} obj.type 图标类型, 可选值: success warning error
|
4441
|
+
* @param {string} obj.title 标题,支持换行显示,用<br>隔开
|
4442
|
+
* @param {string} obj.customClass 自定义样式
|
4443
|
+
* @param {string} obj.duration 显示时间, 毫秒。设为 0 则不会自动关闭
|
4444
|
+
*/
|
4445
|
+
|
4446
|
+
const nbNotify = obj => {
|
4447
|
+
console.log('nbNotify', obj);
|
4448
|
+
return (0,external_ELEMENT_.Notification)({
|
4449
|
+
duration: obj.duration === undefined ? 2000 : obj.duration,
|
4450
|
+
center: true,
|
4451
|
+
dangerouslyUseHTMLString: true,
|
4452
|
+
showClose: false,
|
4453
|
+
customClass: `nb-notification nb-notification--${obj.type} ${obj.customClass ? obj.customClass : ''}`,
|
4454
|
+
position: 'top-left',
|
4455
|
+
message: obj.message,
|
4456
|
+
type: obj.type,
|
4457
|
+
offset: 284,
|
4458
|
+
onClose: () => {
|
4459
|
+
if (obj.onClose) {
|
4460
|
+
obj.onClose();
|
4461
|
+
}
|
4462
|
+
}
|
4463
|
+
});
|
4464
|
+
};
|
4465
|
+
|
4466
|
+
// 可直接通过$notify[type]的形式调用
|
4467
|
+
const types = ['success', 'warning', 'error'];
|
4468
|
+
types.forEach(type => {
|
4469
|
+
nbNotify[type] = obj => {
|
4470
|
+
if (typeof obj === 'string') {
|
4471
|
+
obj = {
|
4472
|
+
message: obj
|
4473
|
+
};
|
4474
|
+
}
|
4475
|
+
if (typeof obj === 'object' && obj.title) {
|
4476
|
+
obj.message = obj.title;
|
4477
|
+
}
|
4478
|
+
obj.type = type;
|
4479
|
+
return nbNotify(obj);
|
4480
|
+
};
|
4481
|
+
});
|
4482
|
+
/* harmony default export */ var nb_notify = (nbNotify);
|
4416
4483
|
// EXTERNAL MODULE: ./packages/iconfont/iconfont.css
|
4417
4484
|
var iconfont = __webpack_require__(3050);
|
4418
4485
|
;// ./locale/lang/zh-CN.js
|
@@ -4545,14 +4612,14 @@ const i18n = function (fn) {
|
|
4545
4612
|
/*
|
4546
4613
|
* @Author: chenghuan.dong
|
4547
4614
|
* @Date: 2024-11-08 17:23:47
|
4548
|
-
* @LastEditTime: 2024-11-13 20:
|
4615
|
+
* @LastEditTime: 2024-11-13 20:47:32
|
4549
4616
|
* @LastEditors: chenghuan.dong
|
4550
4617
|
* @Description: 主index.js导出全部组件
|
4551
4618
|
* @FilePath: \nubomed-ui\packages\index.js
|
4552
4619
|
*/
|
4553
4620
|
|
4554
4621
|
|
4555
|
-
|
4622
|
+
|
4556
4623
|
|
4557
4624
|
// 使用iconfont图标
|
4558
4625
|
|
@@ -4581,7 +4648,7 @@ const install = function (Vue, options = {}) {
|
|
4581
4648
|
});
|
4582
4649
|
|
4583
4650
|
// 全局
|
4584
|
-
|
4651
|
+
Vue.prototype.$nbNotify = nb_notify;
|
4585
4652
|
};
|
4586
4653
|
|
4587
4654
|
// if (typeof window !== 'undefined' && window.Vue) {
|
@@ -4593,7 +4660,8 @@ const packages_i18n = locale.i18n;
|
|
4593
4660
|
install,
|
4594
4661
|
...components,
|
4595
4662
|
locale: locale,
|
4596
|
-
i18n: packages_i18n
|
4663
|
+
i18n: packages_i18n,
|
4664
|
+
nbNotify: nb_notify
|
4597
4665
|
});
|
4598
4666
|
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
4599
4667
|
|