bk-magic-vue 2.4.1-beta.2 → 2.4.1-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.
@@ -15035,6 +15035,13 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15035
15035
  -ms-flex-direction:column;
15036
15036
  flex-direction:column;
15037
15037
  }
15038
+ .bk-image-viewer-mask{
15039
+ position:absolute;
15040
+ top:0;
15041
+ right:0;
15042
+ bottom:0;
15043
+ left:0;
15044
+ }
15038
15045
  .bk-image-viewer-header{
15039
15046
  position:absolute;
15040
15047
  top:0;
@@ -15051,9 +15058,7 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15051
15058
  -webkit-box-align:center;
15052
15059
  -ms-flex-align:center;
15053
15060
  align-items:center;
15054
- padding:0 13px 0 25px;
15055
- background:rgba(0, 0, 0, .7);
15056
- color:#63656e;
15061
+ color:#c4c6cc;
15057
15062
  }
15058
15063
  .bk-image-viewer-header > div{
15059
15064
  -webkit-box-flex:1;
@@ -15062,6 +15067,8 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15062
15067
  overflow:hidden;
15063
15068
  white-space:nowrap;
15064
15069
  text-overflow:ellipsis;
15070
+ font-size:14px;
15071
+ padding:0 25px;
15065
15072
  }
15066
15073
  .bk-image-viewer-header .quit-box{
15067
15074
  display:-webkit-box;
@@ -15074,8 +15081,6 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15074
15081
  -ms-flex-pack:end;
15075
15082
  justify-content:flex-end;
15076
15083
  height:100%;
15077
- }
15078
- .bk-image-viewer-header .quit-tips{
15079
15084
  color:#979ba5;
15080
15085
  }
15081
15086
  .bk-image-viewer-btn{
@@ -15094,18 +15099,23 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15094
15099
  opacity:.8;
15095
15100
  -webkit-box-sizing:border-box;
15096
15101
  box-sizing:border-box;
15097
- color:#fff;
15102
+ background-color:rgba(0, 0, 0, .3);
15103
+ color:#DCDEE5;
15098
15104
  -webkit-user-select:none;
15099
15105
  -moz-user-select:none;
15100
15106
  -ms-user-select:none;
15101
15107
  user-select:none
15102
15108
  }
15109
+ .bk-image-viewer-btn:hover{
15110
+ background-color:rgba(0, 0, 0, .4);
15111
+ color:#63656e;
15112
+ }
15103
15113
  .bk-image-viewer-close{
15104
- width:40px;
15105
- height:40px;
15106
- line-height:38px;
15114
+ width:80px;
15115
+ height:80px;
15116
+ line-height:80px;
15107
15117
  text-align:center;
15108
- font-size:32px;
15118
+ font-size:50px;
15109
15119
  color:#fff;
15110
15120
  cursor:pointer;
15111
15121
  }
@@ -15145,14 +15155,17 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15145
15155
  padding:0 23px;
15146
15156
  background-color:rgba(0,0,0,0.4);
15147
15157
  border-color:#fff;
15148
- border-radius:22px;
15158
+ border-radius:22px
15149
15159
  }
15160
+ .bk-image-viewer-actions:hover{
15161
+ background:rgba(0,0,0,.5);
15162
+ }
15150
15163
  .bk-image-viewer-actions-inner{
15151
15164
  width:100%;
15152
15165
  height:100%;
15153
15166
  text-align:justify;
15154
15167
  font-size:23px;
15155
- color:#fff;
15168
+ color:#c4c6cc;
15156
15169
  display:-webkit-box;
15157
15170
  display:-ms-flexbox;
15158
15171
  display:flex;
@@ -15161,17 +15174,21 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15161
15174
  align-items:center;
15162
15175
  -ms-flex-pack:distribute;
15163
15176
  justify-content:space-around;
15164
- cursor:pointer;
15177
+
15165
15178
  }
