@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.
@@ -1,7 +1,7 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 1178
4
+ /***/ 7021
5
5
  (module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
  "use strict";
@@ -220,7 +220,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `*[data-v-a5f24f64]{box-sizing:border-b
220
220
 
221
221
  /***/ },
222
222
 
223
- /***/ 9182
223
+ /***/ 404
224
224
  (module, __webpack_exports__, __webpack_require__) {
225
225
 
226
226
  "use strict";
@@ -240,7 +240,7 @@ __webpack_require__.r(__webpack_exports__);
240
240
  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()));
241
241
  ___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_22_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_22_use_2_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_22_use_3_font_iconfont_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
242
242
  // Module
243
- ___CSS_LOADER_EXPORT___.push([module.id, `.bnDrop-select[data-v-13f9f2c9]{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-13f9f2c9]{background:#fff;display:none;position:absolute;font-size:14px;right:8px;color:#888;cursor:pointer}.bnDrop-select-down[data-v-13f9f2c9]{position:absolute;font-size:12px;right:8px;color:#888}.bnDrop-select-down[data-v-13f9f2c9] .el-loading-mask .el-loading-spinner{padding-top:6px}.bnDrop-select-down[data-v-13f9f2c9] .el-loading-mask .circular{width:17px;height:17px}.bnDrop-select.disabled[data-v-13f9f2c9]{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-13f9f2c9]{display:none!important}.bnDrop-select[data-v-13f9f2c9]:hover{border-color:#1890ff}.bnDrop-select:hover .bnDrop-select-clear[data-v-13f9f2c9]{z-index:1;display:inline-block}.bnDrop-select.simple[data-v-13f9f2c9]{padding-left:0;color:#1890ff;border:1px solid transparent!important}.bnDrop-select.simple.disabled[data-v-13f9f2c9]{color:rgba(24,144,255,.35);background:none}.bnDrop-placeholder[data-v-13f9f2c9]{color:rgba(0,0,0,.25)}.bnDrop-body[data-v-13f9f2c9]{position:relative}.bnDrop-body-input[data-v-13f9f2c9]{padding:8px}.bnDrop-body-input[data-v-13f9f2c9] .el-input__inner{border-radius:0}.bnDrop-body-list[data-v-13f9f2c9]{position:relative;width:100%;background:#fff;min-height:68px;max-height:260px;overflow-y:auto}.bnDrop-body-list-item[data-v-13f9f2c9]{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-13f9f2c9]{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-13f9f2c9]:hover{color:#2783f2;background-color:rgba(0,0,0,.04)}.bnDrop-body-list-empty[data-v-13f9f2c9]{height:48px;line-height:48px;text-align:center;font-size:12px;color:#999}.bnDrop-body-footer[data-v-13f9f2c9]{width:100%;overflow:hidden}.bnDrop-body-footer[data-v-13f9f2c9] .bnCheck{width:100%;max-width:100%}`, ""]);
243
+ ___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%}`, ""]);
244
244
  // Exports
245
245
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
246
246
 
@@ -809,19 +809,19 @@ module.exports = function (i) {
809
809
 
810
810
  /***/ },
811
811
 
812
- /***/ 601
812
+ /***/ 546
813
813
  (module, __unused_webpack_exports, __webpack_require__) {
814
814
 
815
815
  // style-loader: Adds some css to the DOM by adding a <style> tag
816
816
 
817
817
  // load the styles
818
- var content = __webpack_require__(1178);
818
+ var content = __webpack_require__(7021);
819
819
  if(content.__esModule) content = content.default;
820
820
  if(typeof content === 'string') content = [[module.id, content, '']];
821
821
  if(content.locals) module.exports = content.locals;
822
822
  // add the styles to the DOM
823
823
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
824
- var update = add("57e69151", content, true, {"sourceMap":false,"shadowMode":false});
824
+ var update = add("1e8ba726", content, true, {"sourceMap":false,"shadowMode":false});
825
825
 
826
826
  /***/ },
827
827
 
@@ -953,19 +953,19 @@ var update = add("3ff3fb27", content, true, {"sourceMap":false,"shadowMode":fals
953
953
 
954
954
  /***/ },
955
955
 
956
- /***/ 3376
956
+ /***/ 2022
957
957
  (module, __unused_webpack_exports, __webpack_require__) {
958
958
 
959
959
  // style-loader: Adds some css to the DOM by adding a <style> tag
960
960
 
961
961
  // load the styles
962
- var content = __webpack_require__(9182);
962
+ var content = __webpack_require__(404);
963
963
  if(content.__esModule) content = content.default;
964
964
  if(typeof content === 'string') content = [[module.id, content, '']];
965
965
  if(content.locals) module.exports = content.locals;
966
966
  // add the styles to the DOM
967
967
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
968
- var update = add("29a0c941", content, true, {"sourceMap":false,"shadowMode":false});
968
+ var update = add("362e958c", content, true, {"sourceMap":false,"shadowMode":false});
969
969
 
970
970
  /***/ },
971
971
 
@@ -11805,8 +11805,8 @@ var dialog_component = normalizeComponent(
11805
11805
  )
11806
11806
 
11807
11807
  /* harmony default export */ const dialog = (dialog_component.exports);
11808
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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=13f9f2c9&scoped=true
11809
- var BnDropvue_type_template_id_13f9f2c9_scoped_true_render = function render() {
11808
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
11809
+ var BnDropvue_type_template_id_830beb80_scoped_true_render = function render() {
11810
11810
  var _vm = this,
11811
11811
  _c = _vm._self._c;
11812
11812
  return _c('el-popover', {
@@ -11824,41 +11824,78 @@ var BnDropvue_type_template_id_13f9f2c9_scoped_true_render = function render() {
11824
11824
  scopedSlots: _vm._u([{
11825
11825
  key: "reference",
11826
11826
  fn: function fn() {
11827
- return [_vm._t("default", function () {
11828
- return [_c('div', {
11829
- staticClass: "bnDrop-select",
11830
- "class": {
11831
- 'simple': !_vm.border,
11832
- 'disabled': _vm.disabled
11833
- }
11834
- }, [_vm.multiple && _vm.modelValue.length == 0 || !_vm.multiple && (!_vm.labelInValue && _vm.modelValue === '' || _vm.labelInValue && !_vm.modelValue[_vm.optionProps.value]) ? _c('span', {
11835
- staticClass: "bnDrop-placeholder"
11836
- }, [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]) : _c('span', [!_vm.multiple ? _c('span', {
11837
- attrs: {
11838
- "title": _vm.singleTitle
11839
- }
11840
- }, [_vm._v(_vm._s(_vm.singleTitle))]) : _c('span', {
11827
+ return [_vm.$slots["default"] ? _vm._t("default") : _c('div', {
11828
+ staticClass: "bnDrop-select",
11829
+ "class": {
11830
+ 'simple': !_vm.border,
11831
+ 'disabled': _vm.disabled,
11832
+ 'is-multiple-tags': _vm.multiple && _vm.collapseTags && _vm.val.length > 0
11833
+ }
11834
+ }, [_vm.multiple && _vm.val.length == 0 || !_vm.multiple && (!_vm.labelInValue && _vm.val === '' || _vm.labelInValue && !_vm.val[_vm.optionProps.value]) ? _c('span', {
11835
+ staticClass: "bnDrop-placeholder"
11836
+ }, [_vm._v(" " + _vm._s(_vm.placeholder) + " ")]) : [!_vm.multiple ? _c('span', {
11837
+ attrs: {
11838
+ "title": _vm.singleTitle
11839
+ }
11840
+ }, [_vm._v(_vm._s(_vm.singleTitle))]) : _vm.collapseTags ? _c('div', {
11841
+ staticClass: "bnDrop-tags"
11842
+ }, [_vm._l(_vm.visibleTags, function (tag) {
11843
+ return _c('span', {
11844
+ key: tag.index,
11845
+ staticClass: "bnDrop-tag"
11846
+ }, [_c('span', {
11847
+ staticClass: "bnDrop-tag-text",
11841
11848
  attrs: {
11842
- "title": _vm.multipleTitle
11849
+ "title": tag.label
11843
11850
  }
11844
- }, [_vm._v(" " + _vm._s(_vm.multipleTitle) + " ")]), _vm.clearable ? _c('span', {
11845
- staticClass: "bnUIcon bnUIcon-clear bnDrop-select-clear",
11851
+ }, [_vm._v(_vm._s(tag.label))]), !_vm.disabled ? _c('span', {
11852
+ staticClass: "bnDrop-tag-close bnUIcon bnUIcon-close",
11846
11853
  on: {
11847
11854
  "click": function click($event) {
11848
11855
  $event.stopPropagation();
11849
- return _vm.clear.apply(null, arguments);
11856
+ return _vm.removeTag(tag.index);
11850
11857
  }
11851
11858
  }
11852
- }) : _vm._e()]), _c('span', {
11853
- directives: [{
11854
- name: "loading",
11855
- rawName: "v-loading",
11856
- value: _vm.loading,
11857
- expression: "loading"
11858
- }],
11859
- staticClass: "bnUIcon bnUIcon-down bnDrop-select-down"
11860
- })])];
11861
- })];
11859
+ }) : _vm._e()]);
11860
+ }), _vm.collapsedCount > 0 ? _c('el-tooltip', {
11861
+ attrs: {
11862
+ "disabled": !_vm.collapseTagsTooltip,
11863
+ "effect": "dark",
11864
+ "placement": "top"
11865
+ }
11866
+ }, [_c('div', {
11867
+ staticClass: "bnDrop-collapse-tooltip",
11868
+ attrs: {
11869
+ "slot": "content"
11870
+ },
11871
+ slot: "content"
11872
+ }, _vm._l(_vm.collapsedTags, function (tag) {
11873
+ return _c('div', {
11874
+ key: tag.index
11875
+ }, [_vm._v(_vm._s(tag.label))]);
11876
+ }), 0), _c('span', {
11877
+ staticClass: "bnDrop-tag bnDrop-tag--collapse"
11878
+ }, [_vm._v("+ " + _vm._s(_vm.collapsedCount))])]) : _vm._e()], 2) : _c('span', {
11879
+ attrs: {
11880
+ "title": _vm.multipleTitle
11881
+ }
11882
+ }, [_vm._v(_vm._s(_vm.multipleTitle))]), _vm.clearable ? _c('span', {
11883
+ staticClass: "bnUIcon bnUIcon-clear bnDrop-select-clear",
11884
+ on: {
11885
+ "click": function click($event) {
11886
+ $event.stopPropagation();
11887
+ return _vm.clear.apply(null, arguments);
11888
+ }
11889
+ }
11890
+ }) : _vm._e()], _c('span', {
11891
+ directives: [{
11892
+ name: "loading",
11893
+ rawName: "v-loading",
11894
+ value: _vm.loading,
11895
+ expression: "loading"
11896
+ }],
11897
+ staticClass: "bnUIcon bnUIcon-down bnDrop-select-down"
11898
+ })], 2)];
11862
11899
  },
11863
11900
  proxy: true
11864
11901
  }], null, true),
@@ -11957,7 +11994,7 @@ var BnDropvue_type_template_id_13f9f2c9_scoped_true_render = function render() {
11957
11994
  staticClass: "w-margin-left4"
11958
11995
  }, [_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)]);
11959
11996
  };
11960
- var BnDropvue_type_template_id_13f9f2c9_scoped_true_staticRenderFns = [];
11997
+ var BnDropvue_type_template_id_830beb80_scoped_true_staticRenderFns = [];
11961
11998
 
11962
11999
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.every.js
11963
12000
  var es_array_every = __webpack_require__(8431);
@@ -12145,6 +12182,10 @@ function _toConsumableArray(r) {
12145
12182
 
12146
12183
  /* harmony default export */ const BnDropvue_type_script_lang_js = ({
12147
12184
  name: "BnDrop",
12185
+ model: {
12186
+ prop: 'modelValue',
12187
+ event: 'update:modelValue'
12188
+ },
12148
12189
  props: {
12149
12190
  //最终选中的value
12150
12191
  modelValue: {
@@ -12174,10 +12215,6 @@ function _toConsumableArray(r) {
12174
12215
  };
12175
12216
  }
12176
12217
  },
12177
- // 数据结构
12178
- valueProps: {
12179
- type: Array
12180
- },
12181
12218
  // 位置
12182
12219
  placement: {
12183
12220
  type: String,
@@ -12229,6 +12266,18 @@ function _toConsumableArray(r) {
12229
12266
  },
12230
12267
  // 是否多选
12231
12268
  multiple: Boolean,
12269
+ // 多选 tag 是否折叠超出部分(对齐 Element UI collapse-tags)
12270
+ collapseTags: Boolean,
12271
+ // 折叠 tag 的 +N 是否启用 tooltip 展示全部
12272
+ collapseTagsTooltip: {
12273
+ type: Boolean,
12274
+ "default": true
12275
+ },
12276
+ // collapseTags 为 true 时,收起时默认展示几个 tag
12277
+ maxCollapseTags: {
12278
+ type: Number,
12279
+ "default": 1
12280
+ },
12232
12281
  // 单选模式 是否允许取消选中
12233
12282
  canUncheck: {
12234
12283
  type: Boolean,
@@ -12254,6 +12303,10 @@ function _toConsumableArray(r) {
12254
12303
  type: Boolean,
12255
12304
  "default": true
12256
12305
  },
12306
+ // 数据结构,当labelInValue=true时,返回的对象中都需要那些字段。不传就返回全部
12307
+ valueProps: {
12308
+ type: Array
12309
+ },
12257
12310
  // 不绑定v-model,仅在点击的时候回传点击事件
12258
12311
  noValue: {
12259
12312
  type: Boolean,
@@ -12321,8 +12374,8 @@ function _toConsumableArray(r) {
12321
12374
  }
12322
12375
  },
12323
12376
  methods: {
12324
- /**
12325
- * 初始化远程数据
12377
+ /**
12378
+ * 初始化远程数据
12326
12379
  * */
12327
12380
  initRemote: function initRemote() {
12328
12381
  if (this.pathUrl) {
@@ -12331,8 +12384,8 @@ function _toConsumableArray(r) {
12331
12384
  this.loadOptions();
12332
12385
  }
12333
12386
  },
12334
- /**
12335
- * 下拉框打开关闭
12387
+ /**
12388
+ * 下拉框打开关闭
12336
12389
  * */
12337
12390
  open: function open() {
12338
12391
  // 打开弹框时
@@ -12344,8 +12397,8 @@ function _toConsumableArray(r) {
12344
12397
  this.initRemote();
12345
12398
  }
12346
12399
  },
12347
- /**
12348
- * 清空value
12400
+ /**
12401
+ * 清空value
12349
12402
  * */
12350
12403
  clear: function clear() {
12351
12404
  if (this.multiple) {
@@ -12354,8 +12407,8 @@ function _toConsumableArray(r) {
12354
12407
  this.val = this.labelInValue ? {} : '';
12355
12408
  }
12356
12409
  },
12357
- /**
12358
- * 滚动加载
12410
+ /**
12411
+ * 滚动加载
12359
12412
  * */
12360
12413
  scrollMore: (0,external_lodash_namespaceObject.debounce)(function () {
12361
12414
  if (this.optionList.length < this.total && !this.loading) {
@@ -12372,9 +12425,9 @@ function _toConsumableArray(r) {
12372
12425
  }
12373
12426
  }
12374
12427
  }, 400),
12375
- /**
12376
- * 快速搜索选项
12377
- * @param {String} val 搜索的值
12428
+ /**
12429
+ * 快速搜索选项
12430
+ * @param {String} val 搜索的值
12378
12431
  */
12379
12432
  filterMethod: (0,external_lodash_namespaceObject.debounce)(function (val) {
12380
12433
  this.queryValue = val;
@@ -12384,8 +12437,8 @@ function _toConsumableArray(r) {
12384
12437
  this.loadOptions();
12385
12438
  }
12386
12439
  }, 400),
12387
- /**
12388
- * 多选时判断全部选中
12440
+ /**
12441
+ * 多选时判断全部选中
12389
12442
  * */
12390
12443
  isCheckedAll: function isCheckedAll() {
12391
12444
  var _this = this;
@@ -12418,8 +12471,8 @@ function _toConsumableArray(r) {
12418
12471
  return valSet.has(item);
12419
12472
  });
12420
12473
  },
12421
- /**
12422
- * 全选/取消全选
12474
+ /**
12475
+ * 全选/取消全选
12423
12476
  * */
12424
12477
  checkAll: function checkAll() {
12425
12478
  var _this2 = this;
@@ -12447,9 +12500,9 @@ function _toConsumableArray(r) {
12447
12500
  }
12448
12501
  this.$emit('change', value, isAllChecked);
12449
12502
  },
12450
- /**
12451
- * 多选判断是否选中 选中返回true,未选中返回false
12452
- * @param {Object} item 选项的对象数据
12503
+ /**
12504
+ * 多选判断是否选中 选中返回true,未选中返回false
12505
+ * @param {Object} item 选项的对象数据
12453
12506
  * */
12454
12507
  isChecked: function isChecked(_ref) {
12455
12508
  var _this3 = this;
@@ -12464,9 +12517,9 @@ function _toConsumableArray(r) {
12464
12517
  }
12465
12518
  return check;
12466
12519
  },
12467
- /**
12468
- * 单选判断是否选中 选中返回true,未选中返回false
12469
- * @param {Object} item 选项的对象数据
12520
+ /**
12521
+ * 单选判断是否选中 选中返回true,未选中返回false
12522
+ * @param {Object} item 选项的对象数据
12470
12523
  * */
12471
12524
  isChoose: function isChoose(item) {
12472
12525
  var check = false;
@@ -12478,9 +12531,9 @@ function _toConsumableArray(r) {
12478
12531
  }
12479
12532
  return check;
12480
12533
  },
12481
- /**
12482
- * 点击下拉菜单中的某一项,选中或取消选中
12483
- * @param {Object} item 选项的对象数据
12534
+ /**
12535
+ * 点击下拉菜单中的某一项,选中或取消选中
12536
+ * @param {Object} item 选项的对象数据
12484
12537
  * */
12485
12538
  chooseItem: function chooseItem(item) {
12486
12539
  var value = this.val;
@@ -12543,8 +12596,8 @@ function _toConsumableArray(r) {
12543
12596
  }
12544
12597
  this.$emit('change', value);
12545
12598
  },
12546
- /**
12547
- * 远程加载options
12599
+ /**
12600
+ * 远程加载options
12548
12601
  * */
12549
12602
  loadOptions: function loadOptions(post) {
12550
12603
  var _this4 = this;
@@ -12587,15 +12640,15 @@ function _toConsumableArray(r) {
12587
12640
  }
12588
12641
  });
12589
12642
  },
12590
- /**
12591
- * 前端手动分页
12643
+ /**
12644
+ * 前端手动分页
12592
12645
  * */
12593
12646
  catchPage: function catchPage(page) {
12594
12647
  this.pageData.pageNum = page || this.pageData.pageNum;
12595
12648
  return this.options.slice((this.pageData.pageNum - 1) * this.pageData.pageSize, this.pageData.pageNum * this.pageData.pageSize);
12596
12649
  },
12597
- /**
12598
- * 如果value是对象,然会value的时候把对象组装好再返回。
12650
+ /**
12651
+ * 如果value是对象,然会value的时候把对象组装好再返回。
12599
12652
  * */
12600
12653
  getValObj: function getValObj(val) {
12601
12654
  if (this.valueProps) {
@@ -12608,10 +12661,10 @@ function _toConsumableArray(r) {
12608
12661
  return val;
12609
12662
  }
12610
12663
  },
12611
- /**
12612
- * 从一个数组中通过id找到名字,并返回给调用者
12613
- * @param {Array} list 数组
12614
- * @param {String} id 需要匹配的id
12664
+ /**
12665
+ * 从一个数组中通过id找到名字,并返回给调用者
12666
+ * @param {Array} list 数组
12667
+ * @param {String} id 需要匹配的id
12615
12668
  * */
12616
12669
  foundTitle: function foundTitle(list, id) {
12617
12670
  var title = '';
@@ -12623,11 +12676,11 @@ function _toConsumableArray(r) {
12623
12676
  }
12624
12677
  return title;
12625
12678
  },
12626
- /**
12627
- * 从一个数组中通过id和ids数组的匹配找到标题,并返回给调用者
12628
- * @param {Array} list 数组
12629
- * @param {String} ids 需要匹配的id数组[1,2,3]
12630
- * @return {Array} values 返回所有匹配项组成的数组
12679
+ /**
12680
+ * 从一个数组中通过id和ids数组的匹配找到标题,并返回给调用者
12681
+ * @param {Array} list 数组
12682
+ * @param {String} ids 需要匹配的id数组[1,2,3]
12683
+ * @return {Array} values 返回所有匹配项组成的数组
12631
12684
  * */
12632
12685
  foundValue: function foundValue(list, ids) {
12633
12686
  var value = [];
@@ -12638,11 +12691,19 @@ function _toConsumableArray(r) {
12638
12691
  }
12639
12692
  return value;
12640
12693
  },
12641
- /**
12642
- * 手动关闭
12694
+ /**
12695
+ * 手动关闭
12643
12696
  * */
12644
12697
  close: function close() {
12645
12698
  this.popoverVisible = false;
12699
+ },
12700
+ /** 删除多选 tag */removeTag: function removeTag(index) {
12701
+ if (this.disabled || !this.multiple || !Array.isArray(this.val)) {
12702
+ return;
12703
+ }
12704
+ var next = _toConsumableArray(this.val);
12705
+ next.splice(index, 1);
12706
+ this.val = next;
12646
12707
  }
12647
12708
  },
12648
12709
  computed: {
@@ -12716,39 +12777,68 @@ function _toConsumableArray(r) {
12716
12777
  singleTitle: function singleTitle() {
12717
12778
  var title = '';
12718
12779
  if (this.labelInValue) {
12719
- title = this.modelValue[this.optionProps.label];
12780
+ title = this.val[this.optionProps.label];
12720
12781
  } else {
12721
- title = this.foundTitle(this.options, this.modelValue) || this.modelValue;
12782
+ title = this.foundTitle(this.options, this.val) || this.val;
12722
12783
  }
12723
12784
  return title;
12724
12785
  },
12725
- // 多选时的value值
12726
- multipleTitle: function multipleTitle() {
12786
+ // 多选时的 tag 列表
12787
+ multipleTags: function multipleTags() {
12727
12788
  var _this7 = this;
12728
- var values = [];
12789
+ var value = this.val;
12790
+ if (!Array.isArray(value) || !value.length) {
12791
+ return [];
12792
+ }
12729
12793
  if (this.labelInValue) {
12730
- values = this.modelValue.map(function (v) {
12731
- return v[_this7.optionProps.label];
12794
+ return value.map(function (v, index) {
12795
+ return {
12796
+ index: index,
12797
+ label: v[_this7.optionProps.label] || ''
12798
+ };
12732
12799
  });
12733
- } else {
12734
- var data = this.foundValue(this.options, this.modelValue);
12735
- if (data.length) {
12736
- values = [].concat(_toConsumableArray(values), _toConsumableArray(data));
12737
- }
12738
12800
  }
12739
- return values.join(',');
12801
+ return value.map(function (id, index) {
12802
+ return {
12803
+ index: index,
12804
+ label: _this7.foundTitle(_this7.options, id) || id
12805
+ };
12806
+ });
12807
+ },
12808
+ // 多选时的 value 展示文本
12809
+ multipleTitle: function multipleTitle() {
12810
+ return this.multipleTags.map(function (tag) {
12811
+ return tag.label;
12812
+ }).join(',');
12813
+ },
12814
+ // 多选 collapseTags 模式下可见 tag
12815
+ visibleTags: function visibleTags() {
12816
+ if (!this.collapseTags || this.multipleTags.length <= this.maxCollapseTags) {
12817
+ return this.multipleTags;
12818
+ }
12819
+ return this.multipleTags.slice(0, this.maxCollapseTags);
12820
+ },
12821
+ // 多选 collapseTags 模式下被折叠的 tag
12822
+ collapsedTags: function collapsedTags() {
12823
+ if (!this.collapseTags || this.multipleTags.length <= this.maxCollapseTags) {
12824
+ return [];
12825
+ }
12826
+ return this.multipleTags.slice(this.maxCollapseTags);
12827
+ },
12828
+ collapsedCount: function collapsedCount() {
12829
+ return this.collapsedTags.length;
12740
12830
  }
12741
12831
  }
12742
12832
  });
12743
12833
  ;// ./packages/BnDrop/BnDrop.vue?vue&type=script&lang=js
12744
12834
  /* harmony default export */ const BnDrop_BnDropvue_type_script_lang_js = (BnDropvue_type_script_lang_js);
12745
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnDrop/BnDrop.vue?vue&type=style&index=0&id=13f9f2c9&prod&lang=css
12746
- var BnDropvue_type_style_index_0_id_13f9f2c9_prod_lang_css = __webpack_require__(601);
12747
- ;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=0&id=13f9f2c9&prod&lang=css
12835
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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
12836
+ var BnDropvue_type_style_index_0_id_830beb80_prod_lang_css = __webpack_require__(546);
12837
+ ;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=0&id=830beb80&prod&lang=css
12748
12838
 
12749
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/BnDrop/BnDrop.vue?vue&type=style&index=1&id=13f9f2c9&prod&scoped=true&lang=scss
12750
- var BnDropvue_type_style_index_1_id_13f9f2c9_prod_scoped_true_lang_scss = __webpack_require__(3376);
12751
- ;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=1&id=13f9f2c9&prod&scoped=true&lang=scss
12839
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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
12840
+ var BnDropvue_type_style_index_1_id_830beb80_prod_scoped_true_lang_scss = __webpack_require__(2022);
12841
+ ;// ./packages/BnDrop/BnDrop.vue?vue&type=style&index=1&id=830beb80&prod&scoped=true&lang=scss
12752
12842
 
12753
12843
  ;// ./packages/BnDrop/BnDrop.vue
12754
12844
 
@@ -12762,11 +12852,11 @@ var BnDropvue_type_style_index_1_id_13f9f2c9_prod_scoped_true_lang_scss = __webp
12762
12852
 
12763
12853
  var BnDrop_component = normalizeComponent(
12764
12854
  BnDrop_BnDropvue_type_script_lang_js,
12765
- BnDropvue_type_template_id_13f9f2c9_scoped_true_render,
12766
- BnDropvue_type_template_id_13f9f2c9_scoped_true_staticRenderFns,
12855
+ BnDropvue_type_template_id_830beb80_scoped_true_render,
12856
+ BnDropvue_type_template_id_830beb80_scoped_true_staticRenderFns,
12767
12857
  false,
12768
12858
  null,
12769
- "13f9f2c9",
12859
+ "830beb80",
12770
12860
  null
12771
12861
 
12772
12862
  )