nubomed-ui 2.0.33 → 2.0.35

Sign up to get free protection for your applications and to get access to all the features.
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(require("Vue"));
3
+ module.exports = factory();
4
4
  else if(typeof define === 'function' && define.amd)
5
- define(["Vue"], factory);
5
+ define([], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["nubomed-ui"] = factory(require("Vue"));
7
+ exports["nubomed-ui"] = factory();
8
8
  else
9
- root["nubomed-ui"] = factory(root["Vue"]);
10
- })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__2508__) {
9
+ root["nubomed-ui"] = factory();
10
+ })((typeof self !== 'undefined' ? self : this), function() {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -167,27 +167,6 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".iconfont[data-v-1d7955de]{display:inl
167
167
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
168
168
 
169
169
 
170
- /***/ }),
171
-
172
- /***/ 4474:
173
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
174
-
175
- "use strict";
176
- __webpack_require__.r(__webpack_exports__);
177
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
178
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
179
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
180
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
181
- // Imports
182
-
183
-
184
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
185
- // Module
186
- ___CSS_LOADER_EXPORT___.push([module.id, ".el-pagination--left[data-v-15e54efa]{text-align:left}.el-pagination--center[data-v-15e54efa]{text-align:center}.el-pagination--right[data-v-15e54efa]{text-align:right}", ""]);
187
- // Exports
188
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
189
-
190
-
191
170
  /***/ }),
192
171
 
193
172
  /***/ 9836:
@@ -1497,22 +1476,6 @@ var update = add("7cd5ae63", content, true, {"sourceMap":false,"shadowMode":fals
1497
1476
 
1498
1477
  /***/ }),
1499
1478
 
1500
- /***/ 8974:
1501
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1502
-
1503
- // style-loader: Adds some css to the DOM by adding a <style> tag
1504
-
1505
- // load the styles
1506
- var content = __webpack_require__(4474);
1507
- if(content.__esModule) content = content.default;
1508
- if(typeof content === 'string') content = [[module.id, content, '']];
1509
- if(content.locals) module.exports = content.locals;
1510
- // add the styles to the DOM
1511
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
1512
- var update = add("6359d55d", content, true, {"sourceMap":false,"shadowMode":false});
1513
-
1514
- /***/ }),
1515
-
1516
1479
  /***/ 4136:
1517
1480
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1518
1481
 
@@ -1943,14 +1906,6 @@ module.exports = __webpack_require__.p + "fonts/iconfont.c068c01a.woff";
1943
1906
 
1944
1907
  /***/ }),
1945
1908
 
1946
- /***/ 2508:
1947
- /***/ (function(module) {
1948
-
1949
- "use strict";
1950
- module.exports = __WEBPACK_EXTERNAL_MODULE__2508__;
1951
-
1952
- /***/ }),
1953
-
1954
1909
  /***/ 9306:
1955
1910
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1956
1911
 
@@ -4584,311 +4539,6 @@ const i18n = function (fn) {
4584
4539
  t,
4585
4540
  i18n
4586
4541
  });