15179
+ .bk-image-viewer-actions-inner .bk-icon{
15180
+ cursor:pointer
15181
+ }
15182
+ .bk-image-viewer-actions-inner .bk-icon:hover{
15183
+ color:#fff;
15184
+ }
15166
15185
  .bk-image-viewer-next, .bk-image-viewer-prev{
15167
15186
  top:50%;
15168
15187
  width:80px;
15169
15188
  height:80px;
15170
15189
  font-size:40px;
15171
- color:#fff;
15172
- background-color:rgba(0,0,0,0.4);
15173
- border-color:#fff;
15174
15190
  cursor:pointer;
15191
+ //background:rgb(76,76,76);
15175
15192
  }
15176
15193
  .bk-image-viewer-prev{
15177
15194
  -webkit-transform:translateY(-50%);
@@ -2744,6 +2744,7 @@
2744
2744
  var script$8 = {
2745
2745
  name: 'bk-checkbox',
2746
2746
  mixins: [emitter],
2747
+ inject: ['handleRemoveItem', 'handleAddItem'],
2747
2748
  props: {
2748
2749
  value: {
2749
2750
  type: [String, Number, Boolean],
@@ -2823,9 +2824,16 @@
2823
2824
  }
2824
2825
  },
2825
2826
  created: function created() {
2826
- this.dispatch('bk-checkbox-group', 'checkbox-item-add', this);
2827
+ if (this.handleAddItem && typeof this.handleAddItem === 'function') {
2828
+ this.handleAddItem(this);
2829
+ }
2827
2830
  this.init();
2828
2831
  },
2832
+ destroyed: function destroyed() {
2833
+ if (this.handleRemoveItem && typeof this.handleRemoveItem === 'function') {
2834
+ this.handleRemoveItem(this);
2835
+ }
2836
+ },
2829
2837
  methods: {
2830
2838
  getValue: function getValue() {
2831
2839
  if (this.selected) {
@@ -2995,6 +3003,12 @@
2995
3003
 
2996
3004
  var script$9 = {
2997
3005
  name: 'bk-checkbox-group',
3006
+ provide: function provide() {
3007
+ return {
3008
+ handleAddItem: this.handleAddItem,
3009
+ handleRemoveItem: this.handleRemoveItem
3010
+ };
3011
+ },
2998
3012
  props: {
2999
3013
  value: {
3000
3014
  type: Array,
@@ -3021,16 +3035,17 @@
3021
3035
  this.localValue = _toConsumableArray(_value);
3022
3036
  }
3023
3037
  },
3024
- created: function created() {
3025
- var _this = this;
3026
- this.$on('checkbox-item-add', function (item) {
3027
- if (item) {
3028
- _this.checkboxItems.push(item);
3029
- }
3030
- return false;
3031
- });
3032
- },
3033
3038
  methods: {
3039
+ handleAddItem: function handleAddItem(item) {
3040
+ if (!item || this.checkboxItems.includes(item)) return;
3041
+ this.checkboxItems.push(item);
3042
+ },
3043
+ handleRemoveItem: function handleRemoveItem(item) {
3044
+ var index = this.checkboxItems.indexOf(item);
3045
+ if (index > -1) {
3046
+ this.checkboxItems.splice(index, 1);
3047
+ }
3048
+ },
3034
3049
  handleChange: function handleChange(checked, value) {
3035
3050
  var oldValue = _toConsumableArray(this.localValue);
3036
3051
  var localValue = [];
@@ -8906,6 +8921,16 @@
8906
8921
  message: {
8907
8922
  copy: 'copy',
8908
8923
  copied: 'copied'
8924
+ },
8925
+ image: {
8926
+ zoomIn: 'zoom in',
8927
+ zoomOut: 'zoom out',
8928
+ rotateLeft: 'anticlockwise',
8929
+ rotateRight: 'clockwise rotation',
8930
+ fullScreen: 'full screen',
8931
+ original: 'original size',
8932
+ prev: 'prev',
8933
+ next: 'next'
8909
8934
  }
8910
8935
  }
8911
8936
  };
@@ -9051,6 +9076,14 @@
9051
9076
  message: {
9052
9077
  copy: '复制',
9053
9078
  copied: '已复制'
9079
+ },
9080
+ image: {
9081
+ zoomIn: '放大',
9082
+ zoomOut: '缩小',
9083
+ rotateLeft: '向左旋转',
9084
+ rotateRight: '向右旋转',
9085
+ fullScreen: '适应屏幕',
9086
+ original: '快速回到 1:1'
9054
9087
  }
9055
9088
  }
9056
9089
  };
@@ -52414,7 +52447,9 @@
52414
52447
  class: {
52415
52448
  'bk-margin-left': _vm.multiple
52416
52449
  }
52417
- }, [_vm._v("\n " + _vm._s(_vm.item.name) + "\n "), _vm._t("prepend", null, {
52450
+ }, [_vm._t("option", null, {
52451
+ node: _vm.item
52452
+ }), _vm._t("prepend", null, {
52418
52453
  node: _vm.item
52419
52454
  })], 2)])])], 2), _vm.isRemote ? [_vm.item.isLoading ? _c('i', {
52420
52455
  staticClass: "bk-icon left-icon icon-loading bk-button-icon-loading bk-cascade-right"
@@ -52763,6 +52798,14 @@
52763
52798
  }
52764
52799
  },
52765
52800
  scopedSlots: _vm._u([{
52801
+ key: "option",
52802
+ fn: function fn(ref) {
52803
+ var node = ref.node;
52804
+ return [_vm._t("option", null, {
52805
+ node: node
52806
+ })];
52807
+ }
52808
+ }, {
52766
52809
  key: "prepend",
52767
52810
  fn: function fn(ref) {
52768
52811
  var node = ref.node;
@@ -52794,6 +52837,14 @@
52794
52837
  "updateSelectedList": _vm.updateSelectedList
52795
52838
  },
52796
52839
  scopedSlots: _vm._u([{
52840
+ key: "option",
52841
+ fn: function fn(ref) {
52842
+ var node = ref.node;
52843
+ return [_vm._t("option", null, {
52844
+ node: node
52845
+ })];
52846
+ }
52847
+ }, {
52797
52848
  key: "prepend",
52798
52849
  fn: function fn(ref) {
52799
52850
  var node = ref.node;
@@ -53687,6 +53738,14 @@
53687
53738
  "updateSelectedList": _vm.updateSelectedList
53688
53739
  },
53689
53740
  scopedSlots: _vm._u([{
53741
+ key: "option",
53742
+ fn: function fn(ref) {
53743
+ var node = ref.node;
53744
+ return [_vm._t("option", [_vm._v(_vm._s(node.name))], {
53745
+ node: node
53746
+ })];
53747
+ }
53748
+ }, {
53690
53749
  key: "prepend",
53691
53750
  fn: function fn(ref) {
53692
53751
  var node = ref.node;
@@ -53955,6 +54014,10 @@
53955
54014
  initialIndex: {
53956
54015
  type: Number,
53957
54016
  default: 0
54017
+ },
54018
+ maskClose: {
54019
+ type: Boolean,
54020
+ default: true
53958
54021
  }
53959
54022
  },
53960
54023
  data: function data() {
@@ -54195,7 +54258,14 @@
54195
54258
  attrs: {
54196
54259
  "tabindex": "-1"
54197
54260
  }
54198
- }, [_vm.isShowTitle && _vm.urlList.length ? _c('div', {
54261
+ }, [_c('div', {
54262
+ staticClass: "bk-image-viewer-mask",
54263
+ on: {
54264
+ "click": function click($event) {
54265
+ _vm.maskClose && _vm.hide();
54266
+ }
54267
+ }
54268
+ }), _vm.isShowTitle && _vm.urlList.length ? _c('div', {
54199
54269
  staticClass: "bk-image-viewer-header"
54200
54270
  }, [_c('div', [_vm._v(_vm._s(_vm.currentName))]), _c('div', {
54201
54271
  staticClass: "tc"
@@ -54235,6 +54305,15 @@
54235
54305
  }, [_c('div', {
54236
54306
  staticClass: "bk-image-viewer-actions-inner"
54237
54307
  }, [_c('i', {
54308
+ directives: [{
54309
+ name: "bk-tooltips",
54310
+ rawName: "v-bk-tooltips.top",
54311
+ value: _vm.t('bk.image.zoomOut'),
54312
+ expression: "t('bk.image.zoomOut')",
54313
+ modifiers: {
54314
+ "top": true
54315
+ }
54316
+ }],
54238
54317
  staticClass: "bk-icon icon-narrow-line",
54239
54318
  on: {
54240
54319
  "click": function click($event) {
@@ -54242,6 +54321,15 @@
54242
54321
  }
54243
54322
  }
54244
54323
  }), _c('i', {
54324
+ directives: [{
54325
+ name: "bk-tooltips",
54326
+ rawName: "v-bk-tooltips.top",
54327
+ value: _vm.t('bk.image.zoomIn'),
54328
+ expression: "t('bk.image.zoomIn')",
54329
+ modifiers: {
54330
+ "top": true
54331
+ }
54332
+ }],
54245
54333
  staticClass: "bk-icon icon-enlarge-line",
54246
54334
  on: {
54247
54335
  "click": function click($event) {
@@ -54249,6 +54337,15 @@
54249
54337
  }
54250
54338
  }
54251
54339
  }), _c('i', {
54340
+ directives: [{
54341
+ name: "bk-tooltips",
54342
+ rawName: "v-bk-tooltips.top",
54343
+ value: _vm.t('bk.image.original'),
54344
+ expression: "t('bk.image.original')",
54345
+ modifiers: {
54346
+ "top": true
54347
+ }
54348
+ }],
54252
54349
  staticClass: "bk-icon icon-normalized",
54253
54350
  on: {
54254
54351
  "click": function click($event) {
@@ -54256,6 +54353,15 @@
54256
54353
  }
54257
54354
  }
54258
54355
  }), _c('i', {
54356
+ directives: [{
54357
+ name: "bk-tooltips",
54358
+ rawName: "v-bk-tooltips.top",
54359
+ value: _vm.t('bk.image.rotateLeft'),
54360
+ expression: "t('bk.image.rotateLeft')",
54361
+ modifiers: {
54362
+ "top": true
54363
+ }
54364
+ }],
54259
54365
  staticClass: "bk-icon icon-left-turn-line",
54260
54366
  on: {
54261
54367
  "click": function click($event) {
@@ -54263,13 +54369,31 @@
54263
54369
  }
54264
54370
  }
54265
54371
  }), _c('i', {
54372
+ directives: [{
54373
+ name: "bk-tooltips",
54374
+ rawName: "v-bk-tooltips.top",
54375
+ value: _vm.t('bk.image.rotateRight'),
54376
+ expression: "t('bk.image.rotateRight')",
54377
+ modifiers: {
54378
+ "top": true
54379
+ }
54380
+ }],
54266
54381
  staticClass: "bk-icon icon-right-turn-line",
54267
54382
  on: {
54268
54383
  "click": function click($event) {
54269
- _vm.handleActions('clocelise');
54384
+ _vm.handleActions('clockwise');
54270
54385
  }
54271
54386
  }
54272
54387
  }), _c('i', {
54388
+ directives: [{
54389
+ name: "bk-tooltips",
54390
+ rawName: "v-bk-tooltips.top",
54391
+ value: _vm.t('bk.image.fullScreen'),
54392
+ expression: "t('bk.image.fullScreen')",
54393
+ modifiers: {
54394
+ "top": true
54395
+ }
54396
+ }],
54273
54397
  staticClass: "bk-icon icon-unfull-screen",
54274
54398
  on: {
54275
54399
  "click": function click($event) {
@@ -54378,6 +54502,10 @@
54378
54502
  zIndex: {
54379
54503
  type: Number,
54380
54504
  default: 2000
54505
+ },
54506
+ maskClose: {
54507
+ type: Boolean,
54508
+ default: true
54381
54509
  }
54382
54510
  },
54383
54511
  data: function data() {
@@ -54587,7 +54715,8 @@
54587
54715
  "is-show-title": _vm.isShowPreviewTitle,
54588
54716
  "initial-index": _vm.imageIndex,
54589
54717
  "url-list": _vm.previewSrcList,
54590
- "on-close": _vm.closeViewer
54718
+ "on-close": _vm.closeViewer,
54719
+ "mask-close": _vm.maskClose
54591
54720
  }
54592
54721
  }) : _vm._e()] : _vm._e()], 2);
54593
54722
  };