nubomed-ui 2.0.35 → 2.0.37

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.

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("vue"));
4
4
  else if(typeof define === 'function' && define.amd)
5
5
  define([], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["nubomed-ui"] = factory();
7
+ exports["nubomed-ui"] = factory(require("vue"));
8
8
  else
9
- root["nubomed-ui"] = factory();
10
- })((typeof self !== 'undefined' ? self : this), function() {
9
+ root["nubomed-ui"] = factory(root["Vue"]);
10
+ })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__9274__) {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -167,6 +167,27 @@ ___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
+ /***/ 5953:
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-7bbf5e3c]{text-align:left}.el-pagination--center[data-v-7bbf5e3c]{text-align:center}.el-pagination--right[data-v-7bbf5e3c]{text-align:right}", ""]);
187
+ // Exports
188
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
189
+
190
+
170
191
  /***/ }),
171
192
 
172
193
  /***/ 9836:
@@ -1476,6 +1497,22 @@ var update = add("7cd5ae63", content, true, {"sourceMap":false,"shadowMode":fals
1476
1497
 
1477
1498
  /***/ }),
1478
1499
 
1500
+ /***/ 1413:
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__(5953);
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("58e4aae8", content, true, {"sourceMap":false,"shadowMode":false});
1513
+
1514
+ /***/ }),
1515
+
1479
1516
  /***/ 4136:
1480
1517
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1481
1518
 
@@ -1906,6 +1943,14 @@ module.exports = __webpack_require__.p + "fonts/iconfont.c068c01a.woff";
1906
1943
 
1907
1944
  /***/ }),
1908
1945
 
1946
+ /***/ 9274:
1947
+ /***/ (function(module) {
1948
+
1949
+ "use strict";
1950
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9274__;
1951
+
1952
+ /***/ }),
1953
+
1909
1954
  /***/ 9306:
1910
1955
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1911
1956
 
@@ -4378,10 +4423,7 @@ __webpack_require__.r(__webpack_exports__);
4378
4423
 
4379
4424
  // EXPORTS
4380
4425
  __webpack_require__.d(__webpack_exports__, {
4381
- components: function() { return /* reexport */ components; },
4382
- "default": function() { return /* binding */ entry_lib; },
4383
- i18n: function() { return /* reexport */ packages_i18n; },
4384
- locale: function() { return /* reexport */ locale; }
4426
+ "default": function() { return /* binding */ entry_lib; }
4385
4427
  });
4386
4428
 
4387
4429
  ;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
@@ -4539,6 +4581,283 @@ const i18n = function (fn) {
4539
4581
  t,
4540
4582
  i18n
4541
4583
  });
