bk-magic-vue 2.4.3 → 2.4.6

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.
Files changed (44) hide show
  1. package/dist/bk-magic-vue.css +19 -23
  2. package/dist/bk-magic-vue.js +708 -19
  3. package/dist/bk-magic-vue.min.css +1 -1
  4. package/dist/bk-magic-vue.min.css.gz +0 -0
  5. package/dist/bk-magic-vue.min.css.map +1 -1
  6. package/dist/bk-magic-vue.min.js +1 -1
  7. package/dist/bk-magic-vue.min.js.gz +0 -0
  8. package/dist/bk-magic-vue.min.js.map +1 -1
  9. package/lib/affix.js +5 -2
  10. package/lib/big-tree.js +9 -1
  11. package/lib/card.js +2 -0
  12. package/lib/cascade.js +7 -0
  13. package/lib/image-viewer.js +2 -2
  14. package/lib/image.js +2 -2
  15. package/lib/input.js +2 -0
  16. package/lib/loading.js +5 -2
  17. package/lib/pagination.js +10 -3
  18. package/lib/select.js +10 -3
  19. package/lib/slider.js +2 -0
  20. package/lib/table.js +17 -4
  21. package/lib/tag-input.js +5 -2
  22. package/lib/transfer.js +2 -0
  23. package/lib/ui/bk-magic-vue.css +19 -23
  24. package/lib/ui/bk-magic-vue.min.css +1 -1
  25. package/lib/ui/bk-magic-vue.min.css.gz +0 -0
  26. package/lib/ui/bk-magic-vue.min.css.map +1 -1
  27. package/lib/ui/divider.css +0 -17
  28. package/lib/ui/divider.min.css +1 -1
  29. package/lib/ui/divider.min.css.map +1 -1
  30. package/lib/ui/image-viewer.css +14 -8
  31. package/lib/ui/image-viewer.min.css +1 -1
  32. package/lib/ui/image-viewer.min.css.map +1 -1
  33. package/lib/ui/pagination.css +1 -0
  34. package/lib/ui/pagination.min.css +1 -1
  35. package/lib/ui/pagination.min.css.map +1 -1
  36. package/lib/ui/table.css +6 -0
  37. package/lib/ui/table.min.css +1 -1
  38. package/lib/ui/table.min.css.map +1 -1
  39. package/lib/ui/zoom-image.css +1 -0
  40. package/lib/ui/zoom-image.min.css +1 -1
  41. package/lib/ui/zoom-image.min.css.map +1 -1
  42. package/lib/upload.js +1308 -20
  43. package/lib/version-detail.js +5 -2
  44. package/package.json +5 -4
package/lib/affix.js CHANGED
@@ -118,13 +118,16 @@
118
118
  },
