bk-magic-vue 2.4.12 → 2.4.13-beta.3
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/bk-magic-vue.css +5 -0
- package/dist/bk-magic-vue.js +24 -20
- package/dist/bk-magic-vue.min.css +1 -1
- package/dist/bk-magic-vue.min.css.gz +0 -0
- package/dist/bk-magic-vue.min.css.map +1 -1
- package/dist/bk-magic-vue.min.js +1 -1
- package/dist/bk-magic-vue.min.js.gz +0 -0
- package/dist/bk-magic-vue.min.js.map +1 -1
- package/lib/card.js +3 -10
- package/lib/input.js +3 -10
- package/lib/option-group.js +3 -0
- package/lib/pagination.js +3 -10
- package/lib/slider.js +3 -10
- package/lib/table.js +3 -10
- package/lib/transfer.js +21 -20
- package/lib/ui/bk-magic-vue.css +5 -0
- package/lib/ui/bk-magic-vue.min.css +1 -1
- package/lib/ui/bk-magic-vue.min.css.gz +0 -0
- package/lib/ui/bk-magic-vue.min.css.map +1 -1
- package/lib/ui/transfer.css +6 -0
- package/lib/ui/transfer.min.css +1 -1
- package/lib/ui/transfer.min.css.map +1 -1
- package/package.json +1 -2
package/dist/bk-magic-vue.css
CHANGED
|
@@ -11895,6 +11895,11 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
|
|
|
11895
11895
|
background-color:#eef6fe;
|
|
11896
11896
|
color:#3a84ff;
|
|
11897
11897
|
}
|
|
11898
|
+
.bk-transfer .source-list .content li.is-disabled, .bk-transfer .target-list .content li.is-disabled{
|
|
11899
|
+
cursor:not-allowed;
|
|
11900
|
+
color:#c4c6cc;
|
|
11901
|
+
background-color:#fff;
|
|
11902
|
+
}
|
|
11898
11903
|
.bk-transfer .source-list .content li .content-text, .bk-transfer .target-list .content li .content-text{
|
|
11899
11904
|
-webkit-box-flex:1;
|
|
11900
11905
|
-ms-flex:1;
|
package/dist/bk-magic-vue.js
CHANGED
|
@@ -29619,10 +29619,7 @@
|
|
|
29619
29619
|
type: String,
|
|
29620
29620
|
default: 'normal'
|
|
29621
29621
|
},
|
|
29622
|
-
precision:
|
|
29623
|
-
type: Number,
|
|
29624
|
-
default: 0
|
|
29625
|
-
},
|
|
29622
|
+
precision: Number,
|
|
29626
29623
|
passwordIcon: {
|
|
29627
29624
|
type: Array,
|
|
29628
29625
|
default: function _default() {
|
|
@@ -29852,7 +29849,8 @@
|
|
|
29852
29849
|
}
|
|
29853
29850
|
return outputAttr;
|
|
29854
29851
|
},
|
|
29855
|
-
handleToFixed: function handleToFixed(defaultNumber,
|
|
29852
|
+
handleToFixed: function handleToFixed(defaultNumber, length) {
|
|
29853
|
+
var len = _parseInt$2(length, 10);
|
|
29856
29854
|
var number = Number(defaultNumber);
|
|
29857
29855
|
if (isNaN(number) || number >= Math.pow(10, 21)) {
|
|
29858
29856
|
return number.toString();
|
|
@@ -29953,11 +29951,6 @@
|
|
|
29953
29951
|
return false;
|
|
29954
29952
|
}
|
|
29955
29953
|
if (keyCode === 190) {
|
|
29956
|
-
if (this.precision === 0) {
|
|
29957
|
-
event.stopPropagation();
|
|
29958
|
-
event.preventDefault();
|
|
29959
|
-
return false;
|
|
29960
|
-
}
|
|
29961
29954
|
if (String(value).trim()) {
|
|
29962
29955
|
if (value.indexOf('.') >= 0) {
|
|
29963
29956
|
event.stopPropagation();
|
|
@@ -31385,6 +31378,9 @@
|
|
|
31385
31378
|
return !this.isSelectAllItems && !this.isEmpty;
|
|
31386
31379
|
},
|
|
31387
31380
|
isSelectAllItems: function isSelectAllItems() {
|
|
31381
|
+
if (this.options.length < 1) {
|
|
31382
|
+
return false;
|
|
31383
|
+
}
|
|
31388
31384
|
return Array.prototype.every.call(this.options, function (option) {
|
|
31389
31385
|
return option.isSelected;
|
|
31390
31386
|
});
|
|
@@ -45527,7 +45523,7 @@
|
|
|
45527
45523
|
sortDataList: function sortDataList(list, key, sortList) {
|
|
45528
45524
|
var arr = sortList;
|
|
45529
45525
|
return list.sort(function (a, b) {
|
|
45530
|
-
return arr.indexOf(a[key]) - arr.indexOf(b[key])
|
|
45526
|
+
return arr.indexOf(a[key]) - arr.indexOf(b[key]);
|
|
45531
45527
|
});
|
|
45532
45528
|
},
|
|
45533
45529
|
removeFromDataList: function removeFromDataList(removeItem) {
|
|
@@ -45542,6 +45538,7 @@
|
|
|
45542
45538
|
var displayDataList = this.displayDataList;
|
|
45543
45539
|
var hasSelectedList = this.hasSelectedList;
|
|
45544
45540
|
displayDataList.forEach(function (transferItem) {
|
|
45541
|
+
if (transferItem.disabled) return;
|
|
45545
45542
|
hasSelectedList.push(transferItem);
|
|
45546
45543
|
_this6.removeFromDataList(transferItem);
|
|
45547
45544
|
});
|
|
@@ -45559,10 +45556,13 @@
|
|
|
45559
45556
|
},
|
|
45560
45557
|
allToLeft: function allToLeft() {
|
|
45561
45558
|
this.rightHoverIndex = -1;
|
|
45562
|
-
var hasSelectedList = this.hasSelectedList
|
|
45559
|
+
var hasSelectedList = this.hasSelectedList.filter(function (i) {
|
|
45560
|
+
return !i.disabled;
|
|
45561
|
+
});
|
|
45563
45562
|
var dataList = this.dataList;
|
|
45564
45563
|
while (hasSelectedList.length) {
|
|
45565
45564
|
var transferItem = hasSelectedList.shift();
|
|
45565
|
+
this.hasSelectedList.splice(this.hasSelectedList.indexOf(transferItem), 1);
|
|
45566
45566
|
dataList.push(transferItem);
|
|
45567
45567
|
if (this.sortList.length === this.sourceList.length) {
|
|
45568
45568
|
this.dataList = _toConsumableArray(this.sortDataList(dataList, this.sortCode, this.sortList));
|
|
@@ -45577,7 +45577,8 @@
|
|
|
45577
45577
|
this.$emit('change', this.dataList, this.hasSelectedList, list);
|
|
45578
45578
|
}
|
|
45579
45579
|
},
|
|
45580
|
-
leftClick: function leftClick(index) {
|
|
45580
|
+
leftClick: function leftClick(index, item) {
|
|
45581
|
+
if (item.disabled) return;
|
|
45581
45582
|
this.leftHoverIndex = -1;
|
|
45582
45583
|
var transferItem = this.displayDataList[index];
|
|
45583
45584
|
var hasSelectedList = this.hasSelectedList;
|
|
@@ -45595,7 +45596,8 @@
|
|
|
45595
45596
|
this.$emit('change', this.dataList, this.hasSelectedList, list);
|
|
45596
45597
|
}
|
|
45597
45598
|
},
|
|
45598
|
-
rightClick: function rightClick(index) {
|
|
45599
|
+
rightClick: function rightClick(index, item) {
|
|
45600
|
+
if (item.disabled) return;
|
|
45599
45601
|
this.rightHoverIndex = -1;
|
|
45600
45602
|
var transferItem = this.hasSelectedList.splice(index, 1)[0];
|
|
45601
45603
|
var dataList = this.dataList;
|
|
@@ -45677,12 +45679,13 @@
|
|
|
45677
45679
|
}, _vm._l(_vm.displayDataList, function (item, index) {
|
|
45678
45680
|
return _c('li', {
|
|
45679
45681
|
key: index,
|
|
45682
|
+
class: [item.disabled ? 'is-disabled' : ''],
|
|
45680
45683
|
on: {
|
|
45681
45684
|
"click": function click($event) {
|
|
45682
45685
|
$event.stopPropagation();
|
|
45683
45686
|
$event.preventDefault();
|
|
45684
45687
|
|
|
45685
|
-
_vm.leftClick(index);
|
|
45688
|
+
_vm.leftClick(index, item);
|
|
45686
45689
|
},
|
|
45687
45690
|
"mouseover": function mouseover($event) {
|
|
45688
45691
|
$event.stopPropagation();
|
|
@@ -45708,12 +45711,12 @@
|
|
|
45708
45711
|
attrs: {
|
|
45709
45712
|
"title": item[_vm.displayCode]
|
|
45710
45713
|
}
|
|
45711
|
-
}, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
|
|
45714
|
+
}, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
|
|
45712
45715
|
staticClass: "icon-wrapper",
|
|
45713
45716
|
class: [index === _vm.leftHoverIndex ? 'hover' : '']
|
|
45714
45717
|
}, [_c('i', {
|
|
45715
45718
|
staticClass: "bk-icon icon-arrows-right"
|
|
45716
|
-
})])], null, item)], 2);
|
|
45719
|
+
})]) : _vm._e()], null, item)], 2);
|
|
45717
45720
|
}), 0)] : [_vm.slot['left-empty-content'] ? _c('div', [_vm._t("left-empty-content")], 2) : _c('div', {
|
|
45718
45721
|
staticClass: "empty"
|
|
45719
45722
|
}, [_vm._v("\n " + _vm._s(_vm.emptyContent[0] ? _vm.emptyContent[0] : _vm.t('bk.transfer.emptyContent')) + "\n ")])]], 2), _c('div', {
|
|
@@ -45739,12 +45742,13 @@
|
|
|
45739
45742
|
}, _vm._l(_vm.hasSelectedList, function (item, index) {
|
|
45740
45743
|
return _c('li', {
|
|
45741
45744
|
key: index,
|
|
45745
|
+
class: [item.disabled ? 'is-disabled' : ''],
|
|
45742
45746
|
on: {
|
|
45743
45747
|
"click": function click($event) {
|
|
45744
45748
|
$event.stopPropagation();
|
|
45745
45749
|
$event.preventDefault();
|
|
45746
45750
|
|
|
45747
|
-
_vm.rightClick(index);
|
|
45751
|
+
_vm.rightClick(index, item);
|
|
45748
45752
|
},
|
|
45749
45753
|
"mouseover": function mouseover($event) {
|
|
45750
45754
|
$event.stopPropagation();
|
|
@@ -45770,12 +45774,12 @@
|
|
|
45770
45774
|
attrs: {
|
|
45771
45775
|
"title": item[_vm.displayCode]
|
|
45772
45776
|
}
|
|
45773
|
-
}, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
|
|
45777
|
+
}, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
|
|
45774
45778
|
staticClass: "icon-wrapper",
|
|
45775
45779
|
class: [index === _vm.rightHoverIndex ? 'hover' : '']
|
|
45776
45780
|
}, [_c('i', {
|
|
45777
45781
|
staticClass: "bk-icon icon-close"
|
|
45778
|
-
})])], null, item)], 2);
|
|
45782
|
+
})]) : _vm._e()], null, item)], 2);
|
|
45779
45783
|
}), 0)] : [_vm.slot['right-empty-content'] ? _c('div', [_vm._t("right-empty-content")], 2) : _c('div', {
|
|
45780
45784
|
staticClass: "empty"
|
|
45781
45785
|
}, [_vm._v("\n " + _vm._s(_vm.emptyContent[1] ? _vm.emptyContent[1] : _vm.t('bk.transfer.emptySelected')) + "\n ")])]], 2)]);
|