@bytenew/bn-applet-ui 1.1.45 → 1.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bn-applet-ui.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("
|
|
3
|
+
module.exports = factory(require("lodash"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["
|
|
5
|
+
define(["lodash"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["bn-applet-ui"] = factory(require("
|
|
7
|
+
exports["bn-applet-ui"] = factory(require("lodash"));
|
|
8
8
|
else
|
|
9
|
-
root["bn-applet-ui"] = factory(root["
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), (
|
|
9
|
+
root["bn-applet-ui"] = factory(root["lodash"]);
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), (__WEBPACK_EXTERNAL_MODULE__6773__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -1774,11 +1774,11 @@ module.exports = __webpack_require__.p + "fonts/iconfont.c7ec1979.woff";
|
|
|
1774
1774
|
|
|
1775
1775
|
/***/ },
|
|
1776
1776
|
|
|
1777
|
-
/***/
|
|
1777
|
+
/***/ 6773
|
|
1778
1778
|
(module) {
|
|
1779
1779
|
|
|
1780
1780
|
"use strict";
|
|
1781
|
-
module.exports =
|
|
1781
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6773__;
|
|
1782
1782
|
|
|
1783
1783
|
/***/ },
|
|
1784
1784
|
|
|
@@ -12335,9 +12335,9 @@ var BnAddressParsevue_type_template_id_3a0d7cb0_staticRenderFns = [];
|
|
|
12335
12335
|
var es_array_for_each = __webpack_require__(1629);
|
|
12336
12336
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
12337
12337
|
var es_array_push = __webpack_require__(4114);
|
|
12338
|
-
// EXTERNAL MODULE: external "
|
|
12339
|
-
var
|
|
12340
|
-
var
|
|
12338
|
+
// EXTERNAL MODULE: external "lodash"
|
|
12339
|
+
var external_lodash_ = __webpack_require__(6773);
|
|
12340
|
+
var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
|
|
12341
12341
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnAddressParse/index.vue?vue&type=script&lang=js
|
|
12342
12342
|
|
|
12343
12343
|
|
|
@@ -12363,7 +12363,7 @@ var external_default = /*#__PURE__*/__webpack_require__.n(external_);
|
|
|
12363
12363
|
/**
|
|
12364
12364
|
* 自动识别方法(使用防抖)
|
|
12365
12365
|
*/
|
|
12366
|
-
autoAds: (0,
|
|
12366
|
+
autoAds: (0,external_lodash_.debounce)(function () {
|
|
12367
12367
|
var _this = this;
|
|
12368
12368
|
if (!this.address || this.address == this.record) {
|
|
12369
12369
|
return;
|
|
@@ -12796,7 +12796,7 @@ function formatPathDisplay(path) {
|
|
|
12796
12796
|
separator = _ref3$separator === void 0 ? ' / ' : _ref3$separator,
|
|
12797
12797
|
_ref3$showAllLevels = _ref3.showAllLevels,
|
|
12798
12798
|
showAllLevels = _ref3$showAllLevels === void 0 ? true : _ref3$showAllLevels;
|
|
12799
|
-
if ((0,
|
|
12799
|
+
if ((0,external_lodash_.isEmpty)(path) || !Array.isArray(path) || !path.length) {
|
|
12800
12800
|
return '';
|
|
12801
12801
|
}
|
|
12802
12802
|
var merged = mergeOptionProps(optionProps);
|
|
@@ -12847,7 +12847,7 @@ function cascaderDisplay_isEmptyValue(modelValue) {
|
|
|
12847
12847
|
return !Array.isArray(modelValue) || modelValue.length === 0;
|
|
12848
12848
|
}
|
|
12849
12849
|
if (labelInValue) {
|
|
12850
|
-
return (0,
|
|
12850
|
+
return (0,external_lodash_.isEmpty)(modelValue);
|
|
12851
12851
|
}
|
|
12852
12852
|
return !Array.isArray(modelValue) || modelValue.length === 0;
|
|
12853
12853
|
}
|
|
@@ -13514,7 +13514,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13514
13514
|
},
|
|
13515
13515
|
created: function created() {
|
|
13516
13516
|
/** 搜索输入防抖,避免频繁遍历选项树 */
|
|
13517
|
-
this.debouncedHandleSearchKeywordChange = (0,
|
|
13517
|
+
this.debouncedHandleSearchKeywordChange = (0,external_lodash_.debounce)(this.handleSearchKeywordChange, 200);
|
|
13518
13518
|
/** 多选已选路径键集合(非响应式,避免大数组选中时触发深度依赖追踪) */
|
|
13519
13519
|
this._selectionKeySet = new Set();
|
|
13520
13520
|
/** checkToLast:各前缀路径下的叶子总数 / 已选叶子数 */
|
|
@@ -13612,7 +13612,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13612
13612
|
if (this.multiple) {
|
|
13613
13613
|
return Array.isArray(this.modelValue) ? this.modelValue : [];
|
|
13614
13614
|
}
|
|
13615
|
-
if (this.labelInValue && (0,
|
|
13615
|
+
if (this.labelInValue && (0,external_lodash_.isEmpty)(this.modelValue)) {
|
|
13616
13616
|
return null;
|
|
13617
13617
|
}
|
|
13618
13618
|
return this.modelValue;
|
|
@@ -13620,7 +13620,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13620
13620
|
set: function set(v) {
|
|
13621
13621
|
var next = v;
|
|
13622
13622
|
if (!this.multiple) {
|
|
13623
|
-
if ((0,
|
|
13623
|
+
if ((0,external_lodash_.isEmpty)(v)) {
|
|
13624
13624
|
next = this.labelInValue ? null : [];
|
|
13625
13625
|
this.expandPath = [];
|
|
13626
13626
|
} else {
|
|
@@ -13763,7 +13763,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13763
13763
|
});
|
|
13764
13764
|
},
|
|
13765
13765
|
/** 判断节点是否选中(供 resolveVisibleRows 单次计算) */computeItemSelected: function computeItemSelected(item, level) {
|
|
13766
|
-
if ((0,
|
|
13766
|
+
if ((0,external_lodash_.isEmpty)(this.val)) {
|
|
13767
13767
|
return false;
|
|
13768
13768
|
}
|
|
13769
13769
|
if (!this.multiple) {
|
|
@@ -13804,7 +13804,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13804
13804
|
var selectedKeys = this._selectionKeySet;
|
|
13805
13805
|
var mapResult = function mapResult(result) {
|
|
13806
13806
|
return _objectSpread2(_objectSpread2({}, result), {}, {
|
|
13807
|
-
selected: _this6.multiple ? selectedKeys.has(result.key) : !(0,
|
|
13807
|
+
selected: _this6.multiple ? selectedKeys.has(result.key) : !(0,external_lodash_.isEmpty)(_this6.val) && _this6.isSamePath(_this6.val, result.pathData)
|
|
13808
13808
|
});
|
|
13809
13809
|
};
|
|
13810
13810
|
if (!this.shouldVirtualize(results)) {
|
|
@@ -13905,7 +13905,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
13905
13905
|
});
|
|
13906
13906
|
return obj;
|
|
13907
13907
|
}
|
|
13908
|
-
return (0,
|
|
13908
|
+
return (0,external_lodash_.omit)(node, [this.mergedOptionProps.children]);
|
|
13909
13909
|
},
|
|
13910
13910
|
// --- 路径:value 路径 ↔ 节点路径 ↔ modelValue 格式转换 ---
|
|
13911
13911
|
/** 构建从根到当前项的 value 路径 */
|
|
@@ -14176,7 +14176,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
14176
14176
|
return results;
|
|
14177
14177
|
},
|
|
14178
14178
|
/** 搜索平铺项是否选中 */isSearchResultSelected: function isSearchResultSelected(result) {
|
|
14179
|
-
if ((0,
|
|
14179
|
+
if ((0,external_lodash_.isEmpty)(this.val)) {
|
|
14180
14180
|
return false;
|
|
14181
14181
|
}
|
|
14182
14182
|
if (this.multiple) {
|
|
@@ -14234,7 +14234,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
14234
14234
|
if (this.multiple) {
|
|
14235
14235
|
return;
|
|
14236
14236
|
}
|
|
14237
|
-
var path = (0,
|
|
14237
|
+
var path = (0,external_lodash_.isEmpty)(this.modelValue) ? [] : _toConsumableArray(this.normalizePath(this.modelValue));
|
|
14238
14238
|
if (this.maxLevel != null && this.maxLevel > 0 && path.length > this.maxLevel) {
|
|
14239
14239
|
path = path.slice(0, this.maxLevel);
|
|
14240
14240
|
}
|
|
@@ -14331,7 +14331,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
14331
14331
|
/** 远程 tree 模式:一次请求完整树 */loadTreeOptions: function loadTreeOptions() {
|
|
14332
14332
|
var _this15 = this;
|
|
14333
14333
|
this.treeLoading = true;
|
|
14334
|
-
this.postFunc(this.pathUrl, (0,
|
|
14334
|
+
this.postFunc(this.pathUrl, (0,external_lodash_.cloneDeep)(this.postData)).then(function (res) {
|
|
14335
14335
|
_this15.treeLoading = false;
|
|
14336
14336
|
if (!res.code && res.data) {
|
|
14337
14337
|
var data = res.data;
|
|
@@ -14374,11 +14374,11 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
14374
14374
|
}
|
|
14375
14375
|
var requestPostData = function () {
|
|
14376
14376
|
var requestLevel = _this16.lazyLevelStart + level + 1;
|
|
14377
|
-
var extra = (0,
|
|
14377
|
+
var extra = (0,external_lodash_.cloneDeep)(_this16.postData);
|
|
14378
14378
|
if (!item) {
|
|
14379
14379
|
return _objectSpread2(_objectSpread2({}, extra), {}, _defineProperty({}, _this16.lazyLevelKey, requestLevel));
|
|
14380
14380
|
}
|
|
14381
|
-
return _objectSpread2(_objectSpread2(_objectSpread2({}, (0,
|
|
14381
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({}, (0,external_lodash_.omit)(item, [_this16.mergedOptionProps.children])), extra), {}, _defineProperty({}, _this16.lazyLevelKey, requestLevel));
|
|
14382
14382
|
}();
|
|
14383
14383
|
return this.postFunc(this.pathUrl, requestPostData).then(function (res) {
|
|
14384
14384
|
var _res$data;
|
|
@@ -14469,7 +14469,7 @@ var BnCascaderPanelvue_type_script_lang_js_DEFAULT_OPTION_PROPS = {
|
|
|
14469
14469
|
this.$emit('changeCheckToLast', value);
|
|
14470
14470
|
},
|
|
14471
14471
|
/** 向外同步 v-model;单选选中有效值时触发 close 收起面板 */emitValue: function emitValue(value) {
|
|
14472
|
-
if (!this.multiple && !(0,
|
|
14472
|
+
if (!this.multiple && !(0,external_lodash_.isEmpty)(value)) {
|
|
14473
14473
|
this.$emit('close');
|
|
14474
14474
|
}
|
|
14475
14475
|
this.$emit('update:modelValue', value);
|
|
@@ -16208,7 +16208,7 @@ var BnDropvue_type_template_id_0984e2b5_scoped_true_staticRenderFns = [];
|
|
|
16208
16208
|
/**
|
|
16209
16209
|
* 滚动加载
|
|
16210
16210
|
* */
|
|
16211
|
-
scrollMore: (0,
|
|
16211
|
+
scrollMore: (0,external_lodash_.debounce)(function () {
|
|
16212
16212
|
if (this.optionList.length < this.total && !this.loading) {
|
|
16213
16213
|
// 远程获取
|
|
16214
16214
|
if (this.pathUrl) {
|
|
@@ -16227,7 +16227,7 @@ var BnDropvue_type_template_id_0984e2b5_scoped_true_staticRenderFns = [];
|
|
|
16227
16227
|
* 快速搜索选项
|
|
16228
16228
|
* @param {String} val 搜索的值
|
|
16229
16229
|
*/
|
|
16230
|
-
filterMethod: (0,
|
|
16230
|
+
filterMethod: (0,external_lodash_.debounce)(function (val) {
|
|
16231
16231
|
this.queryValue = val;
|
|
16232
16232
|
// 选项列表被初始化过
|
|
16233
16233
|
if (this.pathUrl && this.isPage) {
|
|
@@ -16276,7 +16276,7 @@ var BnDropvue_type_template_id_0984e2b5_scoped_true_staticRenderFns = [];
|
|
|
16276
16276
|
var _this2 = this;
|
|
16277
16277
|
// 判断当前是否全选
|
|
16278
16278
|
var isAllChecked = this.isCheckedAll();
|
|
16279
|
-
var value = (0,
|
|
16279
|
+
var value = (0,external_lodash_.cloneDeep)(this.val);
|
|
16280
16280
|
if (isAllChecked) {
|
|
16281
16281
|
// 如果已经全选,则取消全选
|
|
16282
16282
|
value = _toConsumableArray(this.fixedFrontOptions);
|
|
@@ -18292,8 +18292,8 @@ var es_parse_float = __webpack_require__(8459);
|
|
|
18292
18292
|
computed: {
|
|
18293
18293
|
canPreview: function canPreview() {
|
|
18294
18294
|
if (!this.file.type) return false;
|
|
18295
|
-
var lowerType = (0,
|
|
18296
|
-
return (0,
|
|
18295
|
+
var lowerType = (0,external_lodash_.toLower)(this.file.type);
|
|
18296
|
+
return (0,external_lodash_.includes)((0,external_lodash_.map)(this.pictureType, external_lodash_.toLower), lowerType) || (0,external_lodash_.includes)((0,external_lodash_.map)(this.videoType, external_lodash_.toLower), lowerType);
|
|
18297
18297
|
}
|
|
18298
18298
|
},
|
|
18299
18299
|
methods: {
|
|
@@ -18481,7 +18481,7 @@ var FileDetail_component = normalizeComponent(
|
|
|
18481
18481
|
* */
|
|
18482
18482
|
includesType: function includesType(typeList, fileType) {
|
|
18483
18483
|
if (!fileType) return false;
|
|
18484
|
-
return (0,
|
|
18484
|
+
return (0,external_lodash_.includes)((0,external_lodash_.map)(typeList, external_lodash_.toLower), (0,external_lodash_.toLower)(fileType));
|
|
18485
18485
|
},
|
|
18486
18486
|
/**
|
|
18487
18487
|
* 打开文件预览,一般是除了图片、视频、音频这些无法预览的附件类型
|
|
@@ -18545,7 +18545,7 @@ var FileDetail_component = normalizeComponent(
|
|
|
18545
18545
|
}
|
|
18546
18546
|
// office类型文件展示对应类型图片
|
|
18547
18547
|
if (this.includesType(this.officeFileTypes, file.type)) {
|
|
18548
|
-
var lowerType = (0,
|
|
18548
|
+
var lowerType = (0,external_lodash_.toLower)(file.type);
|
|
18549
18549
|
if (lowerType.includes('xls')) {
|
|
18550
18550
|
url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_d46630a679d1f3830947095edfd12f41.png";
|
|
18551
18551
|
}
|
|
@@ -19582,7 +19582,7 @@ var es_string_ends_with = __webpack_require__(9449);
|
|
|
19582
19582
|
}
|
|
19583
19583
|
this.checkRange();
|
|
19584
19584
|
},
|
|
19585
|
-
checkRange: (0,
|
|
19585
|
+
checkRange: (0,external_lodash_.debounce)(function () {
|
|
19586
19586
|
var value = this.val;
|
|
19587
19587
|
// 实时校验最大值和最小值
|
|
19588
19588
|
if (value && value !== '-') {
|
|
@@ -23420,10 +23420,10 @@ function util_searchToBoolean(chart, data) {
|
|
|
23420
23420
|
// 是否处理过初始化数据
|
|
23421
23421
|
pageOptionList: [],
|
|
23422
23422
|
total: 0,
|
|
23423
|
-
loadingOptionListDebounced: (0,
|
|
23424
|
-
filterMethodDebounced: (0,
|
|
23425
|
-
initRemoteMethodDebounced: (0,
|
|
23426
|
-
initSelectDataDebounced: (0,
|
|
23423
|
+
loadingOptionListDebounced: (0,external_lodash_.debounce)(this.loadingOptionList, 200),
|
|
23424
|
+
filterMethodDebounced: (0,external_lodash_.debounce)(this.filterMethod, 200),
|
|
23425
|
+
initRemoteMethodDebounced: (0,external_lodash_.debounce)(this.initRemoteMethod, 10),
|
|
23426
|
+
initSelectDataDebounced: (0,external_lodash_.debounce)(this.initSelectData, 10)
|
|
23427
23427
|
};
|
|
23428
23428
|
},
|
|
23429
23429
|
mounted: function mounted() {
|
|
@@ -24496,7 +24496,7 @@ function _asyncToGenerator(n) {
|
|
|
24496
24496
|
},
|
|
24497
24497
|
methods: {
|
|
24498
24498
|
// 防抖函数
|
|
24499
|
-
handleInput:
|
|
24499
|
+
handleInput: external_lodash_default().debounce(function () {
|
|
24500
24500
|
this.debouncedValue = this.sourceData.value;
|
|
24501
24501
|
this.getOptions(this.debouncedValue);
|
|
24502
24502
|
}, 200),
|