nubomed-ui 2.0.46 → 2.0.48

Sign up to get free protection for your applications and to get access to all the features.
package/nubomed-ui.umd.js CHANGED
@@ -546,7 +546,7 @@ src.install = function (Vue) {
546
546
 
547
547
  /***/ }),
548
548
 
549
- /***/ 4908:
549
+ /***/ 4066:
550
550
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
551
551
 
552
552
  "use strict";
@@ -558,8 +558,8 @@ __webpack_require__.d(__webpack_exports__, {
558
558
  "default": function() { return /* binding */ NBDialog; }
559
559
  });
560
560
 
561
- ;// ./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/NBDialog/src/index.vue?vue&type=template&id=5de1a7ac&scoped=true
562
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:"nb-dialog__wrapper",attrs:{"visible":_vm.visible,"show-close":_vm.showClose,"close-on-click-modal":false,"close-on-press-escape":false,"center":_vm.center,"dialog-center":_vm.dialogCenter,"type":_vm.size,"title":_vm.$slots['title-right'] ? '' : _vm.title,"custom-class":_vm.dialogCustomClass,"before-close":_vm.handleClose,"append-to-body":"","destroy-on-close":""},on:{"closed":_vm.closedDialog}},[_c('template',{slot:"title"},[_vm._t("title"),(_vm.$slots['title-right'])?_c('div',{staticClass:"nb-dialog__header--has-form"},[_c('span',{staticClass:"el-dialog__title"},[_vm._v(_vm._s(_vm.title))]),_c('div',{staticClass:"el-dialog__right"},[_vm._t("title-right")],2)]):_vm._e()],2),_vm._t("default"),_c('template',{slot:"footer"},[_vm._t("footer",function(){return [(_vm.showCancelButton)?_c('el-button',{on:{"click":_vm.handleCancel}},[_vm._v(_vm._s(_vm.cancelButtonText)),(_vm.cancelButtonTime > -1)?[_vm._v("("+_vm._s(_vm.cancelAutoTime)+"S)")]:_vm._e()],2):_vm._e(),(_vm.showConfirmButton)?_c('el-button',{attrs:{"type":"primary","plain":_vm.confirmButtonPlain},on:{"click":_vm.handleConfirm}},[_vm._v(_vm._s(_vm.confirmButtonText)),(_vm.confirmButtonTime > -1)?[_vm._v("("+_vm._s(_vm.confirmAutoTime)+"S)")]:_vm._e()],2):_vm._e()]})],2)],2)}
561
+ ;// ./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/NBDialog/src/index.vue?vue&type=template&id=c64765f8&scoped=true
562
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:"nb-dialog__wrapper",attrs:{"visible":_vm.visible,"show-close":_vm.showClose,"close-on-click-modal":false,"close-on-press-escape":false,"center":_vm.center,"dialog-center":_vm.dialogCenter,"type":_vm.size,"title":_vm.$slots['title-right'] ? '' : _vm.title,"custom-class":_vm.dialogCustomClass,"before-close":_vm.handleClose,"append-to-body":"","destroy-on-close":""},on:{"closed":_vm.closedDialog}},[_c('template',{slot:"title"},[_vm._t("title"),(_vm.$slots['title-right'])?_c('div',{staticClass:"nb-dialog__header--has-form"},[_c('span',{staticClass:"el-dialog__title"},[_vm._v(_vm._s(_vm.title))]),_c('div',{staticClass:"el-dialog__right"},[_vm._t("title-right")],2)]):_vm._e()],2),_vm._t("default"),_c('template',{slot:"footer"},[(_vm.$slots.footer)?_vm._t("footer"):[(_vm.showCancelButton)?_c('el-button',{on:{"click":_vm.handleCancel}},[_vm._v(_vm._s(_vm.cancelButtonText)),(_vm.cancelButtonTime > -1)?[_vm._v("("+_vm._s(_vm.cancelAutoTime)+"S)")]:_vm._e()],2):_vm._e(),(_vm.showConfirmButton)?_c('el-button',{attrs:{"type":"primary","plain":_vm.confirmButtonPlain},on:{"click":_vm.handleConfirm}},[_vm._v(_vm._s(_vm.confirmButtonText)),(_vm.confirmButtonTime > -1)?[_vm._v("("+_vm._s(_vm.confirmAutoTime)+"S)")]:_vm._e()],2):_vm._e()]],2)],2)}
563
563
  var staticRenderFns = []