4584
+ // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
4585
+ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
4586
+ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
4587
+ ;// ./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=7bbf5e3c&scoped=true
4588
+ var render = function render() {
4589
+ var _vm = this,
4590
+ _c = _vm._self._c;
4591
+ return _c('transition', {
4592
+ attrs: {
4593
+ "name": "el-notification-fade"
4594
+ }
4595
+ }, [_c('div', {
4596
+ directives: [{
4597
+ name: "show",
4598
+ rawName: "v-show",
4599
+ value: _vm.visible,
4600
+ expression: "visible"
4601
+ }],
4602
+ class: ['nb-notify', `nb-notify--${_vm.type}`],
4603
+ style: _vm.positionStyle,
4604
+ attrs: {
4605
+ "role": "alert"
4606
+ },
4607
+ on: {
4608
+ "mouseenter": function ($event) {
4609
+ return _vm.clearTimer();
4610
+ },
4611
+ "mouseleave": function ($event) {
4612
+ return _vm.startTimer();
4613
+ },
4614
+ "click": _vm.click
4615
+ }
4616
+ }, [_vm.type === 'success' ? _c('nb-icon', {
4617
+ staticClass: "nb-notify__icon",
4618
+ attrs: {
4619
+ "icon": "circle-check-filled"
4620
+ }
4621
+ }) : _vm._e(), _vm.type === 'error' ? _c('nb-icon', {
4622
+ staticClass: "nb-notify__icon",
4623
+ attrs: {
4624
+ "icon": "circle-close-filled"
4625
+ }
4626
+ }) : _vm._e(), _vm.type === 'warning' ? _c('nb-icon', {
4627
+ staticClass: "nb-notify__icon",
4628
+ attrs: {
4629
+ "icon": "warning-filled"
4630
+ }
4631
+ }) : _vm._e(), _c('div', {
4632
+ staticClass: "nb-notify__message",
4633
+ domProps: {
4634
+ "innerHTML": _vm._s(_vm.message)
4635
+ }
4636
+ })], 1)]);
4637
+ };
4638
+ var staticRenderFns = [];
4639
+
4640
+ ;// ./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
4641
+ /* harmony default export */ var srcvue_type_script_lang_js = ({
4642
+ name: 'NBNotify',
4643
+ data() {
4644
+ return {
4645
+ visible: false,
4646
+ message: '',
4647
+ duration: 3000,
4648
+ type: '',
4649
+ showClose: false,
4650
+ customClass: '',
4651
+ onClose: null,
4652
+ onClick: null,
4653
+ closed: false,
4654
+ verticalOffset: 248,
4655
+ timer: null,
4656
+ position: 'top-right'
4657
+ };
4658
+ },
4659
+ computed: {
4660
+ horizontalClass() {
4661
+ return this.position.indexOf('right') > -1 ? 'right' : 'left';
4662
+ },
4663
+ verticalProperty() {
4664
+ return /^top-/.test(this.position) ? 'top' : 'bottom';
4665
+ },
4666
+ positionStyle() {
4667
+ return {
4668
+ [this.verticalProperty]: `${this.verticalOffset}px`
4669
+ };
4670
+ }
4671
+ },
4672
+ watch: {
4673
+ closed(newVal) {
4674
+ if (newVal) {
4675
+ this.visible = false;
4676
+ this.$el.addEventListener('transitionend', this.destroyElement);
4677
+ }
4678
+ }
4679
+ },
4680
+ methods: {
4681
+ destroyElement() {
4682
+ this.$el.removeEventListener('transitionend', this.destroyElement);
4683
+ this.$destroy(true);
4684
+ this.$el.parentNode.removeChild(this.$el);
4685
+ },
4686
+ click() {
4687
+ if (typeof this.onClick === 'function') {
4688
+ this.onClick();
4689
+ }
4690
+ },
4691
+ close() {
4692
+ this.closed = true;
4693
+ if (typeof this.onClose === 'function') {
4694
+ this.onClose();
4695
+ }
4696
+ },
4697
+ clearTimer() {
4698
+ clearTimeout(this.timer);
4699
+ },
4700
+ startTimer() {
4701
+ if (this.duration > 0) {
4702
+ this.timer = setTimeout(() => {
4703
+ if (!this.closed) {
4704
+ this.close();
4705
+ }
4706
+ }, this.duration);
4707
+ }
4708
+ },
4709
+ keydown(e) {
4710
+ if (e.keyCode === 46 || e.keyCode === 8) {
4711
+ this.clearTimer(); // detele 取消倒计时
4712
+ } else if (e.keyCode === 27) {
4713
+ // esc关闭消息
4714
+ if (!this.closed) {
4715
+ this.close();
4716
+ }
4717
+ } else {
4718
+ this.startTimer(); // 恢复倒计时
4719
+ }
4720
+ }
4721
+ },
4722
+ mounted() {
4723
+ if (this.duration > 0) {
4724
+ this.timer = setTimeout(() => {
4725
+ if (!this.closed) {
4726
+ this.close();
4727
+ }
4728
+ }, this.duration);
4729
+ }
4730
+ document.addEventListener('keydown', this.keydown);
4731
+ },
4732
+ beforeDestroy() {
4733
+ document.removeEventListener('keydown', this.keydown);
4734
+ }
4735
+ });
4736
+ ;// ./packages/components/NBNotify/src/index.vue?vue&type=script&lang=js
4737
+ /* harmony default export */ var NBNotify_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
4738
+ // 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=7bbf5e3c&prod&lang=scss&scoped=true
4739
+ var srcvue_type_style_index_0_id_7bbf5e3c_prod_lang_scss_scoped_true = __webpack_require__(1413);
4740
+ ;// ./packages/components/NBNotify/src/index.vue?vue&type=style&index=0&id=7bbf5e3c&prod&lang=scss&scoped=true
4741
+
4742
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
4743
+ var componentNormalizer = __webpack_require__(1656);
4744
+ ;// ./packages/components/NBNotify/src/index.vue
4745
+
4746
+
4747
+
4748
+ ;
4749
+
4750
+
4751
+ /* normalize component */
4752
+
4753
+ var component = (0,componentNormalizer/* default */.A)(
4754
+ NBNotify_srcvue_type_script_lang_js,
4755
+ render,
4756
+ staticRenderFns,
4757
+ false,
4758
+ null,
4759
+ "7bbf5e3c",
4760
+ null
4761
+
4762
+ )
4763
+
4764
+ /* harmony default export */ var NBNotify_src = (component.exports);
4765
+ ;// ./packages/components/NBNotify/src/notify.js
4766
+
4767
+
4768
+
4769
+ /*
4770
+ * @Author: chenghuan.dong
4771
+ * @Date: 2024-11-14 09:44:58
4772
+ * @LastEditTime: 2024-11-14 14:03:08
4773
+ * @LastEditors: chenghuan.dong
4774
+ * @Description:
4775
+ * @FilePath: \nubomed-ui\packages\components\NBNotify\src\notify.js
4776
+ */
4777
+
4778
+
4779
+ // import merge from '../../../utils/merge'
4780
+ // import { PopupManager } from '../../../utils/popup'
4781
+ // import { isVNode } from '../../../utils/vdom'
4782
+
4783
+ let instance;
4784
+ let instances = [];
4785
+ let seed = 1;
4786
+ const Notify = function (options) {
4787
+ console.log('Vue', (external_commonjs_vue_commonjs2_vue_root_Vue_default()));
4788
+ if (!(external_commonjs_vue_commonjs2_vue_root_Vue_default())) {
4789
+ return;
4790
+ }
4791
+ if ((external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$isServer) return;
4792
+ options = Object.assign({}, options);
4793
+ const userOnClose = options.onClose;
4794
+ const id = 'notification_' + seed++;
4795
+ const position = options.position || 'top-right';
4796
+ options.onClose = function () {
4797
+ Notify.close(id, userOnClose);
4798
+ };
4799
+ const NotificationConstructor = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend(NBNotify_src);
4800
+ instance = new NotificationConstructor({
4801
+ data: options
4802
+ });
4803
+ instance.$slots.default = [options.message];
4804
+ instance.id = id;
4805
+ instance.$mount();
4806
+ document.body.appendChild(instance.$el);
4807
+ instance.visible = true;
4808
+ instance.dom = instance.$el;
4809
+ // instance.dom.style.zIndex = PopupManager.nextZIndex()
4810
+
4811
+ let verticalOffset = options.offset || 248;
4812
+ instances.filter(item => item.position === position).forEach(item => {
4813
+ verticalOffset += item.$el.offsetHeight + 16;
4814
+ });
4815
+ verticalOffset += 16;
4816
+ instance.verticalOffset = verticalOffset;
4817
+ instances.push(instance);
4818
+ return instance;
4819
+ };
4820
+ ['success', 'warning', 'info', 'error'].forEach(type => {
4821
+ Notify[type] = options => {
4822
+ if (typeof options === 'string') {
4823
+ options = {
4824
+ message: options
4825
+ };
4826
+ }
4827
+ options.type = type;
4828
+ return Notify(options);
4829
+ };
4830
+ });
4831
+ Notify.close = function (id, userOnClose) {
4832
+ let index = -1;
4833
+ const len = instances.length;
4834
+ const instance = instances.filter((instance, i) => {
4835
+ if (instance.id === id) {
4836
+ index = i;
4837
+ return true;
4838
+ }
4839
+ return false;
4840
+ })[0];
4841
+ if (!instance) return;
4842
+ if (typeof userOnClose === 'function') {
4843
+ userOnClose(instance);
4844
+ }
4845
+ instances.splice(index, 1);
4846
+ if (len <= 1) return;
4847
+ const position = instance.position;
4848
+ const removedHeight = instance.dom.offsetHeight;
4849
+ for (let i = index; i < len - 1; i++) {
4850
+ if (instances[i].position === position) {
4851
+ instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
4852
+ }
4853
+ }
4854
+ };
4855
+ Notify.closeAll = function () {
4856
+ for (let i = instances.length - 1; i >= 0; i--) {
4857
+ instances[i].close();
4858
+ }
4859
+ };
4860
+ /* harmony default export */ var notify = (Notify);
4542
4861
  // EXTERNAL MODULE: ./packages/iconfont/iconfont.css
4543
4862
  var iconfont = __webpack_require__(3050);
4544
4863
  ;// ./packages/index.js
@@ -4548,7 +4867,7 @@ var iconfont = __webpack_require__(3050);
4548
4867
  /*
4549
4868
  * @Author: chenghuan.dong
4550
4869
  * @Date: 2024-11-08 17:23:47
4551
- * @LastEditTime: 2024-11-14 12:08:59
4870
+ * @LastEditTime: 2024-11-14 14:00:53
4552
4871
  * @LastEditors: chenghuan.dong
4553
4872
  * @Description: 主index.js导出全部组件
4554
4873
  * @FilePath: \nubomed-ui\packages\index.js
@@ -4556,7 +4875,7 @@ var iconfont = __webpack_require__(3050);
4556
4875
 
4557
4876
 
4558
4877
 
4559
- // import nbNotify from './components/NBNotify/src/notify.js'
4878
+
4560
4879
 
4561
4880
  // 使用iconfont图标
4562
4881
 
@@ -4567,64 +4886,41 @@ const req = __webpack_require__(3798);
4567
4886
  req.keys().forEach(v => {
4568
4887
  components.push(req(v).default);
4569
4888
  });
4570
- console.log('components', components);
4571
4889
  const install = function (Vue, options = {}) {
4572
4890
  //设置多语言
4573
4891
  locale.use(options.locale);
4574
4892
  locale.i18n(options.i18n);
4893
+
4575
4894
  // 组件
4576
4895
  if (install.installed) return;
4577
4896
  components.forEach(component => {
4578
4897
  const name = 'nb-' + camelToKebab(component.name.slice(2));
4579
- const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination']; //
4580
- console.log((installNames.includes(name) ? '√ ' : '? ') + name);
4898
+ const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination'];
4581
4899
  if (installNames.includes(name)) {
4582
- Vue.component(name, component);
4900
+ console.log('%c' + '√ ' + name, 'color: #00A572;');
4901
+ } else {
4902
+ console.log('? ' + name);
4903
+ }
4904
+ if (installNames.includes(name)) {
4905
+ Vue.component('nb-' + camelToKebab(component.name.slice(2)), component);
4583
4906
  }
4584
4907
  });
4585
4908
 
4586
- // Vue.prototype.$nbNotify = nbNotify
4587
- };
4588
- const packages_i18n = locale.i18n;
4589
- const API = {
4590
- install
4909
+ // 全局
4910
+ Vue.prototype.$nbNotify = notify;
4591
4911
  };
4592
- /* harmony default export */ var packages_0 = (API);
4593
4912
 
4594
-
4595
- // const install = function (Vue, options = {}) {
4596
- // //设置多语言
4597
- // locale.use(options.locale)
4598
- // locale.i18n(options.i18n)
4599
-
4600
- // // 组件
4601
- // if (install.installed) return
4602
- // components.forEach((component) => {
4603
- // const name = 'nb-' + camelToKebab(component.name.slice(2))
4604
- // const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination'] //
4605
- // console.log((installNames.includes(name) ? '√ ' : '? ') + name)
4606
-
4607
- // if (installNames.includes(name)) {
4608
- // Vue.component('nb-' + camelToKebab(component.name.slice(2)), component)
4609
- // }
4610
- // })
4611
-
4612
- // // 全局
4613
- // Vue.prototype.$nbNotify = nbNotify
4913
+ // if (typeof window !== 'undefined' && window.Vue) {
4914
+ // install(window.Vue)
4614
4915
  // }
4615
4916
 
4616
- // // if (typeof window !== 'undefined' && window.Vue) {
4617
- // // install(window.Vue)
4618
- // // }
4619
-
4620
- // const i18n = locale.i18n
4621
-
4622
- // export default {
4623
- // install,
4624
- // ...components,
4625
- // locale,
4626
- // i18n
4627
- // }
4917
+ const packages_i18n = locale.i18n;
4918
+ /* harmony default export */ var packages_0 = ({
4919
+ install,
4920
+ ...components,
4921
+ locale: locale,
4922
+ i18n: packages_i18n
4923
+ });
4628
4924
  ;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
4629
4925
 
4630
4926