119
119
  methods: {
120
120
  setTargetLoop: function setTargetLoop() {
121
+ var rect = this.targetEl.getBoundingClientRect();
121
122
  if (this.offsetType === 'top') {
122
123
  this.styles = {
123
- top: "".concat(this.targetEl.getBoundingClientRect().top + this.offsetTop, "px")
124
+ top: "".concat(rect.top + this.offsetTop, "px"),
125
+ width: "".concat(rect.width, "px")
124
126
  };
125
127
  } else {
126
128
  this.styles = {
127
- bottom: "".concat(window.innerHeight - this.targetEl.getBoundingClientRect().bottom + this.offsetBottom, "px")
129
+ bottom: "".concat(window.innerHeight - rect.bottom + this.offsetBottom, "px"),
130
+ width: "".concat(rect.width, "px")
128
131
  };
129
132
  }
130
133
  },
package/lib/big-tree.js CHANGED
@@ -2029,7 +2029,10 @@
2029
2029
  }) : _vm._e(), _vm.props.node.nodeIcon ? _c('i', {
2030
2030
  class: ['node-icon', _vm.props.node.nodeIcon]
2031
2031
  }) : _vm._e()]), _c('div', {
2032
- staticClass: "node-content"
2032
+ staticClass: "node-content",
2033
+ attrs: {
2034
+ "title": _vm.props.enableTitleTip ? _vm.props.node.name : false
2035
+ }
2033
2036
  }, [_vm._t("default", [_vm._v("\n " + _vm._s(_vm.props.node.name) + "\n ")], {
2034
2037
  node: _vm.props.node,
2035
2038
  data: _vm.props.node.data
@@ -2166,6 +2169,10 @@
2166
2169
  size: {
2167
2170
  type: String,
2168
2171
  default: 'normal'
2172
+ },
2173
+ enableTitleTip: {
2174
+ type: Boolean,
2175
+ default: false
2169
2176
  }
2170
2177
  },
2171
2178
  data: function data() {
@@ -2789,6 +2796,7 @@
2789
2796
  ref: node.id,
2790
2797
  refInFor: true,
2791
2798
  attrs: {
2799
+ "enable-title-tip": _vm.enableTitleTip,
2792
2800
  "node": node
2793
2801
  }
2794
2802
  }, [_vm._t("default", null, {
package/lib/card.js CHANGED
@@ -739,6 +739,7 @@
739
739
  }
740
740
  },
741
741
  handleNumberDelete: function handleNumberDelete(event) {
742
+ this.curValue === '' && (this.curValue = this.max);
742
743
  var curNumberValue = Number(this.curValue);
743
744
  if (curNumberValue - 1 >= this.min) {
744
745
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
@@ -753,6 +754,7 @@
753
754
  }
754
755
  },
755
756
  handleNumberAdd: function handleNumberAdd(event) {
757
+ this.curValue === '' && (this.curValue = this.min);
756
758
  var curNumberValue = Number(this.curValue);
757
759
  if (curNumberValue <= this.max - 1) {
758
760
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
package/lib/cascade.js CHANGED
@@ -5858,6 +5858,9 @@
5858
5858
  },
5859
5859
  watch: {
5860
5860
  showCascade: function showCascade(val) {
5861
+ if (!val) {
5862
+ this.dispatch('bk-form-item', 'form-blur');
5863
+ }
5861
5864
  this.$emit('toggle', val);
5862
5865
  this.filterableStatus = this.searchContent !== '';
5863
5866
  if (val) {
@@ -6096,6 +6099,7 @@
6096
6099
  var selectedList = this.multiple ? this.multipleSelectedList : this.selectedList;
6097
6100
  this.$emit('input', newId);
6098
6101
  this.$emit('change', newId, oldId, JSON.parse(stringify$1(selectedList)));
6102
+ this.dispatch('bk-form-item', 'form-change');
6099
6103
  }
6100
6104
  },
6101
6105
  exposeMultiple: function exposeMultiple(oldId) {
@@ -6291,6 +6295,9 @@
6291
6295
  }
6292
6296
  },
6293
6297
  removeTag: function removeTag(item, index) {
6298
+ if (this.disabled) {
6299
+ return;
6300
+ }
6294
6301
  var oldId = JSON.parse(stringify$1(this.multipleCurrentList));
6295
6302
  this.multipleCurrentList = this.multipleCurrentList.filter(function (itemInfo) {
6296
6303
  return itemInfo.join(',') !== item.id.join(',');
@@ -572,7 +572,7 @@
572
572
  case 'zoomIn':
573
573
  transform.scale = _parseFloat$2((transform.scale + zoomRate).toFixed(3));
574
574
  break;
575
- case 'clocelise':
575
+ case 'clockwise':
576
576
  transform.deg += rotateDeg;
577
577
  break;
578
578
  case 'anticlocelise':
@@ -677,7 +677,7 @@
677
677
  }), _vm.isShowTitle && _vm.urlList.length ? _c('div', {
678
678
  staticClass: "bk-image-viewer-header"
679
679
  }, [_c('div', [_vm._v(_vm._s(_vm.currentName))]), _c('div', {
680
- staticClass: "tc"
680
+ staticClass: "tc "
681
681
  }, [_vm._v(_vm._s(_vm.index + 1) + "/" + _vm._s(_vm.urlList.length))]), _c('div', {
682
682
  staticClass: "quit-box tr"
683
683
  }, [_c('div', {
package/lib/image.js CHANGED
@@ -720,7 +720,7 @@
720
720
  case 'zoomIn':
721
721
  transform.scale = _parseFloat$2((transform.scale + zoomRate).toFixed(3));
722
722
  break;
723
- case 'clocelise':
723
+ case 'clockwise':
724
724
  transform.deg += rotateDeg;
725
725
  break;
726
726
  case 'anticlocelise':
@@ -825,7 +825,7 @@
825
825
  }), _vm.isShowTitle && _vm.urlList.length ? _c('div', {
826
826
  staticClass: "bk-image-viewer-header"
827
827
  }, [_c('div', [_vm._v(_vm._s(_vm.currentName))]), _c('div', {
828
- staticClass: "tc"
828
+ staticClass: "tc "
829
829
  }, [_vm._v(_vm._s(_vm.index + 1) + "/" + _vm._s(_vm.urlList.length))]), _c('div', {
830
830
  staticClass: "quit-box tr"
831
831
  }, [_c('div', {
package/lib/input.js CHANGED
@@ -739,6 +739,7 @@
739
739
  }
740
740
  },
741
741
  handleNumberDelete: function handleNumberDelete(event) {
742
+ this.curValue === '' && (this.curValue = this.max);
742
743
  var curNumberValue = Number(this.curValue);
743
744
  if (curNumberValue - 1 >= this.min) {
744
745
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
@@ -753,6 +754,7 @@
753
754
  }
754
755
  },
755
756
  handleNumberAdd: function handleNumberAdd(event) {
757
+ this.curValue === '' && (this.curValue = this.min);
756
758
  var curNumberValue = Number(this.curValue);
757
759
  if (curNumberValue <= this.max - 1) {
758
760
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
package/lib/loading.js CHANGED
@@ -512,8 +512,11 @@
512
512
  }
513
513
  return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
514
514
  },
515
- renderZIndex: function renderZIndex() {
516
- return this.zIndex;
515
+ renderZIndex: {
516
+ get: function get() {
517
+ return this.zIndex;
518
+ },
519
+ set: function set() {}
517
520
  }
518
521
  },
519
522
  watch: {
package/lib/pagination.js CHANGED
@@ -4359,8 +4359,11 @@
4359
4359
  }
4360
4360
  return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
4361
4361
  },
4362
- renderZIndex: function renderZIndex() {
4363
- return this.zIndex;
4362
+ renderZIndex: {
4363
+ get: function get() {
4364
+ return this.zIndex;
4365
+ },
4366
+ set: function set() {}
4364
4367
  }
4365
4368
  },
4366
4369
  watch: {
@@ -5734,6 +5737,10 @@
5734
5737
  default: ''
5735
5738
  },
5736
5739
  displayTag: Boolean,
5740
+ autoHeight: {
5741
+ type: Boolean,
5742
+ default: true
5743
+ },
5737
5744
  collapseTag: {
5738
5745
  type: Boolean,
5739
5746
  default: true
@@ -6042,7 +6049,7 @@
6042
6049
  },
6043
6050
  handleDropdownShow: function handleDropdownShow() {
6044
6051
  this.defaultWidth = this.$el.offsetWidth;
6045
- this.focus = true;
6052
+ if (this.autoHeight) this.focus = true;
6046
6053
  },
6047
6054
  handleDropdownHide: function handleDropdownHide() {
6048
6055
  this.focus = false;
package/lib/select.js CHANGED
@@ -4359,8 +4359,11 @@
4359
4359
  }
4360
4360
  return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
4361
4361
  },
4362
- renderZIndex: function renderZIndex() {
4363
- return this.zIndex;
4362
+ renderZIndex: {
4363
+ get: function get() {
4364
+ return this.zIndex;
4365
+ },
4366
+ set: function set() {}
4364
4367
  }
4365
4368
  },
4366
4369
  watch: {
@@ -5734,6 +5737,10 @@
5734
5737
  default: ''
5735
5738
  },
5736
5739
  displayTag: Boolean,
5740
+ autoHeight: {
5741
+ type: Boolean,
5742
+ default: true
5743
+ },
5737
5744
  collapseTag: {
5738
5745
  type: Boolean,
5739
5746
  default: true
@@ -6042,7 +6049,7 @@
6042
6049
  },
6043
6050
  handleDropdownShow: function handleDropdownShow() {
6044
6051
  this.defaultWidth = this.$el.offsetWidth;
6045
- this.focus = true;
6052
+ if (this.autoHeight) this.focus = true;
6046
6053
  },
6047
6054
  handleDropdownHide: function handleDropdownHide() {
6048
6055
  this.focus = false;
package/lib/slider.js CHANGED
@@ -931,6 +931,7 @@
931
931
  }
932
932
  },
933
933
  handleNumberDelete: function handleNumberDelete(event) {
934
+ this.curValue === '' && (this.curValue = this.max);
934
935
  var curNumberValue = Number(this.curValue);
935
936
  if (curNumberValue - 1 >= this.min) {
936
937
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
@@ -945,6 +946,7 @@
945
946
  }
946
947
  },
947
948
  handleNumberAdd: function handleNumberAdd(event) {
949
+ this.curValue === '' && (this.curValue = this.min);
948
950
  var curNumberValue = Number(this.curValue);
949
951
  if (curNumberValue <= this.max - 1) {
950
952
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
package/lib/table.js CHANGED
@@ -3827,6 +3827,7 @@
3827
3827
  this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
3828
3828
  var noData = !this.table.data || this.table.data.length === 0;
3829
3829
  this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
3830
+ this.syncRowHeight();
3830
3831
  this.updateScrollY();
3831
3832
  this.notifyObservers('scrollable');
3832
3833
  }
@@ -9569,8 +9570,11 @@
9569
9570
  }
9570
9571
  return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
9571
9572
  },
9572
- renderZIndex: function renderZIndex() {
9573
- return this.zIndex;
9573
+ renderZIndex: {
9574
+ get: function get() {
9575
+ return this.zIndex;
9576
+ },
9577
+ set: function set() {}
9574
9578
  }
9575
9579
  },
9576
9580
  watch: {
@@ -10926,6 +10930,10 @@
10926
10930
  default: ''
10927
10931
  },
10928
10932
  displayTag: Boolean,
10933
+ autoHeight: {
10934
+ type: Boolean,
10935
+ default: true
10936
+ },
10929
10937
  collapseTag: {
10930
10938
  type: Boolean,
10931
10939
  default: true
@@ -11234,7 +11242,7 @@
11234
11242
  },
11235
11243
  handleDropdownShow: function handleDropdownShow() {
11236
11244
  this.defaultWidth = this.$el.offsetWidth;
11237
- this.focus = true;
11245
+ if (this.autoHeight) this.focus = true;
11238
11246
  },
11239
11247
  handleDropdownHide: function handleDropdownHide() {
11240
11248
  this.focus = false;
@@ -12426,6 +12434,10 @@
12426
12434
  type: Boolean,
12427
12435
  default: true
12428
12436
  },
12437
+ rowAutoHeight: {
12438
+ type: Boolean,
12439
+ default: false
12440
+ },
12429
12441
  stripe: Boolean,
12430
12442
  border: Boolean,
12431
12443
  outerBorder: {
@@ -12922,7 +12934,8 @@
12922
12934
  'bk-table-fluid-height': _vm.maxHeight,
12923
12935
  'bk-table-scrollable-x': _vm.layout.scrollX,
12924
12936
  'bk-table-scrollable-y': _vm.layout.scrollY,
12925
- 'bk-table-enable-row-transition': (_vm.store.states.data || []).length !== 0 && (_vm.store.states.data || []).length < 100
12937
+ 'bk-table-enable-row-transition': (_vm.store.states.data || []).length !== 0 && (_vm.store.states.data || []).length < 100,
12938
+ 'bk-table-row-auto-height': _vm.rowAutoHeight
12926
12939
  }, _vm.tableSize ? "bk-table-" + _vm.tableSize : '', _vm.extCls],
12927
12940
  on: {
12928
12941
  "mouseleave": function mouseleave($event) {
package/lib/tag-input.js CHANGED
@@ -1904,8 +1904,11 @@
1904
1904
  }
1905
1905
  return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
1906
1906
  },
1907
- renderZIndex: function renderZIndex() {
1908
- return this.zIndex;
1907
+ renderZIndex: {
1908
+ get: function get() {
1909
+ return this.zIndex;
1910
+ },
1911
+ set: function set() {}
1909
1912
  }
1910
1913
  },
1911
1914
  watch: {
package/lib/transfer.js CHANGED
@@ -890,6 +890,7 @@
890
890
  }
891
891
  },
892
892
  handleNumberDelete: function handleNumberDelete(event) {
893
+ this.curValue === '' && (this.curValue = this.max);
893
894
  var curNumberValue = Number(this.curValue);
894
895
  if (curNumberValue - 1 >= this.min) {
895
896
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
@@ -904,6 +905,7 @@
904
905
  }
905
906
  },
906
907
  handleNumberAdd: function handleNumberAdd(event) {
908
+ this.curValue === '' && (this.curValue = this.min);
907
909
  var curNumberValue = Number(this.curValue);
908
910
  if (curNumberValue <= this.max - 1) {
909
911
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
@@ -7149,6 +7149,7 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
7149
7149
  }
7150
7150
  .bk-page{
7151
7151
  overflow:hidden;
7152
+ white-space:normal;
7152
7153
  }
7153
7154
  .bk-page .icon-angle-right, .bk-page .icon-angle-left{
7154
7155
  line-height:36px;
@@ -10237,6 +10238,7 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10237
10238
  border-radius:0 0 2px 2px;
10238
10239
  }
10239
10240
  .bk-table{
10241
+ white-space:normal;
10240
10242
  position:relative;
10241
10243
  overflow:hidden;
10242
10244
  -webkit-box-sizing:border-box;
@@ -10328,6 +10330,7 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10328
10330
  .bk-table th.is-leaf,
10329
10331
  .bk-table td{
10330
10332
  border-bottom:1px solid #dfe0e5;
10333
+ height:43px;
10331
10334
  }
10332
10335
  .bk-table th.is-sortable{
10333
10336
  cursor:pointer;
@@ -10472,6 +10475,9 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10472
10475
  position:absolute;
10473
10476
  z-index:-1;
10474
10477
  }
10478
+ .bk-table-row-auto-height .cell{
10479
+ display:block;
10480
+ }
10475
10481
  .bk-table-group,
10476
10482
  .bk-table-border,
10477
10483
  .bk-table-outer-border{
@@ -14626,6 +14632,7 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
14626
14632
  width:100%;
14627
14633
  height:100%;
14628
14634
  cursor:pointer;
14635
+ vertical-align:bottom;
14629
14636
  }
14630
14637
  .bk-zoom-image .bk-full-screen{
14631
14638
  position:fixed;
@@ -15059,6 +15066,7 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15059
15066
  -ms-flex-align:center;
15060
15067
  align-items:center;
15061
15068
  color:#c4c6cc;
15069
+ background:rgba(0,0,0,0.70);
15062
15070
  }
15063
15071
  .bk-image-viewer-header > div{
15064
15072
  -webkit-box-flex:1;
@@ -15080,7 +15088,9 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15080
15088
  -webkit-box-pack:end;
15081
15089
  -ms-flex-pack:end;
15082
15090
  justify-content:flex-end;
15083
- height:100%;
15091
+ }
15092
+ .bk-image-viewer-header .quit-tips{
15093
+ font-size:14px;
15084
15094
  color:#979ba5;
15085
15095
  }
15086
15096
  .bk-image-viewer-btn{
@@ -15111,14 +15121,16 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15111
15121
  color:#63656e;
15112
15122
  }
15113
15123
  .bk-image-viewer-close{
15114
- width:80px;
15115
- height:80px;
15116
- line-height:80px;
15124
+ height:52px;
15125
+ line-height:48px;
15117
15126
  text-align:center;
15118
- font-size:50px;
15119
- color:#fff;
15120
- cursor:pointer;
15127
+ font-size:32px;
15128
+ color:#C4C6CC;
15129
+ cursor:pointer
15121
15130
  }
15131
+ .bk-image-viewer-close:hover{
15132
+ color:#fff;
15133
+ }
15122
15134
  .bk-image-viewer-canvas{
15123
15135
  width:100%;
15124
15136
  height:100%;
@@ -15188,7 +15200,6 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15188
15200
  height:80px;
15189
15201
  font-size:40px;
15190
15202
  cursor:pointer;
15191
- //background:rgb(76,76,76);
15192
15203
  }
15193
15204
  .bk-image-viewer-prev{
15194
15205
  -webkit-transform:translateY(-50%);
@@ -15250,21 +15261,6 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15250
15261
  .bk-divider{
15251
15262
  position:relative
15252
15263
  }
15253
- .bk-divider-horizontal{
15254
- display:block;
15255
- width:100%;
15256
- height:0;
15257
- margin:1em 0;
15258
- border-bottom:1px solid #dcdee5;
15259
- }
15260
- .bk-divider-vertical{
15261
- display:inline-block;
15262
- width:0;
15263
- height:1em;
15264
- margin:0 8px;
15265
- vertical-align:middle;
15266
- border-right:1px solid #dcdee5;
15267
- }
15268
15264
  .bk-divider-info{
15269
15265
  position:absolute;
15270
15266
  padding:0 1.4em;