nubomed-ui 2.0.14 → 2.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/css/element-ui/element-variables.css +67236 -0
- package/css/element-ui/index.css +1 -1
- package/css/element-variables.css +1 -0
- package/css/nb-ui/index.css +1 -1
- package/nubomed-ui.common.js +148 -1466
- package/nubomed-ui.common.js.map +1 -1
- package/nubomed-ui.umd.js +148 -1466
- 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/nubomed-ui.umd.js
CHANGED
@@ -178,6 +178,27 @@ ___CSS_LOADER_EXPORT___.push([module.id, "@font-face{font-family:iconfont;src:ur
|
|
178
178
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
179
179
|
|
180
180
|
|
181
|
+
/***/ }),
|
182
|
+
|
183
|
+
/***/ 1500:
|
184
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
185
|
+
|
186
|
+
"use strict";
|
187
|
+
__webpack_require__.r(__webpack_exports__);
|
188
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
|
189
|
+
/* 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__);
|
190
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
191
|
+
/* 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__);
|
192
|
+
// Imports
|
193
|
+
|
194
|
+
|
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()));
|
196
|
+
// Module
|
197
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".iconfont[data-v-1d7955de]{display:inline-flex}", ""]);
|
198
|
+
// Exports
|
199
|
+
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
200
|
+
|
201
|
+
|
181
202
|
/***/ }),
|
182
203
|
|
183
204
|
/***/ 7207:
|
@@ -551,7 +572,7 @@ src.install = function (Vue) {
|
|
551
572
|
|
552
573
|
/***/ }),
|
553
574
|
|
554
|
-
/***/
|
575
|
+
/***/ 4794:
|
555
576
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
556
577
|
|
557
578
|
"use strict";
|
@@ -563,7 +584,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
563
584
|
"default": function() { return /* binding */ components_NBHeader; }
|
564
585
|
});
|
565
586
|
|
566
|
-
;// ./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
|
567
588
|
var render = function render() {
|
568
589
|
var _vm = this,
|
569
590
|
_c = _vm._self._c;
|
@@ -577,12 +598,10 @@ var render = function render() {
|
|
577
598
|
return _vm.handleBack.apply(null, arguments);
|
578
599
|
}
|
579
600
|
}
|
580
|
-
}, [_c('
|
601
|
+
}, [_c('NBIcon', {
|
581
602
|
attrs: {
|
582
|
-
"icon
|
603
|
+
"icon": "back"
|
583
604
|
}
|
584
|
-
}), _c('span', {
|
585
|
-
staticClass: "iconfont icon-back"
|
586
605
|
}), _c('span', {
|
587
606
|
staticClass: "nb-header__back__text"
|
588
607
|
}, [_vm._v(_vm._s(_vm.backText))])], 1) : _vm._e(), _c('div', {
|
@@ -614,1156 +633,34 @@ var render = function render() {
|
|
614
633
|
}, [_vm._t("title", function () {
|
615
634
|
return [_vm._v(_vm._s(_vm.title))];
|
616
635
|
})], 2) : _vm._e(), _c('div', {
|
617
|
-
staticClass: "nb-header__right"
|
618
|
-
}, [_vm._t("right")], 2), _vm.logout ? _c('div', {
|
619
|
-
staticClass: "nb-header__logout",
|
620
|
-
on: {
|
621
|
-
"click": function ($event) {
|
622
|
-
$event.stopPropagation();
|
623
|
-
return _vm.handleLogout.apply(null, arguments);
|
624
|
-
}
|
625
|
-
}
|
626
|
-
}, [_c('
|
627
|
-
attrs: {
|
628
|
-
"icon
|
629
|
-
}
|
630
|
-
}), _c('span', {
|
631
|
-
staticClass: "nb-header__logout__text"
|
632
|
-
}, [_vm._v(_vm._s(_vm.logoutText)), _vm.logoutTime > -1 ? [_vm._v("(" + _vm._s(_vm.logoutTime) + "S)")] : _vm._e()], 2)], 1) : _vm._e()]);
|
633
|
-
};
|
634
|
-
var staticRenderFns = [];
|
635
|
-
|
636
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
637
|
-
var es_array_push = __webpack_require__(4114);
|
638
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js
|
639
|
-
var esnext_iterator_constructor = __webpack_require__(8992);
|
640
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.filter.js
|
641
|
-
var esnext_iterator_filter = __webpack_require__(4520);
|
642
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
643
|
-
var esnext_iterator_for_each = __webpack_require__(3949);
|
644
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.map.js
|
645
|
-
var esnext_iterator_map = __webpack_require__(1454);
|
646
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.reduce.js
|
647
|
-
var esnext_iterator_reduce = __webpack_require__(8872);
|
648
|
-
;// ./node_modules/vuex/dist/vuex.esm.js
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
/*!
|
656
|
-
* vuex v3.6.2
|
657
|
-
* (c) 2021 Evan You
|
658
|
-
* @license MIT
|
659
|
-
*/
|
660
|
-
function applyMixin(Vue) {
|
661
|
-
var version = Number(Vue.version.split('.')[0]);
|
662
|
-
if (version >= 2) {
|
663
|
-
Vue.mixin({
|
664
|
-
beforeCreate: vuexInit
|
665
|
-
});
|
666
|
-
} else {
|
667
|
-
// override init and inject vuex init procedure
|
668
|
-
// for 1.x backwards compatibility.
|
669
|
-
var _init = Vue.prototype._init;
|
670
|
-
Vue.prototype._init = function (options) {
|
671
|
-
if (options === void 0) options = {};
|
672
|
-
options.init = options.init ? [vuexInit].concat(options.init) : vuexInit;
|
673
|
-
_init.call(this, options);
|
674
|
-
};
|
675
|
-
}
|
676
|
-
|
677
|
-
/**
|
678
|
-
* Vuex init hook, injected into each instances init hooks list.
|
679
|
-
*/
|
680
|
-
|
681
|
-
function vuexInit() {
|
682
|
-
var options = this.$options;
|
683
|
-
// store injection
|
684
|
-
if (options.store) {
|
685
|
-
this.$store = typeof options.store === 'function' ? options.store() : options.store;
|
686
|
-
} else if (options.parent && options.parent.$store) {
|
687
|
-
this.$store = options.parent.$store;
|
688
|
-
}
|
689
|
-
}
|
690
|
-
}
|
691
|
-
var target = typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : {};
|
692
|
-
var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
693
|
-
function devtoolPlugin(store) {
|
694
|
-
if (!devtoolHook) {
|
695
|
-
return;
|
696
|
-
}
|
697
|
-
store._devtoolHook = devtoolHook;
|
698
|
-
devtoolHook.emit('vuex:init', store);
|
699
|
-
devtoolHook.on('vuex:travel-to-state', function (targetState) {
|
700
|
-
store.replaceState(targetState);
|
701
|
-
});
|
702
|
-
store.subscribe(function (mutation, state) {
|
703
|
-
devtoolHook.emit('vuex:mutation', mutation, state);
|
704
|
-
}, {
|
705
|
-
prepend: true
|
706
|
-
});
|
707
|
-
store.subscribeAction(function (action, state) {
|
708
|
-
devtoolHook.emit('vuex:action', action, state);
|
709
|
-
}, {
|
710
|
-
prepend: true
|
711
|
-
});
|
712
|
-
}
|
713
|
-
|
714
|
-
/**
|
715
|
-
* Get the first item that pass the test
|
716
|
-
* by second argument function
|
717
|
-
*
|
718
|
-
* @param {Array} list
|
719
|
-
* @param {Function} f
|
720
|
-
* @return {*}
|
721
|
-
*/
|
722
|
-
function find(list, f) {
|
723
|
-
return list.filter(f)[0];
|
724
|
-
}
|
725
|
-
|
726
|
-
/**
|
727
|
-
* Deep copy the given object considering circular structure.
|
728
|
-
* This function caches all nested objects and its copies.
|
729
|
-
* If it detects circular structure, use cached copy to avoid infinite loop.
|
730
|
-
*
|
731
|
-
* @param {*} obj
|
732
|
-
* @param {Array<Object>} cache
|
733
|
-
* @return {*}
|
734
|
-
*/
|
735
|
-
function deepCopy(obj, cache) {
|
736
|
-
if (cache === void 0) cache = [];
|
737
|
-
|
738
|
-
// just return if obj is immutable value
|
739
|
-
if (obj === null || typeof obj !== 'object') {
|
740
|
-
return obj;
|
741
|
-
}
|
742
|
-
|
743
|
-
// if obj is hit, it is in circular structure
|
744
|
-
var hit = find(cache, function (c) {
|
745
|
-
return c.original === obj;
|
746
|
-
});
|
747
|
-
if (hit) {
|
748
|
-
return hit.copy;
|
749
|
-
}
|
750
|
-
var copy = Array.isArray(obj) ? [] : {};
|
751
|
-
// put the copy into cache at first
|
752
|
-
// because we want to refer it in recursive deepCopy
|
753
|
-
cache.push({
|
754
|
-
original: obj,
|
755
|
-
copy: copy
|
756
|
-
});
|
757
|
-
Object.keys(obj).forEach(function (key) {
|
758
|
-
copy[key] = deepCopy(obj[key], cache);
|
759
|
-
});
|
760
|
-
return copy;
|
761
|
-
}
|
762
|
-
|
763
|
-
/**
|
764
|
-
* forEach for object
|
765
|
-
*/
|
766
|
-
function forEachValue(obj, fn) {
|
767
|
-
Object.keys(obj).forEach(function (key) {
|
768
|
-
return fn(obj[key], key);
|
769
|
-
});
|
770
|
-
}
|
771
|
-
function isObject(obj) {
|
772
|
-
return obj !== null && typeof obj === 'object';
|
773
|
-
}
|
774
|
-
function isPromise(val) {
|
775
|
-
return val && typeof val.then === 'function';
|
776
|
-
}
|
777
|
-
function assert(condition, msg) {
|
778
|
-
if (!condition) {
|
779
|
-
throw new Error("[vuex] " + msg);
|
780
|
-
}
|
781
|
-
}
|
782
|
-
function partial(fn, arg) {
|
783
|
-
return function () {
|
784
|
-
return fn(arg);
|
785
|
-
};
|
786
|
-
}
|
787
|
-
|
788
|
-
// Base data struct for store's module, package with some attribute and method
|
789
|
-
var Module = function Module(rawModule, runtime) {
|
790
|
-
this.runtime = runtime;
|
791
|
-
// Store some children item
|
792
|
-
this._children = Object.create(null);
|
793
|
-
// Store the origin module object which passed by programmer
|
794
|
-
this._rawModule = rawModule;
|
795
|
-
var rawState = rawModule.state;
|
796
|
-
|
797
|
-
// Store the origin module's state
|
798
|
-
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
|
799
|
-
};
|
800
|
-
var prototypeAccessors = {
|
801
|
-
namespaced: {
|
802
|
-
configurable: true
|
803
|
-
}
|
804
|
-
};
|
805
|
-
prototypeAccessors.namespaced.get = function () {
|
806
|
-
return !!this._rawModule.namespaced;
|
807
|
-
};
|
808
|
-
Module.prototype.addChild = function addChild(key, module) {
|
809
|
-
this._children[key] = module;
|
810
|
-
};
|
811
|
-
Module.prototype.removeChild = function removeChild(key) {
|
812
|
-
delete this._children[key];
|
813
|
-
};
|
814
|
-
Module.prototype.getChild = function getChild(key) {
|
815
|
-
return this._children[key];
|
816
|
-
};
|
817
|
-
Module.prototype.hasChild = function hasChild(key) {
|
818
|
-
return key in this._children;
|
819
|
-
};
|
820
|
-
Module.prototype.update = function update(rawModule) {
|
821
|
-
this._rawModule.namespaced = rawModule.namespaced;
|
822
|
-
if (rawModule.actions) {
|
823
|
-
this._rawModule.actions = rawModule.actions;
|
824
|
-
}
|
825
|
-
if (rawModule.mutations) {
|
826
|
-
this._rawModule.mutations = rawModule.mutations;
|
827
|
-
}
|
828
|
-
if (rawModule.getters) {
|
829
|
-
this._rawModule.getters = rawModule.getters;
|
830
|
-
}
|
831
|
-
};
|
832
|
-
Module.prototype.forEachChild = function forEachChild(fn) {
|
833
|
-
forEachValue(this._children, fn);
|
834
|
-
};
|
835
|
-
Module.prototype.forEachGetter = function forEachGetter(fn) {
|
836
|
-
if (this._rawModule.getters) {
|
837
|
-
forEachValue(this._rawModule.getters, fn);
|
838
|
-
}
|
839
|
-
};
|
840
|
-
Module.prototype.forEachAction = function forEachAction(fn) {
|
841
|
-
if (this._rawModule.actions) {
|
842
|
-
forEachValue(this._rawModule.actions, fn);
|
843
|
-
}
|
844
|
-
};
|
845
|
-
Module.prototype.forEachMutation = function forEachMutation(fn) {
|
846
|
-
if (this._rawModule.mutations) {
|
847
|
-
forEachValue(this._rawModule.mutations, fn);
|
848
|
-
}
|
849
|
-
};
|
850
|
-
Object.defineProperties(Module.prototype, prototypeAccessors);
|
851
|
-
var ModuleCollection = function ModuleCollection(rawRootModule) {
|
852
|
-
// register root module (Vuex.Store options)
|
853
|
-
this.register([], rawRootModule, false);
|
854
|
-
};
|
855
|
-
ModuleCollection.prototype.get = function get(path) {
|
856
|
-
return path.reduce(function (module, key) {
|
857
|
-
return module.getChild(key);
|
858
|
-
}, this.root);
|
859
|
-
};
|
860
|
-
ModuleCollection.prototype.getNamespace = function getNamespace(path) {
|
861
|
-
var module = this.root;
|
862
|
-
return path.reduce(function (namespace, key) {
|
863
|
-
module = module.getChild(key);
|
864
|
-
return namespace + (module.namespaced ? key + '/' : '');
|
865
|
-
}, '');
|
866
|
-
};
|
867
|
-
ModuleCollection.prototype.update = function update$1(rawRootModule) {
|
868
|
-
update([], this.root, rawRootModule);
|
869
|
-
};
|
870
|
-
ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
|
871
|
-
var this$1 = this;
|
872
|
-
if (runtime === void 0) runtime = true;
|
873
|
-
if (false) {}
|
874
|
-
var newModule = new Module(rawModule, runtime);
|
875
|
-
if (path.length === 0) {
|
876
|
-
this.root = newModule;
|
877
|
-
} else {
|
878
|
-
var parent = this.get(path.slice(0, -1));
|
879
|
-
parent.addChild(path[path.length - 1], newModule);
|
880
|
-
}
|
881
|
-
|
882
|
-
// register nested modules
|
883
|
-
if (rawModule.modules) {
|
884
|
-
forEachValue(rawModule.modules, function (rawChildModule, key) {
|
885
|
-
this$1.register(path.concat(key), rawChildModule, runtime);
|
886
|
-
});
|
887
|
-
}
|
888
|
-
};
|
889
|
-
ModuleCollection.prototype.unregister = function unregister(path) {
|
890
|
-
var parent = this.get(path.slice(0, -1));
|
891
|
-
var key = path[path.length - 1];
|
892
|
-
var child = parent.getChild(key);
|
893
|
-
if (!child) {
|
894
|
-
if (false) {}
|
895
|
-
return;
|
896
|
-
}
|
897
|
-
if (!child.runtime) {
|
898
|
-
return;
|
899
|
-
}
|
900
|
-
parent.removeChild(key);
|
901
|
-
};
|
902
|
-
ModuleCollection.prototype.isRegistered = function isRegistered(path) {
|
903
|
-
var parent = this.get(path.slice(0, -1));
|
904
|
-
var key = path[path.length - 1];
|
905
|
-
if (parent) {
|
906
|
-
return parent.hasChild(key);
|
907
|
-
}
|
908
|
-
return false;
|
909
|
-
};
|
910
|
-
function update(path, targetModule, newModule) {
|
911
|
-
if (false) {}
|
912
|
-
|
913
|
-
// update target module
|
914
|
-
targetModule.update(newModule);
|
915
|
-
|
916
|
-
// update nested modules
|
917
|
-
if (newModule.modules) {
|
918
|
-
for (var key in newModule.modules) {
|
919
|
-
if (!targetModule.getChild(key)) {
|
920
|
-
if (false) {}
|
921
|
-
return;
|
922
|
-
}
|
923
|
-
update(path.concat(key), targetModule.getChild(key), newModule.modules[key]);
|
924
|
-
}
|
925
|
-
}
|
926
|
-
}
|
927
|
-
var functionAssert = {
|
928
|
-
assert: function (value) {
|
929
|
-
return typeof value === 'function';
|
930
|
-
},
|
931
|
-
expected: 'function'
|
932
|
-
};
|
933
|
-
var objectAssert = {
|
934
|
-
assert: function (value) {
|
935
|
-
return typeof value === 'function' || typeof value === 'object' && typeof value.handler === 'function';
|
936
|
-
},
|
937
|
-
expected: 'function or object with "handler" function'
|
938
|
-
};
|
939
|
-
var assertTypes = {
|
940
|
-
getters: functionAssert,
|
941
|
-
mutations: functionAssert,
|
942
|
-
actions: objectAssert
|
943
|
-
};
|
944
|
-
function assertRawModule(path, rawModule) {
|
945
|
-
Object.keys(assertTypes).forEach(function (key) {
|
946
|
-
if (!rawModule[key]) {
|
947
|
-
return;
|
948
|
-
}
|
949
|
-
var assertOptions = assertTypes[key];
|
950
|
-
forEachValue(rawModule[key], function (value, type) {
|
951
|
-
assert(assertOptions.assert(value), makeAssertionMessage(path, key, type, value, assertOptions.expected));
|
952
|
-
});
|
953
|
-
});
|
954
|
-
}
|
955
|
-
function makeAssertionMessage(path, key, type, value, expected) {
|
956
|
-
var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
|
957
|
-
if (path.length > 0) {
|
958
|
-
buf += " in module \"" + path.join('.') + "\"";
|
959
|
-
}
|
960
|
-
buf += " is " + JSON.stringify(value) + ".";
|
961
|
-
return buf;
|
962
|
-
}
|
963
|
-
var Vue; // bind on install
|
964
|
-
|
965
|
-
var Store = function Store(options) {
|
966
|
-
var this$1 = this;
|
967
|
-
if (options === void 0) options = {};
|
968
|
-
|
969
|
-
// Auto install if it is not done yet and `window` has `Vue`.
|
970
|
-
// To allow users to avoid auto-installation in some cases,
|
971
|
-
// this code should be placed here. See #731
|
972
|
-
if (!Vue && typeof window !== 'undefined' && window.Vue) {
|
973
|
-
install(window.Vue);
|
974
|
-
}
|
975
|
-
if (false) {}
|
976
|
-
var plugins = options.plugins;
|
977
|
-
if (plugins === void 0) plugins = [];
|
978
|
-
var strict = options.strict;
|
979
|
-
if (strict === void 0) strict = false;
|
980
|
-
|
981
|
-
// store internal state
|
982
|
-
this._committing = false;
|
983
|
-
this._actions = Object.create(null);
|
984
|
-
this._actionSubscribers = [];
|
985
|
-
this._mutations = Object.create(null);
|
986
|
-
this._wrappedGetters = Object.create(null);
|
987
|
-
this._modules = new ModuleCollection(options);
|
988
|
-
this._modulesNamespaceMap = Object.create(null);
|
989
|
-
this._subscribers = [];
|
990
|
-
this._watcherVM = new Vue();
|
991
|
-
this._makeLocalGettersCache = Object.create(null);
|
992
|
-
|
993
|
-
// bind commit and dispatch to self
|
994
|
-
var store = this;
|
995
|
-
var ref = this;
|
996
|
-
var dispatch = ref.dispatch;
|
997
|
-
var commit = ref.commit;
|
998
|
-
this.dispatch = function boundDispatch(type, payload) {
|
999
|
-
return dispatch.call(store, type, payload);
|
1000
|
-
};
|
1001
|
-
this.commit = function boundCommit(type, payload, options) {
|
1002
|
-
return commit.call(store, type, payload, options);
|
1003
|
-
};
|
1004
|
-
|
1005
|
-
// strict mode
|
1006
|
-
this.strict = strict;
|
1007
|
-
var state = this._modules.root.state;
|
1008
|
-
|
1009
|
-
// init root module.
|
1010
|
-
// this also recursively registers all sub-modules
|
1011
|
-
// and collects all module getters inside this._wrappedGetters
|
1012
|
-
installModule(this, state, [], this._modules.root);
|
1013
|
-
|
1014
|
-
// initialize the store vm, which is responsible for the reactivity
|
1015
|
-
// (also registers _wrappedGetters as computed properties)
|
1016
|
-
resetStoreVM(this, state);
|
1017
|
-
|
1018
|
-
// apply plugins
|
1019
|
-
plugins.forEach(function (plugin) {
|
1020
|
-
return plugin(this$1);
|
1021
|
-
});
|
1022
|
-
var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
|
1023
|
-
if (useDevtools) {
|
1024
|
-
devtoolPlugin(this);
|
1025
|
-
}
|
1026
|
-
};
|
1027
|
-
var prototypeAccessors$1 = {
|
1028
|
-
state: {
|
1029
|
-
configurable: true
|
1030
|
-
}
|
1031
|
-
};
|
1032
|
-
prototypeAccessors$1.state.get = function () {
|
1033
|
-
return this._vm._data.$$state;
|
1034
|
-
};
|
1035
|
-
prototypeAccessors$1.state.set = function (v) {
|
1036
|
-
if (false) {}
|
1037
|
-
};
|
1038
|
-
Store.prototype.commit = function commit(_type, _payload, _options) {
|
1039
|
-
var this$1 = this;
|
1040
|
-
|
1041
|
-
// check object-style commit
|
1042
|
-
var ref = unifyObjectStyle(_type, _payload, _options);
|
1043
|
-
var type = ref.type;
|
1044
|
-
var payload = ref.payload;
|
1045
|
-
var options = ref.options;
|
1046
|
-
var mutation = {
|
1047
|
-
type: type,
|
1048
|
-
payload: payload
|
1049
|
-
};
|
1050
|
-
var entry = this._mutations[type];
|
1051
|
-
if (!entry) {
|
1052
|
-
if (false) {}
|
1053
|
-
return;
|
1054
|
-
}
|
1055
|
-
this._withCommit(function () {
|
1056
|
-
entry.forEach(function commitIterator(handler) {
|
1057
|
-
handler(payload);
|
1058
|
-
});
|
1059
|
-
});
|
1060
|
-
this._subscribers.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
1061
|
-
.forEach(function (sub) {
|
1062
|
-
return sub(mutation, this$1.state);
|
1063
|
-
});
|
1064
|
-
if (false) {}
|
1065
|
-
};
|
1066
|
-
Store.prototype.dispatch = function dispatch(_type, _payload) {
|
1067
|
-
var this$1 = this;
|
1068
|
-
|
1069
|
-
// check object-style dispatch
|
1070
|
-
var ref = unifyObjectStyle(_type, _payload);
|
1071
|
-
var type = ref.type;
|
1072
|
-
var payload = ref.payload;
|
1073
|
-
var action = {
|
1074
|
-
type: type,
|
1075
|
-
payload: payload
|
1076
|
-
};
|
1077
|
-
var entry = this._actions[type];
|
1078
|
-
if (!entry) {
|
1079
|
-
if (false) {}
|
1080
|
-
return;
|
1081
|
-
}
|
1082
|
-
try {
|
1083
|
-
this._actionSubscribers.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
1084
|
-
.filter(function (sub) {
|
1085
|
-
return sub.before;
|
1086
|
-
}).forEach(function (sub) {
|
1087
|
-
return sub.before(action, this$1.state);
|
1088
|
-
});
|
1089
|
-
} catch (e) {
|
1090
|
-
if (false) {}
|
1091
|
-
}
|
1092
|
-
var result = entry.length > 1 ? Promise.all(entry.map(function (handler) {
|
1093
|
-
return handler(payload);
|
1094
|
-
})) : entry[0](payload);
|
1095
|
-
return new Promise(function (resolve, reject) {
|
1096
|
-
result.then(function (res) {
|
1097
|
-
try {
|
1098
|
-
this$1._actionSubscribers.filter(function (sub) {
|
1099
|
-
return sub.after;
|
1100
|
-
}).forEach(function (sub) {
|
1101
|
-
return sub.after(action, this$1.state);
|
1102
|
-
});
|
1103
|
-
} catch (e) {
|
1104
|
-
if (false) {}
|
1105
|
-
}
|
1106
|
-
resolve(res);
|
1107
|
-
}, function (error) {
|
1108
|
-
try {
|
1109
|
-
this$1._actionSubscribers.filter(function (sub) {
|
1110
|
-
return sub.error;
|
1111
|
-
}).forEach(function (sub) {
|
1112
|
-
return sub.error(action, this$1.state, error);
|
1113
|
-
});
|
1114
|
-
} catch (e) {
|
1115
|
-
if (false) {}
|
1116
|
-
}
|
1117
|
-
reject(error);
|
1118
|
-
});
|
1119
|
-
});
|
1120
|
-
};
|
1121
|
-
Store.prototype.subscribe = function subscribe(fn, options) {
|
1122
|
-
return genericSubscribe(fn, this._subscribers, options);
|
1123
|
-
};
|
1124
|
-
Store.prototype.subscribeAction = function subscribeAction(fn, options) {
|
1125
|
-
var subs = typeof fn === 'function' ? {
|
1126
|
-
before: fn
|
1127
|
-
} : fn;
|
1128
|
-
return genericSubscribe(subs, this._actionSubscribers, options);
|
1129
|
-
};
|
1130
|
-
Store.prototype.watch = function watch(getter, cb, options) {
|
1131
|
-
var this$1 = this;
|
1132
|
-
if (false) {}
|
1133
|
-
return this._watcherVM.$watch(function () {
|
1134
|
-
return getter(this$1.state, this$1.getters);
|
1135
|
-
}, cb, options);
|
1136
|
-
};
|
1137
|
-
Store.prototype.replaceState = function replaceState(state) {
|
1138
|
-
var this$1 = this;
|
1139
|
-
this._withCommit(function () {
|
1140
|
-
this$1._vm._data.$$state = state;
|
1141
|
-
});
|
1142
|
-
};
|
1143
|
-
Store.prototype.registerModule = function registerModule(path, rawModule, options) {
|
1144
|
-
if (options === void 0) options = {};
|
1145
|
-
if (typeof path === 'string') {
|
1146
|
-
path = [path];
|
1147
|
-
}
|
1148
|
-
if (false) {}
|
1149
|
-
this._modules.register(path, rawModule);
|
1150
|
-
installModule(this, this.state, path, this._modules.get(path), options.preserveState);
|
1151
|
-
// reset store to update getters...
|
1152
|
-
resetStoreVM(this, this.state);
|
1153
|
-
};
|
1154
|
-
Store.prototype.unregisterModule = function unregisterModule(path) {
|
1155
|
-
var this$1 = this;
|
1156
|
-
if (typeof path === 'string') {
|
1157
|
-
path = [path];
|
1158
|
-
}
|
1159
|
-
if (false) {}
|
1160
|
-
this._modules.unregister(path);
|
1161
|
-
this._withCommit(function () {
|
1162
|
-
var parentState = getNestedState(this$1.state, path.slice(0, -1));
|
1163
|
-
Vue.delete(parentState, path[path.length - 1]);
|
1164
|
-
});
|
1165
|
-
resetStore(this);
|
1166
|
-
};
|
1167
|
-
Store.prototype.hasModule = function hasModule(path) {
|
1168
|
-
if (typeof path === 'string') {
|
1169
|
-
path = [path];
|
1170
|
-
}
|
1171
|
-
if (false) {}
|
1172
|
-
return this._modules.isRegistered(path);
|
1173
|
-
};
|
1174
|
-
Store.prototype.hotUpdate = function hotUpdate(newOptions) {
|
1175
|
-
this._modules.update(newOptions);
|
1176
|
-
resetStore(this, true);
|
1177
|
-
};
|
1178
|
-
Store.prototype._withCommit = function _withCommit(fn) {
|
1179
|
-
var committing = this._committing;
|
1180
|
-
this._committing = true;
|
1181
|
-
fn();
|
1182
|
-
this._committing = committing;
|
1183
|
-
};
|
1184
|
-
Object.defineProperties(Store.prototype, prototypeAccessors$1);
|
1185
|
-
function genericSubscribe(fn, subs, options) {
|
1186
|
-
if (subs.indexOf(fn) < 0) {
|
1187
|
-
options && options.prepend ? subs.unshift(fn) : subs.push(fn);
|
1188
|
-
}
|
1189
|
-
return function () {
|
1190
|
-
var i = subs.indexOf(fn);
|
1191
|
-
if (i > -1) {
|
1192
|
-
subs.splice(i, 1);
|
1193
|
-
}
|
1194
|
-
};
|
1195
|
-
}
|
1196
|
-
function resetStore(store, hot) {
|
1197
|
-
store._actions = Object.create(null);
|
1198
|
-
store._mutations = Object.create(null);
|
1199
|
-
store._wrappedGetters = Object.create(null);
|
1200
|
-
store._modulesNamespaceMap = Object.create(null);
|
1201
|
-
var state = store.state;
|
1202
|
-
// init all modules
|
1203
|
-
installModule(store, state, [], store._modules.root, true);
|
1204
|
-
// reset vm
|
1205
|
-
resetStoreVM(store, state, hot);
|
1206
|
-
}
|
1207
|
-
function resetStoreVM(store, state, hot) {
|
1208
|
-
var oldVm = store._vm;
|
1209
|
-
|
1210
|
-
// bind store public getters
|
1211
|
-
store.getters = {};
|
1212
|
-
// reset local getters cache
|
1213
|
-
store._makeLocalGettersCache = Object.create(null);
|
1214
|
-
var wrappedGetters = store._wrappedGetters;
|
1215
|
-
var computed = {};
|
1216
|
-
forEachValue(wrappedGetters, function (fn, key) {
|
1217
|
-
// use computed to leverage its lazy-caching mechanism
|
1218
|
-
// direct inline function use will lead to closure preserving oldVm.
|
1219
|
-
// using partial to return function with only arguments preserved in closure environment.
|
1220
|
-
computed[key] = partial(fn, store);
|
1221
|
-
Object.defineProperty(store.getters, key, {
|
1222
|
-
get: function () {
|
1223
|
-
return store._vm[key];
|
1224
|
-
},
|
1225
|
-
enumerable: true // for local getters
|
1226
|
-
});
|
1227
|
-
});
|
1228
|
-
|
1229
|
-
// use a Vue instance to store the state tree
|
1230
|
-
// suppress warnings just in case the user has added
|
1231
|
-
// some funky global mixins
|
1232
|
-
var silent = Vue.config.silent;
|
1233
|
-
Vue.config.silent = true;
|
1234
|
-
store._vm = new Vue({
|
1235
|
-
data: {
|
1236
|
-
$$state: state
|
1237
|
-
},
|
1238
|
-
computed: computed
|
1239
|
-
});
|
1240
|
-
Vue.config.silent = silent;
|
1241
|
-
|
1242
|
-
// enable strict mode for new vm
|
1243
|
-
if (store.strict) {
|
1244
|
-
enableStrictMode(store);
|
1245
|
-
}
|
1246
|
-
if (oldVm) {
|
1247
|
-
if (hot) {
|
1248
|
-
// dispatch changes in all subscribed watchers
|
1249
|
-
// to force getter re-evaluation for hot reloading.
|
1250
|
-
store._withCommit(function () {
|
1251
|
-
oldVm._data.$$state = null;
|
1252
|
-
});
|
1253
|
-
}
|
1254
|
-
Vue.nextTick(function () {
|
1255
|
-
return oldVm.$destroy();
|
1256
|
-
});
|
1257
|
-
}
|
1258
|
-
}
|
1259
|
-
function installModule(store, rootState, path, module, hot) {
|
1260
|
-
var isRoot = !path.length;
|
1261
|
-
var namespace = store._modules.getNamespace(path);
|
1262
|
-
|
1263
|
-
// register in namespace map
|
1264
|
-
if (module.namespaced) {
|
1265
|
-
if (store._modulesNamespaceMap[namespace] && "production" !== 'production') {}
|
1266
|
-
store._modulesNamespaceMap[namespace] = module;
|
1267
|
-
}
|
1268
|
-
|
1269
|
-
// set state
|
1270
|
-
if (!isRoot && !hot) {
|
1271
|
-
var parentState = getNestedState(rootState, path.slice(0, -1));
|
1272
|
-
var moduleName = path[path.length - 1];
|
1273
|
-
store._withCommit(function () {
|
1274
|
-
if (false) {}
|
1275
|
-
Vue.set(parentState, moduleName, module.state);
|
1276
|
-
});
|
1277
|
-
}
|
1278
|
-
var local = module.context = makeLocalContext(store, namespace, path);
|
1279
|
-
module.forEachMutation(function (mutation, key) {
|
1280
|
-
var namespacedType = namespace + key;
|
1281
|
-
registerMutation(store, namespacedType, mutation, local);
|
1282
|
-
});
|
1283
|
-
module.forEachAction(function (action, key) {
|
1284
|
-
var type = action.root ? key : namespace + key;
|
1285
|
-
var handler = action.handler || action;
|
1286
|
-
registerAction(store, type, handler, local);
|
1287
|
-
});
|
1288
|
-
module.forEachGetter(function (getter, key) {
|
1289
|
-
var namespacedType = namespace + key;
|
1290
|
-
registerGetter(store, namespacedType, getter, local);
|
1291
|
-
});
|
1292
|
-
module.forEachChild(function (child, key) {
|
1293
|
-
installModule(store, rootState, path.concat(key), child, hot);
|
1294
|
-
});
|
1295
|
-
}
|
1296
|
-
|
1297
|
-
/**
|
1298
|
-
* make localized dispatch, commit, getters and state
|
1299
|
-
* if there is no namespace, just use root ones
|
1300
|
-
*/
|
1301
|
-
function makeLocalContext(store, namespace, path) {
|
1302
|
-
var noNamespace = namespace === '';
|
1303
|
-
var local = {
|
1304
|
-
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
|
1305
|
-
var args = unifyObjectStyle(_type, _payload, _options);
|
1306
|
-
var payload = args.payload;
|
1307
|
-
var options = args.options;
|
1308
|
-
var type = args.type;
|
1309
|
-
if (!options || !options.root) {
|
1310
|
-
type = namespace + type;
|
1311
|
-
if (false) {}
|
1312
|
-
}
|
1313
|
-
return store.dispatch(type, payload);
|
1314
|
-
},
|
1315
|
-
commit: noNamespace ? store.commit : function (_type, _payload, _options) {
|
1316
|
-
var args = unifyObjectStyle(_type, _payload, _options);
|
1317
|
-
var payload = args.payload;
|
1318
|
-
var options = args.options;
|
1319
|
-
var type = args.type;
|
1320
|
-
if (!options || !options.root) {
|
1321
|
-
type = namespace + type;
|
1322
|
-
if (false) {}
|
1323
|
-
}
|
1324
|
-
store.commit(type, payload, options);
|
1325
|
-
}
|
1326
|
-
};
|
1327
|
-
|
1328
|
-
// getters and state object must be gotten lazily
|
1329
|
-
// because they will be changed by vm update
|
1330
|
-
Object.defineProperties(local, {
|
1331
|
-
getters: {
|
1332
|
-
get: noNamespace ? function () {
|
1333
|
-
return store.getters;
|
1334
|
-
} : function () {
|
1335
|
-
return makeLocalGetters(store, namespace);
|
1336
|
-
}
|
1337
|
-
},
|
1338
|
-
state: {
|
1339
|
-
get: function () {
|
1340
|
-
return getNestedState(store.state, path);
|
1341
|
-
}
|
1342
|
-
}
|
1343
|
-
});
|
1344
|
-
return local;
|
1345
|
-
}
|
1346
|
-
function makeLocalGetters(store, namespace) {
|
1347
|
-
if (!store._makeLocalGettersCache[namespace]) {
|
1348
|
-
var gettersProxy = {};
|
1349
|
-
var splitPos = namespace.length;
|
1350
|
-
Object.keys(store.getters).forEach(function (type) {
|
1351
|
-
// skip if the target getter is not match this namespace
|
1352
|
-
if (type.slice(0, splitPos) !== namespace) {
|
1353
|
-
return;
|
1354
|
-
}
|
1355
|
-
|
1356
|
-
// extract local getter type
|
1357
|
-
var localType = type.slice(splitPos);
|
1358
|
-
|
1359
|
-
// Add a port to the getters proxy.
|
1360
|
-
// Define as getter property because
|
1361
|
-
// we do not want to evaluate the getters in this time.
|
1362
|
-
Object.defineProperty(gettersProxy, localType, {
|
1363
|
-
get: function () {
|
1364
|
-
return store.getters[type];
|
1365
|
-
},
|
1366
|
-
enumerable: true
|
1367
|
-
});
|
1368
|
-
});
|
1369
|
-
store._makeLocalGettersCache[namespace] = gettersProxy;
|
1370
|
-
}
|
1371
|
-
return store._makeLocalGettersCache[namespace];
|
1372
|
-
}
|
1373
|
-
function registerMutation(store, type, handler, local) {
|
1374
|
-
var entry = store._mutations[type] || (store._mutations[type] = []);
|
1375
|
-
entry.push(function wrappedMutationHandler(payload) {
|
1376
|
-
handler.call(store, local.state, payload);
|
1377
|
-
});
|
1378
|
-
}
|
1379
|
-
function registerAction(store, type, handler, local) {
|
1380
|
-
var entry = store._actions[type] || (store._actions[type] = []);
|
1381
|
-
entry.push(function wrappedActionHandler(payload) {
|
1382
|
-
var res = handler.call(store, {
|
1383
|
-
dispatch: local.dispatch,
|
1384
|
-
commit: local.commit,
|
1385
|
-
getters: local.getters,
|
1386
|
-
state: local.state,
|
1387
|
-
rootGetters: store.getters,
|
1388
|
-
rootState: store.state
|
1389
|
-
}, payload);
|
1390
|
-
if (!isPromise(res)) {
|
1391
|
-
res = Promise.resolve(res);
|
1392
|
-
}
|
1393
|
-
if (store._devtoolHook) {
|
1394
|
-
return res.catch(function (err) {
|
1395
|
-
store._devtoolHook.emit('vuex:error', err);
|
1396
|
-
throw err;
|
1397
|
-
});
|
1398
|
-
} else {
|
1399
|
-
return res;
|
1400
|
-
}
|
1401
|
-
});
|
1402
|
-
}
|
1403
|
-
function registerGetter(store, type, rawGetter, local) {
|
1404
|
-
if (store._wrappedGetters[type]) {
|
1405
|
-
if (false) {}
|
1406
|
-
return;
|
1407
|
-
}
|
1408
|
-
store._wrappedGetters[type] = function wrappedGetter(store) {
|
1409
|
-
return rawGetter(local.state,
|
1410
|
-
// local state
|
1411
|
-
local.getters,
|
1412
|
-
// local getters
|
1413
|
-
store.state,
|
1414
|
-
// root state
|
1415
|
-
store.getters // root getters
|
1416
|
-
);
|
1417
|
-
};
|
1418
|
-
}
|
1419
|
-
function enableStrictMode(store) {
|
1420
|
-
store._vm.$watch(function () {
|
1421
|
-
return this._data.$$state;
|
1422
|
-
}, function () {
|
1423
|
-
if (false) {}
|
1424
|
-
}, {
|
1425
|
-
deep: true,
|
1426
|
-
sync: true
|
1427
|
-
});
|
1428
|
-
}
|
1429
|
-
function getNestedState(state, path) {
|
1430
|
-
return path.reduce(function (state, key) {
|
1431
|
-
return state[key];
|
1432
|
-
}, state);
|
1433
|
-
}
|
1434
|
-
function unifyObjectStyle(type, payload, options) {
|
1435
|
-
if (isObject(type) && type.type) {
|
1436
|
-
options = payload;
|
1437
|
-
payload = type;
|
1438
|
-
type = type.type;
|
1439
|
-
}
|
1440
|
-
if (false) {}
|
1441
|
-
return {
|
1442
|
-
type: type,
|
1443
|
-
payload: payload,
|
1444
|
-
options: options
|
1445
|
-
};
|
1446
|
-
}
|
1447
|
-
function install(_Vue) {
|
1448
|
-
if (Vue && _Vue === Vue) {
|
1449
|
-
if (false) {}
|
1450
|
-
return;
|
1451
|
-
}
|
1452
|
-
Vue = _Vue;
|
1453
|
-
applyMixin(Vue);
|
1454
|
-
}
|
1455
|
-
|
1456
|
-
/**
|
1457
|
-
* Reduce the code which written in Vue.js for getting the state.
|
1458
|
-
* @param {String} [namespace] - Module's namespace
|
1459
|
-
* @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.
|
1460
|
-
* @param {Object}
|
1461
|
-
*/
|
1462
|
-
var mapState = normalizeNamespace(function (namespace, states) {
|
1463
|
-
var res = {};
|
1464
|
-
if (false) {}
|
1465
|
-
normalizeMap(states).forEach(function (ref) {
|
1466
|
-
var key = ref.key;
|
1467
|
-
var val = ref.val;
|
1468
|
-
res[key] = function mappedState() {
|
1469
|
-
var state = this.$store.state;
|
1470
|
-
var getters = this.$store.getters;
|
1471
|
-
if (namespace) {
|
1472
|
-
var module = getModuleByNamespace(this.$store, 'mapState', namespace);
|
1473
|
-
if (!module) {
|
1474
|
-
return;
|
1475
|
-
}
|
1476
|
-
state = module.context.state;
|
1477
|
-
getters = module.context.getters;
|
1478
|
-
}
|
1479
|
-
return typeof val === 'function' ? val.call(this, state, getters) : state[val];
|
1480
|
-
};
|
1481
|
-
// mark vuex getter for devtools
|
1482
|
-
res[key].vuex = true;
|
1483
|
-
});
|
1484
|
-
return res;
|
1485
|
-
});
|
1486
|
-
|
1487
|
-
/**
|
1488
|
-
* Reduce the code which written in Vue.js for committing the mutation
|
1489
|
-
* @param {String} [namespace] - Module's namespace
|
1490
|
-
* @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.
|
1491
|
-
* @return {Object}
|
1492
|
-
*/
|
1493
|
-
var mapMutations = normalizeNamespace(function (namespace, mutations) {
|
1494
|
-
var res = {};
|
1495
|
-
if (false) {}
|
1496
|
-
normalizeMap(mutations).forEach(function (ref) {
|
1497
|
-
var key = ref.key;
|
1498
|
-
var val = ref.val;
|
1499
|
-
res[key] = function mappedMutation() {
|
1500
|
-
var args = [],
|
1501
|
-
len = arguments.length;
|
1502
|
-
while (len--) args[len] = arguments[len];
|
1503
|
-
|
1504
|
-
// Get the commit method from store
|
1505
|
-
var commit = this.$store.commit;
|
1506
|
-
if (namespace) {
|
1507
|
-
var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
|
1508
|
-
if (!module) {
|
1509
|
-
return;
|
1510
|
-
}
|
1511
|
-
commit = module.context.commit;
|
1512
|
-
}
|
1513
|
-
return typeof val === 'function' ? val.apply(this, [commit].concat(args)) : commit.apply(this.$store, [val].concat(args));
|
1514
|
-
};
|
1515
|
-
});
|
1516
|
-
return res;
|
1517
|
-
});
|
1518
|
-
|
1519
|
-
/**
|
1520
|
-
* Reduce the code which written in Vue.js for getting the getters
|
1521
|
-
* @param {String} [namespace] - Module's namespace
|
1522
|
-
* @param {Object|Array} getters
|
1523
|
-
* @return {Object}
|
1524
|
-
*/
|
1525
|
-
var mapGetters = normalizeNamespace(function (namespace, getters) {
|
1526
|
-
var res = {};
|
1527
|
-
if (false) {}
|
1528
|
-
normalizeMap(getters).forEach(function (ref) {
|
1529
|
-
var key = ref.key;
|
1530
|
-
var val = ref.val;
|
1531
|
-
|
1532
|
-
// The namespace has been mutated by normalizeNamespace
|
1533
|
-
val = namespace + val;
|
1534
|
-
res[key] = function mappedGetter() {
|
1535
|
-
if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
|
1536
|
-
return;
|
1537
|
-
}
|
1538
|
-
if (false) {}
|
1539
|
-
return this.$store.getters[val];
|
1540
|
-
};
|
1541
|
-
// mark vuex getter for devtools
|
1542
|
-
res[key].vuex = true;
|
1543
|
-
});
|
1544
|
-
return res;
|
1545
|
-
});
|
1546
|
-
|
1547
|
-
/**
|
1548
|
-
* Reduce the code which written in Vue.js for dispatch the action
|
1549
|
-
* @param {String} [namespace] - Module's namespace
|
1550
|
-
* @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.
|
1551
|
-
* @return {Object}
|
1552
|
-
*/
|
1553
|
-
var mapActions = normalizeNamespace(function (namespace, actions) {
|
1554
|
-
var res = {};
|
1555
|
-
if (false) {}
|
1556
|
-
normalizeMap(actions).forEach(function (ref) {
|
1557
|
-
var key = ref.key;
|
1558
|
-
var val = ref.val;
|
1559
|
-
res[key] = function mappedAction() {
|
1560
|
-
var args = [],
|
1561
|
-
len = arguments.length;
|
1562
|
-
while (len--) args[len] = arguments[len];
|
1563
|
-
|
1564
|
-
// get dispatch function from store
|
1565
|
-
var dispatch = this.$store.dispatch;
|
1566
|
-
if (namespace) {
|
1567
|
-
var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
|
1568
|
-
if (!module) {
|
1569
|
-
return;
|
1570
|
-
}
|
1571
|
-
dispatch = module.context.dispatch;
|
1572
|
-
}
|
1573
|
-
return typeof val === 'function' ? val.apply(this, [dispatch].concat(args)) : dispatch.apply(this.$store, [val].concat(args));
|
1574
|
-
};
|
1575
|
-
});
|
1576
|
-
return res;
|
1577
|
-
});
|
1578
|
-
|
1579
|
-
/**
|
1580
|
-
* Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
|
1581
|
-
* @param {String} namespace
|
1582
|
-
* @return {Object}
|
1583
|
-
*/
|
1584
|
-
var createNamespacedHelpers = function (namespace) {
|
1585
|
-
return {
|
1586
|
-
mapState: mapState.bind(null, namespace),
|
1587
|
-
mapGetters: mapGetters.bind(null, namespace),
|
1588
|
-
mapMutations: mapMutations.bind(null, namespace),
|
1589
|
-
mapActions: mapActions.bind(null, namespace)
|
1590
|
-
};
|
1591
|
-
};
|
1592
|
-
|
1593
|
-
/**
|
1594
|
-
* Normalize the map
|
1595
|
-
* normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
|
1596
|
-
* normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
|
1597
|
-
* @param {Array|Object} map
|
1598
|
-
* @return {Object}
|
1599
|
-
*/
|
1600
|
-
function normalizeMap(map) {
|
1601
|
-
if (!isValidMap(map)) {
|
1602
|
-
return [];
|
1603
|
-
}
|
1604
|
-
return Array.isArray(map) ? map.map(function (key) {
|
1605
|
-
return {
|
1606
|
-
key: key,
|
1607
|
-
val: key
|
1608
|
-
};
|
1609
|
-
}) : Object.keys(map).map(function (key) {
|
1610
|
-
return {
|
1611
|
-
key: key,
|
1612
|
-
val: map[key]
|
1613
|
-
};
|
1614
|
-
});
|
1615
|
-
}
|
1616
|
-
|
1617
|
-
/**
|
1618
|
-
* Validate whether given map is valid or not
|
1619
|
-
* @param {*} map
|
1620
|
-
* @return {Boolean}
|
1621
|
-
*/
|
1622
|
-
function isValidMap(map) {
|
1623
|
-
return Array.isArray(map) || isObject(map);
|
1624
|
-
}
|
1625
|
-
|
1626
|
-
/**
|
1627
|
-
* 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.
|
1628
|
-
* @param {Function} fn
|
1629
|
-
* @return {Function}
|
1630
|
-
*/
|
1631
|
-
function normalizeNamespace(fn) {
|
1632
|
-
return function (namespace, map) {
|
1633
|
-
if (typeof namespace !== 'string') {
|
1634
|
-
map = namespace;
|
1635
|
-
namespace = '';
|
1636
|
-
} else if (namespace.charAt(namespace.length - 1) !== '/') {
|
1637
|
-
namespace += '/';
|
1638
|
-
}
|
1639
|
-
return fn(namespace, map);
|
1640
|
-
};
|
1641
|
-
}
|
1642
|
-
|
1643
|
-
/**
|
1644
|
-
* Search a special module from store by namespace. if module not exist, print error message.
|
1645
|
-
* @param {Object} store
|
1646
|
-
* @param {String} helper
|
1647
|
-
* @param {String} namespace
|
1648
|
-
* @return {Object}
|
1649
|
-
*/
|
1650
|
-
function getModuleByNamespace(store, helper, namespace) {
|
1651
|
-
var module = store._modulesNamespaceMap[namespace];
|
1652
|
-
if (false) {}
|
1653
|
-
return module;
|
1654
|
-
}
|
1655
|
-
|
1656
|
-
// Credits: borrowed code from fcomb/redux-logger
|
1657
|
-
|
1658
|
-
function createLogger(ref) {
|
1659
|
-
if (ref === void 0) ref = {};
|
1660
|
-
var collapsed = ref.collapsed;
|
1661
|
-
if (collapsed === void 0) collapsed = true;
|
1662
|
-
var filter = ref.filter;
|
1663
|
-
if (filter === void 0) filter = function (mutation, stateBefore, stateAfter) {
|
1664
|
-
return true;
|
1665
|
-
};
|
1666
|
-
var transformer = ref.transformer;
|
1667
|
-
if (transformer === void 0) transformer = function (state) {
|
1668
|
-
return state;
|
1669
|
-
};
|
1670
|
-
var mutationTransformer = ref.mutationTransformer;
|
1671
|
-
if (mutationTransformer === void 0) mutationTransformer = function (mut) {
|
1672
|
-
return mut;
|
1673
|
-
};
|
1674
|
-
var actionFilter = ref.actionFilter;
|
1675
|
-
if (actionFilter === void 0) actionFilter = function (action, state) {
|
1676
|
-
return true;
|
1677
|
-
};
|
1678
|
-
var actionTransformer = ref.actionTransformer;
|
1679
|
-
if (actionTransformer === void 0) actionTransformer = function (act) {
|
1680
|
-
return act;
|
1681
|
-
};
|
1682
|
-
var logMutations = ref.logMutations;
|
1683
|
-
if (logMutations === void 0) logMutations = true;
|
1684
|
-
var logActions = ref.logActions;
|
1685
|
-
if (logActions === void 0) logActions = true;
|
1686
|
-
var logger = ref.logger;
|
1687
|
-
if (logger === void 0) logger = console;
|
1688
|
-
return function (store) {
|
1689
|
-
var prevState = deepCopy(store.state);
|
1690
|
-
if (typeof logger === 'undefined') {
|
1691
|
-
return;
|
1692
|
-
}
|
1693
|
-
if (logMutations) {
|
1694
|
-
store.subscribe(function (mutation, state) {
|
1695
|
-
var nextState = deepCopy(state);
|
1696
|
-
if (filter(mutation, prevState, nextState)) {
|
1697
|
-
var formattedTime = getFormattedTime();
|
1698
|
-
var formattedMutation = mutationTransformer(mutation);
|
1699
|
-
var message = "mutation " + mutation.type + formattedTime;
|
1700
|
-
startMessage(logger, message, collapsed);
|
1701
|
-
logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
|
1702
|
-
logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
|
1703
|
-
logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
|
1704
|
-
endMessage(logger);
|
1705
|
-
}
|
1706
|
-
prevState = nextState;
|
1707
|
-
});
|
1708
|
-
}
|
1709
|
-
if (logActions) {
|
1710
|
-
store.subscribeAction(function (action, state) {
|
1711
|
-
if (actionFilter(action, state)) {
|
1712
|
-
var formattedTime = getFormattedTime();
|
1713
|
-
var formattedAction = actionTransformer(action);
|
1714
|
-
var message = "action " + action.type + formattedTime;
|
1715
|
-
startMessage(logger, message, collapsed);
|
1716
|
-
logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
|
1717
|
-
endMessage(logger);
|
1718
|
-
}
|
1719
|
-
});
|
1720
|
-
}
|
1721
|
-
};
|
1722
|
-
}
|
1723
|
-
function startMessage(logger, message, collapsed) {
|
1724
|
-
var startMessage = collapsed ? logger.groupCollapsed : logger.group;
|
1725
|
-
|
1726
|
-
// render
|
1727
|
-
try {
|
1728
|
-
startMessage.call(logger, message);
|
1729
|
-
} catch (e) {
|
1730
|
-
logger.log(message);
|
1731
|
-
}
|
1732
|
-
}
|
1733
|
-
function endMessage(logger) {
|
1734
|
-
try {
|
1735
|
-
logger.groupEnd();
|
1736
|
-
} catch (e) {
|
1737
|
-
logger.log('—— log end ——');
|
1738
|
-
}
|
1739
|
-
}
|
1740
|
-
function getFormattedTime() {
|
1741
|
-
var time = new Date();
|
1742
|
-
return " @ " + pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3);
|
1743
|
-
}
|
1744
|
-
function repeat(str, times) {
|
1745
|
-
return new Array(times + 1).join(str);
|
1746
|
-
}
|
1747
|
-
function pad(num, maxLength) {
|
1748
|
-
return repeat('0', maxLength - num.toString().length) + num;
|
1749
|
-
}
|
1750
|
-
var index = {
|
1751
|
-
Store: Store,
|
1752
|
-
install: install,
|
1753
|
-
version: '3.6.2',
|
1754
|
-
mapState: mapState,
|
1755
|
-
mapMutations: mapMutations,
|
1756
|
-
mapGetters: mapGetters,
|
1757
|
-
mapActions: mapActions,
|
1758
|
-
createNamespacedHelpers: createNamespacedHelpers,
|
1759
|
-
createLogger: createLogger
|
636
|
+
staticClass: "nb-header__right"
|
637
|
+
}, [_vm._t("right")], 2), _vm.logout ? _c('div', {
|
638
|
+
staticClass: "nb-header__logout",
|
639
|
+
on: {
|
640
|
+
"click": function ($event) {
|
641
|
+
$event.stopPropagation();
|
642
|
+
return _vm.handleLogout.apply(null, arguments);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
}, [_c('NBIcon', {
|
646
|
+
attrs: {
|
647
|
+
"icon": "logout"
|
648
|
+
}
|
649
|
+
}), _c('span', {
|
650
|
+
staticClass: "nb-header__logout__text"
|
651
|
+
}, [_vm._v(_vm._s(_vm.logoutText)), _vm.logoutTime > -1 ? [_vm._v("(" + _vm._s(_vm.logoutTime) + "S)")] : _vm._e()], 2)], 1) : _vm._e()]);
|
1760
652
|
};
|
1761
|
-
|
653
|
+
var staticRenderFns = [];
|
1762
654
|
|
655
|
+
// EXTERNAL MODULE: ./packages/components/NBIcon/index.js + 5 modules
|
656
|
+
var NBIcon = __webpack_require__(1343);
|
1763
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
|
1764
658
|
|
1765
659
|
/* harmony default export */ var NBHeadervue_type_script_lang_js = ({
|
1766
660
|
name: 'NBHeader',
|
661
|
+
components: {
|
662
|
+
NBIcon: NBIcon["default"]
|
663
|
+
},
|
1767
664
|
props: {
|
1768
665
|
// 是否显示返回
|
1769
666
|
back: {
|
@@ -1828,13 +725,7 @@ var index = {
|
|
1828
725
|
data() {
|
1829
726
|
return {};
|
1830
727
|
},
|
1831
|
-
computed: {
|
1832
|
-
...mapGetters([])
|
1833
|
-
},
|
1834
|
-
watch: {},
|
1835
|
-
created() {},
|
1836
|
-
mounted() {},
|
1837
|
-
beforeDestroy() {},
|
728
|
+
computed: {},
|
1838
729
|
methods: {
|
1839
730
|
// 返回
|
1840
731
|
handleBack() {
|
@@ -1885,7 +776,7 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
1885
776
|
staticRenderFns,
|
1886
777
|
false,
|
1887
778
|
null,
|
1888
|
-
"
|
779
|
+
"40023fcc",
|
1889
780
|
null
|
1890
781
|
|
1891
782
|
)
|
@@ -1908,6 +799,85 @@ NBHeader.install = function (Vue) {
|
|
1908
799
|
|
1909
800
|
/***/ }),
|
1910
801
|
|
802
|
+
/***/ 1343:
|
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=1d7955de&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
|
+
// iconfont图标
|
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=1d7955de&prod&lang=scss&scoped=true
|
838
|
+
var srcvue_type_style_index_0_id_1d7955de_prod_lang_scss_scoped_true = __webpack_require__(5312);
|
839
|
+
;// ./packages/components/NBIcon/src/index.vue?vue&type=style&index=0&id=1d7955de&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
|
+
"1d7955de",
|
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
|
+
|
1911
881
|
/***/ 9165:
|
1912
882
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1913
883
|
|
@@ -2131,6 +1101,22 @@ var update = add("f422e070", content, true, {"sourceMap":false,"shadowMode":fals
|
|
2131
1101
|
|
2132
1102
|
/***/ }),
|
2133
1103
|
|
1104
|
+
/***/ 5312:
|
1105
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
1106
|
+
|
1107
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
1108
|
+
|
1109
|
+
// load the styles
|
1110
|
+
var content = __webpack_require__(1500);
|
1111
|
+
if(content.__esModule) content = content.default;
|
1112
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
1113
|
+
if(content.locals) module.exports = content.locals;
|
1114
|
+
// add the styles to the DOM
|
1115
|
+
var add = (__webpack_require__(258)/* ["default"] */ .A)
|
1116
|
+
var update = add("7cd5ae63", content, true, {"sourceMap":false,"shadowMode":false});
|
1117
|
+
|
1118
|
+
/***/ }),
|
1119
|
+
|
2134
1120
|
/***/ 9443:
|
2135
1121
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2136
1122
|
|
@@ -2424,7 +1410,8 @@ function applyToTag (styleElement, obj) {
|
|
2424
1410
|
var map = {
|
2425
1411
|
"./NBBottomActionBar/index.js": 5850,
|
2426
1412
|
"./NBEmpty/index.js": 6298,
|
2427
|
-
"./NBHeader/index.js":
|
1413
|
+
"./NBHeader/index.js": 4794,
|
1414
|
+
"./NBIcon/index.js": 1343,
|
2428
1415
|
"./NBPagination/index.js": 9165,
|
2429
1416
|
"./NBTag/index.js": 7996
|
2430
1417
|
};
|
@@ -2661,26 +1648,6 @@ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
2661
1648
|
};
|
2662
1649
|
|
2663
1650
|
|
2664
|
-
/***/ }),
|
2665
|
-
|
2666
|
-
/***/ 6319:
|
2667
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2668
|
-
|
2669
|
-
"use strict";
|
2670
|
-
|
2671
|
-
var anObject = __webpack_require__(8551);
|
2672
|
-
var iteratorClose = __webpack_require__(9539);
|
2673
|
-
|
2674
|
-
// call something on iterator step with safe closing on error
|
2675
|
-
module.exports = function (iterator, fn, value, ENTRIES) {
|
2676
|
-
try {
|
2677
|
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
2678
|
-
} catch (error) {
|
2679
|
-
iteratorClose(iterator, 'throw', error);
|
2680
|
-
}
|
2681
|
-
};
|
2682
|
-
|
2683
|
-
|
2684
1651
|
/***/ }),
|
2685
1652
|
|
2686
1653
|
/***/ 2195:
|
@@ -2778,20 +1745,6 @@ module.exports = !fails(function () {
|
|
2778
1745
|
});
|
2779
1746
|
|
2780
1747
|
|
2781
|
-
/***/ }),
|
2782
|
-
|
2783
|
-
/***/ 2529:
|
2784
|
-
/***/ (function(module) {
|
2785
|
-
|
2786
|
-
"use strict";
|
2787
|
-
|
2788
|
-
// `CreateIterResultObject` abstract operation
|
2789
|
-
// https://tc39.es/ecma262/#sec-createiterresultobject
|
2790
|
-
module.exports = function (value, done) {
|
2791
|
-
return { value: value, done: done };
|
2792
|
-
};
|
2793
|
-
|
2794
|
-
|
2795
1748
|
/***/ }),
|
2796
1749
|
|
2797
1750
|
/***/ 6699:
|
@@ -2898,21 +1851,6 @@ module.exports = function (O, key, value, options) {
|
|
2898
1851
|
};
|
2899
1852
|
|
2900
1853
|
|
2901
|
-
/***/ }),
|
2902
|
-
|
2903
|
-
/***/ 6279:
|
2904
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2905
|
-
|
2906
|
-
"use strict";
|
2907
|
-
|
2908
|
-
var defineBuiltIn = __webpack_require__(6840);
|
2909
|
-
|
2910
|
-
module.exports = function (target, src, options) {
|
2911
|
-
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
2912
|
-
return target;
|
2913
|
-
};
|
2914
|
-
|
2915
|
-
|
2916
1854
|
/***/ }),
|
2917
1855
|
|
2918
1856
|
/***/ 9433:
|
@@ -3820,122 +2758,6 @@ module.exports = function (iterator, kind, value) {
|
|
3820
2758
|
};
|
3821
2759
|
|
3822
2760
|
|
3823
|
-
/***/ }),
|
3824
|
-
|
3825
|
-
/***/ 9462:
|
3826
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3827
|
-
|
3828
|
-
"use strict";
|
3829
|
-
|
3830
|
-
var call = __webpack_require__(9565);
|
3831
|
-
var create = __webpack_require__(2360);
|
3832
|
-
var createNonEnumerableProperty = __webpack_require__(6699);
|
3833
|
-
var defineBuiltIns = __webpack_require__(6279);
|
3834
|
-
var wellKnownSymbol = __webpack_require__(8227);
|
3835
|
-
var InternalStateModule = __webpack_require__(1181);
|
3836
|
-
var getMethod = __webpack_require__(5966);
|
3837
|
-
var IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);
|
3838
|
-
var createIterResultObject = __webpack_require__(2529);
|
3839
|
-
var iteratorClose = __webpack_require__(9539);
|
3840
|
-
|
3841
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
3842
|
-
var ITERATOR_HELPER = 'IteratorHelper';
|
3843
|
-
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
|
3844
|
-
var setInternalState = InternalStateModule.set;
|
3845
|
-
|
3846
|
-
var createIteratorProxyPrototype = function (IS_ITERATOR) {
|
3847
|
-
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
|
3848
|
-
|
3849
|
-
return defineBuiltIns(create(IteratorPrototype), {
|
3850
|
-
next: function next() {
|
3851
|
-
var state = getInternalState(this);
|
3852
|
-
// for simplification:
|
3853
|
-
// for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`
|
3854
|
-
// for `%IteratorHelperPrototype%.next` - just a value
|
3855
|
-
if (IS_ITERATOR) return state.nextHandler();
|
3856
|
-
try {
|
3857
|
-
var result = state.done ? undefined : state.nextHandler();
|
3858
|
-
return createIterResultObject(result, state.done);
|
3859
|
-
} catch (error) {
|
3860
|
-
state.done = true;
|
3861
|
-
throw error;
|
3862
|
-
}
|
3863
|
-
},
|
3864
|
-
'return': function () {
|
3865
|
-
var state = getInternalState(this);
|
3866
|
-
var iterator = state.iterator;
|
3867
|
-
state.done = true;
|
3868
|
-
if (IS_ITERATOR) {
|
3869
|
-
var returnMethod = getMethod(iterator, 'return');
|
3870
|
-
return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
|
3871
|
-
}
|
3872
|
-
if (state.inner) try {
|
3873
|
-
iteratorClose(state.inner.iterator, 'normal');
|
3874
|
-
} catch (error) {
|
3875
|
-
return iteratorClose(iterator, 'throw', error);
|
3876
|
-
}
|
3877
|
-
if (iterator) iteratorClose(iterator, 'normal');
|
3878
|
-
return createIterResultObject(undefined, true);
|
3879
|
-
}
|
3880
|
-
});
|
3881
|
-
};
|
3882
|
-
|
3883
|
-
var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
|
3884
|
-
var IteratorHelperPrototype = createIteratorProxyPrototype(false);
|
3885
|
-
|
3886
|
-
createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
|
3887
|
-
|
3888
|
-
module.exports = function (nextHandler, IS_ITERATOR) {
|
3889
|
-
var IteratorProxy = function Iterator(record, state) {
|
3890
|
-
if (state) {
|
3891
|
-
state.iterator = record.iterator;
|
3892
|
-
state.next = record.next;
|
3893
|
-
} else state = record;
|
3894
|
-
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
|
3895
|
-
state.nextHandler = nextHandler;
|
3896
|
-
state.counter = 0;
|
3897
|
-
state.done = false;
|
3898
|
-
setInternalState(this, state);
|
3899
|
-
};
|
3900
|
-
|
3901
|
-
IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
|
3902
|
-
|
3903
|
-
return IteratorProxy;
|
3904
|
-
};
|
3905
|
-
|
3906
|
-
|
3907
|
-
/***/ }),
|
3908
|
-
|
3909
|
-
/***/ 713:
|
3910
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3911
|
-
|
3912
|
-
"use strict";
|
3913
|
-
|
3914
|
-
var call = __webpack_require__(9565);
|
3915
|
-
var aCallable = __webpack_require__(9306);
|
3916
|
-
var anObject = __webpack_require__(8551);
|
3917
|
-
var getIteratorDirect = __webpack_require__(1767);
|
3918
|
-
var createIteratorProxy = __webpack_require__(9462);
|
3919
|
-
var callWithSafeIterationClosing = __webpack_require__(6319);
|
3920
|
-
|
3921
|
-
var IteratorProxy = createIteratorProxy(function () {
|
3922
|
-
var iterator = this.iterator;
|
3923
|
-
var result = anObject(call(this.next, iterator));
|
3924
|
-
var done = this.done = !!result.done;
|
3925
|
-
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
|
3926
|
-
});
|
3927
|
-
|
3928
|
-
// `Iterator.prototype.map` method
|
3929
|
-
// https://github.com/tc39/proposal-iterator-helpers
|
3930
|
-
module.exports = function map(mapper) {
|
3931
|
-
anObject(this);
|
3932
|
-
aCallable(mapper);
|
3933
|
-
return new IteratorProxy(getIteratorDirect(this), {
|
3934
|
-
mapper: mapper
|
3935
|
-
});
|
3936
|
-
};
|
3937
|
-
|
3938
|
-
|
3939
2761
|
/***/ }),
|
3940
2762
|
|
3941
2763
|
/***/ 7657:
|
@@ -4993,49 +3815,6 @@ $({ global: true, constructor: true, forced: FORCED }, {
|
|
4993
3815
|
});
|
4994
3816
|
|
4995
3817
|
|
4996
|
-
/***/ }),
|
4997
|
-
|
4998
|
-
/***/ 2489:
|
4999
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5000
|
-
|
5001
|
-
"use strict";
|
5002
|
-
|
5003
|
-
var $ = __webpack_require__(6518);
|
5004
|
-
var call = __webpack_require__(9565);
|
5005
|
-
var aCallable = __webpack_require__(9306);
|
5006
|
-
var anObject = __webpack_require__(8551);
|
5007
|
-
var getIteratorDirect = __webpack_require__(1767);
|
5008
|
-
var createIteratorProxy = __webpack_require__(9462);
|
5009
|
-
var callWithSafeIterationClosing = __webpack_require__(6319);
|
5010
|
-
var IS_PURE = __webpack_require__(6395);
|
5011
|
-
|
5012
|
-
var IteratorProxy = createIteratorProxy(function () {
|
5013
|
-
var iterator = this.iterator;
|
5014
|
-
var predicate = this.predicate;
|
5015
|
-
var next = this.next;
|
5016
|
-
var result, done, value;
|
5017
|
-
while (true) {
|
5018
|
-
result = anObject(call(next, iterator));
|
5019
|
-
done = this.done = !!result.done;
|
5020
|
-
if (done) return;
|
5021
|
-
value = result.value;
|
5022
|
-
if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;
|
5023
|
-
}
|
5024
|
-
});
|
5025
|
-
|
5026
|
-
// `Iterator.prototype.filter` method
|
5027
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.filter
|
5028
|
-
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
5029
|
-
filter: function filter(predicate) {
|
5030
|
-
anObject(this);
|
5031
|
-
aCallable(predicate);
|
5032
|
-
return new IteratorProxy(getIteratorDirect(this), {
|
5033
|
-
predicate: predicate
|
5034
|
-
});
|
5035
|
-
}
|
5036
|
-
});
|
5037
|
-
|
5038
|
-
|
5039
3818
|
/***/ }),
|
5040
3819
|
|
5041
3820
|
/***/ 7588:
|
@@ -5064,64 +3843,6 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
5064
3843
|
});
|
5065
3844
|
|
5066
3845
|
|
5067
|
-
/***/ }),
|
5068
|
-
|
5069
|
-
/***/ 1701:
|
5070
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5071
|
-
|
5072
|
-
"use strict";
|
5073
|
-
|
5074
|
-
var $ = __webpack_require__(6518);
|
5075
|
-
var map = __webpack_require__(713);
|
5076
|
-
var IS_PURE = __webpack_require__(6395);
|
5077
|
-
|
5078
|
-
// `Iterator.prototype.map` method
|
5079
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
5080
|
-
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
5081
|
-
map: map
|
5082
|
-
});
|
5083
|
-
|
5084
|
-
|
5085
|
-
/***/ }),
|
5086
|
-
|
5087
|
-
/***/ 8237:
|
5088
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5089
|
-
|
5090
|
-
"use strict";
|
5091
|
-
|
5092
|
-
var $ = __webpack_require__(6518);
|
5093
|
-
var iterate = __webpack_require__(2652);
|
5094
|
-
var aCallable = __webpack_require__(9306);
|
5095
|
-
var anObject = __webpack_require__(8551);
|
5096
|
-
var getIteratorDirect = __webpack_require__(1767);
|
5097
|
-
|
5098
|
-
var $TypeError = TypeError;
|
5099
|
-
|
5100
|
-
// `Iterator.prototype.reduce` method
|
5101
|
-
// https://tc39.es/ecma262/#sec-iterator.prototype.reduce
|
5102
|
-
$({ target: 'Iterator', proto: true, real: true }, {
|
5103
|
-
reduce: function reduce(reducer /* , initialValue */) {
|
5104
|
-
anObject(this);
|
5105
|
-
aCallable(reducer);
|
5106
|
-
var record = getIteratorDirect(this);
|
5107
|
-
var noInitial = arguments.length < 2;
|
5108
|
-
var accumulator = noInitial ? undefined : arguments[1];
|
5109
|
-
var counter = 0;
|
5110
|
-
iterate(record, function (value) {
|
5111
|
-
if (noInitial) {
|
5112
|
-
noInitial = false;
|
5113
|
-
accumulator = value;
|
5114
|
-
} else {
|
5115
|
-
accumulator = reducer(accumulator, value, counter);
|
5116
|
-
}
|
5117
|
-
counter++;
|
5118
|
-
}, { IS_RECORD: true });
|
5119
|
-
if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value');
|
5120
|
-
return accumulator;
|
5121
|
-
}
|
5122
|
-
});
|
5123
|
-
|
5124
|
-
|
5125
3846
|
/***/ }),
|
5126
3847
|
|
5127
3848
|
/***/ 8992:
|
@@ -5133,17 +3854,6 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
5133
3854
|
__webpack_require__(8111);
|
5134
3855
|
|
5135
3856
|
|
5136
|
-
/***/ }),
|
5137
|
-
|
5138
|
-
/***/ 4520:
|
5139
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5140
|
-
|
5141
|
-
"use strict";
|
5142
|
-
|
5143
|
-
// TODO: Remove from `core-js@4`
|
5144
|
-
__webpack_require__(2489);
|
5145
|
-
|
5146
|
-
|
5147
3857
|
/***/ }),
|
5148
3858
|
|
5149
3859
|
/***/ 3949:
|
@@ -5155,28 +3865,6 @@ __webpack_require__(2489);
|
|
5155
3865
|
__webpack_require__(7588);
|
5156
3866
|
|
5157
3867
|
|
5158
|
-
/***/ }),
|
5159
|
-
|
5160
|
-
/***/ 1454:
|
5161
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5162
|
-
|
5163
|
-
"use strict";
|
5164
|
-
|
5165
|
-
// TODO: Remove from `core-js@4`
|
5166
|
-
__webpack_require__(1701);
|
5167
|
-
|
5168
|
-
|
5169
|
-
/***/ }),
|
5170
|
-
|
5171
|
-
/***/ 8872:
|
5172
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
5173
|
-
|
5174
|
-
"use strict";
|
5175
|
-
|
5176
|
-
// TODO: Remove from `core-js@4`
|
5177
|
-
__webpack_require__(8237);
|
5178
|
-
|
5179
|
-
|
5180
3868
|
/***/ })
|
5181
3869
|
|
5182
3870
|
/******/ });
|
@@ -5466,19 +4154,13 @@ const i18n = function (fn) {
|
|
5466
4154
|
* @FilePath: \nubomed-ui\packages\index.js
|
5467
4155
|
*/
|
5468
4156
|
|
5469
|
-
//
|
5470
|
-
// import NBTag from './components/NBTag/index.js'
|
5471
|
-
// import NBEmpty from './components/NBEmpty/index.js'
|
5472
|
-
// import NBPagination from './components/NBPagination/index.js'
|
5473
|
-
// import NBBottomActionBar from './components/NBBottomActionBar/index.js'
|
5474
|
-
|
5475
|
-
// const components = [SvgIcon, NBTag, NBEmpty, NBPagination, NBBottomActionBar]
|
4157
|
+
// 使用iconfont图标
|
5476
4158
|
|
5477
4159
|
|
4160
|
+
// 获取所有组件
|
5478
4161
|
const components = [];
|
5479
4162
|
const req = __webpack_require__(2162);
|
5480
4163
|
req.keys().forEach(v => {
|
5481
|
-
console.log(req(v).default);
|
5482
4164
|
components.push(req(v).default);
|
5483
4165
|
});
|
5484
4166
|
|