564
564
 
565
565
 
@@ -604,6 +604,7 @@ var staticRenderFns = []
604
604
  //
605
605
  //
606
606
  //
607
+ //
607
608
 
608
609
  /* harmony default export */ var srcvue_type_script_lang_js = ({
609
610
  name: 'NBDialog',
@@ -707,7 +708,7 @@ var staticRenderFns = []
707
708
  dialogCustomClass() {
708
709
  let cls = 'nb-dialog ';
709
710
  if (this.form) {
710
- cls += `nb-form-dialog `;
711
+ cls += 'nb-form-dialog ';
711
712
  }
712
713
  if (this.customClass) {
713
714
  cls += this.customClass;
@@ -796,7 +797,7 @@ var component = (0,componentNormalizer/* default */.A)(
796
797
  staticRenderFns,
797
798
  false,
798
799
  null,
799
- "5de1a7ac",
800
+ "c64765f8",
800
801
  null
801
802
 
802
803
  )
@@ -2236,6 +2237,255 @@ src.install = function (Vue) {
2236
2237
 
2237
2238
  /***/ }),
2238
2239
 
2240
+ /***/ 1842:
2241
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2242
+
2243
+ "use strict";
2244
+ // ESM COMPAT FLAG
2245
+ __webpack_require__.r(__webpack_exports__);
2246
+
2247
+ // EXPORTS
2248
+ __webpack_require__.d(__webpack_exports__, {
2249
+ "default": function() { return /* binding */ NBSidebarNavGroup; }
2250
+ });
2251
+
2252
+ ;// ./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/NBSidebarNavGroup/src/index.vue?vue&type=template&id=37c880ce&scoped=true
2253
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nb-sidebar-nav-group"},[_vm._t("head"),(_vm.title)?_c('div',{staticClass:"nav-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('div',{staticClass:"nb-sidebar-nav__wrapper"},[_vm._t("default")],2)],2)}
2254
+ var staticRenderFns = []
2255
+
2256
+
2257
+ ;// ./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/NBSidebarNavGroup/src/index.vue?vue&type=script&lang=js
2258
+ //
2259
+ //
2260
+ //
2261
+ //
2262
+ //
2263
+ //
2264
+ //
2265
+ //
2266
+ //
2267
+ //
2268
+ //
2269
+ //
2270
+ //
2271
+ //
2272
+ //
2273
+ //
2274
+ //
2275
+ //
2276
+
2277
+ /* harmony default export */ var srcvue_type_script_lang_js = ({
2278
+ name: 'NBSidebarNavGroup',
2279
+ // 左侧导航:图标+文字+数量+箭头
2280
+ props: {
2281
+ // 标题
2282
+ title: {
2283
+ type: String,
2284
+ default: ''
2285
+ }
2286
+ }
2287
+ });
2288
+ ;// ./packages/components/NBSidebarNavGroup/src/index.vue?vue&type=script&lang=js
2289
+ /* harmony default export */ var NBSidebarNavGroup_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
2290
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2291
+ var componentNormalizer = __webpack_require__(1656);
2292
+ ;// ./packages/components/NBSidebarNavGroup/src/index.vue
2293
+
2294
+
2295
+
2296
+
2297
+
2298
+ /* normalize component */
2299
+ ;
2300
+ var component = (0,componentNormalizer/* default */.A)(
2301
+ NBSidebarNavGroup_srcvue_type_script_lang_js,
2302
+ render,
2303
+ staticRenderFns,
2304
+ false,
2305
+ null,
2306
+ "37c880ce",
2307
+ null
2308
+
2309
+ )
2310
+
2311
+ /* harmony default export */ var src = (component.exports);
2312
+ ;// ./packages/components/NBSidebarNavGroup/index.js
2313
+
2314
+ src.install = function (Vue) {
2315
+ Vue.component(src.name, src);
2316
+ };
2317
+ /* harmony default export */ var NBSidebarNavGroup = (src);
2318
+
2319
+ /***/ }),
2320
+
2321
+ /***/ 8071:
2322
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2323
+
2324
+ "use strict";
2325
+ // ESM COMPAT FLAG
2326
+ __webpack_require__.r(__webpack_exports__);
2327
+
2328
+ // EXPORTS
2329
+ __webpack_require__.d(__webpack_exports__, {
2330
+ "default": function() { return /* binding */ NBSidebarNav; }
2331
+ });
2332
+
2333
+ ;// ./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/NBSidebarNav/src/index.vue?vue&type=template&id=19b803ac&scoped=true
2334
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nb-sidebar-nav",class:_vm.getClass},_vm._l((_vm.options),function(item,index){return _c('div',{key:index,staticClass:"nav-item",class:_vm.getItemClass(item),on:{"click":function($event){$event.stopPropagation();return _vm.handleChange(item, index)}}},[_vm._t("default",function(){return [(item[_vm.optionProps.icon])?_c('nb-icon',{staticClass:"nav-item__icon",attrs:{"icon":item[_vm.optionProps.icon]}}):_vm._e(),_c('div',{staticClass:"nav-item__text"},[_vm._v(_vm._s(item[_vm.optionProps.text]))]),(item[_vm.optionProps.num] >= 0)?_c('span',{staticClass:"nav-item__num"},[_vm._v(_vm._s(item[_vm.optionProps.num]))]):_vm._e(),(item[_vm.optionProps.badge])?_c('span',{staticClass:"nav-item__badge"},[_vm._v(_vm._s(_vm.getBadge(item)))]):_vm._e()]},{"row":item}),(_vm.showArrow)?_c('nb-icon',{staticClass:"nav-item__arrow",attrs:{"icon":"arrow-right"}}):_vm._e()],2)}),0)}
2335
+ var staticRenderFns = []
2336
+
2337
+
2338
+ ;// ./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/NBSidebarNav/src/index.vue?vue&type=script&lang=js
2339
+ //
2340
+ //
2341
+ //
2342
+ //
2343
+ //
2344
+ //
2345
+ //
2346
+ //
2347
+ //
2348
+ //
2349
+ //
2350
+ //
2351
+ //
2352
+ //
2353
+ //
2354
+ //
2355
+ //
2356
+ //
2357
+ //
2358
+
2359
+ /* harmony default export */ var srcvue_type_script_lang_js = ({
2360
+ name: 'NBSidebarNav',
2361
+ // 左侧导航:图标+文字+数量+箭头
2362
+ props: {
2363
+ // 选项数据,必须包含icon-svg图标名称,name-文字,count-数量(选填),className-样式名称(选填),group-分组名称,badgeCount-角标数量,大于0才显示
2364
+ options: {
2365
+ type: Array,
2366
+ default: () => {
2367
+ return [];
2368
+ }
2369
+ },
2370
+ // name: 名称,唯一值,icon 图标字段,text 文字字段,num 数量字段,badge 角标数量,state 状态(danger-异常)
2371
+ props: {
2372
+ type: Object,
2373
+ default: () => {
2374
+ return {};
2375
+ }
2376
+ },
2377
+ // 当前选中的名称,对应options里的name
2378
+ activeName: {
2379
+ type: [Number, String],
2380
+ default: ''
2381
+ },
2382
+ // 是否显示箭头
2383
+ showArrow: {
2384
+ type: Boolean,
2385
+ default: true
2386
+ },
2387
+ // 角标数量最大值,超出最大值显示+
2388
+ badgeMax: {
2389
+ type: Number,
2390
+ default: 99
2391
+ }
2392
+ },
2393
+ data() {
2394
+ return {
2395
+ defaultProps: {
2396
+ name: 'name',
2397
+ icon: 'icon',
2398
+ text: 'text',
2399
+ num: 'num',
2400
+ badge: 'badge',
2401
+ state: 'state'
2402
+ },
2403
+ active: this.activeName
2404
+ };
2405
+ },
2406
+ computed: {
2407
+ optionProps() {
2408
+ return Object.assign(this.defaultProps, this.props);
2409
+ },
2410
+ // 整体样式
2411
+ getClass() {
2412
+ let cls = '';
2413
+ // 如果有箭头
2414
+ if (this.showArrow) {
2415
+ cls += ' nb-sidebar-nav--arrow';
2416
+ }
2417
+ return cls;
2418
+ }
2419
+ },
2420
+ watch: {
2421
+ activeName(val) {
2422
+ this.active = val;
2423
+ }
2424
+ },
2425
+ methods: {
2426
+ // 每一行的样式
2427
+ getItemClass(item) {
2428
+ let cls = '';
2429
+ // danger 异常,背景是红色
2430
+ if (item[this.optionProps.state]) {
2431
+ cls += ` nav-item--${item[this.optionProps.state]}`;
2432
+ }
2433
+ // 异常情况补充 按单调拨 根据isAbnormal:true
2434
+ if (item.isAbnormal || item.abnormal) {
2435
+ cls += ` nav-item--error`;
2436
+ }
2437
+ // 选中
2438
+ if (item[this.optionProps.name] === this.active) {
2439
+ cls += ' nav-item--active';
2440
+ }
2441
+ return cls;
2442
+ },
2443
+ // 切换
2444
+ handleChange(item, index) {
2445
+ this.$emit('change', item, index);
2446
+ },
2447
+ // 角标
2448
+ getBadge(item) {
2449
+ if (item[this.optionProps.badge] > this.badgeMax) {
2450
+ return '99+';
2451
+ }
2452
+ return item[this.optionProps.badge];
2453
+ }
2454
+ }
2455
+ });
2456
+ ;// ./packages/components/NBSidebarNav/src/index.vue?vue&type=script&lang=js
2457
+ /* harmony default export */ var NBSidebarNav_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
2458
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2459
+ var componentNormalizer = __webpack_require__(1656);
2460
+ ;// ./packages/components/NBSidebarNav/src/index.vue
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+ /* normalize component */
2467
+ ;
2468
+ var component = (0,componentNormalizer/* default */.A)(
2469
+ NBSidebarNav_srcvue_type_script_lang_js,
2470
+ render,
2471
+ staticRenderFns,
2472
+ false,
2473
+ null,
2474
+ "19b803ac",
2475
+ null
2476
+
2477
+ )
2478
+
2479
+ /* harmony default export */ var src = (component.exports);
2480
+ ;// ./packages/components/NBSidebarNav/index.js
2481
+
2482
+ src.install = function (Vue) {
2483
+ Vue.component(src.name, src);
2484
+ };
2485
+ /* harmony default export */ var NBSidebarNav = (src);
2486
+
2487
+ /***/ }),
2488
+
2239
2489
  /***/ 6168:
