nubomed-ui 2.0.13 → 2.0.15
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/nb-ui/index.css +1 -1
- package/fonts/iconfont.0c3a9555.woff2 +0 -0
- package/fonts/iconfont.a99a4236.ttf +0 -0
- package/fonts/iconfont.c068c01a.woff +0 -0
- package/nubomed-ui.common.js +271 -1610
- package/nubomed-ui.common.js.map +1 -1
- package/nubomed-ui.umd.js +271 -1610
- package/nubomed-ui.umd.js.map +1 -1
- package/nubomed-ui.umd.min.js +1 -7
- package/nubomed-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/img/check-error.509b7a84.svg +0 -29
- package/img/check-loading.0e416e6c.gif +0 -0
- package/img/check-success.cbd442a6.svg +0 -31
- package/img/empty-scan.8cf42221.png +0 -0
package/nubomed-ui.umd.js
CHANGED
@@ -150,7 +150,37 @@ function normalizeComponent(
|
|
150
150
|
|
151
151
|
/***/ }),
|
152
152
|
|
153
|
-
/***/
|
153
|
+
/***/ 151:
|
154
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155
|
+
|
156
|
+
"use strict";
|
157
|
+
__webpack_require__.r(__webpack_exports__);
|
158
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
|
159
|
+
/* 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__);
|
160
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
161
|
+
/* 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__);
|
162
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4417);
|
163
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
164
|
+
// Imports
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(7943), __webpack_require__.b);
|
169
|
+
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(8927), __webpack_require__.b);
|
170
|
+
var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(8705), __webpack_require__.b);
|
171
|
+
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()));
|
172
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
173
|
+
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
|
174
|
+
var ___CSS_LOADER_URL_REPLACEMENT_2___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
|
175
|
+
// Module
|
176
|
+
___CSS_LOADER_EXPORT___.push([module.id, "@font-face{font-family:iconfont;src:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"woff2\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ") format(\"woff\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ") format(\"truetype\")}.iconfont{font-family:iconfont!important;font-size:1rem;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-menu-stock-compare:before{content:\"\\e6b8\"}.icon-minus:before{content:\"\\e794\"}.icon-connect:before{content:\"\\e6ef\"}.icon-connect-error:before{content:\"\\e6f0\"}.icon-menu-take-no-back:before{content:\"\\e6e9\"}.icon-sort-down:before{content:\"\\e6ec\"}.icon-menu-storeroom-recevie-copy:before{content:\"\\e710\"}.icon-caret-up-expand:before{content:\"\\e6ee\"}.icon-caret-down-expand:before{content:\"\\e6f1\"}.icon-caret-left-expand:before{content:\"\\e6f2\"}.icon-caret-right-expand:before{content:\"\\e6f3\"}.icon-loading:before{content:\"\\e6fe\"}.icon-caret-up:before{content:\"\\e6ff\"}.icon-double-arrow-left:before{content:\"\\e701\"}.icon-network-null:before{content:\"\\e609\"}.icon-double-arrow-right:before{content:\"\\e702\"}.icon-wifi-online:before{content:\"\\e60a\"}.icon-left-alignment:before{content:\"\\e703\"}.icon-network-4G:before{content:\"\\e60b\"}.icon-right-alignment:before{content:\"\\e704\"}.icon-battery-charging:before{content:\"\\e60c\"}.icon-center-alignment:before{content:\"\\e705\"}.icon-wifi-offline:before{content:\"\\e60d\"}.icon-battery-low:before{content:\"\\e60e\"}.icon-network-5G:before{content:\"\\e60f\"}.icon-battery-null:before{content:\"\\e610\"}.icon-battery-full:before{content:\"\\e611\"}.icon-man-filled:before{content:\"\\e612\"}.icon-women-filled:before{content:\"\\e613\"}.icon-male-filled:before{content:\"\\e614\"}.icon-female-filled:before{content:\"\\e615\"}.icon-children-filled:before{content:\"\\e616\"}.icon-unknown-sex-filled:before{content:\"\\e617\"}.icon-account:before{content:\"\\e618\"}.icon-unlock-filled:before{content:\"\\e619\"}.icon-password:before{content:\"\\e61a\"}.icon-voice-no-filled:before{content:\"\\e61b\"}.icon-bell-filled:before{content:\"\\e61c\"}.icon-voice-filled:before{content:\"\\e61d\"}.icon-zhiyin:before{content:\"\\e61e\"}.icon-note:before{content:\"\\e61f\"}.icon-multiple-choice:before{content:\"\\e620\"}.icon-logout:before{content:\"\\e621\"}.icon-copy:before{content:\"\\e622\"}.icon-back:before{content:\"\\e623\"}.icon-menu-checked-filled:before{content:\"\\e624\"}.icon-door-closed:before{content:\"\\e625\"}.icon-menu-inventory-filled:before{content:\"\\e626\"}.icon-door-opened:before{content:\"\\e627\"}.icon-delete-filled:before{content:\"\\e628\"}.icon-circle-close-filled:before{content:\"\\e629\"}.icon-nail-filled:before{content:\"\\e62a\"}.icon-warning-filled:before{content:\"\\e62b\"}.icon-circle-plus-filled:before{content:\"\\e62c\"}.icon-urgent:before{content:\"\\e62d\"}.icon-xiala:before{content:\"\\e62e\"}.icon-remove-filled:before{content:\"\\e62f\"}.icon-circle-check-filled:before{content:\"\\e630\"}.icon-up:before{content:\"\\e631\"}.icon-square-down:before{content:\"\\e632\"}.icon-square-left:before{content:\"\\e633\"}.icon-right:before{content:\"\\e634\"}.icon-caret-right:before{content:\"\\e635\"}.icon-caret-down:before{content:\"\\e636\"}.icon-double-caret:before{content:\"\\e638\"}.icon-import-file-filled:before{content:\"\\e639\"}.icon-export-file-filled:before{content:\"\\e63a\"}.icon-tuisun:before{content:\"\\e63b\"}.icon-tuiyao:before{content:\"\\e63c\"}.icon-print-filled:before{content:\"\\e63d\"}.icon-video:before{content:\"\\e63e\"}.icon-download-filled:before{content:\"\\e63f\"}.icon-switch-square-filled:before{content:\"\\e640\"}.icon-caps-filled:before{content:\"\\e641\"}.icon-split:before{content:\"\\e642\"}.icon-lock-filled-bottom:before{content:\"\\e643\"}.icon-checked-corner-bottom:before{content:\"\\e644\"}.icon-switch:before{content:\"\\e646\"}.icon-radio-unselected:before{content:\"\\e647\"}.icon-radio-selected:before{content:\"\\e648\"}.icon-humidity:before{content:\"\\e649\"}.icon-checkbox-checked:before{content:\"\\e64a\"}.icon-temperature:before{content:\"\\e64b\"}.icon-checkbox-null:before{content:\"\\e64c\"}.icon-checkbox-indeterminate:before{content:\"\\e64d\"}.icon-checkbox-filled:before{content:\"\\e64e\"}.icon-menu-rescue:before{content:\"\\e64f\"}.icon-menu-take-back:before{content:\"\\e650\"}.icon-menu-consume:before{content:\"\\e651\"}.icon-menu-expiry-warning:before{content:\"\\e653\"}.icon-menu-scrap:before{content:\"\\e654\"}.icon-menu-in-store:before{content:\"\\e655\"}.icon-menu-abnormal:before{content:\"\\e656\"}.icon-menu-control:before{content:\"\\e657\"}.icon-menu-inventory:before{content:\"\\e659\"}.icon-menu-video:before{content:\"\\e65a\"}.icon-menu-user-log:before{content:\"\\e65b\"}.icon-menu-face:before{content:\"\\e65c\"}.icon-menu-fingerprint:before{content:\"\\e65d\"}.icon-menu-update:before{content:\"\\e65e\"}.icon-menu-info:before{content:\"\\e65f\"}.icon-drug:before{content:\"\\e660\"}.icon-menu-phone:before{content:\"\\e661\"}.icon-menu-about:before{content:\"\\e662\"}.icon-syringe:before{content:\"\\e665\"}.icon-menu-out-stock:before{content:\"\\e666\"}.icon-rfid:before{content:\"\\e667\"}.icon-unlock:before{content:\"\\e668\"}.icon-recovery:before{content:\"\\e669\"}.icon-menu-notice-setting:before{content:\"\\e66a\"}.icon-menu-temp-hum:before{content:\"\\e66c\"}.icon-menu-uv:before{content:\"\\e66d\"}.icon-yizhuquyao:before{content:\"\\e66f\"}.icon-menu-apply:before{content:\"\\e671\"}.icon-menu-checked:before{content:\"\\e672\"}.icon-menu-take-plus:before{content:\"\\e673\"}.icon-shoushu:before{content:\"\\e674\"}.icon-menu-urgent-take:before{content:\"\\e675\"}.icon-menu-calibration:before{content:\"\\e676\"}.icon-menu-empty-bottle-recycling:before{content:\"\\e677\"}.icon-huanhui:before{content:\"\\e678\"}.icon-menu-storeroom-grant:before{content:\"\\e679\"}.icon-menu-setting:before{content:\"\\e67a\"}.icon-menu-notice:before{content:\"\\e67b\"}.icon-menu-empty-bottle-take:before{content:\"\\e67c\"}.icon-menu-return-loss:before{content:\"\\e67d\"}.icon-delete:before{content:\"\\e67e\"}.icon-print:before{content:\"\\e67f\"}.icon-import:before{content:\"\\e680\"}.icon-relate:before{content:\"\\e681\"}.icon-download:before{content:\"\\e682\"}.icon-refresh:before{content:\"\\e683\"}.icon-yaopinguanli:before{content:\"\\e684\"}.icon-menu-consumable:before{content:\"\\e685\"}.icon-stop:before{content:\"\\e686\"}.icon-menu-user:before{content:\"\\e687\"}.icon-menu-exchange:before{content:\"\\e688\"}.icon-shijian:before{content:\"\\e689\"}.icon-menu-help:before{content:\"\\e68a\"}.icon-circle-close:before{content:\"\\e68b\"}.icon-circle-plus:before{content:\"\\e68c\"}.icon-shutdown:before{content:\"\\e68d\"}.icon-menu-guide:before{content:\"\\e68e\"}.icon-eye-open:before{content:\"\\e68f\"}.icon-eye-close:before{content:\"\\e690\"}.icon-search:before{content:\"\\e691\"}.icon-exit:before{content:\"\\e694\"}.icon-calendar:before{content:\"\\e695\"}.icon-women:before{content:\"\\e696\"}.icon-man:before{content:\"\\e697\"}.icon-children:before{content:\"\\e698\"}.icon-female:before{content:\"\\e699\"}.icon-unknown-sex:before{content:\"\\e69a\"}.icon-male:before{content:\"\\e69b\"}.icon-caps:before{content:\"\\e69e\"}.icon-menu-trace-stock:before{content:\"\\e70e\"}.icon-check:before{content:\"\\e69f\"}.icon-close:before{content:\"\\e6a0\"}.icon-plus:before{content:\"\\e6a3\"}.icon-menu-anti-theft:before{content:\"\\e664\"}.icon-single-branch:before{content:\"\\e66e\"}.icon-menu-card:before{content:\"\\e6a4\"}.icon-clear-filled:before{content:\"\\e6b5\"}.icon-nail:before{content:\"\\e6b6\"}.icon-menu-back:before{content:\"\\e6b7\"}.icon-menu-take:before{content:\"\\e6bb\"}.icon-menu-system-log:before{content:\"\\e6bc\"}.icon-menu-billed:before{content:\"\\e6bd\"}.icon-menu-dull-warning:before{content:\"\\e601\"}.icon-menu-trace-operator:before{content:\"\\e602\"}.icon-menu-trace-goods:before{content:\"\\e604\"}.icon-children-blue:before{content:\"\\e6a6\"}.icon-humidity-normal:before{content:\"\\e6be\"}.icon-humidity-abnormal:before{content:\"\\e6bf\"}.icon-temperature-normal:before{content:\"\\e6c0\"}.icon-temperature-abnormal:before{content:\"\\e6c1\"}.icon-menu-allocate:before{content:\"\\e693\"}.icon-menu-unknown:before{content:\"\\e69c\"}.icon-arrow-down:before{content:\"\\e69d\"}.icon-arrow-up:before{content:\"\\e6a1\"}.icon-menu-stock:before{content:\"\\e6a2\"}.icon-arrow-left:before{content:\"\\e6cf\"}.icon-arrow-right:before{content:\"\\e6d0\"}.icon-menu-list-query:before{content:\"\\e6d1\"}.icon-menu-list-abnormal:before{content:\"\\e6d2\"}.icon-go-filled:before{content:\"\\e6d4\"}.icon-menu-revoke-billing:before{content:\"\\e652\"}.icon-menu-network-log:before{content:\"\\e658\"}.icon-menu-revoke-consume:before{content:\"\\e670\"}.icon-lock-filled:before{content:\"\\e70f\"}.icon-keyboard:before{content:\"\\e603\"}.icon-face:before{content:\"\\e6b9\"}.icon-computer:before{content:\"\\e6d7\"}.icon-checked-corner-top:before{content:\"\\e6a7\"}.icon-taocanheguanli:before{content:\"\\e6e0\"}.icon-yidong:before{content:\"\\e6e1\"}.icon-menu-recovery:before{content:\"\\e6e3\"}.icon-menu-storeroom-check:before{content:\"\\e6e4\"}.icon-menu-storeroom-receive:before{content:\"\\e6e5\"}.icon-anesthesiologist:before{content:\"\\e6e6\"}.icon-menu-book:before{content:\"\\e6e7\"}.icon-camera:before{content:\"\\e6eb\"}", ""]);
|
177
|
+
// Exports
|
178
|
+
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
179
|
+
|
180
|
+
|
181
|
+
/***/ }),
|
182
|
+
|
183
|
+
/***/ 7079:
|
154
184
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155
185
|
|
156
186
|
"use strict";
|
@@ -164,7 +194,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
164
194
|
|
165
195
|
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()));
|
166
196
|
// Module
|
167
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".
|
197
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".iconfont[data-v-de41916a]{display:inline-flex}", ""]);
|
168
198
|
// Exports
|
169
199
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
170
200
|
|
@@ -284,6 +314,39 @@ module.exports = function (cssWithMappingToString) {
|
|
284
314
|
|
285
315
|
/***/ }),
|
286
316
|
|
317
|
+
/***/ 4417:
|
318
|
+
/***/ (function(module) {
|
319
|
+
|
320
|
+
"use strict";
|
321
|
+
|
322
|
+
|
323
|
+
module.exports = function (url, options) {
|
324
|
+
if (!options) {
|
325
|
+
options = {};
|
326
|
+
}
|
327
|
+
if (!url) {
|
328
|
+
return url;
|
329
|
+
}
|
330
|
+
url = String(url.__esModule ? url.default : url);
|
331
|
+
|
332
|
+
// If url is already wrapped in quotes, remove them
|
333
|
+
if (/^['"].*['"]$/.test(url)) {
|
334
|
+
url = url.slice(1, -1);
|
335
|
+
}
|
336
|
+
if (options.hash) {
|
337
|
+
url += options.hash;
|
338
|
+
}
|
339
|
+
|
340
|
+
// Should url be wrapped?
|
341
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
342
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
343
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
344
|
+
}
|
345
|
+
return url;
|
346
|
+
};
|
347
|
+
|
348
|
+
/***/ }),
|
349
|
+
|
287
350
|
/***/ 1601:
|
288
351
|
/***/ (function(module) {
|
289
352
|
|
@@ -509,7 +572,7 @@ src.install = function (Vue) {
|
|
509
572
|
|
510
573
|
/***/ }),
|
511
574
|
|
512
|
-
/***/
|
575
|
+
/***/ 4794:
|
513
576
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
514
577
|
|
515
578
|
"use strict";
|
@@ -521,7 +584,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
521
584
|
"default": function() { return /* binding */ components_NBHeader; }
|
522
585
|
});
|
523
586
|
|
524
|
-
;// ./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/NBHeader/index.vue?vue&type=template&id=
|
587
|
+
;// ./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/NBHeader/index.vue?vue&type=template&id=40023fcc&scoped=true
|
525
588
|
var render = function render() {
|
526
589
|
var _vm = this,
|
527
590
|
_c = _vm._self._c;
|
@@ -535,12 +598,10 @@ var render = function render() {
|
|
535
598
|
return _vm.handleBack.apply(null, arguments);
|
536
599
|
}
|
537
600
|
}
|
538
|
-
}, [_c('
|
601
|
+
}, [_c('NBIcon', {
|
539
602
|
attrs: {
|
540
|
-
"icon
|
603
|
+
"icon": "back"
|
541
604
|
}
|
542
|
-
}), _c('span', {
|
543
|
-
staticClass: "iconfont icon-back"
|
544
605
|
}), _c('span', {
|
545
606
|
staticClass: "nb-header__back__text"
|
546
607
|
}, [_vm._v(_vm._s(_vm.backText))])], 1) : _vm._e(), _c('div', {
|
@@ -581,9 +642,9 @@ var render = function render() {
|
|
581
642
|
return _vm.handleLogout.apply(null, arguments);
|
582
643
|
}
|
583
644
|
}
|
584
|
-
}, [_c('
|
645
|
+
}, [_c('NBIcon', {
|
585
646
|
attrs: {
|
586
|
-
"icon
|
647
|
+
"icon": "logout"
|
587
648
|
}
|
588
649
|
}), _c('span', {
|
589
650
|
staticClass: "nb-header__logout__text"
|
@@ -591,1137 +652,15 @@ var render = function render() {
|
|
591
652
|
};
|
592
653
|
var staticRenderFns = [];
|
593
654
|
|
594
|
-
// EXTERNAL MODULE: ./
|
595
|
-
var
|
596
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js
|
597
|
-
var esnext_iterator_constructor = __webpack_require__(8992);
|
598
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.filter.js
|
599
|
-
var esnext_iterator_filter = __webpack_require__(4520);
|
600
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
601
|
-
var esnext_iterator_for_each = __webpack_require__(3949);
|
602
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.map.js
|
603
|
-
var esnext_iterator_map = __webpack_require__(1454);
|
604
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.reduce.js
|
605
|
-
var esnext_iterator_reduce = __webpack_require__(8872);
|
606
|
-
;// ./node_modules/vuex/dist/vuex.esm.js
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
/*!
|
614
|
-
* vuex v3.6.2
|
615
|
-
* (c) 2021 Evan You
|
616
|
-
* @license MIT
|
617
|
-
*/
|
618
|
-
function applyMixin(Vue) {
|
619
|
-
var version = Number(Vue.version.split('.')[0]);
|
620
|
-
if (version >= 2) {
|
621
|
-
Vue.mixin({
|
622
|
-
beforeCreate: vuexInit
|
623
|
-
});
|
624
|
-
} else {
|
625
|
-
// override init and inject vuex init procedure
|
626
|
-
// for 1.x backwards compatibility.
|
627
|
-
var _init = Vue.prototype._init;
|
628
|
-
Vue.prototype._init = function (options) {
|
629
|
-
if (options === void 0) options = {};
|
630
|
-
options.init = options.init ? [vuexInit].concat(options.init) : vuexInit;
|
631
|
-
_init.call(this, options);
|
632
|
-
};
|
633
|
-
}
|
634
|
-
|
635
|
-
/**
|
636
|
-
* Vuex init hook, injected into each instances init hooks list.
|
637
|
-
*/
|
638
|
-
|
639
|
-
function vuexInit() {
|
640
|
-
var options = this.$options;
|
641
|
-
// store injection
|
642
|
-
if (options.store) {
|
643
|
-
this.$store = typeof options.store === 'function' ? options.store() : options.store;
|
644
|
-
} else if (options.parent && options.parent.$store) {
|
645
|
-
this.$store = options.parent.$store;
|
646
|
-
}
|
647
|
-
}
|
648
|
-
}
|
649
|
-
var target = typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : {};
|
650
|
-
var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
651
|
-
function devtoolPlugin(store) {
|
652
|
-
if (!devtoolHook) {
|
653
|
-
return;
|
654
|
-
}
|
655
|
-
store._devtoolHook = devtoolHook;
|
656
|
-
devtoolHook.emit('vuex:init', store);
|
657
|
-
devtoolHook.on('vuex:travel-to-state', function (targetState) {
|
658
|
-
store.replaceState(targetState);
|
659
|
-
});
|
660
|
-
store.subscribe(function (mutation, state) {
|
661
|
-
devtoolHook.emit('vuex:mutation', mutation, state);
|
662
|
-
}, {
|
663
|
-
prepend: true
|
664
|
-
});
|
665
|
-
store.subscribeAction(function (action, state) {
|
666
|
-
devtoolHook.emit('vuex:action', action, state);
|
667
|
-
}, {
|
668
|
-
prepend: true
|
669
|
-
});
|
670
|
-
}
|
671
|
-
|
672
|
-
/**
|
673
|
-
* Get the first item that pass the test
|
674
|
-
* by second argument function
|
675
|
-
*
|
676
|
-
* @param {Array} list
|
677
|
-
* @param {Function} f
|
678
|
-
* @return {*}
|
679
|
-
*/
|
680
|
-
function find(list, f) {
|
681
|
-
return list.filter(f)[0];
|
682
|
-
}
|
683
|
-
|
684
|
-
/**
|
685
|
-
* Deep copy the given object considering circular structure.
|
686
|
-
* This function caches all nested objects and its copies.
|
687
|
-
* If it detects circular structure, use cached copy to avoid infinite loop.
|
688
|
-
*
|
689
|
-
* @param {*} obj
|
690
|
-
* @param {Array<Object>} cache
|
691
|
-
* @return {*}
|
692
|
-
*/
|
693
|
-
function deepCopy(obj, cache) {
|
694
|
-
if (cache === void 0) cache = [];
|
695
|
-
|
696
|
-
// just return if obj is immutable value
|
697
|
-
if (obj === null || typeof obj !== 'object') {
|
698
|
-
return obj;
|
699
|
-
}
|
700
|
-
|
701
|
-
// if obj is hit, it is in circular structure
|
702
|
-
var hit = find(cache, function (c) {
|
703
|
-
return c.original === obj;
|
704
|
-
});
|
705
|
-
if (hit) {
|
706
|
-
return hit.copy;
|
707
|
-
}
|
708
|
-
var copy = Array.isArray(obj) ? [] : {};
|
709
|
-
// put the copy into cache at first
|
710
|
-
// because we want to refer it in recursive deepCopy
|
711
|
-
cache.push({
|
712
|
-
original: obj,
|
713
|
-
copy: copy
|
714
|
-
});
|
715
|
-
Object.keys(obj).forEach(function (key) {
|
716
|
-
copy[key] = deepCopy(obj[key], cache);
|
717
|
-
});
|
718
|
-
return copy;
|
719
|
-
}
|
720
|
-
|
721
|
-
/**
|
722
|
-
* forEach for object
|
723
|
-
*/
|
724
|
-
function forEachValue(obj, fn) {
|
725
|
-
Object.keys(obj).forEach(function (key) {
|
726
|
-
return fn(obj[key], key);
|
727
|
-
});
|
728
|
-
}
|
729
|
-
function isObject(obj) {
|
730
|
-
return obj !== null && typeof obj === 'object';
|
731
|
-
}
|
732
|
-
function isPromise(val) {
|
733
|
-
return val && typeof val.then === 'function';
|
734
|
-
}
|
735
|
-
function assert(condition, msg) {
|
736
|
-
if (!condition) {
|
737
|
-
throw new Error("[vuex] " + msg);
|
738
|
-
}
|
739
|
-
}
|
740
|
-
function partial(fn, arg) {
|
741
|
-
return function () {
|
742
|
-
return fn(arg);
|
743
|
-
};
|
744
|
-
}
|
745
|
-
|
746
|
-
// Base data struct for store's module, package with some attribute and method
|
747
|
-
var Module = function Module(rawModule, runtime) {
|
748
|
-
this.runtime = runtime;
|
749
|
-
// Store some children item
|
750
|
-
this._children = Object.create(null);
|
751
|
-
// Store the origin module object which passed by programmer
|
752
|
-
this._rawModule = rawModule;
|
753
|
-
var rawState = rawModule.state;
|
754
|
-
|
755
|
-
// Store the origin module's state
|
756
|
-
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
|
757
|
-
};
|
758
|
-
var prototypeAccessors = {
|
759
|
-
namespaced: {
|
760
|
-
configurable: true
|
761
|
-
}
|
762
|
-
};
|
763
|
-
prototypeAccessors.namespaced.get = function () {
|
764
|
-
return !!this._rawModule.namespaced;
|
765
|
-
};
|
766
|
-
Module.prototype.addChild = function addChild(key, module) {
|
767
|
-
this._children[key] = module;
|
768
|
-
};
|
769
|
-
Module.prototype.removeChild = function removeChild(key) {
|
770
|
-
delete this._children[key];
|
771
|
-
};
|
772
|
-
Module.prototype.getChild = function getChild(key) {
|
773
|
-
return this._children[key];
|
774
|
-
};
|
775
|
-
Module.prototype.hasChild = function hasChild(key) {
|
776
|
-
return key in this._children;
|
777
|
-
};
|
778
|
-
Module.prototype.update = function update(rawModule) {
|
779
|
-
this._rawModule.namespaced = rawModule.namespaced;
|
780
|
-
if (rawModule.actions) {
|
781
|
-
this._rawModule.actions = rawModule.actions;
|
782
|
-
}
|
783
|
-
if (rawModule.mutations) {
|
784
|
-
this._rawModule.mutations = rawModule.mutations;
|
785
|
-
}
|
786
|
-
if (rawModule.getters) {
|
787
|
-
this._rawModule.getters = rawModule.getters;
|
788
|
-
}
|
789
|
-
};
|
790
|
-
Module.prototype.forEachChild = function forEachChild(fn) {
|
791
|
-
forEachValue(this._children, fn);
|
792
|
-
};
|
793
|
-
Module.prototype.forEachGetter = function forEachGetter(fn) {
|
794
|
-
if (this._rawModule.getters) {
|
795
|
-
forEachValue(this._rawModule.getters, fn);
|
796
|
-
}
|
797
|
-
};
|
798
|
-
Module.prototype.forEachAction = function forEachAction(fn) {
|
799
|
-
if (this._rawModule.actions) {
|
800
|
-
forEachValue(this._rawModule.actions, fn);
|
801
|
-
}
|
802
|
-
};
|
803
|
-
Module.prototype.forEachMutation = function forEachMutation(fn) {
|
804
|
-
if (this._rawModule.mutations) {
|
805
|
-
forEachValue(this._rawModule.mutations, fn);
|
806
|
-
}
|
807
|
-
};
|
808
|
-
Object.defineProperties(Module.prototype, prototypeAccessors);
|
809
|
-
var ModuleCollection = function ModuleCollection(rawRootModule) {
|
810
|
-
// register root module (Vuex.Store options)
|
811
|
-
this.register([], rawRootModule, false);
|
812
|
-
};
|
813
|
-
ModuleCollection.prototype.get = function get(path) {
|
814
|
-
return path.reduce(function (module, key) {
|
815
|
-
return module.getChild(key);
|
816
|
-
}, this.root);
|
817
|
-
};
|
818
|
-
ModuleCollection.prototype.getNamespace = function getNamespace(path) {
|
819
|
-
var module = this.root;
|
820
|
-
return path.reduce(function (namespace, key) {
|
821
|
-
module = module.getChild(key);
|
822
|
-
return namespace + (module.namespaced ? key + '/' : '');
|
823
|
-
}, '');
|
824
|
-
};
|
825
|
-
ModuleCollection.prototype.update = function update$1(rawRootModule) {
|
826
|
-
update([], this.root, rawRootModule);
|
827
|
-
};
|
828
|
-
ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
|
829
|
-
var this$1 = this;
|
830
|
-
if (runtime === void 0) runtime = true;
|
831
|
-
if (false) {}
|
832
|
-
var newModule = new Module(rawModule, runtime);
|
833
|
-
if (path.length === 0) {
|
834
|
-
this.root = newModule;
|
835
|
-
} else {
|
836
|
-
var parent = this.get(path.slice(0, -1));
|
837
|
-
parent.addChild(path[path.length - 1], newModule);
|
838
|
-
}
|
839
|
-
|
840
|
-
// register nested modules
|
841
|
-
if (rawModule.modules) {
|
842
|
-
forEachValue(rawModule.modules, function (rawChildModule, key) {
|
843
|
-
this$1.register(path.concat(key), rawChildModule, runtime);
|
844
|
-
});
|
845
|
-
}
|
846
|
-
};
|
847
|
-
ModuleCollection.prototype.unregister = function unregister(path) {
|
848
|
-
var parent = this.get(path.slice(0, -1));
|
849
|
-
var key = path[path.length - 1];
|
850
|
-
var child = parent.getChild(key);
|
851
|
-
if (!child) {
|
852
|
-
if (false) {}
|
853
|
-
return;
|
854
|
-
}
|
855
|
-
if (!child.runtime) {
|
856
|
-
return;
|
857
|
-
}
|
858
|
-
parent.removeChild(key);
|
859
|
-
};
|
860
|
-
ModuleCollection.prototype.isRegistered = function isRegistered(path) {
|
861
|
-
var parent = this.get(path.slice(0, -1));
|
862
|
-
var key = path[path.length - 1];
|
863
|
-
if (parent) {
|
864
|
-
return parent.hasChild(key);
|
865
|
-
}
|
866
|
-
return false;
|
867
|
-
};
|
868
|
-
function update(path, targetModule, newModule) {
|
869
|
-
if (false) {}
|
870
|
-
|
871
|
-
// update target module
|
872
|
-
targetModule.update(newModule);
|
873
|
-
|
874
|
-
// update nested modules
|
875
|
-
if (newModule.modules) {
|
876
|
-
for (var key in newModule.modules) {
|
877
|
-
if (!targetModule.getChild(key)) {
|
878
|
-
if (false) {}
|
879
|
-
return;
|
880
|
-
}
|
881
|
-
update(path.concat(key), targetModule.getChild(key), newModule.modules[key]);
|
882
|
-
}
|
883
|
-
}
|
884
|
-
}
|
885
|
-
var functionAssert = {
|
886
|
-
assert: function (value) {
|
887
|
-
return typeof value === 'function';
|
888
|
-
},
|
889
|
-
expected: 'function'
|
890
|
-
};
|
891
|
-
var objectAssert = {
|
892
|
-
assert: function (value) {
|
893
|
-
return typeof value === 'function' || typeof value === 'object' && typeof value.handler === 'function';
|
894
|
-
},
|
895
|
-
expected: 'function or object with "handler" function'
|
896
|
-
};
|
897
|
-
var assertTypes = {
|
898
|
-
getters: functionAssert,
|
899
|
-
mutations: functionAssert,
|
900
|
-
actions: objectAssert
|
901
|
-
};
|
902
|
-
function assertRawModule(path, rawModule) {
|
903
|
-
Object.keys(assertTypes).forEach(function (key) {
|
904
|
-
if (!rawModule[key]) {
|
905
|
-
return;
|
906
|
-
}
|
907
|
-
var assertOptions = assertTypes[key];
|
908
|
-
forEachValue(rawModule[key], function (value, type) {
|
909
|
-
assert(assertOptions.assert(value), makeAssertionMessage(path, key, type, value, assertOptions.expected));
|
910
|
-
});
|
911
|
-
});
|
912
|
-
}
|
913
|
-
function makeAssertionMessage(path, key, type, value, expected) {
|
914
|
-
var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
|
915
|
-
if (path.length > 0) {
|
916
|
-
buf += " in module \"" + path.join('.') + "\"";
|
917
|
-
}
|
918
|
-
buf += " is " + JSON.stringify(value) + ".";
|
919
|
-
return buf;
|
920
|
-
}
|
921
|
-
var Vue; // bind on install
|
922
|
-
|
923
|
-
var Store = function Store(options) {
|
924
|
-
var this$1 = this;
|
925
|
-
if (options === void 0) options = {};
|
926
|
-
|
927
|
-
// Auto install if it is not done yet and `window` has `Vue`.
|
928
|
-
// To allow users to avoid auto-installation in some cases,
|
929
|
-
// this code should be placed here. See #731
|
930
|
-
if (!Vue && typeof window !== 'undefined' && window.Vue) {
|
931
|
-
install(window.Vue);
|
932
|
-
}
|
933
|
-
if (false) {}
|
934
|
-
var plugins = options.plugins;
|
935
|
-
if (plugins === void 0) plugins = [];
|
936
|
-
var strict = options.strict;
|
937
|
-
if (strict === void 0) strict = false;
|
938
|
-
|
939
|
-
// store internal state
|
940
|
-
this._committing = false;
|
941
|
-
this._actions = Object.create(null);
|
942
|
-
this._actionSubscribers = [];
|
943
|
-
this._mutations = Object.create(null);
|
944
|
-
this._wrappedGetters = Object.create(null);
|
945
|
-
this._modules = new ModuleCollection(options);
|
946
|
-
this._modulesNamespaceMap = Object.create(null);
|
947
|
-
this._subscribers = [];
|
948
|
-
this._watcherVM = new Vue();
|
949
|
-
this._makeLocalGettersCache = Object.create(null);
|
950
|
-
|
951
|
-
// bind commit and dispatch to self
|
952
|
-
var store = this;
|
953
|
-
var ref = this;
|
954
|
-
var dispatch = ref.dispatch;
|
955
|
-
var commit = ref.commit;
|
956
|
-
this.dispatch = function boundDispatch(type, payload) {
|
957
|
-
return dispatch.call(store, type, payload);
|
958
|
-
};
|
959
|
-
this.commit = function boundCommit(type, payload, options) {
|
960
|
-
return commit.call(store, type, payload, options);
|
961
|
-
};
|
962
|
-
|
963
|
-
// strict mode
|
964
|
-
this.strict = strict;
|
965
|
-
var state = this._modules.root.state;
|
966
|
-
|
967
|
-
// init root module.
|
968
|
-
// this also recursively registers all sub-modules
|
969
|
-
// and collects all module getters inside this._wrappedGetters
|
970
|
-
installModule(this, state, [], this._modules.root);
|
971
|
-
|
972
|
-
// initialize the store vm, which is responsible for the reactivity
|
973
|
-
// (also registers _wrappedGetters as computed properties)
|
974
|
-
resetStoreVM(this, state);
|
975
|
-
|
976
|
-
// apply plugins
|
977
|
-
plugins.forEach(function (plugin) {
|
978
|
-
return plugin(this$1);
|
979
|
-
});
|
980
|
-
var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
|
981
|
-
if (useDevtools) {
|
982
|
-
devtoolPlugin(this);
|
983
|
-
}
|
984
|
-
};
|
985
|
-
var prototypeAccessors$1 = {
|
986
|
-
state: {
|
987
|
-
configurable: true
|
988
|
-
}
|
989
|
-
};
|
990
|
-
prototypeAccessors$1.state.get = function () {
|
991
|
-
return this._vm._data.$$state;
|
992
|
-
};
|
993
|
-
prototypeAccessors$1.state.set = function (v) {
|
994
|
-
if (false) {}
|
995
|
-
};
|
996
|
-
Store.prototype.commit = function commit(_type, _payload, _options) {
|
997
|
-
var this$1 = this;
|
998
|
-
|
999
|
-
// check object-style commit
|
1000
|
-
var ref = unifyObjectStyle(_type, _payload, _options);
|
1001
|
-
var type = ref.type;
|
1002
|
-
var payload = ref.payload;
|
1003
|
-
var options = ref.options;
|
1004
|
-
var mutation = {
|
1005
|
-
type: type,
|
1006
|
-
payload: payload
|
1007
|
-
};
|
1008
|
-
var entry = this._mutations[type];
|
1009
|
-
if (!entry) {
|
1010
|
-
if (false) {}
|
1011
|
-
return;
|
1012
|
-
}
|
1013
|
-
this._withCommit(function () {
|
1014
|
-
entry.forEach(function commitIterator(handler) {
|
1015
|
-
handler(payload);
|
1016
|
-
});
|
1017
|
-
});
|
1018
|
-
this._subscribers.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
1019
|
-
.forEach(function (sub) {
|
1020
|
-
return sub(mutation, this$1.state);
|
1021
|
-
});
|
1022
|
-
if (false) {}
|
1023
|
-
};
|
1024
|
-
Store.prototype.dispatch = function dispatch(_type, _payload) {
|
1025
|
-
var this$1 = this;
|
1026
|
-
|
1027
|
-
// check object-style dispatch
|
1028
|
-
var ref = unifyObjectStyle(_type, _payload);
|
1029
|
-
var type = ref.type;
|
1030
|
-
var payload = ref.payload;
|
1031
|
-
var action = {
|
1032
|
-
type: type,
|
1033
|
-
payload: payload
|
1034
|
-
};
|
1035
|
-
var entry = this._actions[type];
|
1036
|
-
if (!entry) {
|
1037
|
-
if (false) {}
|
1038
|
-
return;
|
1039
|
-
}
|
1040
|
-
try {
|
1041
|
-
this._actionSubscribers.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
1042
|
-
.filter(function (sub) {
|
1043
|
-
return sub.before;
|
1044
|
-
}).forEach(function (sub) {
|
1045
|
-
return sub.before(action, this$1.state);
|
1046
|
-
});
|
1047
|
-
} catch (e) {
|
1048
|
-
if (false) {}
|
1049
|
-
}
|
1050
|
-
var result = entry.length > 1 ? Promise.all(entry.map(function (handler) {
|
1051
|
-
return handler(payload);
|
1052
|
-
})) : entry[0](payload);
|
1053
|
-
return new Promise(function (resolve, reject) {
|
1054
|
-
result.then(function (res) {
|
1055
|
-
try {
|
1056
|
-
this$1._actionSubscribers.filter(function (sub) {
|
1057
|
-
return sub.after;
|
1058
|
-
}).forEach(function (sub) {
|
1059
|
-
return sub.after(action, this$1.state);
|
1060
|
-
});
|
1061
|
-
} catch (e) {
|
1062
|
-
if (false) {}
|
1063
|
-
}
|
1064
|
-
resolve(res);
|
1065
|
-
}, function (error) {
|
1066
|
-
try {
|
1067
|
-
this$1._actionSubscribers.filter(function (sub) {
|
1068
|
-
return sub.error;
|
1069
|
-
}).forEach(function (sub) {
|
1070
|
-
return sub.error(action, this$1.state, error);
|
1071
|
-
});
|
1072
|
-
} catch (e) {
|
1073
|
-
if (false) {}
|
1074
|
-
}
|
1075
|
-
reject(error);
|
1076
|
-
});
|
1077
|
-
});
|
1078
|
-
};
|
1079
|
-
Store.prototype.subscribe = function subscribe(fn, options) {
|
1080
|
-
return genericSubscribe(fn, this._subscribers, options);
|
1081
|
-
};
|
1082
|
-
Store.prototype.subscribeAction = function subscribeAction(fn, options) {
|
1083
|
-
var subs = typeof fn === 'function' ? {
|
1084
|
-
before: fn
|
1085
|
-
} : fn;
|
1086
|
-
return genericSubscribe(subs, this._actionSubscribers, options);
|
1087
|
-
};
|
1088
|
-
Store.prototype.watch = function watch(getter, cb, options) {
|
1089
|
-
var this$1 = this;
|
1090
|
-
if (false) {}
|
1091
|
-
return this._watcherVM.$watch(function () {
|
1092
|
-
return getter(this$1.state, this$1.getters);
|
1093
|
-
}, cb, options);
|
1094
|
-
};
|
1095
|
-
Store.prototype.replaceState = function replaceState(state) {
|
1096
|
-
var this$1 = this;
|
1097
|
-
this._withCommit(function () {
|
1098
|
-
this$1._vm._data.$$state = state;
|
1099
|
-
});
|
1100
|
-
};
|
1101
|
-
Store.prototype.registerModule = function registerModule(path, rawModule, options) {
|
1102
|
-
if (options === void 0) options = {};
|
1103
|
-
if (typeof path === 'string') {
|
1104
|
-
path = [path];
|
1105
|
-
}
|
1106
|
-
if (false) {}
|
1107
|
-
this._modules.register(path, rawModule);
|
1108
|
-
installModule(this, this.state, path, this._modules.get(path), options.preserveState);
|
1109
|
-
// reset store to update getters...
|
1110
|
-
resetStoreVM(this, this.state);
|
1111
|
-
};
|
1112
|
-
Store.prototype.unregisterModule = function unregisterModule(path) {
|
1113
|
-
var this$1 = this;
|
1114
|
-
if (typeof path === 'string') {
|
1115
|
-
path = [path];
|
1116
|
-
}
|
1117
|
-
if (false) {}
|
1118
|
-
this._modules.unregister(path);
|
1119
|
-
this._withCommit(function () {
|
1120
|
-
var parentState = getNestedState(this$1.state, path.slice(0, -1));
|
1121
|
-
Vue.delete(parentState, path[path.length - 1]);
|
1122
|
-
});
|
1123
|
-
resetStore(this);
|
1124
|
-
};
|
1125
|
-
Store.prototype.hasModule = function hasModule(path) {
|
1126
|
-
if (typeof path === 'string') {
|
1127
|
-
path = [path];
|
1128
|
-
}
|
1129
|
-
if (false) {}
|
1130
|
-
return this._modules.isRegistered(path);
|
1131
|
-
};
|
1132
|
-
Store.prototype.hotUpdate = function hotUpdate(newOptions) {
|
1133
|
-
this._modules.update(newOptions);
|
1134
|
-
resetStore(this, true);
|
1135
|
-
};
|
1136
|
-
Store.prototype._withCommit = function _withCommit(fn) {
|
1137
|
-
var committing = this._committing;
|
1138
|
-
this._committing = true;
|
1139
|
-
fn();
|
1140
|
-
this._committing = committing;
|
1141
|
-
};
|
1142
|
-
Object.defineProperties(Store.prototype, prototypeAccessors$1);
|
1143
|
-
function genericSubscribe(fn, subs, options) {
|
1144
|
-
if (subs.indexOf(fn) < 0) {
|
1145
|
-
options && options.prepend ? subs.unshift(fn) : subs.push(fn);
|
1146
|
-
}
|
1147
|
-
return function () {
|
1148
|
-
var i = subs.indexOf(fn);
|
1149
|
-
if (i > -1) {
|
1150
|
-
subs.splice(i, 1);
|
1151
|
-
}
|
1152
|
-
};
|
1153
|
-
}
|
1154
|
-
function resetStore(store, hot) {
|
1155
|
-
store._actions = Object.create(null);
|
1156
|
-
store._mutations = Object.create(null);
|
1157
|
-
store._wrappedGetters = Object.create(null);
|
1158
|
-
store._modulesNamespaceMap = Object.create(null);
|
1159
|
-
var state = store.state;
|
1160
|
-
// init all modules
|
1161
|
-
installModule(store, state, [], store._modules.root, true);
|
1162
|
-
// reset vm
|
1163
|
-
resetStoreVM(store, state, hot);
|
1164
|
-
}
|
1165
|
-
function resetStoreVM(store, state, hot) {
|
1166
|
-
var oldVm = store._vm;
|
1167
|
-
|
1168
|
-
// bind store public getters
|
1169
|
-
store.getters = {};
|
1170
|
-
// reset local getters cache
|
1171
|
-
store._makeLocalGettersCache = Object.create(null);
|
1172
|
-
var wrappedGetters = store._wrappedGetters;
|
1173
|
-
var computed = {};
|
1174
|
-
forEachValue(wrappedGetters, function (fn, key) {
|
1175
|
-
// use computed to leverage its lazy-caching mechanism
|
1176
|
-
// direct inline function use will lead to closure preserving oldVm.
|
1177
|
-
// using partial to return function with only arguments preserved in closure environment.
|
1178
|
-
computed[key] = partial(fn, store);
|
1179
|
-
Object.defineProperty(store.getters, key, {
|
1180
|
-
get: function () {
|
1181
|
-
return store._vm[key];
|
1182
|
-
},
|
1183
|
-
enumerable: true // for local getters
|
1184
|
-
});
|
1185
|
-
});
|
1186
|
-
|
1187
|
-
// use a Vue instance to store the state tree
|
1188
|
-
// suppress warnings just in case the user has added
|
1189
|
-
// some funky global mixins
|
1190
|
-
var silent = Vue.config.silent;
|
1191
|
-
Vue.config.silent = true;
|
1192
|
-
store._vm = new Vue({
|
1193
|
-
data: {
|
1194
|
-
$$state: state
|
1195
|
-
},
|
1196
|
-
computed: computed
|
1197
|
-
});
|
1198
|
-
Vue.config.silent = silent;
|
1199
|
-
|
1200
|
-
// enable strict mode for new vm
|
1201
|
-
if (store.strict) {
|
1202
|
-
enableStrictMode(store);
|
1203
|
-
}
|
1204
|
-
if (oldVm) {
|
1205
|
-
if (hot) {
|
1206
|
-
// dispatch changes in all subscribed watchers
|
1207
|
-
// to force getter re-evaluation for hot reloading.
|
1208
|
-
store._withCommit(function () {
|
1209
|
-
oldVm._data.$$state = null;
|
1210
|
-
});
|
1211
|
-
}
|
1212
|
-
Vue.nextTick(function () {
|
1213
|
-
return oldVm.$destroy();
|
1214
|
-
});
|
1215
|
-
}
|
1216
|
-
}
|
1217
|
-
function installModule(store, rootState, path, module, hot) {
|
1218
|
-
var isRoot = !path.length;
|
1219
|
-
var namespace = store._modules.getNamespace(path);
|
1220
|
-
|
1221
|
-
// register in namespace map
|
1222
|
-
if (module.namespaced) {
|
1223
|
-
if (store._modulesNamespaceMap[namespace] && "production" !== 'production') {}
|
1224
|
-
store._modulesNamespaceMap[namespace] = module;
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
// set state
|
1228
|
-
if (!isRoot && !hot) {
|
1229
|
-
var parentState = getNestedState(rootState, path.slice(0, -1));
|
1230
|
-
var moduleName = path[path.length - 1];
|
1231
|
-
store._withCommit(function () {
|
1232
|
-
if (false) {}
|
1233
|
-
Vue.set(parentState, moduleName, module.state);
|
1234
|
-
});
|
1235
|
-
}
|
1236
|
-
var local = module.context = makeLocalContext(store, namespace, path);
|
1237
|
-
module.forEachMutation(function (mutation, key) {
|
1238
|
-
var namespacedType = namespace + key;
|
1239
|
-
registerMutation(store, namespacedType, mutation, local);
|
1240
|
-
});
|
1241
|
-
module.forEachAction(function (action, key) {
|
1242
|
-
var type = action.root ? key : namespace + key;
|
1243
|
-
var handler = action.handler || action;
|
1244
|
-
registerAction(store, type, handler, local);
|
1245
|
-
});
|
1246
|
-
module.forEachGetter(function (getter, key) {
|
1247
|
-
var namespacedType = namespace + key;
|
1248
|
-
registerGetter(store, namespacedType, getter, local);
|
1249
|
-
});
|
1250
|
-
module.forEachChild(function (child, key) {
|
1251
|
-
installModule(store, rootState, path.concat(key), child, hot);
|
1252
|
-
});
|
1253
|
-
}
|
1254
|
-
|
1255
|
-
/**
|
1256
|
-
* make localized dispatch, commit, getters and state
|
1257
|
-
* if there is no namespace, just use root ones
|
1258
|
-
*/
|
1259
|
-
function makeLocalContext(store, namespace, path) {
|
1260
|
-
var noNamespace = namespace === '';
|
1261
|
-
var local = {
|
1262
|
-
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
|
1263
|
-
var args = unifyObjectStyle(_type, _payload, _options);
|
1264
|
-
var payload = args.payload;
|
1265
|
-
var options = args.options;
|
1266
|
-
var type = args.type;
|
1267
|
-
if (!options || !options.root) {
|
1268
|
-
type = namespace + type;
|
1269
|
-
if (false) {}
|
1270
|
-
}
|
1271
|
-
return store.dispatch(type, payload);
|
1272
|
-
},
|
1273
|
-
commit: noNamespace ? store.commit : function (_type, _payload, _options) {
|
1274
|
-
var args = unifyObjectStyle(_type, _payload, _options);
|
1275
|
-
var payload = args.payload;
|
1276
|
-
var options = args.options;
|
1277
|
-
var type = args.type;
|
1278
|
-
if (!options || !options.root) {
|
1279
|
-
type = namespace + type;
|
1280
|
-
if (false) {}
|
1281
|
-
}
|
1282
|
-
store.commit(type, payload, options);
|
1283
|
-
}
|
1284
|
-
};
|
1285
|
-
|
1286
|
-
// getters and state object must be gotten lazily
|
1287
|
-
// because they will be changed by vm update
|
1288
|
-
Object.defineProperties(local, {
|
1289
|
-
getters: {
|
1290
|
-
get: noNamespace ? function () {
|
1291
|
-
return store.getters;
|
1292
|
-
} : function () {
|
1293
|
-
return makeLocalGetters(store, namespace);
|
1294
|
-
}
|
1295
|
-
},
|
1296
|
-
state: {
|
1297
|
-
get: function () {
|
1298
|
-
return getNestedState(store.state, path);
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
});
|
1302
|
-
return local;
|
1303
|
-
}
|
1304
|
-
function makeLocalGetters(store, namespace) {
|
1305
|
-
if (!store._makeLocalGettersCache[namespace]) {
|
1306
|
-
var gettersProxy = {};
|
1307
|
-
var splitPos = namespace.length;
|
1308
|
-
Object.keys(store.getters).forEach(function (type) {
|
1309
|
-
// skip if the target getter is not match this namespace
|
1310
|
-
if (type.slice(0, splitPos) !== namespace) {
|
1311
|
-
return;
|
1312
|
-
}
|
1313
|
-
|
1314
|
-
// extract local getter type
|
1315
|
-
var localType = type.slice(splitPos);
|
1316
|
-
|
1317
|
-
// Add a port to the getters proxy.
|
1318
|
-
// Define as getter property because
|
1319
|
-
// we do not want to evaluate the getters in this time.
|
1320
|
-
Object.defineProperty(gettersProxy, localType, {
|
1321
|
-
get: function () {
|
1322
|
-
return store.getters[type];
|
1323
|
-
},
|
1324
|
-
enumerable: true
|
1325
|
-
});
|
1326
|
-
});
|
1327
|
-
store._makeLocalGettersCache[namespace] = gettersProxy;
|
1328
|
-
}
|
1329
|
-
return store._makeLocalGettersCache[namespace];
|
1330
|
-
}
|
1331
|
-
function registerMutation(store, type, handler, local) {
|
1332
|
-
var entry = store._mutations[type] || (store._mutations[type] = []);
|
1333
|
-
entry.push(function wrappedMutationHandler(payload) {
|
1334
|
-
handler.call(store, local.state, payload);
|
1335
|
-
});
|
1336
|
-
}
|
1337
|
-
function registerAction(store, type, handler, local) {
|
1338
|
-
var entry = store._actions[type] || (store._actions[type] = []);
|
1339
|
-
entry.push(function wrappedActionHandler(payload) {
|
1340
|
-
var res = handler.call(store, {
|
1341
|
-
dispatch: local.dispatch,
|
1342
|
-
commit: local.commit,
|
1343
|
-
getters: local.getters,
|
1344
|
-
state: local.state,
|
1345
|
-
rootGetters: store.getters,
|
1346
|
-
rootState: store.state
|
1347
|
-
}, payload);
|
1348
|
-
if (!isPromise(res)) {
|
1349
|
-
res = Promise.resolve(res);
|
1350
|
-
}
|
1351
|
-
if (store._devtoolHook) {
|
1352
|
-
return res.catch(function (err) {
|
1353
|
-
store._devtoolHook.emit('vuex:error', err);
|
1354
|
-
throw err;
|
1355
|
-
});
|
1356
|
-
} else {
|
1357
|
-
return res;
|
1358
|
-
}
|
1359
|
-
});
|
1360
|
-
}
|
1361
|
-
function registerGetter(store, type, rawGetter, local) {
|
1362
|
-
if (store._wrappedGetters[type]) {
|
1363
|
-
if (false) {}
|
1364
|
-
return;
|
1365
|
-
}
|
1366
|
-
store._wrappedGetters[type] = function wrappedGetter(store) {
|
1367
|
-
return rawGetter(local.state,
|
1368
|
-
// local state
|
1369
|
-
local.getters,
|
1370
|
-
// local getters
|
1371
|
-
store.state,
|
1372
|
-
// root state
|
1373
|
-
store.getters // root getters
|
1374
|
-
);
|
1375
|
-
};
|
1376
|
-
}
|
1377
|
-
function enableStrictMode(store) {
|
1378
|
-
store._vm.$watch(function () {
|
1379
|
-
return this._data.$$state;
|
1380
|
-
}, function () {
|
1381
|
-
if (false) {}
|
1382
|
-
}, {
|
1383
|
-
deep: true,
|
1384
|
-
sync: true
|
1385
|
-
});
|
1386
|
-
}
|
1387
|
-
function getNestedState(state, path) {
|
1388
|
-
return path.reduce(function (state, key) {
|
1389
|
-
return state[key];
|
1390
|
-
}, state);
|
1391
|
-
}
|
1392
|
-
function unifyObjectStyle(type, payload, options) {
|
1393
|
-
if (isObject(type) && type.type) {
|
1394
|
-
options = payload;
|
1395
|
-
payload = type;
|
1396
|
-
type = type.type;
|
1397
|
-
}
|
1398
|
-
if (false) {}
|
1399
|
-
return {
|
1400
|
-
type: type,
|
1401
|
-
payload: payload,
|
1402
|
-
options: options
|
1403
|
-
};
|
1404
|
-
}
|
1405
|
-
function install(_Vue) {
|
1406
|
-
if (Vue && _Vue === Vue) {
|
1407
|
-
if (false) {}
|
1408
|
-
return;
|
1409
|
-
}
|
1410
|
-
Vue = _Vue;
|
1411
|
-
applyMixin(Vue);
|
1412
|
-
}
|
1413
|
-
|
1414
|
-
/**
|
1415
|
-
* Reduce the code which written in Vue.js for getting the state.
|
1416
|
-
* @param {String} [namespace] - Module's namespace
|
1417
|
-
* @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
|
1418
|
-
* @param {Object}
|
1419
|
-
*/
|
1420
|
-
var mapState = normalizeNamespace(function (namespace, states) {
|
1421
|
-
var res = {};
|
1422
|
-
if (false) {}
|
1423
|
-
normalizeMap(states).forEach(function (ref) {
|
1424
|
-
var key = ref.key;
|
1425
|
-
var val = ref.val;
|
1426
|
-
res[key] = function mappedState() {
|
1427
|
-
var state = this.$store.state;
|
1428
|
-
var getters = this.$store.getters;
|
1429
|
-
if (namespace) {
|
1430
|
-
var module = getModuleByNamespace(this.$store, 'mapState', namespace);
|
1431
|
-
if (!module) {
|
1432
|
-
return;
|
1433
|
-
}
|
1434
|
-
state = module.context.state;
|
1435
|
-
getters = module.context.getters;
|
1436
|
-
}
|
1437
|
-
return typeof val === 'function' ? val.call(this, state, getters) : state[val];
|
1438
|
-
};
|
1439
|
-
// mark vuex getter for devtools
|
1440
|
-
res[key].vuex = true;
|
1441
|
-
});
|
1442
|
-
return res;
|
1443
|
-
});
|
1444
|
-
|
1445
|
-
/**
|
1446
|
-
* Reduce the code which written in Vue.js for committing the mutation
|
1447
|
-
* @param {String} [namespace] - Module's namespace
|
1448
|
-
* @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
1449
|
-
* @return {Object}
|
1450
|
-
*/
|
1451
|
-
var mapMutations = normalizeNamespace(function (namespace, mutations) {
|
1452
|
-
var res = {};
|
1453
|
-
if (false) {}
|
1454
|
-
normalizeMap(mutations).forEach(function (ref) {
|
1455
|
-
var key = ref.key;
|
1456
|
-
var val = ref.val;
|
1457
|
-
res[key] = function mappedMutation() {
|
1458
|
-
var args = [],
|
1459
|
-
len = arguments.length;
|
1460
|
-
while (len--) args[len] = arguments[len];
|
1461
|
-
|
1462
|
-
// Get the commit method from store
|
1463
|
-
var commit = this.$store.commit;
|
1464
|
-
if (namespace) {
|
1465
|
-
var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
|
1466
|
-
if (!module) {
|
1467
|
-
return;
|
1468
|
-
}
|
1469
|
-
commit = module.context.commit;
|
1470
|
-
}
|
1471
|
-
return typeof val === 'function' ? val.apply(this, [commit].concat(args)) : commit.apply(this.$store, [val].concat(args));
|
1472
|
-
};
|
1473
|
-
});
|
1474
|
-
return res;
|
1475
|
-
});
|
1476
|
-
|
1477
|
-
/**
|
1478
|
-
* Reduce the code which written in Vue.js for getting the getters
|
1479
|
-
* @param {String} [namespace] - Module's namespace
|
1480
|
-
* @param {Object|Array} getters
|
1481
|
-
* @return {Object}
|
1482
|
-
*/
|
1483
|
-
var mapGetters = normalizeNamespace(function (namespace, getters) {
|
1484
|
-
var res = {};
|
1485
|
-
if (false) {}
|
1486
|
-
normalizeMap(getters).forEach(function (ref) {
|
1487
|
-
var key = ref.key;
|
1488
|
-
var val = ref.val;
|
1489
|
-
|
1490
|
-
// The namespace has been mutated by normalizeNamespace
|
1491
|
-
val = namespace + val;
|
1492
|
-
res[key] = function mappedGetter() {
|
1493
|
-
if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
|
1494
|
-
return;
|
1495
|
-
}
|
1496
|
-
if (false) {}
|
1497
|
-
return this.$store.getters[val];
|
1498
|
-
};
|
1499
|
-
// mark vuex getter for devtools
|
1500
|
-
res[key].vuex = true;
|
1501
|
-
});
|
1502
|
-
return res;
|
1503
|
-
});
|
1504
|
-
|
1505
|
-
/**
|
1506
|
-
* Reduce the code which written in Vue.js for dispatch the action
|
1507
|
-
* @param {String} [namespace] - Module's namespace
|
1508
|
-
* @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
1509
|
-
* @return {Object}
|
1510
|
-
*/
|
1511
|
-
var mapActions = normalizeNamespace(function (namespace, actions) {
|
1512
|
-
var res = {};
|
1513
|
-
if (false) {}
|
1514
|
-
normalizeMap(actions).forEach(function (ref) {
|
1515
|
-
var key = ref.key;
|
1516
|
-
var val = ref.val;
|
1517
|
-
res[key] = function mappedAction() {
|
1518
|
-
var args = [],
|
1519
|
-
len = arguments.length;
|
1520
|
-
while (len--) args[len] = arguments[len];
|
1521
|
-
|
1522
|
-
// get dispatch function from store
|
1523
|
-
var dispatch = this.$store.dispatch;
|
1524
|
-
if (namespace) {
|
1525
|
-
var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
|
1526
|
-
if (!module) {
|
1527
|
-
return;
|
1528
|
-
}
|
1529
|
-
dispatch = module.context.dispatch;
|
1530
|
-
}
|
1531
|
-
return typeof val === 'function' ? val.apply(this, [dispatch].concat(args)) : dispatch.apply(this.$store, [val].concat(args));
|
1532
|
-
};
|
1533
|
-
});
|
1534
|
-
return res;
|
1535
|
-
});
|
1536
|
-
|
1537
|
-
/**
|
1538
|
-
* Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
|
1539
|
-
* @param {String} namespace
|
1540
|
-
* @return {Object}
|
1541
|
-
*/
|
1542
|
-
var createNamespacedHelpers = function (namespace) {
|
1543
|
-
return {
|
1544
|
-
mapState: mapState.bind(null, namespace),
|
1545
|
-
mapGetters: mapGetters.bind(null, namespace),
|
1546
|
-
mapMutations: mapMutations.bind(null, namespace),
|
1547
|
-
mapActions: mapActions.bind(null, namespace)
|
1548
|
-
};
|
1549
|
-
};
|
1550
|
-
|
1551
|
-
/**
|
1552
|
-
* Normalize the map
|
1553
|
-
* normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
|
1554
|
-
* normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
|
1555
|
-
* @param {Array|Object} map
|
1556
|
-
* @return {Object}
|
1557
|
-
*/
|
1558
|
-
function normalizeMap(map) {
|
1559
|
-
if (!isValidMap(map)) {
|
1560
|
-
return [];
|
1561
|
-
}
|
1562
|
-
return Array.isArray(map) ? map.map(function (key) {
|
1563
|
-
return {
|
1564
|
-
key: key,
|
1565
|
-
val: key
|
1566
|
-
};
|
1567
|
-
}) : Object.keys(map).map(function (key) {
|
1568
|
-
return {
|
1569
|
-
key: key,
|
1570
|
-
val: map[key]
|
1571
|
-
};
|
1572
|
-
});
|
1573
|
-
}
|
1574
|
-
|
1575
|
-
/**
|
1576
|
-
* Validate whether given map is valid or not
|
1577
|
-
* @param {*} map
|
1578
|
-
* @return {Boolean}
|
1579
|
-
*/
|
1580
|
-
function isValidMap(map) {
|
1581
|
-
return Array.isArray(map) || isObject(map);
|
1582
|
-
}
|
1583
|
-
|
1584
|
-
/**
|
1585
|
-
* Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
|
1586
|
-
* @param {Function} fn
|
1587
|
-
* @return {Function}
|
1588
|
-
*/
|
1589
|
-
function normalizeNamespace(fn) {
|
1590
|
-
return function (namespace, map) {
|
1591
|
-
if (typeof namespace !== 'string') {
|
1592
|
-
map = namespace;
|
1593
|
-
namespace = '';
|
1594
|
-
} else if (namespace.charAt(namespace.length - 1) !== '/') {
|
1595
|
-
namespace += '/';
|
1596
|
-
}
|
1597
|
-
return fn(namespace, map);
|
1598
|
-
};
|
1599
|
-
}
|
1600
|
-
|
1601
|
-
/**
|
1602
|
-
* Search a special module from store by namespace. if module not exist, print error message.
|
1603
|
-
* @param {Object} store
|
1604
|
-
* @param {String} helper
|
1605
|
-
* @param {String} namespace
|
1606
|
-
* @return {Object}
|
1607
|
-
*/
|
1608
|
-
function getModuleByNamespace(store, helper, namespace) {
|
1609
|
-
var module = store._modulesNamespaceMap[namespace];
|
1610
|
-
if (false) {}
|
1611
|
-
return module;
|
1612
|
-
}
|
1613
|
-
|
1614
|
-
// Credits: borrowed code from fcomb/redux-logger
|
1615
|
-
|
1616
|
-
function createLogger(ref) {
|
1617
|
-
if (ref === void 0) ref = {};
|
1618
|
-
var collapsed = ref.collapsed;
|
1619
|
-
if (collapsed === void 0) collapsed = true;
|
1620
|
-
var filter = ref.filter;
|
1621
|
-
if (filter === void 0) filter = function (mutation, stateBefore, stateAfter) {
|
1622
|
-
return true;
|
1623
|
-
};
|
1624
|
-
var transformer = ref.transformer;
|
1625
|
-
if (transformer === void 0) transformer = function (state) {
|
1626
|
-
return state;
|
1627
|
-
};
|
1628
|
-
var mutationTransformer = ref.mutationTransformer;
|
1629
|
-
if (mutationTransformer === void 0) mutationTransformer = function (mut) {
|
1630
|
-
return mut;
|
1631
|
-
};
|
1632
|
-
var actionFilter = ref.actionFilter;
|
1633
|
-
if (actionFilter === void 0) actionFilter = function (action, state) {
|
1634
|
-
return true;
|
1635
|
-
};
|
1636
|
-
var actionTransformer = ref.actionTransformer;
|
1637
|
-
if (actionTransformer === void 0) actionTransformer = function (act) {
|
1638
|
-
return act;
|
1639
|
-
};
|
1640
|
-
var logMutations = ref.logMutations;
|
1641
|
-
if (logMutations === void 0) logMutations = true;
|
1642
|
-
var logActions = ref.logActions;
|
1643
|
-
if (logActions === void 0) logActions = true;
|
1644
|
-
var logger = ref.logger;
|
1645
|
-
if (logger === void 0) logger = console;
|
1646
|
-
return function (store) {
|
1647
|
-
var prevState = deepCopy(store.state);
|
1648
|
-
if (typeof logger === 'undefined') {
|
1649
|
-
return;
|
1650
|
-
}
|
1651
|
-
if (logMutations) {
|
1652
|
-
store.subscribe(function (mutation, state) {
|
1653
|
-
var nextState = deepCopy(state);
|
1654
|
-
if (filter(mutation, prevState, nextState)) {
|
1655
|
-
var formattedTime = getFormattedTime();
|
1656
|
-
var formattedMutation = mutationTransformer(mutation);
|
1657
|
-
var message = "mutation " + mutation.type + formattedTime;
|
1658
|
-
startMessage(logger, message, collapsed);
|
1659
|
-
logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
|
1660
|
-
logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
|
1661
|
-
logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
|
1662
|
-
endMessage(logger);
|
1663
|
-
}
|
1664
|
-
prevState = nextState;
|
1665
|
-
});
|
1666
|
-
}
|
1667
|
-
if (logActions) {
|
1668
|
-
store.subscribeAction(function (action, state) {
|
1669
|
-
if (actionFilter(action, state)) {
|
1670
|
-
var formattedTime = getFormattedTime();
|
1671
|
-
var formattedAction = actionTransformer(action);
|
1672
|
-
var message = "action " + action.type + formattedTime;
|
1673
|
-
startMessage(logger, message, collapsed);
|
1674
|
-
logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
|
1675
|
-
endMessage(logger);
|
1676
|
-
}
|
1677
|
-
});
|
1678
|
-
}
|
1679
|
-
};
|
1680
|
-
}
|
1681
|
-
function startMessage(logger, message, collapsed) {
|
1682
|
-
var startMessage = collapsed ? logger.groupCollapsed : logger.group;
|
1683
|
-
|
1684
|
-
// render
|
1685
|
-
try {
|
1686
|
-
startMessage.call(logger, message);
|
1687
|
-
} catch (e) {
|
1688
|
-
logger.log(message);
|
1689
|
-
}
|
1690
|
-
}
|
1691
|
-
function endMessage(logger) {
|
1692
|
-
try {
|
1693
|
-
logger.groupEnd();
|
1694
|
-
} catch (e) {
|
1695
|
-
logger.log('—— log end ——');
|
1696
|
-
}
|
1697
|
-
}
|
1698
|
-
function getFormattedTime() {
|
1699
|
-
var time = new Date();
|
1700
|
-
return " @ " + pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3);
|
1701
|
-
}
|
1702
|
-
function repeat(str, times) {
|
1703
|
-
return new Array(times + 1).join(str);
|
1704
|
-
}
|
1705
|
-
function pad(num, maxLength) {
|
1706
|
-
return repeat('0', maxLength - num.toString().length) + num;
|
1707
|
-
}
|
1708
|
-
var index = {
|
1709
|
-
Store: Store,
|
1710
|
-
install: install,
|
1711
|
-
version: '3.6.2',
|
1712
|
-
mapState: mapState,
|
1713
|
-
mapMutations: mapMutations,
|
1714
|
-
mapGetters: mapGetters,
|
1715
|
-
mapActions: mapActions,
|
1716
|
-
createNamespacedHelpers: createNamespacedHelpers,
|
1717
|
-
createLogger: createLogger
|
1718
|
-
};
|
1719
|
-
/* harmony default export */ var vuex_esm = ((/* unused pure expression or super */ null && (index)));
|
1720
|
-
|
655
|
+
// EXTERNAL MODULE: ./packages/components/NBIcon/index.js + 5 modules
|
656
|
+
var NBIcon = __webpack_require__(7318);
|
1721
657
|
;// ./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/NBHeader/index.vue?vue&type=script&lang=js
|
1722
658
|
|
1723
659
|
/* harmony default export */ var NBHeadervue_type_script_lang_js = ({
|
1724
660
|
name: 'NBHeader',
|
661
|
+
components: {
|
662
|
+
NBIcon: NBIcon["default"]
|
663
|
+
},
|
1725
664
|
props: {
|
1726
665
|
// 是否显示返回
|
1727
666
|
back: {
|
@@ -1786,13 +725,7 @@ var index = {
|
|
1786
725
|
data() {
|
1787
726
|
return {};
|
1788
727
|
},
|
1789
|
-
computed: {
|
1790
|
-
...mapGetters([])
|
1791
|
-
},
|
1792
|
-
watch: {},
|
1793
|
-
created() {},
|
1794
|
-
mounted() {},
|
1795
|
-
beforeDestroy() {},
|
728
|
+
computed: {},
|
1796
729
|
methods: {
|
1797
730
|
// 返回
|
1798
731
|
handleBack() {
|
@@ -1843,7 +776,7 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
1843
776
|
staticRenderFns,
|
1844
777
|
false,
|
1845
778
|
null,
|
1846
|
-
"
|
779
|
+
"40023fcc",
|
1847
780
|
null
|
1848
781
|
|
1849
782
|
)
|
@@ -1866,6 +799,85 @@ NBHeader.install = function (Vue) {
|
|
1866
799
|
|
1867
800
|
/***/ }),
|
1868
801
|
|
802
|
+
/***/ 7318:
|
803
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
804
|
+
|
805
|
+
"use strict";
|
806
|
+
// ESM COMPAT FLAG
|
807
|
+
__webpack_require__.r(__webpack_exports__);
|
808
|
+
|
809
|
+
// EXPORTS
|
810
|
+
__webpack_require__.d(__webpack_exports__, {
|
811
|
+
"default": function() { return /* binding */ NBIcon; }
|
812
|
+
});
|
813
|
+
|
814
|
+
;// ./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/NBIcon/src/index.vue?vue&type=template&id=de41916a&scoped=true
|
815
|
+
var render = function render() {
|
816
|
+
var _vm = this,
|
817
|
+
_c = _vm._self._c;
|
818
|
+
return _vm.icon ? _c('span', {
|
819
|
+
class: `nb-icon iconfont icon-${_vm.icon}`
|
820
|
+
}) : _vm._e();
|
821
|
+
};
|
822
|
+
var staticRenderFns = [];
|
823
|
+
|
824
|
+
;// ./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/NBIcon/src/index.vue?vue&type=script&lang=js
|
825
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
826
|
+
name: 'NBIcon',
|
827
|
+
props: {
|
828
|
+
// 类型,success/info/warning/danger,默认主题色状态
|
829
|
+
icon: {
|
830
|
+
type: String,
|
831
|
+
default: ''
|
832
|
+
}
|
833
|
+
}
|
834
|
+
});
|
835
|
+
;// ./packages/components/NBIcon/src/index.vue?vue&type=script&lang=js
|
836
|
+
/* harmony default export */ var NBIcon_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
837
|
+
// 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/NBIcon/src/index.vue?vue&type=style&index=0&id=de41916a&prod&lang=scss&scoped=true
|
838
|
+
var srcvue_type_style_index_0_id_de41916a_prod_lang_scss_scoped_true = __webpack_require__(6331);
|
839
|
+
;// ./packages/components/NBIcon/src/index.vue?vue&type=style&index=0&id=de41916a&prod&lang=scss&scoped=true
|
840
|
+
|
841
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
842
|
+
var componentNormalizer = __webpack_require__(1656);
|
843
|
+
;// ./packages/components/NBIcon/src/index.vue
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
;
|
848
|
+
|
849
|
+
|
850
|
+
/* normalize component */
|
851
|
+
|
852
|
+
var component = (0,componentNormalizer/* default */.A)(
|
853
|
+
NBIcon_srcvue_type_script_lang_js,
|
854
|
+
render,
|
855
|
+
staticRenderFns,
|
856
|
+
false,
|
857
|
+
null,
|
858
|
+
"de41916a",
|
859
|
+
null
|
860
|
+
|
861
|
+
)
|
862
|
+
|
863
|
+
/* harmony default export */ var src = (component.exports);
|
864
|
+
;// ./packages/components/NBIcon/index.js
|
865
|
+
/*
|
866
|
+
* @Author: chenghuan.dong
|
867
|
+
* @Date: 2024-11-11 13:46:33
|
868
|
+
* @LastEditTime: 2024-11-12 11:29:51
|
869
|
+
* @LastEditors: chenghuan.dong
|
870
|
+
* @Description:
|
871
|
+
* @FilePath: \nubomed-ui\packages\components\NBIcon\index.js
|
872
|
+
*/
|
873
|
+
|
874
|
+
src.install = function (Vue) {
|
875
|
+
Vue.component('nb-icon', src);
|
876
|
+
};
|
877
|
+
/* harmony default export */ var NBIcon = (src);
|
878
|
+
|
879
|
+
/***/ }),
|
880
|
+
|
1869
881
|
/***/ 9165:
|
1870
882
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1871
883
|
|
@@ -1981,99 +993,14 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
1981
993
|
/* harmony default export */ var NBPagination = (component.exports);
|
1982
994
|
;// ./packages/components/NBPagination/index.js
|
1983
995
|
|
1984
|
-
NBPagination.install = function (Vue) {
|
1985
|
-
Vue.component('nb-pagination', NBPagination);
|
1986
|
-
};
|
1987
|
-
/* harmony default export */ var components_NBPagination = (NBPagination);
|
1988
|
-
|
1989
|
-
/***/ }),
|
1990
|
-
|
1991
|
-
/***/ 7996:
|
1992
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1993
|
-
|
1994
|
-
"use strict";
|
1995
|
-
// ESM COMPAT FLAG
|
1996
|
-
__webpack_require__.r(__webpack_exports__);
|
1997
|
-
|
1998
|
-
// EXPORTS
|
1999
|
-
__webpack_require__.d(__webpack_exports__, {
|
2000
|
-
"default": function() { return /* binding */ NBTag; }
|
2001
|
-
});
|
2002
|
-
|
2003
|
-
;// ./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/NBTag/src/index.vue?vue&type=template&id=6665f146
|
2004
|
-
var render = function render() {
|
2005
|
-
var _vm = this,
|
2006
|
-
_c = _vm._self._c;
|
2007
|
-
return _c('span', {
|
2008
|
-
staticClass: "nb-tag",
|
2009
|
-
class: `nb-tag--${_vm.size} nb-tag--${_vm.type} ${_vm.fill ? `nb-tag--fill` : ''}`
|
2010
|
-
}, [_vm._t("default")], 2);
|
2011
|
-
};
|
2012
|
-
var staticRenderFns = [];
|
2013
|
-
|
2014
|
-
;// ./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/NBTag/src/index.vue?vue&type=script&lang=js
|
2015
|
-
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
2016
|
-
name: 'NBTag',
|
2017
|
-
props: {
|
2018
|
-
// 类型,success/info/warning/danger,默认主题色状态
|
2019
|
-
type: {
|
2020
|
-
type: String,
|
2021
|
-
default: ''
|
2022
|
-
},
|
2023
|
-
// 尺寸,large-大标签(高度36),默认小标签(高度32)
|
2024
|
-
size: {
|
2025
|
-
type: String,
|
2026
|
-
default: ''
|
2027
|
-
},
|
2028
|
-
// 是否填充
|
2029
|
-
fill: {
|
2030
|
-
type: Boolean,
|
2031
|
-
default: false
|
2032
|
-
}
|
2033
|
-
}
|
2034
|
-
});
|
2035
|
-
;// ./packages/components/NBTag/src/index.vue?vue&type=script&lang=js
|
2036
|
-
/* harmony default export */ var NBTag_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
2037
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
2038
|
-
var componentNormalizer = __webpack_require__(1656);
|
2039
|
-
;// ./packages/components/NBTag/src/index.vue
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
/* normalize component */
|
2046
|
-
;
|
2047
|
-
var component = (0,componentNormalizer/* default */.A)(
|
2048
|
-
NBTag_srcvue_type_script_lang_js,
|
2049
|
-
render,
|
2050
|
-
staticRenderFns,
|
2051
|
-
false,
|
2052
|
-
null,
|
2053
|
-
null,
|
2054
|
-
null
|
2055
|
-
|
2056
|
-
)
|
2057
|
-
|
2058
|
-
/* harmony default export */ var src = (component.exports);
|
2059
|
-
;// ./packages/components/NBTag/index.js
|
2060
|
-
/*
|
2061
|
-
* @Author: chenghuan.dong
|
2062
|
-
* @Date: 2024-11-11 13:46:33
|
2063
|
-
* @LastEditTime: 2024-11-11 16:27:27
|
2064
|
-
* @LastEditors: chenghuan.dong
|
2065
|
-
* @Description:
|
2066
|
-
* @FilePath: \nubomed-ui\packages\components\NBTag\index.js
|
2067
|
-
*/
|
2068
|
-
|
2069
|
-
src.install = function (Vue) {
|
2070
|
-
Vue.component('nb-tag', src);
|
996
|
+
NBPagination.install = function (Vue) {
|
997
|
+
Vue.component('nb-pagination', NBPagination);
|
2071
998
|
};
|
2072
|
-
/* harmony default export */ var
|
999
|
+
/* harmony default export */ var components_NBPagination = (NBPagination);
|
2073
1000
|
|
2074
1001
|
/***/ }),
|
2075
1002
|
|
2076
|
-
/***/
|
1003
|
+
/***/ 7996:
|
2077
1004
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
2078
1005
|
|
2079
1006
|
"use strict";
|
@@ -2082,128 +1009,111 @@ __webpack_require__.r(__webpack_exports__);
|
|
2082
1009
|
|
2083
1010
|
// EXPORTS
|
2084
1011
|
__webpack_require__.d(__webpack_exports__, {
|
2085
|
-
"default": function() { return /* binding */
|
1012
|
+
"default": function() { return /* binding */ NBTag; }
|
2086
1013
|
});
|
2087
1014
|
|
2088
|
-
;// ./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/
|
1015
|
+
;// ./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/NBTag/src/index.vue?vue&type=template&id=6665f146
|
2089
1016
|
var render = function render() {
|
2090
1017
|
var _vm = this,
|
2091
1018
|
_c = _vm._self._c;
|
2092
|
-
return
|
2093
|
-
staticClass: "
|
2094
|
-
|
2095
|
-
}, _vm
|
2096
|
-
class: _vm.svgClass,
|
2097
|
-
attrs: {
|
2098
|
-
"aria-hidden": "true"
|
2099
|
-
}
|
2100
|
-
}, _vm.$listeners), [_c('use', {
|
2101
|
-
attrs: {
|
2102
|
-
"href": _vm.iconName
|
2103
|
-
}
|
2104
|
-
})]);
|
1019
|
+
return _c('span', {
|
1020
|
+
staticClass: "nb-tag",
|
1021
|
+
class: `nb-tag--${_vm.size} nb-tag--${_vm.type} ${_vm.fill ? `nb-tag--fill` : ''}`
|
1022
|
+
}, [_vm._t("default")], 2);
|
2105
1023
|
};
|
2106
1024
|
var staticRenderFns = [];
|
2107
1025
|
|
2108
|
-
;// ./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/
|
1026
|
+
;// ./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/NBTag/src/index.vue?vue&type=script&lang=js
|
2109
1027
|
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
2110
|
-
name: '
|
1028
|
+
name: 'NBTag',
|
2111
1029
|
props: {
|
2112
|
-
|
1030
|
+
// 类型,success/info/warning/danger,默认主题色状态
|
1031
|
+
type: {
|
2113
1032
|
type: String,
|
2114
|
-
|
1033
|
+
default: ''
|
2115
1034
|
},
|
2116
|
-
|
1035
|
+
// 尺寸,large-大标签(高度36),默认小标签(高度32)
|
1036
|
+
size: {
|
2117
1037
|
type: String,
|
2118
1038
|
default: ''
|
2119
|
-
}
|
2120
|
-
},
|
2121
|
-
computed: {
|
2122
|
-
isExternal() {
|
2123
|
-
return this.validateIsExternal(this.iconClass);
|
2124
1039
|
},
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
if (this.className) {
|
2130
|
-
return 'svg-icon ' + this.className;
|
2131
|
-
} else {
|
2132
|
-
return 'svg-icon';
|
2133
|
-
}
|
2134
|
-
},
|
2135
|
-
styleExternalIcon() {
|
2136
|
-
return {
|
2137
|
-
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
2138
|
-
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
2139
|
-
};
|
2140
|
-
}
|
2141
|
-
},
|
2142
|
-
methods: {
|
2143
|
-
validateIsExternal(path) {
|
2144
|
-
return /^(https?:|mailto:|tel:)/.test(path);
|
1040
|
+
// 是否填充
|
1041
|
+
fill: {
|
1042
|
+
type: Boolean,
|
1043
|
+
default: false
|
2145
1044
|
}
|
2146
1045
|
}
|
2147
1046
|
});
|
2148
|
-
;// ./packages/components/
|
2149
|
-
/* harmony default export */ var
|
2150
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/SvgIcon/src/index.vue?vue&type=style&index=0&id=5346430d&prod&scoped=true&lang=css
|
2151
|
-
var srcvue_type_style_index_0_id_5346430d_prod_scoped_true_lang_css = __webpack_require__(4135);
|
2152
|
-
;// ./packages/components/SvgIcon/src/index.vue?vue&type=style&index=0&id=5346430d&prod&scoped=true&lang=css
|
2153
|
-
|
1047
|
+
;// ./packages/components/NBTag/src/index.vue?vue&type=script&lang=js
|
1048
|
+
/* harmony default export */ var NBTag_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
2154
1049
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
2155
1050
|
var componentNormalizer = __webpack_require__(1656);
|
2156
|
-
;// ./packages/components/
|
1051
|
+
;// ./packages/components/NBTag/src/index.vue
|
2157
1052
|
|
2158
1053
|
|
2159
1054
|
|
2160
|
-
;
|
2161
1055
|
|
2162
1056
|
|
2163
1057
|
/* normalize component */
|
2164
|
-
|
1058
|
+
;
|
2165
1059
|
var component = (0,componentNormalizer/* default */.A)(
|
2166
|
-
|
1060
|
+
NBTag_srcvue_type_script_lang_js,
|
2167
1061
|
render,
|
2168
1062
|
staticRenderFns,
|
2169
1063
|
false,
|
2170
1064
|
null,
|
2171
|
-
|
1065
|
+
null,
|
2172
1066
|
null
|
2173
1067
|
|
2174
1068
|
)
|
2175
1069
|
|
2176
1070
|
/* harmony default export */ var src = (component.exports);
|
2177
|
-
;// ./packages/components/
|
1071
|
+
;// ./packages/components/NBTag/index.js
|
2178
1072
|
/*
|
2179
1073
|
* @Author: chenghuan.dong
|
2180
|
-
* @Date: 2024-11-11 13:
|
2181
|
-
* @LastEditTime: 2024-11-11
|
1074
|
+
* @Date: 2024-11-11 13:46:33
|
1075
|
+
* @LastEditTime: 2024-11-11 16:27:27
|
2182
1076
|
* @LastEditors: chenghuan.dong
|
2183
|
-
* @Description:
|
2184
|
-
* @FilePath: \nubomed-ui\packages\components\
|
1077
|
+
* @Description:
|
1078
|
+
* @FilePath: \nubomed-ui\packages\components\NBTag\index.js
|
2185
1079
|
*/
|
2186
1080
|
|
2187
1081
|
src.install = function (Vue) {
|
2188
|
-
Vue.component(
|
1082
|
+
Vue.component('nb-tag', src);
|
2189
1083
|
};
|
2190
|
-
/* harmony default export */ var
|
1084
|
+
/* harmony default export */ var NBTag = (src);
|
1085
|
+
|
1086
|
+
/***/ }),
|
1087
|
+
|
1088
|
+
/***/ 3050:
|
1089
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1090
|
+
|
1091
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
1092
|
+
|
1093
|
+
// load the styles
|
1094
|
+
var content = __webpack_require__(151);
|
1095
|
+
if(content.__esModule) content = content.default;
|
1096
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
1097
|
+
if(content.locals) module.exports = content.locals;
|
1098
|
+
// add the styles to the DOM
|
1099
|
+
var add = (__webpack_require__(258)/* ["default"] */ .A)
|
1100
|
+
var update = add("f422e070", content, true, {"sourceMap":false,"shadowMode":false});
|
2191
1101
|
|
2192
1102
|
/***/ }),
|
2193
1103
|
|
2194
|
-
/***/
|
1104
|
+
/***/ 6331:
|
2195
1105
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2196
1106
|
|
2197
1107
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
2198
1108
|
|
2199
1109
|
// load the styles
|
2200
|
-
var content = __webpack_require__(
|
1110
|
+
var content = __webpack_require__(7079);
|
2201
1111
|
if(content.__esModule) content = content.default;
|
2202
1112
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
2203
1113
|
if(content.locals) module.exports = content.locals;
|
2204
1114
|
// add the styles to the DOM
|
2205
1115
|
var add = (__webpack_require__(258)/* ["default"] */ .A)
|
2206
|
-
var update = add("
|
1116
|
+
var update = add("ed234164", content, true, {"sourceMap":false,"shadowMode":false});
|
2207
1117
|
|
2208
1118
|
/***/ }),
|
2209
1119
|
|
@@ -2500,10 +1410,10 @@ function applyToTag (styleElement, obj) {
|
|
2500
1410
|
var map = {
|
2501
1411
|
"./NBBottomActionBar/index.js": 5850,
|
2502
1412
|
"./NBEmpty/index.js": 6298,
|
2503
|
-
"./NBHeader/index.js":
|
1413
|
+
"./NBHeader/index.js": 4794,
|
1414
|
+
"./NBIcon/index.js": 7318,
|
2504
1415
|
"./NBPagination/index.js": 9165,
|
2505
|
-
"./NBTag/index.js": 7996
|
2506
|
-
"./SvgIcon/index.js": 2760
|
1416
|
+
"./NBTag/index.js": 7996
|
2507
1417
|
};
|
2508
1418
|
|
2509
1419
|
|
@@ -2584,6 +1494,30 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAMAAAD8
|
|
2584
1494
|
|
2585
1495
|
/***/ }),
|
2586
1496
|
|
1497
|
+
/***/ 8705:
|
1498
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1499
|
+
|
1500
|
+
"use strict";
|
1501
|
+
module.exports = __webpack_require__.p + "fonts/iconfont.a99a4236.ttf";
|
1502
|
+
|
1503
|
+
/***/ }),
|
1504
|
+
|
1505
|
+
/***/ 7943:
|
1506
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1507
|
+
|
1508
|
+
"use strict";
|
1509
|
+
module.exports = __webpack_require__.p + "fonts/iconfont.0c3a9555.woff2";
|
1510
|
+
|
1511
|
+
/***/ }),
|
1512
|
+
|
1513
|
+
/***/ 8927:
|
1514
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1515
|
+
|
1516
|
+
"use strict";
|
1517
|
+
module.exports = __webpack_require__.p + "fonts/iconfont.c068c01a.woff";
|
1518
|
+
|
1519
|
+
/***/ }),
|
1520
|
+
|
2587
1521
|
/***/ 9306:
|
2588
1522
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2589
1523
|
|
@@ -2714,26 +1648,6 @@ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
2714
1648
|
};
|
2715
1649
|
|
2716
1650
|
|
2717
|
-
/***/ }),
|
2718
|
-
|
2719
|
-
/***/ 6319:
|
2720
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2721
|
-
|
2722
|
-
"use strict";
|
2723
|
-
|
2724
|
-
var anObject = __webpack_require__(8551);
|
2725
|
-
var iteratorClose = __webpack_require__(9539);
|
2726
|
-
|
2727
|
-
// call something on iterator step with safe closing on error
|
2728
|
-
module.exports = function (iterator, fn, value, ENTRIES) {
|
2729
|
-
try {
|
2730
|
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
2731
|
-
} catch (error) {
|
2732
|
-
iteratorClose(iterator, 'throw', error);
|
2733
|
-
}
|
2734
|
-
};
|
2735
|
-
|
2736
|
-
|
2737
1651
|
/***/ }),
|
2738
1652
|
|
2739
1653
|
/***/ 2195:
|
@@ -2831,20 +1745,6 @@ module.exports = !fails(function () {
|
|
2831
1745
|
});
|
2832
1746
|
|
2833
1747
|
|
2834
|
-
/***/ }),
|
2835
|
-
|
2836
|
-
/***/ 2529:
|
2837
|
-
/***/ (function(module) {
|
2838
|
-
|
2839
|
-
"use strict";
|
2840
|
-
|
2841
|
-
// `CreateIterResultObject` abstract operation
|
2842
|
-
// https://tc39.es/ecma262/#sec-createiterresultobject
|
2843
|
-
module.exports = function (value, done) {
|
2844
|
-
return { value: value, done: done };
|
2845
|
-
};
|
2846
|
-
|
2847
|
-
|
2848
1748
|
/***/ }),
|
2849
1749
|
|
2850
1750
|
/***/ 6699:
|
@@ -2951,21 +1851,6 @@ module.exports = function (O, key, value, options) {
|
|
2951
1851
|
};
|
2952
1852
|
|
2953
1853
|
|
2954
|
-
/***/ }),
|
2955
|
-
|
2956
|
-
/***/ 6279:
|
2957
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2958
|
-
|
2959
|
-
"use strict";
|
2960
|
-
|
2961
|
-
var defineBuiltIn = __webpack_require__(6840);
|
2962
|
-
|
2963
|
-
module.exports = function (target, src, options) {
|
2964
|
-
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
2965
|
-
return target;
|
2966
|
-
};
|
2967
|
-
|
2968
|
-
|
2969
1854
|
/***/ }),
|
2970
1855
|
|
2971
1856
|
/***/ 9433:
|
@@ -3873,122 +2758,6 @@ module.exports = function (iterator, kind, value) {
|
|
3873
2758
|
};
|
3874
2759
|
|
3875
2760
|
|
3876
|
-
/***/ }),
|
3877
|
-
|
3878
|
-
/***/ 9462:
|
3879
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3880
|
-
|
3881
|
-
"use strict";
|
3882
|
-
|
3883
|
-
var call = __webpack_require__(9565);
|
3884
|
-
var create = __webpack_require__(2360);
|
3885
|
-
var createNonEnumerableProperty = __webpack_require__(6699);
|
3886
|
-
var defineBuiltIns = __webpack_require__(6279);
|
3887
|
-
var wellKnownSymbol = __webpack_require__(8227);
|
3888
|
-
var InternalStateModule = __webpack_require__(1181);
|
3889
|
-
var getMethod = __webpack_require__(5966);
|
3890
|
-
var IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);
|
3891
|
-
var createIterResultObject = __webpack_require__(2529);
|
3892
|
-
var iteratorClose = __webpack_require__(9539);
|
3893
|
-
|
3894
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
3895
|
-
var ITERATOR_HELPER = 'IteratorHelper';
|
3896
|
-
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
|
3897
|
-
var setInternalState = InternalStateModule.set;
|
3898
|
-
|
3899
|
-
var createIteratorProxyPrototype = function (IS_ITERATOR) {
|
3900
|
-
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
|
3901
|
-
|
3902
|
-
return defineBuiltIns(create(IteratorPrototype), {
|
3903
|
-
next: function next() {
|
3904
|
-
var state = getInternalState(this);
|
3905
|
-
// for simplification:
|
3906
|
-
// for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`
|
3907
|
-
// for `%IteratorHelperPrototype%.next` - just a value
|
3908
|
-
if (IS_ITERATOR) return state.nextHandler();
|
3909
|
-
try {
|
3910
|
-
var result = state.done ? undefined : state.nextHandler();
|
3911
|
-
return createIterResultObject(result, state.done);
|
3912
|
-
} catch (error) {
|
3913
|
-
state.done = true;
|
3914
|
-
throw error;
|
3915
|
-
}
|
3916
|
-
},
|
3917
|
-
'return': function () {
|
3918
|
-
var state = getInternalState(this);
|
3919
|
-
var iterator = state.iterator;
|
3920
|
-
state.done = true;
|
3921
|
-
if (IS_ITERATOR) {
|
3922
|
-
var returnMethod = getMethod(iterator, 'return');
|
3923
|
-
return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
|
3924
|
-
}
|
3925
|
-
if (state.inner) try {
|
3926
|
-
iteratorClose(state.inner.iterator, 'normal');
|
3927
|
-
} catch (error) {
|
3928
|
-
return iteratorClose(iterator, 'throw', error);
|
3929
|
-
}
|
3930
|
-
if (iterator) iteratorClose(iterator, 'normal');
|
3931
|
-
return createIterResultObject(undefined, true);
|
3932
|
-
}
|
3933
|
-
});
|
3934
|
-
};
|
3935
|
-
|
3936
|
-
var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
|
3937
|
-
var IteratorHelperPrototype = createIteratorProxyPrototype(false);
|
3938
|
-
|
3939
|
-
createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
|
3940
|
-
|
3941
|
-
module.exports = function (nextHandler, IS_ITERATOR) {
|
3942
|
-
var IteratorProxy = function Iterator(record, state) {
|
3943
|
-
if (state) {
|
3944
|
-
state.iterator = record.iterator;
|
3945
|
-
state.next = record.next;
|
3946
|
-
} else state = record;
|
3947
|
-
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
|
3948
|
-
state.nextHandler = nextHandler;
|
3949
|
-
state.counter = 0;
|
3950
|
-
state.done = false;
|
3951
|
-
setInternalState(this, state);
|
3952
|
-
};
|
3953
|
-
|
3954
|
-
IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
|
3955
|
-
|
3956
|
-
return IteratorProxy;
|
3957
|
-
};
|
3958
|
-
|
3959
|
-
|
3960
|
-
/***/ }),
|
3961
|
-
|
3962
|
-
/***/ 713:
|
3963
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3964
|
-
|
3965
|
-
"use strict";
|
3966
|
-
|
3967
|
-
var call = __webpack_require__(9565);
|
3968
|
-
var aCallable = __webpack_require__(9306);
|
3969
|
-
var anObject = __webpack_require__(8551);
|
3970
|
-
var getIteratorDirect = __webpack_require__(1767);
|
3971
|
-
var createIteratorProxy = __webpack_require__(9462);
|
3972
|
-
var callWithSafeIterationClosing = __webpack_require__(6319);
|
3973
|
-
|
3974
|
-
var IteratorProxy = createIteratorProxy(function () {
|
3975
|
-
var iterator = this.iterator;
|
3976
|
-
var result = anObject(call(this.next, iterator));
|
3977
|
-
var done = this.done = !!result.done;
|
3978
|
-
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
|
3979
|
-
});
|
3980
|
-
|
3981
|
-
// `Iterator.prototype.map` method
|
3982
|
-
// https://github.com/tc39/proposal-iterator-helpers
|
3983
|
-
module.exports = function map(mapper) {
|
3984
|
-
anObject(this);
|
3985
|
-
aCallable(mapper);
|
3986
|
-
return new IteratorProxy(getIteratorDirect(this), {
|
3987
|
-
mapper: mapper
|
3988
|
-
});
|
3989
|
-
};
|
3990
|
-
|
3991
|
-
|
3992
2761
|
/***/ }),
|
3993
2762
|
|
3994
2763
|
/***/ 7657:
|
@@ -5046,49 +3815,6 @@ $({ global: true, constructor: true, forced: FORCED }, {
|
|
5046
3815
|
});
|
5047
3816
|
|
5048
3817
|
|
5049
|
-
/***/ }),
|
5050
|
-
|
5051
|
-
/***/ 2489:
|
5052
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5053
|
-
|
5054
|
-
"use strict";
|
5055
|
-
|
5056
|
-
var $ = __webpack_require__(6518);
|
5057
|
-
var call = __webpack_require__(9565);
|
5058
|
-
var aCallable = __webpack_require__(9306);
|
5059
|
-
var anObject = __webpack_require__(8551);
|
5060
|
-
var getIteratorDirect = __webpack_require__(1767);
|
5061
|
-
var createIteratorProxy = __webpack_require__(9462);
|
5062
|
-
var callWithSafeIterationClosing = __webpack_require__(6319);
|
5063
|
-
var IS_PURE = __webpack_require__(6395);
|
5064
|
-
|
5065
|
-
var IteratorProxy = createIteratorProxy(function () {
|
5066
|
-
var iterator = this.iterator;
|
5067
|
-
var predicate = this.predicate;
|
5068
|
-
var next = this.next;
|
5069
|
-
var result, done, value;
|
5070
|
-
while (true) {
|
5071
|
-
result = anObject(call(next, iterator));
|
5072
|
-
done = this.done = !!result.done;
|
5073
|
-
if (done) return;
|
5074
|
-
value = result.value;
|
5075
|
-
if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;
|
5076
|
-
}
|
5077
|
-
});
|
5078
|
-
|
5079
|
-
// `Iterator.prototype.filter` method
|
5080
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.filter
|
5081
|
-
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
5082
|
-
filter: function filter(predicate) {
|
5083
|
-
anObject(this);
|
5084
|
-
aCallable(predicate);
|
5085
|
-
return new IteratorProxy(getIteratorDirect(this), {
|
5086
|
-
predicate: predicate
|
5087
|
-
});
|
5088
|
-
}
|
5089
|
-
});
|
5090
|
-
|
5091
|
-
|
5092
3818
|
/***/ }),
|
5093
3819
|
|
5094
3820
|
/***/ 7588:
|
@@ -5117,64 +3843,6 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
5117
3843
|
});
|
5118
3844
|
|
5119
3845
|
|
5120
|
-
/***/ }),
|
5121
|
-
|
5122
|
-
/***/ 1701:
|
5123
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5124
|
-
|
5125
|
-
"use strict";
|
5126
|
-
|
5127
|
-
var $ = __webpack_require__(6518);
|
5128
|
-
var map = __webpack_require__(713);
|
5129
|
-
var IS_PURE = __webpack_require__(6395);
|
5130
|
-
|
5131
|
-
// `Iterator.prototype.map` method
|
5132
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
5133
|
-
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
5134
|
-
map: map
|
5135
|
-
});
|
5136
|
-
|
5137
|
-
|
5138
|
-
/***/ }),
|
5139
|
-
|
5140
|
-
/***/ 8237:
|
5141
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5142
|
-
|
5143
|
-
"use strict";
|
5144
|
-
|
5145
|
-
var $ = __webpack_require__(6518);
|
5146
|
-
var iterate = __webpack_require__(2652);
|
5147
|
-
var aCallable = __webpack_require__(9306);
|
5148
|
-
var anObject = __webpack_require__(8551);
|
5149
|
-
var getIteratorDirect = __webpack_require__(1767);
|
5150
|
-
|
5151
|
-
var $TypeError = TypeError;
|
5152
|
-
|
5153
|
-
// `Iterator.prototype.reduce` method
|
5154
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.reduce
|
5155
|
-
$({ target: 'Iterator', proto: true, real: true }, {
|
5156
|
-
reduce: function reduce(reducer /* , initialValue */) {
|
5157
|
-
anObject(this);
|
5158
|
-
aCallable(reducer);
|
5159
|
-
var record = getIteratorDirect(this);
|
5160
|
-
var noInitial = arguments.length < 2;
|
5161
|
-
var accumulator = noInitial ? undefined : arguments[1];
|
5162
|
-
var counter = 0;
|
5163
|
-
iterate(record, function (value) {
|
5164
|
-
if (noInitial) {
|
5165
|
-
noInitial = false;
|
5166
|
-
accumulator = value;
|
5167
|
-
} else {
|
5168
|
-
accumulator = reducer(accumulator, value, counter);
|
5169
|
-
}
|
5170
|
-
counter++;
|
5171
|
-
}, { IS_RECORD: true });
|
5172
|
-
if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value');
|
5173
|
-
return accumulator;
|
5174
|
-
}
|
5175
|
-
});
|
5176
|
-
|
5177
|
-
|
5178
3846
|
/***/ }),
|
5179
3847
|
|
5180
3848
|
/***/ 8992:
|
@@ -5186,17 +3854,6 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
5186
3854
|
__webpack_require__(8111);
|
5187
3855
|
|
5188
3856
|
|
5189
|
-
/***/ }),
|
5190
|
-
|
5191
|
-
/***/ 4520:
|
5192
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5193
|
-
|
5194
|
-
"use strict";
|
5195
|
-
|
5196
|
-
// TODO: Remove from `core-js@4`
|
5197
|
-
__webpack_require__(2489);
|
5198
|
-
|
5199
|
-
|
5200
3857
|
/***/ }),
|
5201
3858
|
|
5202
3859
|
/***/ 3949:
|
@@ -5208,28 +3865,6 @@ __webpack_require__(2489);
|
|
5208
3865
|
__webpack_require__(7588);
|
5209
3866
|
|
5210
3867
|
|
5211
|
-
/***/ }),
|
5212
|
-
|
5213
|
-
/***/ 1454:
|
5214
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5215
|
-
|
5216
|
-
"use strict";
|
5217
|
-
|
5218
|
-
// TODO: Remove from `core-js@4`
|
5219
|
-
__webpack_require__(1701);
|
5220
|
-
|
5221
|
-
|
5222
|
-
/***/ }),
|
5223
|
-
|
5224
|
-
/***/ 8872:
|
5225
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5226
|
-
|
5227
|
-
"use strict";
|
5228
|
-
|
5229
|
-
// TODO: Remove from `core-js@4`
|
5230
|
-
__webpack_require__(8237);
|
5231
|
-
|
5232
|
-
|
5233
3868
|
/***/ })
|
5234
3869
|
|
5235
3870
|
/******/ });
|
@@ -5258,6 +3893,9 @@ __webpack_require__(8237);
|
|
5258
3893
|
/******/ return module.exports;
|
5259
3894
|
/******/ }
|
5260
3895
|
/******/
|
3896
|
+
/******/ // expose the modules object (__webpack_modules__)
|
3897
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
3898
|
+
/******/
|
5261
3899
|
/************************************************************************/
|
5262
3900
|
/******/ /* webpack/runtime/compat get default export */
|
5263
3901
|
/******/ !function() {
|
@@ -5316,6 +3954,32 @@ __webpack_require__(8237);
|
|
5316
3954
|
/******/ __webpack_require__.p = "";
|
5317
3955
|
/******/ }();
|
5318
3956
|
/******/
|
3957
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
3958
|
+
/******/ !function() {
|
3959
|
+
/******/ __webpack_require__.b = document.baseURI || self.location.href;
|
3960
|
+
/******/
|
3961
|
+
/******/ // object to store loaded and loading chunks
|
3962
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
3963
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
3964
|
+
/******/ var installedChunks = {
|
3965
|
+
/******/ 668: 0
|
3966
|
+
/******/ };
|
3967
|
+
/******/
|
3968
|
+
/******/ // no chunk on demand loading
|
3969
|
+
/******/
|
3970
|
+
/******/ // no prefetching
|
3971
|
+
/******/
|
3972
|
+
/******/ // no preloaded
|
3973
|
+
/******/
|
3974
|
+
/******/ // no HMR
|
3975
|
+
/******/
|
3976
|
+
/******/ // no HMR manifest
|
3977
|
+
/******/
|
3978
|
+
/******/ // no on chunks loaded
|
3979
|
+
/******/
|
3980
|
+
/******/ // no jsonp function
|
3981
|
+
/******/ }();
|
3982
|
+
/******/
|
5319
3983
|
/************************************************************************/
|
5320
3984
|
var __webpack_exports__ = {};
|
5321
3985
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
@@ -5352,6 +4016,8 @@ var es_array_push = __webpack_require__(4114);
|
|
5352
4016
|
var esnext_iterator_constructor = __webpack_require__(8992);
|
5353
4017
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
5354
4018
|
var esnext_iterator_for_each = __webpack_require__(3949);
|
4019
|
+
// EXTERNAL MODULE: ./packages/iconfont/iconfont.css
|
4020
|
+
var iconfont = __webpack_require__(3050);
|
5355
4021
|
;// ./locale/lang/zh-CN.js
|
5356
4022
|
/*
|
5357
4023
|
* @Author: chenghuan.dong
|
@@ -5482,24 +4148,19 @@ const i18n = function (fn) {
|
|
5482
4148
|
/*
|
5483
4149
|
* @Author: chenghuan.dong
|
5484
4150
|
* @Date: 2024-11-08 17:23:47
|
5485
|
-
* @LastEditTime: 2024-11-11
|
4151
|
+
* @LastEditTime: 2024-11-12 11:14:23
|
5486
4152
|
* @LastEditors: chenghuan.dong
|
5487
4153
|
* @Description: 主index.js导出全部组件
|
5488
4154
|
* @FilePath: \nubomed-ui\packages\index.js
|
5489
4155
|
*/
|
5490
4156
|
|
5491
|
-
//
|
5492
|
-
// import NBTag from './components/NBTag/index.js'
|
5493
|
-
// import NBEmpty from './components/NBEmpty/index.js'
|
5494
|
-
// import NBPagination from './components/NBPagination/index.js'
|
5495
|
-
// import NBBottomActionBar from './components/NBBottomActionBar/index.js'
|
4157
|
+
// 使用iconfont图标
|
5496
4158
|
|
5497
|
-
// const components = [SvgIcon, NBTag, NBEmpty, NBPagination, NBBottomActionBar]
|
5498
4159
|
|
4160
|
+
// 获取所有组件
|
5499
4161
|
const components = [];
|
5500
4162
|
const req = __webpack_require__(2162);
|
5501
4163
|
req.keys().forEach(v => {
|
5502
|
-
console.log(req(v).default);
|
5503
4164
|
components.push(req(v).default);
|
5504
4165
|
});
|
5505
4166
|
|