4587
- // EXTERNAL MODULE: external "Vue"
4588
- var external_Vue_ = __webpack_require__(2508);
4589
- var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_);
4590
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBNotify/src/index.vue?vue&type=template&id=15e54efa&scoped=true
4591
- var render = function render() {
4592
- var _vm = this,
4593
- _c = _vm._self._c;
4594
- return _c('transition', {
4595
- attrs: {
4596
- "name": "el-notification-fade"
4597
- }
4598
- }, [_c('div', {
4599
- directives: [{
4600
- name: "show",
4601
- rawName: "v-show",
4602
- value: _vm.visible,
4603
- expression: "visible"
4604
- }],
4605
- class: ['el-notification', 'nb-notification'],
4606
- style: _vm.positionStyle,
4607
- attrs: {
4608
- "role": "alert"
4609
- },
4610
- on: {
4611
- "mouseenter": function ($event) {
4612
- return _vm.clearTimer();
4613
- },
4614
- "mouseleave": function ($event) {
4615
- return _vm.startTimer();
4616
- },
4617
- "click": _vm.click
4618
- }
4619
- }, [_vm.type || _vm.iconClass ? _c('i', {
4620
- staticClass: "el-notification__icon",
4621
- class: [_vm.typeClass, _vm.iconClass]
4622
- }) : _vm._e(), _c('div', {
4623
- staticClass: "el-notification__group",
4624
- class: {
4625
- 'is-with-icon': _vm.typeClass || _vm.iconClass
4626
- }
4627
- }, [_c('h2', {
4628
- staticClass: "el-notification__title",
4629
- domProps: {
4630
- "textContent": _vm._s(_vm.title)
4631
- }
4632
- }), _c('div', {
4633
- directives: [{
4634
- name: "show",
4635
- rawName: "v-show",
4636
- value: _vm.message,
4637
- expression: "message"
4638
- }],
4639
- staticClass: "el-notification__content"
4640
- }, [_vm._t("default", function () {
4641
- return [!_vm.dangerouslyUseHTMLString ? _c('p', [_vm._v(_vm._s(_vm.message))]) : _vm._e(), _c('p', {
4642
- domProps: {
4643
- "innerHTML": _vm._s(_vm.message)
4644
- }
4645
- })];
4646
- })], 2), _vm.showClose ? _c('div', {
4647
- staticClass: "el-notification__closeBtn el-icon-close",
4648
- on: {
4649
- "click": function ($event) {
4650
- $event.stopPropagation();
4651
- return _vm.close.apply(null, arguments);
4652
- }
4653
- }
4654
- }) : _vm._e()])])]);
4655
- };
4656
- var staticRenderFns = [];
4657
-
4658
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBNotify/src/index.vue?vue&type=script&lang=js
4659
- let typeMap = {
4660
- success: 'success',
4661
- info: 'info',
4662
- warning: 'warning',
4663
- error: 'error'
4664
- };
4665
- /* harmony default export */ var srcvue_type_script_lang_js = ({
4666
- name: 'NBNotify',
4667
- data() {
4668
- return {
4669
- visible: false,
4670
- title: '',
4671
- message: '',
4672
- duration: 4500,
4673
- type: '',
4674
- showClose: false,
4675
- customClass: '',
4676
- iconClass: '',
4677
- onClose: null,
4678
- onClick: null,
4679
- closed: false,
4680
- verticalOffset: 0,
4681
- timer: null,
4682
- dangerouslyUseHTMLString: true,
4683
- position: 'top-right'
4684
- };
4685
- },
4686
- computed: {
4687
- typeClass() {
4688
- return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : '';
4689
- },
4690
- horizontalClass() {
4691
- return this.position.indexOf('right') > -1 ? 'right' : 'left';
4692
- },
4693
- verticalProperty() {
4694
- return /^top-/.test(this.position) ? 'top' : 'bottom';
4695
- },
4696
- positionStyle() {
4697
- return {
4698
- [this.verticalProperty]: `${this.verticalOffset}px`
4699
- };
4700
- }
4701
- },
4702
- watch: {
4703
- closed(newVal) {
4704
- if (newVal) {
4705
- this.visible = false;
4706
- this.$el.addEventListener('transitionend', this.destroyElement);
4707
- }
4708
- }
4709
- },
4710
- methods: {
4711
- destroyElement() {
4712
- this.$el.removeEventListener('transitionend', this.destroyElement);
4713
- this.$destroy(true);
4714
- this.$el.parentNode.removeChild(this.$el);
4715
- },
4716
- click() {
4717
- if (typeof this.onClick === 'function') {
4718
- this.onClick();
4719
- }
4720
- },
4721
- close() {
4722
- this.closed = true;
4723
- if (typeof this.onClose === 'function') {
4724
- this.onClose();
4725
- }
4726
- },
4727
- clearTimer() {
4728
- clearTimeout(this.timer);
4729
- },
4730
- startTimer() {
4731
- if (this.duration > 0) {
4732
- this.timer = setTimeout(() => {
4733
- if (!this.closed) {
4734
- this.close();
4735
- }
4736
- }, this.duration);
4737
- }
4738
- },
4739
- keydown(e) {
4740
- if (e.keyCode === 46 || e.keyCode === 8) {
4741
- this.clearTimer(); // detele 取消倒计时
4742
- } else if (e.keyCode === 27) {
4743
- // esc关闭消息
4744
- if (!this.closed) {
4745
- this.close();
4746
- }
4747
- } else {
4748
- this.startTimer(); // 恢复倒计时
4749
- }
4750
- }
4751
- },
4752
- mounted() {
4753
- if (this.duration > 0) {
4754
- this.timer = setTimeout(() => {
4755
- if (!this.closed) {
4756
- this.close();
4757
- }
4758
- }, this.duration);
4759
- }
4760
- document.addEventListener('keydown', this.keydown);
4761
- },
4762
- beforeDestroy() {
4763
- document.removeEventListener('keydown', this.keydown);
4764
- }
4765
- });
4766
- ;// ./packages/components/NBNotify/src/index.vue?vue&type=script&lang=js
4767
- /* harmony default export */ var NBNotify_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
4768
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBNotify/src/index.vue?vue&type=style&index=0&id=15e54efa&prod&lang=scss&scoped=true
4769
- var srcvue_type_style_index_0_id_15e54efa_prod_lang_scss_scoped_true = __webpack_require__(8974);
4770
- ;// ./packages/components/NBNotify/src/index.vue?vue&type=style&index=0&id=15e54efa&prod&lang=scss&scoped=true
4771
-
4772
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
4773
- var componentNormalizer = __webpack_require__(1656);
4774
- ;// ./packages/components/NBNotify/src/index.vue
4775
-
4776
-
4777
-
4778
- ;
4779
-
4780
-
4781
- /* normalize component */
4782
-
4783
- var component = (0,componentNormalizer/* default */.A)(
4784
- NBNotify_srcvue_type_script_lang_js,
4785
- render,
4786
- staticRenderFns,
4787
- false,
4788
- null,
4789
- "15e54efa",
4790
- null
4791
-
4792
- )
4793
-
4794
- /* harmony default export */ var NBNotify_src = (component.exports);
4795
- ;// ./packages/components/NBNotify/src/notify.js
4796
-
4797
-
4798
-
4799
- /*
4800
- * @Author: chenghuan.dong
4801
- * @Date: 2024-11-14 09:44:58
4802
- * @LastEditTime: 2024-11-14 10:47:42
4803
- * @LastEditors: chenghuan.dong
4804
- * @Description:
4805
- * @FilePath: \nubomed-ui\packages\components\NBNotify\src\notify.js
4806
- */
4807
-
4808
-
4809
- // import merge from '../../../utils/merge'
4810
- // import { PopupManager } from '../../../utils/popup'
4811
- // import { isVNode } from '../../../utils/vdom'
4812
-
4813
- let instance;
4814
- let instances = [];
4815
- let seed = 1;
4816
- const Notification = function (options) {
4817
- console.log('Vue', (external_Vue_default()));
4818
- if (!(external_Vue_default())) {
4819
- return;
4820
- }
4821
- if ((external_Vue_default()).prototype.$isServer) return;
4822
- options = Object.assign({}, options);
4823
- const userOnClose = options.onClose;
4824
- const id = 'notification_' + seed++;
4825
- const position = options.position || 'top-right';
4826
- options.onClose = function () {
4827
- Notification.close(id, userOnClose);
4828
- };
4829
- const NotificationConstructor = external_Vue_default().extend(NBNotify_src);
4830
- instance = new NotificationConstructor({
4831
- data: options
4832
- });
4833
- instance.$slots.default = [options.message];
4834
- options.message = 'REPLACED_BY_VNODE';
4835
- instance.id = id;
4836
- instance.$mount();
4837
- document.body.appendChild(instance.$el);
4838
- instance.visible = true;
4839
- instance.dom = instance.$el;
4840
- // instance.dom.style.zIndex = PopupManager.nextZIndex()
4841
-
4842
- let verticalOffset = options.offset || 0;
4843
- instances.filter(item => item.position === position).forEach(item => {
4844
- verticalOffset += item.$el.offsetHeight + 16;
4845
- });
4846
- verticalOffset += 16;
4847
- instance.verticalOffset = verticalOffset;
4848
- instances.push(instance);
4849
- return instance;
4850
- };
4851
- ['success', 'warning', 'info', 'error'].forEach(type => {
4852
- Notification[type] = options => {
4853
- if (typeof options === 'string') {
4854
- options = {
4855
- message: options
4856
- };
4857
- }
4858
- options.type = type;
4859
- return Notification(options);
4860
- };
4861
- });
4862
- Notification.close = function (id, userOnClose) {
4863
- let index = -1;
4864
- const len = instances.length;
4865
- const instance = instances.filter((instance, i) => {
4866
- if (instance.id === id) {
4867
- index = i;
4868
- return true;
4869
- }
4870
- return false;
4871
- })[0];
4872
- if (!instance) return;
4873
- if (typeof userOnClose === 'function') {
4874
- userOnClose(instance);
4875
- }
4876
- instances.splice(index, 1);
4877
- if (len <= 1) return;
4878
- const position = instance.position;
4879
- const removedHeight = instance.dom.offsetHeight;
4880
- for (let i = index; i < len - 1; i++) {
4881
- if (instances[i].position === position) {
4882
- instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
4883
- }
4884
- }
4885
- };
4886
- Notification.closeAll = function () {
4887
- for (let i = instances.length - 1; i >= 0; i--) {
4888
- instances[i].close();
4889
- }
4890
- };
4891
- /* harmony default export */ var notify = (Notification);
4892
4542
  // EXTERNAL MODULE: ./packages/iconfont/iconfont.css