2240
2490
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2241
2491
 
@@ -2879,7 +3129,7 @@ webpackContext.id = 1603;
2879
3129
  var map = {
2880
3130
  "./NBBadge/index.js": 3134,
2881
3131
  "./NBCheckboxGroup/index.js": 2129,
2882
- "./NBDialog/index.js": 4908,
3132
+ "./NBDialog/index.js": 4066,
2883
3133
  "./NBEmpty/index.js": 2846,
2884
3134
  "./NBFullscreenDialog/index.js": 1516,
2885
3135
  "./NBHeader/index.js": 6523,
@@ -2889,6 +3139,8 @@ var map = {
2889
3139
  "./NBPagination/index.js": 2407,
2890
3140
  "./NBProgress/index.js": 928,
2891
3141
  "./NBRadioGroup/index.js": 2139,
3142
+ "./NBSidebarNav/index.js": 8071,
3143
+ "./NBSidebarNavGroup/index.js": 1842,
2892
3144
  "./NBSummaryBar/index.js": 6168,
2893
3145
  "./NBTabs/index.js": 5434,
2894
3146
  "./NBTag/index.js": 8681
@@ -5899,7 +6151,7 @@ var iconfont = __webpack_require__(2170);
5899
6151
  /*
5900
6152
  * @Author: chenghuan.dong
5901
6153
  * @Date: 2024-11-08 17:23:47
5902
- * @LastEditTime: 2024-11-15 17:05:51
6154
+ * @LastEditTime: 2024-11-18 14:05:00
5903
6155
  * @LastEditors: chenghuan.dong
5904
6156
  * @Description: 主index.js导出全部组件
5905
6157
  * @FilePath: \nubomed-ui\packages\index.js
@@ -5927,7 +6179,7 @@ const install = function (Vue, options = {}) {
5927
6179
  if (install.installed) return;
5928
6180
  components.forEach(component => {
5929
6181
  const name = 'nb-' + camelToKebab(component.name.slice(2));
5930
- 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-dialog', 'nb-fullscreen-dialog', 'nb-out-footer-dialog', 'nb-message-dialog'];
6182
+ 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-dialog', 'nb-fullscreen-dialog', 'nb-out-footer-dialog', 'nb-message-dialog', 'nb-sidebar-nav-group', 'nb-sidebar-nav'];
5931
6183
  if (installNames.includes(name)) {
5932
6184
  console.log('%c' + '√ ' + name, 'color: #00A572;');
5933
6185
  } else {