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.common.js
CHANGED
@@ -296,6 +296,90 @@ module.exports = function (i) {
|
|
296
296
|
|
297
297
|
/***/ }),
|
298
298
|
|
299
|
+
/***/ 3250:
|
300
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
301
|
+
|
302
|
+
"use strict";
|
303
|
+
// ESM COMPAT FLAG
|
304
|
+
__webpack_require__.r(__webpack_exports__);
|
305
|
+
|
306
|
+
// EXPORTS
|
307
|
+
__webpack_require__.d(__webpack_exports__, {
|
308
|
+
"default": function() { return /* binding */ NBBadge; }
|
309
|
+
});
|
310
|
+
|
311
|
+
;// ./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
|
312
|
+
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()}
|
313
|
+
var staticRenderFns = []
|
314
|
+
|
315
|
+
|
316
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
|
317
|
+
//
|
318
|
+
//
|
319
|
+
//
|
320
|
+
//
|
321
|
+
//
|
322
|
+
//
|
323
|
+
//
|
324
|
+
//
|
325
|
+
//
|
326
|
+
//
|
327
|
+
//
|
328
|
+
//
|
329
|
+
|
330
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
331
|
+
name: 'NBBadge',
|
332
|
+
props: {
|
333
|
+
// 类型,success/info/warning/danger,默认主题色状态
|
334
|
+
value: {
|
335
|
+
type: [String, Number],
|
336
|
+
default: ''
|
337
|
+
},
|
338
|
+
// 尺寸,large-大标签(高度36),默认小标签(高度32)
|
339
|
+
max: {
|
340
|
+
type: Number,
|
341
|
+
default: null
|
342
|
+
},
|
343
|
+
// 类型 primary / success / warning / danger / info
|
344
|
+
type: {
|
345
|
+
type: String,
|
346
|
+
default: 'danger'
|
347
|
+
}
|
348
|
+
}
|
349
|
+
});
|
350
|
+
;// ./packages/components/NBBadge/src/index.vue?vue&type=script&lang=js
|
351
|
+
/* harmony default export */ var NBBadge_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
352
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
353
|
+
var componentNormalizer = __webpack_require__(1656);
|
354
|
+
;// ./packages/components/NBBadge/src/index.vue
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
/* normalize component */
|
361
|
+
;
|
362
|
+
var component = (0,componentNormalizer/* default */.A)(
|
363
|
+
NBBadge_srcvue_type_script_lang_js,
|
364
|
+
render,
|
365
|
+
staticRenderFns,
|
366
|
+
false,
|
367
|
+
null,
|
368
|
+
null,
|
369
|
+
null
|
370
|
+
|
371
|
+
)
|
372
|
+
|
373
|
+
/* harmony default export */ var src = (component.exports);
|
374
|
+
;// ./packages/components/NBBadge/index.js
|
375
|
+
|
376
|
+
src.install = function (Vue) {
|
377
|
+
Vue.component(src.name, src);
|
378
|
+
};
|
379
|
+
/* harmony default export */ var NBBadge = (src);
|
380
|
+
|
381
|
+
/***/ }),
|
382
|
+
|
299
383
|
/***/ 9070:
|
300
384
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
301
385
|
|
@@ -676,7 +760,7 @@ src.install = function (Vue) {
|
|
676
760
|
|
677
761
|
/***/ }),
|
678
762
|
|
679
|
-
/***/
|
763
|
+
/***/ 1001:
|
680
764
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
681
765
|
|
682
766
|
"use strict";
|
@@ -688,14 +772,84 @@ __webpack_require__.d(__webpack_exports__, {
|
|
688
772
|
"default": function() { return /* binding */ NBHeader; }
|
689
773
|
});
|
690
774
|
|
691
|
-
;// ./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=
|
692
|
-
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',
|
775
|
+
;// ./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
|
776
|
+
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()])}
|
693
777
|
var staticRenderFns = []
|
694
778
|
|
695
779
|
|
780
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js
|
781
|
+
var esnext_iterator_constructor = __webpack_require__(8992);
|
782
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
783
|
+
var esnext_iterator_for_each = __webpack_require__(3949);
|
696
784
|
// EXTERNAL MODULE: ./packages/components/NBIcon/index.js + 4 modules
|
697
785
|
var NBIcon = __webpack_require__(79);
|
786
|
+
// EXTERNAL MODULE: ./packages/components/NBBadge/index.js + 4 modules
|
787
|
+
var NBBadge = __webpack_require__(3250);
|
788
|
+
;// ./packages/utils/dom.js
|
789
|
+
/*
|
790
|
+
* @Author: chenghuan.dong
|
791
|
+
* @Date: 2024-11-14 14:48:30
|
792
|
+
* @LastEditTime: 2024-11-14 14:50:14
|
793
|
+
* @LastEditors: chenghuan.dong
|
794
|
+
* @Description:
|
795
|
+
* @FilePath: \nubomed-ui\packages\utils\dom.js
|
796
|
+
*/
|
797
|
+
/* istanbul ignore next */
|
798
|
+
function addClass(el, cls) {
|
799
|
+
if (!el) return;
|
800
|
+
var curClass = el.className;
|
801
|
+
var classes = (cls || '').split(' ');
|
802
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
803
|
+
var clsName = classes[i];
|
804
|
+
if (!clsName) continue;
|
805
|
+
if (el.classList) {
|
806
|
+
el.classList.add(clsName);
|
807
|
+
} else if (!hasClass(el, clsName)) {
|
808
|
+
curClass += ' ' + clsName;
|
809
|
+
}
|
810
|
+
}
|
811
|
+
if (!el.classList) {
|
812
|
+
el.setAttribute('class', curClass);
|
813
|
+
}
|
814
|
+
}
|
815
|
+
|
816
|
+
/* istanbul ignore next */
|
817
|
+
function removeClass(el, cls) {
|
818
|
+
if (!el || !cls) return;
|
819
|
+
var classes = cls.split(' ');
|
820
|
+
var curClass = ' ' + el.className + ' ';
|
821
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
822
|
+
var clsName = classes[i];
|
823
|
+
if (!clsName) continue;
|
824
|
+
if (el.classList) {
|
825
|
+
el.classList.remove(clsName);
|
826
|
+
} else if (hasClass(el, clsName)) {
|
827
|
+
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
828
|
+
}
|
829
|
+
}
|
830
|
+
if (!el.classList) {
|
831
|
+
el.setAttribute('class', trim(curClass));
|
832
|
+
}
|
833
|
+
}
|
834
|
+
|
835
|
+
/* istanbul ignore next */
|
836
|
+
function hasClass(el, cls) {
|
837
|
+
if (!el || !cls) return false;
|
838
|
+
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
839
|
+
if (el.classList) {
|
840
|
+
return el.classList.contains(cls);
|
841
|
+
} else {
|
842
|
+
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
843
|
+
}
|
844
|
+
}
|
845
|
+
|
846
|
+
/* istanbul ignore next */
|
847
|
+
const trim = function (string) {
|
848
|
+
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
849
|
+
};
|
698
850
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
|
851
|
+
|
852
|
+
|
699
853
|
//
|
700
854
|
//
|
701
855
|
//
|
@@ -747,13 +901,15 @@ var NBIcon = __webpack_require__(79);
|
|
747
901
|
//
|
748
902
|
//
|
749
903
|
//
|
750
|
-
|
904
|
+
|
905
|
+
|
751
906
|
|
752
907
|
|
753
908
|
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
754
909
|
name: 'NBHeader',
|
755
910
|
components: {
|
756
|
-
NBIcon: NBIcon["default"]
|
911
|
+
NBIcon: NBIcon["default"],
|
912
|
+
NBBadge: NBBadge["default"]
|
757
913
|
},
|
758
914
|
props: {
|
759
915
|
// 是否显示返回
|
@@ -819,7 +975,28 @@ var NBIcon = __webpack_require__(79);
|
|
819
975
|
data() {
|
820
976
|
return {};
|
821
977
|
},
|
822
|
-
|
978
|
+
mounted() {
|
979
|
+
// 缩小tab的字体
|
980
|
+
if (this.$refs.refNBHeaderTabs) {
|
981
|
+
const tabs = this.$refs.refNBHeaderTabs.querySelectorAll('.nb-header__tab');
|
982
|
+
tabs.forEach(x => {
|
983
|
+
const el = x.querySelector('.nb-header__tab__text>span');
|
984
|
+
if (el) {
|
985
|
+
addClass(x.querySelector('.nb-header__tab__text'), `nb-header__tab__text--${parseInt(el.clientHeight / 42)}`);
|
986
|
+
}
|
987
|
+
});
|
988
|
+
}
|
989
|
+
|
990
|
+
// 缩小右侧按钮大小
|
991
|
+
if (this.$refs.refNBHeaderRight && this.$refs.refNBHeaderTabs) {
|
992
|
+
const rightButton = this.$refs.refNBHeaderRight.querySelectorAll('.nb-header__btn');
|
993
|
+
rightButton.forEach(x => {
|
994
|
+
if (x && x.clientWidth > 220) {
|
995
|
+
addClass(x, 'nb-header__btn--small');
|
996
|
+
}
|
997
|
+
});
|
998
|
+
}
|
999
|
+
},
|
823
1000
|
methods: {
|
824
1001
|
// 返回
|
825
1002
|
handleBack() {
|
@@ -870,7 +1047,7 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
870
1047
|
staticRenderFns,
|
871
1048
|
false,
|
872
1049
|
null,
|
873
|
-
"
|
1050
|
+
"8de13f1a",
|
874
1051
|
null
|
875
1052
|
|
876
1053
|
)
|
@@ -2150,10 +2327,11 @@ webpackContext.id = 1603;
|
|
2150
2327
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2151
2328
|
|
2152
2329
|
var map = {
|
2330
|
+
"./NBBadge/index.js": 3250,
|
2153
2331
|
"./NBCheckboxGroup/index.js": 9070,
|
2154
2332
|
"./NBEmpty/index.js": 4400,
|
2155
2333
|
"./NBFullscreenDialog/index.js": 4531,
|
2156
|
-
"./NBHeader/index.js":
|
2334
|
+
"./NBHeader/index.js": 1001,
|
2157
2335
|
"./NBIcon/index.js": 79,
|
2158
2336
|
"./NBOutFooterDialog/index.js": 5592,
|
2159
2337
|
"./NBPagination/index.js": 8369,
|
@@ -5161,7 +5339,7 @@ var iconfont = __webpack_require__(1970);
|
|
5161
5339
|
/*
|
5162
5340
|
* @Author: chenghuan.dong
|
5163
5341
|
* @Date: 2024-11-08 17:23:47
|
5164
|
-
* @LastEditTime: 2024-11-
|
5342
|
+
* @LastEditTime: 2024-11-15 16:12:39
|
5165
5343
|
* @LastEditors: chenghuan.dong
|
5166
5344
|
* @Description: 主index.js导出全部组件
|
5167
5345
|
* @FilePath: \nubomed-ui\packages\index.js
|
@@ -5189,7 +5367,7 @@ const install = function (Vue, options = {}) {
|
|
5189
5367
|
if (install.installed) return;
|
5190
5368
|
components.forEach(component => {
|
5191
5369
|
const name = 'nb-' + camelToKebab(component.name.slice(2));
|
5192
|
-
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'];
|
5370
|
+
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'];
|
5193
5371
|
if (installNames.includes(name)) {
|
5194
5372
|
console.log('%c' + '√ ' + name, 'color: #00A572;');
|
5195
5373
|
} else {
|