nubomed-ui 2.0.43 → 2.0.44
Sign up to get free protection for your applications and to get access to all the features.
- package/css/element-ui/index.css +1 -1
- package/css/element-variables.css +1 -1
- package/css/nb-ui/index.css +1 -1
- package/nubomed-ui.common.js +188 -10
- package/nubomed-ui.common.js.map +1 -1
- package/nubomed-ui.umd.js +188 -10
- 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
@@ -306,6 +306,90 @@ module.exports = function (i) {
|
|
306
306
|
|
307
307
|
/***/ }),
|
308
308
|
|
309
|
+
/***/ 3134:
|
310
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
311
|
+
|
312
|
+
"use strict";
|
313
|
+
// ESM COMPAT FLAG
|
314
|
+
__webpack_require__.r(__webpack_exports__);
|
315
|
+
|
316
|
+
// EXPORTS
|
317
|
+
__webpack_require__.d(__webpack_exports__, {
|
318
|
+
"default": function() { return /* binding */ NBBadge; }
|
319
|
+
});
|
320
|
+
|
321
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBBadge/src/index.vue?vue&type=template&id=a2f7b152
|
322
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.value > 0)?_c('span',{staticClass:"nb-badge",class:("nb-badge--" + _vm.type)},[_vm._v(_vm._s(_vm.value > _vm.max ? (_vm.max + "+") : _vm.value))]):_vm._e()}
|
323
|
+
var staticRenderFns = []
|
324
|
+
|
325
|
+
|
326
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBBadge/src/index.vue?vue&type=script&lang=js
|
327
|
+
//
|
328
|
+
//
|
329
|
+
//
|
330
|
+
//
|
331
|
+
//
|
332
|
+
//
|
333
|
+
//
|
334
|
+
//
|
335
|
+
//
|
336
|
+
//
|
337
|
+
//
|
338
|
+
//
|
339
|
+
|
340
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
341
|
+
name: 'NBBadge',
|
342
|
+
props: {
|
343
|
+
// 类型,success/info/warning/danger,默认主题色状态
|
344
|
+
value: {
|
345
|
+
type: [String, Number],
|
346
|
+
default: ''
|
347
|
+
},
|
348
|
+
// 尺寸,large-大标签(高度36),默认小标签(高度32)
|
349
|
+
max: {
|
350
|
+
type: Number,
|
351
|
+
default: null
|
352
|
+
},
|
353
|
+
// 类型 primary / success / warning / danger / info
|
354
|
+
type: {
|
355
|
+
type: String,
|
356
|
+
default: 'danger'
|
357
|
+
}
|
358
|
+
}
|
359
|
+
});
|
360
|
+
;// ./packages/components/NBBadge/src/index.vue?vue&type=script&lang=js
|
361
|
+
/* harmony default export */ var NBBadge_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
362
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
363
|
+
var componentNormalizer = __webpack_require__(1656);
|
364
|
+
;// ./packages/components/NBBadge/src/index.vue
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
/* normalize component */
|
371
|
+
;
|
372
|
+
var component = (0,componentNormalizer/* default */.A)(
|
373
|
+
NBBadge_srcvue_type_script_lang_js,
|
374
|
+
render,
|
375
|
+
staticRenderFns,
|
376
|
+
false,
|
377
|
+
null,
|
378
|
+
null,
|
379
|
+
null
|
380
|
+
|
381
|
+
)
|
382
|
+
|
383
|
+
/* harmony default export */ var src = (component.exports);
|
384
|
+
;// ./packages/components/NBBadge/index.js
|
385
|
+
|
386
|
+
src.install = function (Vue) {
|
387
|
+
Vue.component(src.name, src);
|
388
|
+
};
|
389
|
+
/* harmony default export */ var NBBadge = (src);
|
390
|
+
|
391
|
+
/***/ }),
|
392
|
+
|
309
393
|
/***/ 2129:
|
310
394
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
311
395
|
|
@@ -686,7 +770,7 @@ src.install = function (Vue) {
|
|
686
770
|
|
687
771
|
/***/ }),
|
688
772
|
|
689
|
-
/***/
|
773
|
+
/***/ 6523:
|
690
774
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
691
775
|
|
692
776
|
"use strict";
|
@@ -698,14 +782,84 @@ __webpack_require__.d(__webpack_exports__, {
|
|
698
782
|
"default": function() { return /* binding */ NBHeader; }
|
699
783
|
});
|
700
784
|
|
701
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBHeader/src/index.vue?vue&type=template&id=
|
702
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nb-header"},[(_vm.back)?_c('div',{staticClass:"nb-header__back",on:{"click":function($event){$event.stopPropagation();return _vm.handleBack.apply(null, arguments)}}},[_c('NBIcon',{attrs:{"icon":"back"}}),_c('span',{staticClass:"nb-header__back__text"},[_vm._v(_vm._s(_vm.backText))])],1):_vm._e(),_c('div',{staticClass:"nb-header__left"},[_vm._t("left")],2),(_vm.tabs.length)?_c('ul',{staticClass:"nb-header__tabs"},_vm._l((_vm.tabs),function(item,index){return _c('li',{key:index,staticClass:"nb-header__tab",class:_vm.tabsItemClass(item, index),on:{"click":function($event){$event.stopPropagation();return _vm.handleChangeTab(item, index)}}},[_c('div',{staticClass:"nb-header__tab__text"},[_c('span',
|
785
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBHeader/src/index.vue?vue&type=template&id=8de13f1a&scoped=true
|
786
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nb-header"},[(_vm.back)?_c('div',{staticClass:"nb-header__back",on:{"click":function($event){$event.stopPropagation();return _vm.handleBack.apply(null, arguments)}}},[_c('NBIcon',{attrs:{"icon":"back"}}),_c('span',{staticClass:"nb-header__back__text"},[_vm._v(_vm._s(_vm.backText))])],1):_vm._e(),_c('div',{staticClass:"nb-header__left"},[_vm._t("left")],2),(_vm.tabs.length)?_c('ul',{ref:"refNBHeaderTabs",staticClass:"nb-header__tabs"},_vm._l((_vm.tabs),function(item,index){return _c('li',{key:index,staticClass:"nb-header__tab",class:_vm.tabsItemClass(item, index),on:{"click":function($event){$event.stopPropagation();return _vm.handleChangeTab(item, index)}}},[_c('div',{staticClass:"nb-header__tab__text"},[_c('span',{domProps:{"innerHTML":_vm._s(item[_vm.tabProps.text])}})]),_c('NBBadge',{attrs:{"value":item[_vm.tabProps.badge],"max":99}})],1)}),0):_vm._e(),(_vm.title)?_c('div',{staticClass:"nb-header__title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),(_vm.$slots.title)?_c('div',{staticClass:"nb-header__title"},[_vm._t("title")],2):_vm._e(),_c('div',{ref:"refNBHeaderRight",staticClass:"nb-header__right"},[_vm._t("right")],2),(_vm.logout)?_c('div',{staticClass:"nb-header__logout",on:{"click":function($event){$event.stopPropagation();return _vm.handleLogout.apply(null, arguments)}}},[_c('NBIcon',{attrs:{"icon":"logout"}}),_c('span',{staticClass:"nb-header__logout__text"},[_vm._v(_vm._s(_vm.logoutText)),(_vm.logoutTime > -1)?[_vm._v("("+_vm._s(_vm.logoutTime)+"S)")]:_vm._e()],2)],1):_vm._e()])}
|
703
787
|
var staticRenderFns = []
|
704
788
|
|
705
789
|
|
790
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js
|
791
|
+
var esnext_iterator_constructor = __webpack_require__(8992);
|
792
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
793
|
+
var esnext_iterator_for_each = __webpack_require__(3949);
|
706
794
|
// EXTERNAL MODULE: ./packages/components/NBIcon/index.js + 4 modules
|
707
795
|
var NBIcon = __webpack_require__(5408);
|
796
|
+
// EXTERNAL MODULE: ./packages/components/NBBadge/index.js + 4 modules
|
797
|
+
var NBBadge = __webpack_require__(3134);
|
798
|
+
;// ./packages/utils/dom.js
|
799
|
+
/*
|
800
|
+
* @Author: chenghuan.dong
|
801
|
+
* @Date: 2024-11-14 14:48:30
|
802
|
+
* @LastEditTime: 2024-11-14 14:50:14
|
803
|
+
* @LastEditors: chenghuan.dong
|
804
|
+
* @Description:
|
805
|
+
* @FilePath: \nubomed-ui\packages\utils\dom.js
|
806
|
+
*/
|
807
|
+
/* istanbul ignore next */
|
808
|
+
function addClass(el, cls) {
|
809
|
+
if (!el) return;
|
810
|
+
var curClass = el.className;
|
811
|
+
var classes = (cls || '').split(' ');
|
812
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
813
|
+
var clsName = classes[i];
|
814
|
+
if (!clsName) continue;
|
815
|
+
if (el.classList) {
|
816
|
+
el.classList.add(clsName);
|
817
|
+
} else if (!hasClass(el, clsName)) {
|
818
|
+
curClass += ' ' + clsName;
|
819
|
+
}
|
820
|
+
}
|
821
|
+
if (!el.classList) {
|
822
|
+
el.setAttribute('class', curClass);
|
823
|
+
}
|
824
|
+
}
|
825
|
+
|
826
|
+
/* istanbul ignore next */
|
827
|
+
function removeClass(el, cls) {
|
828
|
+
if (!el || !cls) return;
|
829
|
+
var classes = cls.split(' ');
|
830
|
+
var curClass = ' ' + el.className + ' ';
|
831
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
832
|
+
var clsName = classes[i];
|
833
|
+
if (!clsName) continue;
|
834
|
+
if (el.classList) {
|
835
|
+
el.classList.remove(clsName);
|
836
|
+
} else if (hasClass(el, clsName)) {
|
837
|
+
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
838
|
+
}
|
839
|
+
}
|
840
|
+
if (!el.classList) {
|
841
|
+
el.setAttribute('class', trim(curClass));
|
842
|
+
}
|
843
|
+
}
|
844
|
+
|
845
|
+
/* istanbul ignore next */
|
846
|
+
function hasClass(el, cls) {
|
847
|
+
if (!el || !cls) return false;
|
848
|
+
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
849
|
+
if (el.classList) {
|
850
|
+
return el.classList.contains(cls);
|
851
|
+
} else {
|
852
|
+
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
853
|
+
}
|
854
|
+
}
|
855
|
+
|
856
|
+
/* istanbul ignore next */
|
857
|
+
const trim = function (string) {
|
858
|
+
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
859
|
+
};
|
708
860
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBHeader/src/index.vue?vue&type=script&lang=js
|
861
|
+
|
862
|
+
|
709
863
|
//
|
710
864
|
//
|
711
865
|
//
|
@@ -757,13 +911,15 @@ var NBIcon = __webpack_require__(5408);
|
|
757
911
|
//
|
758
912
|
//
|
759
913
|
//
|
760
|
-
|
914
|
+
|
915
|
+
|
761
916
|
|
762
917
|
|
763
918
|
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
764
919
|
name: 'NBHeader',
|
765
920
|
components: {
|
766
|
-
NBIcon: NBIcon["default"]
|
921
|
+
NBIcon: NBIcon["default"],
|
922
|
+
NBBadge: NBBadge["default"]
|
767
923
|
},
|
768
924
|
props: {
|
769
925
|
// 是否显示返回
|
@@ -829,7 +985,28 @@ var NBIcon = __webpack_require__(5408);
|
|
829
985
|
data() {
|
830
986
|
return {};
|
831
987
|
},
|
832
|
-
|
988
|
+
mounted() {
|
989
|
+
// 缩小tab的字体
|
990
|
+
if (this.$refs.refNBHeaderTabs) {
|
991
|
+
const tabs = this.$refs.refNBHeaderTabs.querySelectorAll('.nb-header__tab');
|
992
|
+
tabs.forEach(x => {
|
993
|
+
const el = x.querySelector('.nb-header__tab__text>span');
|
994
|
+
if (el) {
|
995
|
+
addClass(x.querySelector('.nb-header__tab__text'), `nb-header__tab__text--${parseInt(el.clientHeight / 42)}`);
|
996
|
+
}
|
997
|
+
});
|
998
|
+
}
|
999
|
+
|
1000
|
+
// 缩小右侧按钮大小
|
1001
|
+
if (this.$refs.refNBHeaderRight && this.$refs.refNBHeaderTabs) {
|
1002
|
+
const rightButton = this.$refs.refNBHeaderRight.querySelectorAll('.nb-header__btn');
|
1003
|
+
rightButton.forEach(x => {
|
1004
|
+
if (x && x.clientWidth > 220) {
|
1005
|
+
addClass(x, 'nb-header__btn--small');
|
1006
|
+
}
|
1007
|
+
});
|
1008
|
+
}
|
1009
|
+
},
|
833
1010
|
methods: {
|
834
1011
|
// 返回
|
835
1012
|
handleBack() {
|
@@ -880,7 +1057,7 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
880
1057
|
staticRenderFns,
|
881
1058
|
false,
|
882
1059
|
null,
|
883
|
-
"
|
1060
|
+
"8de13f1a",
|
884
1061
|
null
|
885
1062
|
|
886
1063
|
)
|
@@ -2160,10 +2337,11 @@ webpackContext.id = 1603;
|
|
2160
2337
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2161
2338
|
|
2162
2339
|
var map = {
|
2340
|
+
"./NBBadge/index.js": 3134,
|
2163
2341
|
"./NBCheckboxGroup/index.js": 2129,
|
2164
2342
|
"./NBEmpty/index.js": 2846,
|
2165
2343
|
"./NBFullscreenDialog/index.js": 1516,
|
2166
|
-
"./NBHeader/index.js":
|
2344
|
+
"./NBHeader/index.js": 6523,
|
2167
2345
|
"./NBIcon/index.js": 5408,
|
2168
2346
|
"./NBOutFooterDialog/index.js": 9213,
|
2169
2347
|
"./NBPagination/index.js": 2407,
|
@@ -5171,7 +5349,7 @@ var iconfont = __webpack_require__(2170);
|
|
5171
5349
|
/*
|
5172
5350
|
* @Author: chenghuan.dong
|
5173
5351
|
* @Date: 2024-11-08 17:23:47
|
5174
|
-
* @LastEditTime: 2024-11-
|
5352
|
+
* @LastEditTime: 2024-11-15 16:12:39
|
5175
5353
|
* @LastEditors: chenghuan.dong
|
5176
5354
|
* @Description: 主index.js导出全部组件
|
5177
5355
|
* @FilePath: \nubomed-ui\packages\index.js
|
@@ -5199,7 +5377,7 @@ const install = function (Vue, options = {}) {
|
|
5199
5377
|
if (install.installed) return;
|
5200
5378
|
components.forEach(component => {
|
5201
5379
|
const name = 'nb-' + camelToKebab(component.name.slice(2));
|
5202
|
-
const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-radio-group', 'nb-checkbox-group', 'nb-header', 'nb-summary-bar', 'nb-header', 'nb-tabs', 'nb-pagination', 'nb-progress', 'nb-fullscreen-dialog', 'nb-out-footer-dialog'];
|
5380
|
+
const installNames = ['nb-icon', 'nb-tag', 'nb-badge', 'nb-empty', 'nb-radio-group', 'nb-checkbox-group', 'nb-header', 'nb-summary-bar', 'nb-header', 'nb-tabs', 'nb-pagination', 'nb-progress', 'nb-fullscreen-dialog', 'nb-out-footer-dialog'];
|
5203
5381
|
if (installNames.includes(name)) {
|
5204
5382
|
console.log('%c' + '√ ' + name, 'color: #00A572;');
|
5205
5383
|
} else {
|