@bytenew/bn-applet-ui 1.1.28 → 1.1.30
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
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
14
|
+
/***/ 7515
|
|
15
15
|
(module, __webpack_exports__, __webpack_require__) {
|
|
16
16
|
|
|
17
17
|
"use strict";
|
|
@@ -230,7 +230,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `*[data-v-a5f24f64]{box-sizing:border-b
|
|
|
230
230
|
|
|
231
231
|
/***/ },
|
|
232
232
|
|
|
233
|
-
/***/
|
|
233
|
+
/***/ 8868
|
|
234
234
|
(module, __webpack_exports__, __webpack_require__) {
|
|
235
235
|
|
|
236
236
|
"use strict";
|
|
@@ -250,7 +250,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
250
250
|
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()));
|
|
251
251
|
___CSS_LOADER_EXPORT___.i(_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_font_iconfont_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
|
|
252
252
|
// Module
|
|
253
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.bnDrop-select[data-v-
|
|
253
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.bnDrop-select[data-v-830beb80]{display:inline-block;position:relative;max-width:100%;min-width:110px;height:32px;line-height:32px;padding-right:28px;padding-left:12px;font-size:14px;color:rgba(0,0,0,.85);border:1px solid rgba(0,0,0,.15);border-radius:2px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bnDrop-select-clear[data-v-830beb80]{background:#fff;display:none;position:absolute;font-size:14px;right:8px;color:#888;cursor:pointer}.bnDrop-select-down[data-v-830beb80]{position:absolute;font-size:12px;right:8px;color:#888}.bnDrop-select-down[data-v-830beb80] .el-loading-mask .el-loading-spinner{padding-top:6px}.bnDrop-select-down[data-v-830beb80] .el-loading-mask .circular{width:17px;height:17px}.bnDrop-select.disabled[data-v-830beb80]{color:rgba(0,0,0,.25);background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.15)!important;cursor:not-allowed}.bnDrop-select.disabled .bnDrop-select-clear[data-v-830beb80]{display:none!important}.bnDrop-select[data-v-830beb80]:hover{border-color:#1890ff}.bnDrop-select:hover .bnDrop-select-clear[data-v-830beb80]{z-index:1;display:inline-block}.bnDrop-select.simple[data-v-830beb80]{padding-left:0;color:#1890ff;border:1px solid transparent!important}.bnDrop-select.simple.disabled[data-v-830beb80]{color:rgba(24,144,255,.35);background:none}.bnDrop-select.is-multiple-tags[data-v-830beb80]{display:inline-flex;align-items:center;height:auto;min-height:32px;line-height:normal;padding-top:1px;padding-bottom:1px;white-space:normal;overflow:visible}.bnDrop-tags[data-v-830beb80]{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:2px 0;flex:1;min-width:0}.bnDrop-tag[data-v-830beb80]{display:inline-flex;align-items:center;max-width:100%;height:24px;padding:0 8px;font-size:12px;color:#909399;background:#f0f2f5;border-radius:4px;box-sizing:border-box}.bnDrop-tag--collapse[data-v-830beb80]{cursor:default}.bnDrop-tag-text[data-v-830beb80]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bnDrop-tag-close[data-v-830beb80]{margin-left:4px;font-size:12px;color:#909399;cursor:pointer;border-radius:50%;flex-shrink:0}.bnDrop-tag-close[data-v-830beb80]:hover{color:#409eff;background:#ecf5ff}.bnDrop-collapse-tooltip[data-v-830beb80]{max-width:280px;line-height:1.6}.bnDrop-placeholder[data-v-830beb80]{color:rgba(0,0,0,.25)}.bnDrop-body[data-v-830beb80]{position:relative}.bnDrop-body-input[data-v-830beb80]{padding:8px}.bnDrop-body-input[data-v-830beb80] .el-input__inner{border-radius:0}.bnDrop-body-list[data-v-830beb80]{position:relative;width:100%;background:#fff;min-height:68px;max-height:260px;overflow-y:auto}.bnDrop-body-list-item[data-v-830beb80]{position:relative;height:36px;font-size:14px;padding:0 10px;color:rgba(0,0,0,.85);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bnDrop-body-list-item.disabled[data-v-830beb80]{color:rgba(0,0,0,.25);background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.15)!important;cursor:not-allowed}.bnDrop-body-list-item[data-v-830beb80]:hover{color:#2783f2;background-color:rgba(0,0,0,.04)}.bnDrop-body-list-empty[data-v-830beb80]{height:48px;line-height:48px;text-align:center;font-size:12px;color:#999}.bnDrop-body-footer[data-v-830beb80]{width:100%;overflow:hidden}.bnDrop-body-footer[data-v-830beb80] .bnCheck{width:100%;max-width:100%}`, ""]);
|
|
254
254
|
// Exports
|
|
255
255
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
256
256
|
|
|
@@ -819,19 +819,19 @@ module.exports = function (i) {
|
|
|
819
819
|
|
|
820
820
|
/***/ },
|
|
821
821
|
|
|
822
|
-
/***/
|
|
822
|
+
/***/ 1330
|
|
823
823
|
(module, __unused_webpack_exports, __webpack_require__) {
|
|
824
824
|
|
|
825
825
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
826
826
|
|
|
827
827
|
// load the styles
|
|
828
|
-
var content = __webpack_require__(
|
|
828
|
+
var content = __webpack_require__(7515);
|
|
829
829
|
if(content.__esModule) content = content.default;
|
|
830
830
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
831
831
|
if(content.locals) module.exports = content.locals;
|
|
832
832
|
// add the styles to the DOM
|
|
833
833
|
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
834
|
-
var update = add("
|
|
834
|
+
var update = add("4233f664", content, true, {"sourceMap":false,"shadowMode":false});
|
|
835
835
|
|
|
836
836
|
/***/ },
|
|
837
837
|
|
|
@@ -963,19 +963,19 @@ var update = add("3698972a", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
963
963
|
|
|
964
964
|
/***/ },
|
|
965
965
|
|
|
966
|
-
/***/
|
|
966
|
+
/***/ 7448
|
|
967
967
|
(module, __unused_webpack_exports, __webpack_require__) {
|
|
968
968
|
|
|
969
969
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
970
970
|
|
|
971
971
|
// load the styles
|
|
972
|
-
var content = __webpack_require__(
|
|
972
|
+
var content = __webpack_require__(8868);
|
|
973
973
|
if(content.__esModule) content = content.default;
|
|
974
974
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
975
975
|
if(content.locals) module.exports = content.locals;
|
|
976
976
|
// add the styles to the DOM
|
|
977
977
|
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
978
|
-
var update = add("
|
|
978
|
+
var update = add("8d645a60", content, true, {"sourceMap":false,"shadowMode":false});
|
|
979
979
|
|
|
980
980
|
/***/ },
|
|
981
981
|
|
|
@@ -11823,8 +11823,8 @@ var dialog_component = normalizeComponent(
|
|
|
11823
11823
|
)
|
|
11824
11824
|
|
|
11825
11825
|
/* harmony default export */ const dialog = (dialog_component.exports);
|
|
11826
|
-
;// ./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/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnDrop/BnDrop.vue?vue&type=template&id=
|
|
11827
|
-
var
|
|
11826
|
+
;// ./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/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnDrop/BnDrop.vue?vue&type=template&id=830beb80&scoped=true
|
|
11827
|
+
var BnDropvue_type_template_id_830beb80_scoped_true_render = function render() {
|
|
11828
11828
|
var _vm = this,
|
|
11829
11829
|
_c = _vm._self._c;
|
|
11830
11830
|
return _c('el-popover', {
|
|
@@ -11842,41 +11842,78 @@ var BnDropvue_type_template_id_13f9f2c9_scoped_true_render = function render() {
|
|
|
11842
11842
|
scopedSlots: _vm._u([{
|
|
11843
11843
|
key: "reference",
|
|
11844
11844
|
fn: function fn() {
|
|
11845
|
-
return [_vm._t("default"
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11845
|
+
return [_vm.$slots["default"] ? _vm._t("default") : _c('div', {
|
|
11846
|
+
staticClass: "bnDrop-select",
|
|
11847
|
+
"class": {
|
|
11848
|
+
'simple': !_vm.border,
|
|
11849
|
+
'disabled': _vm.disabled,
|
|
11850
|
+
'is-multiple-tags': _vm.multiple && _vm.collapseTags && _vm.val.length > 0
|
|
11851
|
+
}
|
|
11852
|
+
}, [_vm.multiple && _vm.val.length == 0 || !_vm.multiple && (!_vm.labelInValue && _vm.val === '' || _vm.labelInValue && !_vm.val[_vm.optionProps.value]) ? _c('span', {
|
|
11853
|
+
staticClass: "bnDrop-placeholder"
|
|
11854
|
+
}, [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]) : [!_vm.multiple ? _c('span', {
|
|
11855
|
+
attrs: {
|
|
11856
|
+
"title": _vm.singleTitle
|
|
11857
|
+
}
|
|
11858
|
+
}, [_vm._v(_vm._s(_vm.singleTitle))]) : _vm.collapseTags ? _c('div', {
|
|
11859
|
+
staticClass: "bnDrop-tags"
|
|
11860
|
+
}, [_vm._l(_vm.visibleTags, function (tag) {
|
|
11861
|
+
return _c('span', {
|
|
11862
|
+
key: tag.index,
|
|
11863
|
+
staticClass: "bnDrop-tag"
|
|
11864
|
+
}, [_c('span', {
|
|
11865
|
+
staticClass: "bnDrop-tag-text",
|
|
11859
11866
|
attrs: {
|
|
11860
|
-
"title":
|
|
11867
|
+
"title": tag.label
|
|
11861
11868
|
}
|
|
11862
|
-
}, [_vm._v(
|
|
11863
|
-
staticClass: "bnUIcon bnUIcon-
|
|
11869
|
+
}, [_vm._v(_vm._s(tag.label))]), !_vm.disabled ? _c('span', {
|
|
11870
|
+
staticClass: "bnDrop-tag-close bnUIcon bnUIcon-close",
|
|
11864
11871
|
on: {
|
|
11865
11872
|
"click": function click($event) {
|
|
11866
11873
|
$event.stopPropagation();
|
|
11867
|
-
return _vm.
|
|
11874
|
+
return _vm.removeTag(tag.index);
|
|
11868
11875
|
}
|
|
11869
11876
|
}
|
|
11870
|
-
}) : _vm._e()])
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11877
|
+
}) : _vm._e()]);
|
|
11878
|
+
}), _vm.collapsedCount > 0 ? _c('el-tooltip', {
|
|
11879
|
+
attrs: {
|
|
11880
|
+
"disabled": !_vm.collapseTagsTooltip,
|
|
11881
|
+
"effect": "dark",
|
|
11882
|
+
"placement": "top"
|
|
11883
|
+
}
|
|
11884
|
+
}, [_c('div', {
|
|
11885
|
+
staticClass: "bnDrop-collapse-tooltip",
|
|
11886
|
+
attrs: {
|
|
11887
|
+
"slot": "content"
|
|
11888
|
+
},
|
|
11889
|
+
slot: "content"
|
|
11890
|
+
}, _vm._l(_vm.collapsedTags, function (tag) {
|
|
11891
|
+
return _c('div', {
|
|
11892
|
+
key: tag.index
|
|
11893
|
+
}, [_vm._v(_vm._s(tag.label))]);
|
|
11894
|
+
}), 0), _c('span', {
|
|
11895
|
+
staticClass: "bnDrop-tag bnDrop-tag--collapse"
|
|
11896
|
+
}, [_vm._v("+ " + _vm._s(_vm.collapsedCount))])]) : _vm._e()], 2) : _c('span', {
|
|
11897
|
+
attrs: {
|
|
11898
|
+
"title": _vm.multipleTitle
|
|
11899
|
+
}
|
|
11900
|
+
}, [_vm._v(_vm._s(_vm.multipleTitle))]), _vm.clearable ? _c('span', {
|
|
11901
|
+
staticClass: "bnUIcon bnUIcon-clear bnDrop-select-clear",
|
|
11902
|
+
on: {
|
|
11903
|
+
"click": function click($event) {
|
|
11904
|
+
$event.stopPropagation();
|
|
11905
|
+
return _vm.clear.apply(null, arguments);
|
|
11906
|
+
}
|
|
11907
|
+
}
|
|
11908
|
+
}) : _vm._e()], _c('span', {
|
|
11909
|
+
directives: [{
|
|
11910
|
+
name: "loading",
|
|
11911
|
+
rawName: "v-loading",
|
|
11912
|
+
value: _vm.loading,
|
|
11913
|
+
expression: "loading"
|
|
11914
|
+
}],
|
|
11915
|
+
staticClass: "bnUIcon bnUIcon-down bnDrop-select-down"
|
|
11916
|
+
})], 2)];
|
|
11880
11917
|
},
|
|
11881
11918
|
proxy: true
|
|
11882
11919
|
}], null, true),
|
|
@@ -11975,7 +12012,7 @@ var BnDropvue_type_template_id_13f9f2c9_scoped_true_render = function render() {
|
|
|
11975
12012
|
staticClass: "w-margin-left4"
|
|
11976
12013
|
}, [_vm._v(_vm._s(_vm.val.length == 0 ? '全选' : "\u5DF2\u9009".concat(_vm.val.length - _vm.fixedFrontOptions.length, "\u9879")))]), _c('span', {}, [_vm._v("已加载" + _vm._s(_vm.optionList.length) + "/" + _vm._s(_vm.total) + "项")])])])], 1) : _vm._e(), _vm._t("dropdown-bottom")], 2)]);
|
|
11977
12014
|
};
|
|
11978
|
-
var
|
|
12015
|
+
var BnDropvue_type_template_id_830beb80_scoped_true_staticRenderFns = [];
|
|
11979
12016
|
|
|
11980
12017
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.every.js
|
|
11981
12018
|
var es_array_every = __webpack_require__(8431);
|
|
@@ -12163,6 +12200,10 @@ function _toConsumableArray(r) {
|
|
|
12163
12200
|
|
|
12164
12201
|
/* harmony default export */ const BnDropvue_type_script_lang_js = ({
|
|
12165
12202
|
name: "BnDrop",
|
|
12203
|
+
model: {
|
|
12204
|
+
prop: 'modelValue',
|
|
12205
|
+
event: 'update:modelValue'
|
|
12206
|
+
},
|
|
12166
12207
|
props: {
|
|
12167
12208
|
//最终选中的value
|
|
12168
12209
|
modelValue: {
|
|
@@ -12192,10 +12233,6 @@ function _toConsumableArray(r) {
|
|
|
12192
12233
|
};
|
|
12193
12234
|
}
|
|
12194
12235
|
},
|
|
12195
|
-
// 数据结构
|
|
12196
|
-
valueProps: {
|
|
12197
|
-
type: Array
|
|
12198
|
-
},
|
|
12199
12236
|
// 位置
|
|
12200
12237
|
placement: {
|
|
12201
12238
|
type: String,
|
|
@@ -12247,6 +12284,18 @@ function _toConsumableArray(r) {
|
|
|
12247
12284
|
},
|
|
12248
12285
|
// 是否多选
|
|
12249
12286
|
multiple: Boolean,
|
|
12287
|
+
// 多选 tag 是否折叠超出部分(对齐 Element UI collapse-tags)
|
|
12288
|
+
collapseTags: Boolean,
|
|
12289
|
+
// 折叠 tag 的 +N 是否启用 tooltip 展示全部
|
|
12290
|
+
collapseTagsTooltip: {
|
|
12291
|
+
type: Boolean,
|
|
12292
|
+
"default": true
|
|
12293
|
+
},
|
|
12294
|
+
// collapseTags 为 true 时,收起时默认展示几个 tag
|
|
12295
|
+
maxCollapseTags: {
|
|
12296
|
+
type: Number,
|
|
12297
|
+
"default": 1
|
|
12298
|
+
},
|
|
12250
12299
|
// 单选模式 是否允许取消选中
|
|
12251
12300
|
canUncheck: {
|
|
12252
12301
|
type: Boolean,
|
|
@@ -12272,6 +12321,10 @@ function _toConsumableArray(r) {
|
|
|
12272
12321
|
type: Boolean,
|
|
12273
12322
|
"default": true
|
|
12274
12323
|
},
|
|
12324
|
+
// 数据结构,当labelInValue=true时,返回的对象中都需要那些字段。不传就返回全部
|
|
12325
|
+
valueProps: {
|
|
12326
|
+
type: Array
|
|
12327
|
+
},
|
|
12275
12328
|
// 不绑定v-model,仅在点击的时候回传点击事件
|
|
12276
12329
|
noValue: {
|
|
12277
12330
|
type: Boolean,
|
|
@@ -12339,8 +12392,8 @@ function _toConsumableArray(r) {
|
|
|
12339
12392
|
}
|
|
12340
12393
|
},
|
|
12341
12394
|
methods: {
|
|
12342
|
-
/**
|
|
12343
|
-
* 初始化远程数据
|
|
12395
|
+
/**
|
|
12396
|
+
* 初始化远程数据
|
|
12344
12397
|
* */
|
|
12345
12398
|
initRemote: function initRemote() {
|
|
12346
12399
|
if (this.pathUrl) {
|
|
@@ -12349,8 +12402,8 @@ function _toConsumableArray(r) {
|
|
|
12349
12402
|
this.loadOptions();
|
|
12350
12403
|
}
|
|
12351
12404
|
},
|
|
12352
|
-
/**
|
|
12353
|
-
* 下拉框打开关闭
|
|
12405
|
+
/**
|
|
12406
|
+
* 下拉框打开关闭
|
|
12354
12407
|
* */
|
|
12355
12408
|
open: function open() {
|
|
12356
12409
|
// 打开弹框时
|
|
@@ -12362,8 +12415,8 @@ function _toConsumableArray(r) {
|
|
|
12362
12415
|
this.initRemote();
|
|
12363
12416
|
}
|
|
12364
12417
|
},
|
|
12365
|
-
/**
|
|
12366
|
-
* 清空value
|
|
12418
|
+
/**
|
|
12419
|
+
* 清空value
|
|
12367
12420
|
* */
|
|
12368
12421
|
clear: function clear() {
|
|
12369
12422
|
if (this.multiple) {
|
|
@@ -12372,8 +12425,8 @@ function _toConsumableArray(r) {
|
|
|
12372
12425
|
this.val = this.labelInValue ? {} : '';
|
|
12373
12426
|
}
|
|
12374
12427
|
},
|
|
12375
|
-
/**
|
|
12376
|
-
* 滚动加载
|
|
12428
|
+
/**
|
|
12429
|
+
* 滚动加载
|
|
12377
12430
|
* */
|
|
12378
12431
|
scrollMore: (0,external_lodash_.debounce)(function () {
|
|
12379
12432
|
if (this.optionList.length < this.total && !this.loading) {
|
|
@@ -12390,9 +12443,9 @@ function _toConsumableArray(r) {
|
|
|
12390
12443
|
}
|
|
12391
12444
|
}
|
|
12392
12445
|
}, 400),
|
|
12393
|
-
/**
|
|
12394
|
-
* 快速搜索选项
|
|
12395
|
-
* @param {String} val 搜索的值
|
|
12446
|
+
/**
|
|
12447
|
+
* 快速搜索选项
|
|
12448
|
+
* @param {String} val 搜索的值
|
|
12396
12449
|
*/
|
|
12397
12450
|
filterMethod: (0,external_lodash_.debounce)(function (val) {
|
|
12398
12451
|
this.queryValue = val;
|
|
@@ -12402,8 +12455,8 @@ function _toConsumableArray(r) {
|
|
|
12402
12455
|
this.loadOptions();
|
|
12403
12456
|
}
|
|
12404
12457
|
}, 400),
|
|
12405
|
-
/**
|
|
12406
|
-
* 多选时判断全部选中
|
|
12458
|
+
/**
|
|
12459
|
+
* 多选时判断全部选中
|
|
12407
12460
|
* */
|
|
12408
12461
|
isCheckedAll: function isCheckedAll() {
|
|
12409
12462
|
var _this = this;
|
|
@@ -12436,8 +12489,8 @@ function _toConsumableArray(r) {
|
|
|
12436
12489
|
return valSet.has(item);
|
|
12437
12490
|
});
|
|
12438
12491
|
},
|
|
12439
|
-
/**
|
|
12440
|
-
* 全选/取消全选
|
|
12492
|
+
/**
|
|
12493
|
+
* 全选/取消全选
|
|
12441
12494
|
* */
|
|
12442
12495
|
checkAll: function checkAll() {
|
|
12443
12496
|
var _this2 = this;
|
|
@@ -12465,9 +12518,9 @@ function _toConsumableArray(r) {
|
|
|
12465
12518
|
}
|
|
12466
12519
|
this.$emit('change', value, isAllChecked);
|
|
12467
12520
|
},
|
|
12468
|
-
/**
|
|
12469
|
-
* 多选判断是否选中 选中返回true,未选中返回false
|
|
12470
|
-
* @param {Object} item 选项的对象数据
|
|
12521
|
+
/**
|
|
12522
|
+
* 多选判断是否选中 选中返回true,未选中返回false
|
|
12523
|
+
* @param {Object} item 选项的对象数据
|
|
12471
12524
|
* */
|
|
12472
12525
|
isChecked: function isChecked(_ref) {
|
|
12473
12526
|
var _this3 = this;
|
|
@@ -12482,9 +12535,9 @@ function _toConsumableArray(r) {
|
|
|
12482
12535
|
}
|
|
12483
12536
|
return check;
|
|
12484
12537
|
},
|
|
12485
|
-
/**
|
|
12486
|
-
* 单选判断是否选中 选中返回true,未选中返回false
|
|
12487
|
-
* @param {Object} item 选项的对象数据
|
|
12538
|
+
/**
|
|
12539
|
+
* 单选判断是否选中 选中返回true,未选中返回false
|
|
12540
|
+
* @param {Object} item 选项的对象数据
|
|
12488
12541
|
* */
|
|
12489
12542
|
isChoose: function isChoose(item) {
|
|
12490
12543
|
var check = false;
|
|
@@ -12496,9 +12549,9 @@ function _toConsumableArray(r) {
|
|
|
12496
12549
|
}
|
|
12497
12550
|
return check;
|
|
12498
12551
|
},
|
|
12499
|
-
/**
|
|
12500
|
-
* 点击下拉菜单中的某一项,选中或取消选中
|
|
12501
|
-
* @param {Object} item 选项的对象数据
|
|
12552
|
+
/**
|
|
12553
|
+
* 点击下拉菜单中的某一项,选中或取消选中
|
|
12554
|
+
* @param {Object} item 选项的对象数据
|
|
12502
12555
|
* */
|
|
12503
12556
|
chooseItem: function chooseItem(item) {
|
|
12504
12557
|
var value = this.val;
|
|
@@ -12561,8 +12614,8 @@ function _toConsumableArray(r) {
|
|
|
12561
12614
|
}
|
|
12562
12615
|
this.$emit('change', value);
|
|
12563
12616
|
},
|
|
12564
|
-
/**
|
|
12565
|
-
* 远程加载options
|
|
12617
|
+
/**
|
|
12618
|
+
* 远程加载options
|
|
12566
12619
|
* */
|
|
12567
12620
|
loadOptions: function loadOptions(post) {
|
|
12568
12621
|
var _this4 = this;
|
|
@@ -12605,15 +12658,15 @@ function _toConsumableArray(r) {
|
|
|
12605
12658
|
}
|
|
12606
12659
|
});
|
|
12607
12660
|
},
|
|
12608
|
-
/**
|
|
12609
|
-
* 前端手动分页
|
|
12661
|
+
/**
|
|
12662
|
+
* 前端手动分页
|
|
12610
12663
|
* */
|
|
12611
12664
|
catchPage: function catchPage(page) {
|
|
12612
12665
|
this.pageData.pageNum = page || this.pageData.pageNum;
|
|
12613
12666
|
return this.options.slice((this.pageData.pageNum - 1) * this.pageData.pageSize, this.pageData.pageNum * this.pageData.pageSize);
|
|
12614
12667
|
},
|
|
12615
|
-
/**
|
|
12616
|
-
* 如果value是对象,然会value的时候把对象组装好再返回。
|
|
12668
|
+
/**
|
|
12669
|
+
* 如果value是对象,然会value的时候把对象组装好再返回。
|
|
12617
12670
|
* */
|
|
12618
12671
|
getValObj: function getValObj(val) {
|
|
12619
12672
|
if (this.valueProps) {
|
|
@@ -12626,10 +12679,10 @@ function _toConsumableArray(r) {
|
|
|
12626
12679
|
return val;
|
|
12627
12680
|
}
|
|
12628
12681
|
},
|
|
12629
|
-
/**
|
|
12630
|
-
* 从一个数组中通过id找到名字,并返回给调用者
|
|
12631
|
-
* @param {Array} list 数组
|
|
12632
|
-
* @param {String} id 需要匹配的id
|
|
12682
|
+
/**
|
|
12683
|
+
* 从一个数组中通过id找到名字,并返回给调用者
|
|
12684
|
+
* @param {Array} list 数组
|
|
12685
|
+
* @param {String} id 需要匹配的id
|
|
12633
12686
|
* */
|
|
12634
12687
|
foundTitle: function foundTitle(list, id) {
|
|
12635
12688
|
var title = '';
|
|
@@ -12641,11 +12694,11 @@ function _toConsumableArray(r) {
|
|
|
12641
12694
|
}
|
|
12642
12695
|
return title;
|
|
12643
12696
|
},
|
|
12644
|
-
/**
|
|
12645
|
-
* 从一个数组中通过id和ids数组的匹配找到标题,并返回给调用者
|
|
12646
|
-
* @param {Array} list 数组
|
|
12647
|
-
* @param {String} ids 需要匹配的id数组[1,2,3]
|
|
12648
|
-
* @return {Array} values 返回所有匹配项组成的数组
|
|
12697
|
+
/**
|
|
12698
|
+
* 从一个数组中通过id和ids数组的匹配找到标题,并返回给调用者
|
|
12699
|
+
* @param {Array} list 数组
|
|
12700
|
+
* @param {String} ids 需要匹配的id数组[1,2,3]
|
|
12701
|
+
* @return {Array} values 返回所有匹配项组成的数组
|
|
12649
12702
|
* */
|
|
12650
12703
|
foundValue: function foundValue(list, ids) {
|
|
12651
12704
|
var value = [];
|
|
@@ -12656,11 +12709,19 @@ function _toConsumableArray(r) {
|
|
|
12656
12709
|
}
|
|
12657
12710
|
return value;
|
|
12658
12711
|
},
|
|
12659
|
-
/**
|
|
12660
|
-
* 手动关闭
|
|
12712
|
+
/**
|
|
12713
|
+
* 手动关闭
|
|
12661
12714
|
* */
|
|
12662
12715
|
close: function close() {
|
|
12663
12716
|
this.popoverVisible = false;
|
|
12717
|
+
},
|
|
12718
|
+
/** 删除多选 tag */removeTag: function removeTag(index) {
|
|
12719
|
+
if (this.disabled || !this.multiple || !Array.isArray(this.val)) {
|
|
12720
|
+
return;
|
|
12721
|
+
}
|
|
12722
|
+
var next = _toConsumableArray(this.val);
|
|
12723
|
+
next.splice(index, 1);
|
|
12724
|
+
this.val = next;
|
|
12664
12725
|
}
|
|
12665
12726
|
},
|
|
12666
12727
|
computed: {
|
|
@@ -12734,39 +12795,68 @@ function _toConsumableArray(r) {
|
|
|
12734
12795
|
singleTitle: function singleTitle() {
|
|
12735
12796
|
var title = '';
|
|
12736
12797
|
if (this.labelInValue) {
|
|
12737
|
-
title = this.
|
|
12798
|
+
title = this.val[this.optionProps.label];
|
|
12738
12799
|
} else {
|
|
12739
|
-
title = this.foundTitle(this.options, this.
|
|
12800
|
+
title = this.foundTitle(this.options, this.val) || this.val;
|
|
12740
12801
|
}
|
|
12741
12802
|
return title;
|
|
12742
12803
|
},
|
|
12743
|
-
// 多选时的
|
|
12744
|
-
|
|
12804
|
+
// 多选时的 tag 列表
|
|
12805
|
+
multipleTags: function multipleTags() {
|
|
12745
12806
|
var _this7 = this;
|
|
12746
|
-
var
|
|
12807
|
+
var value = this.val;
|
|
12808
|
+
if (!Array.isArray(value) || !value.length) {
|
|
12809
|
+
return [];
|
|
12810
|
+
}
|
|
12747
12811
|
if (this.labelInValue) {
|
|
12748
|
-
|
|
12749
|
-
return
|
|
12812
|
+
return value.map(function (v, index) {
|
|
12813
|
+
return {
|
|
12814
|
+
index: index,
|
|
12815
|
+
label: v[_this7.optionProps.label] || ''
|
|
12816
|
+
};
|
|
12750
12817
|
});
|
|
12751
|
-
} else {
|
|
12752
|
-
var data = this.foundValue(this.options, this.modelValue);
|
|
12753
|
-
if (data.length) {
|
|
12754
|
-
values = [].concat(_toConsumableArray(values), _toConsumableArray(data));
|
|
12755
|
-
}
|
|
12756
12818
|
}
|
|
12757
|
-
return
|
|
12819
|
+
return value.map(function (id, index) {
|
|
12820
|
+
return {
|
|
12821
|
+
index: index,
|
|
12822
|
+
label: _this7.foundTitle(_this7.options, id) || id
|
|
12823
|
+
};
|
|
12824
|
+
});
|
|
12825
|
+
},
|
|
12826
|
+
// 多选时的 value 展示文本
|
|
12827
|
+
multipleTitle: function multipleTitle() {
|
|
12828
|
+
return this.multipleTags.map(function (tag) {
|
|
12829
|
+
return tag.label;
|
|
12830
|
+
}).join(',');
|
|
12831
|
+
},
|
|
12832
|
+
// 多选 collapseTags 模式下可见 tag
|
|
12833
|
+
visibleTags: function visibleTags() {
|
|
12834
|
+
if (!this.collapseTags || this.multipleTags.length <= this.maxCollapseTags) {
|
|
12835
|
+
return this.multipleTags;
|
|
12836
|
+
}
|
|
12837
|
+
return this.multipleTags.slice(0, this.maxCollapseTags);
|
|
12838
|
+
},
|
|
12839
|
+
// 多选 collapseTags 模式下被折叠的 tag
|
|
12840
|
+
collapsedTags: function collapsedTags() {
|
|
12841
|
+
if (!this.collapseTags || this.multipleTags.length <= this.maxCollapseTags) {
|
|
12842
|
+
return [];
|
|
12843
|
+
}
|
|
12844
|
+
return this.multipleTags.slice(this.maxCollapseTags);
|
|
12845
|
+
},
|
|
12846
|
+
collapsedCount: function collapsedCount() {
|
|
12847
|
+
return this.collapsedTags.length;
|
|
12758
12848
|
}
|
|
12759
12849
|
}
|
|
12760
12850
|
});
|
|
12761
12851
|
;// ./packages/BnDrop/BnDrop.vue?vue&type=script&lang=js
|
|
12762
12852
|
/* harmony default export */ const BnDrop_BnDropvue_type_script_lang_js = (BnDropvue_type_script_lang_js);
|
|
12763
|
-
// 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/BnDrop/BnDrop.vue?vue&type=style&index=0&id=
|
|
12764
|
-
var
|
|
12765
|
-
;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=0&id=
|
|
12853
|
+
// 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/BnDrop/BnDrop.vue?vue&type=style&index=0&id=830beb80&prod&lang=css
|
|
12854
|
+
var BnDropvue_type_style_index_0_id_830beb80_prod_lang_css = __webpack_require__(1330);
|
|
12855
|
+
;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=0&id=830beb80&prod&lang=css
|
|
12766
12856
|
|
|
12767
|
-
// 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/BnDrop/BnDrop.vue?vue&type=style&index=1&id=
|
|
12768
|
-
var
|
|
12769
|
-
;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=1&id=
|
|
12857
|
+
// 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/BnDrop/BnDrop.vue?vue&type=style&index=1&id=830beb80&prod&scoped=true&lang=scss
|
|
12858
|
+
var BnDropvue_type_style_index_1_id_830beb80_prod_scoped_true_lang_scss = __webpack_require__(7448);
|
|
12859
|
+
;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=1&id=830beb80&prod&scoped=true&lang=scss
|
|
12770
12860
|
|
|
12771
12861
|
;// ./packages/BnDrop/BnDrop.vue
|
|
12772
12862
|
|
|
@@ -12780,11 +12870,11 @@ var BnDropvue_type_style_index_1_id_13f9f2c9_prod_scoped_true_lang_scss = __webp
|
|
|
12780
12870
|
|
|
12781
12871
|
var BnDrop_component = normalizeComponent(
|
|
12782
12872
|
BnDrop_BnDropvue_type_script_lang_js,
|
|
12783
|
-
|
|
12784
|
-
|
|
12873
|
+
BnDropvue_type_template_id_830beb80_scoped_true_render,
|
|
12874
|
+
BnDropvue_type_template_id_830beb80_scoped_true_staticRenderFns,
|
|
12785
12875
|
false,
|
|
12786
12876
|
null,
|
|
12787
|
-
"
|
|
12877
|
+
"830beb80",
|
|
12788
12878
|
null
|
|
12789
12879
|
|
|
12790
12880
|
)
|