4893
4543
  var iconfont = __webpack_require__(3050);
4894
4544
  ;// ./packages/index.js
@@ -4898,7 +4548,7 @@ var iconfont = __webpack_require__(3050);
4898
4548
  /*
4899
4549
  * @Author: chenghuan.dong
4900
4550
  * @Date: 2024-11-08 17:23:47
4901
- * @LastEditTime: 2024-11-14 11:00:38
4551
+ * @LastEditTime: 2024-11-14 12:08:59
4902
4552
  * @LastEditors: chenghuan.dong
4903
4553
  * @Description: 主index.js导出全部组件
4904
4554
  * @FilePath: \nubomed-ui\packages\index.js
@@ -4906,7 +4556,7 @@ var iconfont = __webpack_require__(3050);
4906
4556
 
4907
4557
 
4908
4558
 
4909
-
4559
+ // import nbNotify from './components/NBNotify/src/notify.js'
4910
4560
 
4911
4561
  // 使用iconfont图标
4912
4562
 
@@ -4932,7 +4582,8 @@ const install = function (Vue, options = {}) {
4932
4582
  Vue.component(name, component);
4933
4583
  }
4934
4584
  });
4935
- Vue.prototype.$nbNotify = notify;
4585
+
4586
+ // Vue.prototype.$nbNotify = nbNotify
4936
4587
  };
4937
4588
  const packages_i18n = locale.i18n;
4938
4589
  const API = {