backend-management-ui 1.7.4 → 1.7.5
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/index.common.js +28 -19
- package/package.json +1 -1
package/index.common.js
CHANGED
|
@@ -184,6 +184,9 @@ var script$6 = {
|
|
|
184
184
|
clearable: true
|
|
185
185
|
}, item.attrs || {});
|
|
186
186
|
if (componentName === "el-virtual-select") {
|
|
187
|
+
console.log(_objectSpread$1(_objectSpread$1({}, baseAttrs), {}, {
|
|
188
|
+
options: item.options || []
|
|
189
|
+
}), '虚拟滚动');
|
|
187
190
|
return _objectSpread$1(_objectSpread$1({}, baseAttrs), {}, {
|
|
188
191
|
options: item.options || []
|
|
189
192
|
});
|
|
@@ -1353,6 +1356,7 @@ var __vue_component__$1 = /*#__PURE__*/normalizeComponent({
|
|
|
1353
1356
|
staticRenderFns: __vue_staticRenderFns__$1
|
|
1354
1357
|
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, createInjector, undefined, undefined);
|
|
1355
1358
|
|
|
1359
|
+
var _this = undefined;
|
|
1356
1360
|
var script = {
|
|
1357
1361
|
name: 'UiVirtualSelect',
|
|
1358
1362
|
components: {
|
|
@@ -1375,11 +1379,15 @@ var script = {
|
|
|
1375
1379
|
}
|
|
1376
1380
|
},
|
|
1377
1381
|
value: {
|
|
1378
|
-
type: [String, Array],
|
|
1382
|
+
type: [String, Number, Null, Undefined, Array],
|
|
1379
1383
|
"default": function _default() {
|
|
1380
1384
|
return [];
|
|
1381
1385
|
}
|
|
1382
|
-
}
|
|
1386
|
+
},
|
|
1387
|
+
// 接收父组件v-model传递的值
|
|
1388
|
+
"default": function _default() {
|
|
1389
|
+
return _this.$attrs.multiple ? [] : null;
|
|
1390
|
+
}
|
|
1383
1391
|
},
|
|
1384
1392
|
data: function data() {
|
|
1385
1393
|
return {
|
|
@@ -1396,14 +1404,15 @@ var script = {
|
|
|
1396
1404
|
immediate: true,
|
|
1397
1405
|
handler: function handler(newVal) {
|
|
1398
1406
|
this.innerValue = _Array$isArray__default["default"](newVal) ? _toConsumableArray__default["default"](newVal) : newVal;
|
|
1399
|
-
console.log('this.innerValue', this.innerValue);
|
|
1407
|
+
console.log('this.innerValue', this.innerValue, this);
|
|
1400
1408
|
}
|
|
1401
1409
|
},
|
|
1402
1410
|
options: {
|
|
1403
1411
|
deep: true,
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1412
|
+
immediate: true,
|
|
1413
|
+
handler: function handler(val) {
|
|
1414
|
+
this.filteredData = _toConsumableArray__default["default"](val);
|
|
1415
|
+
console.log('this.filteredData: ', this.filteredData, val);
|
|
1407
1416
|
this.calcMaxItemWidth();
|
|
1408
1417
|
}
|
|
1409
1418
|
}
|
|
@@ -1414,7 +1423,7 @@ var script = {
|
|
|
1414
1423
|
methods: {
|
|
1415
1424
|
calcMaxItemWidth: function calcMaxItemWidth() {
|
|
1416
1425
|
var _context,
|
|
1417
|
-
|
|
1426
|
+
_this2 = this;
|
|
1418
1427
|
if (!this.options.length) return;
|
|
1419
1428
|
var temp = document.createElement('div');
|
|
1420
1429
|
temp.style.cssText = "\n position: absolute;\n top: -9999px;\n left: -9999px;\n white-space: nowrap;\n padding: 0 20px;\n font-size: 14px;\n box-sizing: border-box;\n ";
|
|
@@ -1422,8 +1431,8 @@ var script = {
|
|
|
1422
1431
|
var maxWidth = 0;
|
|
1423
1432
|
_forEachInstanceProperty__default["default"](_context = this.options).call(_context, function (item) {
|
|
1424
1433
|
var _context2;
|
|
1425
|
-
var label = item[
|
|
1426
|
-
var rightLabel = item[
|
|
1434
|
+
var label = item[_this2.fields.label] || '';
|
|
1435
|
+
var rightLabel = item[_this2.fields.rightLabel] || '';
|
|
1427
1436
|
temp.innerHTML = _concatInstanceProperty__default["default"](_context2 = "<span>".concat(label, "</span><span style=\"margin-left:10px;color:#939393\">")).call(_context2, rightLabel, "</span>");
|
|
1428
1437
|
maxWidth = Math.max(maxWidth, temp.offsetWidth);
|
|
1429
1438
|
});
|
|
@@ -1441,23 +1450,23 @@ var script = {
|
|
|
1441
1450
|
},
|
|
1442
1451
|
filterMethod: function filterMethod(query) {
|
|
1443
1452
|
var _context3,
|
|
1444
|
-
|
|
1453
|
+
_this3 = this;
|
|
1445
1454
|
this.filteredData = query ? _filterInstanceProperty__default["default"](_context3 = this.options).call(_context3, function (item) {
|
|
1446
1455
|
var _context4, _context5;
|
|
1447
|
-
var labelMatch = _includesInstanceProperty__default["default"](_context4 = item[
|
|
1448
|
-
var rightLabelMatch =
|
|
1456
|
+
var labelMatch = _includesInstanceProperty__default["default"](_context4 = item[_this3.fields.label].toLowerCase()).call(_context4, query.toLowerCase());
|
|
1457
|
+
var rightLabelMatch = _this3.fields.rightLabel ? _includesInstanceProperty__default["default"](_context5 = item[_this3.fields.rightLabel].toLowerCase()).call(_context5, query.toLowerCase()) : false;
|
|
1449
1458
|
return labelMatch || rightLabelMatch;
|
|
1450
1459
|
}) : _toConsumableArray__default["default"](this.options);
|
|
1451
1460
|
this.$nextTick(function () {
|
|
1452
|
-
var
|
|
1453
|
-
return (
|
|
1461
|
+
var _this3$$refs$virtualL;
|
|
1462
|
+
return (_this3$$refs$virtualL = _this3.$refs.virtualList) === null || _this3$$refs$virtualL === void 0 ? void 0 : _this3$$refs$virtualL.scrollToIndex(0);
|
|
1454
1463
|
});
|
|
1455
1464
|
},
|
|
1456
1465
|
handleVisibleChange: function handleVisibleChange(visible) {
|
|
1457
|
-
var
|
|
1466
|
+
var _this4 = this;
|
|
1458
1467
|
if (visible) {
|
|
1459
1468
|
this.$nextTick(function () {
|
|
1460
|
-
|
|
1469
|
+
_this4.setPopperWidth();
|
|
1461
1470
|
});
|
|
1462
1471
|
} else {
|
|
1463
1472
|
var _this$$refs$virtualLi;
|
|
@@ -1545,14 +1554,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
1545
1554
|
/* style */
|
|
1546
1555
|
var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
|
|
1547
1556
|
if (!inject) return;
|
|
1548
|
-
inject("data-v-
|
|
1549
|
-
source: ".select-wrap[data-v-
|
|
1557
|
+
inject("data-v-54763b23_0", {
|
|
1558
|
+
source: ".select-wrap[data-v-54763b23]{position:relative}.select-wrap[data-v-54763b23] :deep(.el-select){width:100%}.virtual-select-popper[data-v-54763b23]{padding:0!important;border:1px solid #e4e7ed!important;border-radius:4px!important}.virtual-list[data-v-54763b23]{max-height:245px;overflow-y:auto;overflow-x:hidden!important;scrollbar-width:thin;scrollbar-color:#e4e7ed #f5f7fa}.virtual-list[data-v-54763b23]::-webkit-scrollbar{width:6px!important;display:block!important}.virtual-list[data-v-54763b23]::-webkit-scrollbar-thumb{background-color:#e4e7ed;border-radius:3px}.virtual-list[data-v-54763b23]::-webkit-scrollbar-track{background-color:#f5f7fa}[data-v-54763b23]:deep(.el-scrollbar__bar.is-vertical){display:none!important}",
|
|
1550
1559
|
map: undefined,
|
|
1551
1560
|
media: undefined
|
|
1552
1561
|
});
|
|
1553
1562
|
};
|
|
1554
1563
|
/* scoped */
|
|
1555
|
-
var __vue_scope_id__ = "data-v-
|
|
1564
|
+
var __vue_scope_id__ = "data-v-54763b23";
|
|
1556
1565
|
/* module identifier */
|
|
1557
1566
|
var __vue_module_identifier__ = undefined;
|
|
1558
1567
|
/* functional template */
|