eoss-ui 0.4.39 → 0.4.40

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.
@@ -2664,7 +2664,7 @@ module.exports = require("qs");
2664
2664
  // ESM COMPAT FLAG
2665
2665
  __webpack_require__.r(__webpack_exports__);
2666
2666
 
2667
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/main.vue?vue&type=template&id=4801ad47&
2667
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/main.vue?vue&type=template&id=3b8fb8f5&
2668
2668
  var render = function () {
2669
2669
  var _vm = this
2670
2670
  var _h = _vm.$createElement
@@ -2905,7 +2905,7 @@ var staticRenderFns = []
2905
2905
  render._withStripped = true
2906
2906
 
2907
2907
 
2908
- // CONCATENATED MODULE: ./packages/selector-panel/src/main.vue?vue&type=template&id=4801ad47&
2908
+ // CONCATENATED MODULE: ./packages/selector-panel/src/main.vue?vue&type=template&id=3b8fb8f5&
2909
2909
 
2910
2910
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/tree.vue?vue&type=template&id=24ad732a&
2911
2911
  var treevue_type_template_id_24ad732a_render = function () {
@@ -4093,10 +4093,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4093
4093
  },
4094
4094
  checkeds: function checkeds(res, old) {
4095
4095
  var val = res;
4096
- if (!Array.isArray(val)) {
4097
- this.checkeds = [res];
4098
- return;
4099
- }
4096
+ // if (!Array.isArray(val)) {
4097
+ // this.checkeds = [res];
4098
+ // return;
4099
+ // }
4100
4100
  if (old.length > 0) {
4101
4101
  if (val.length < old.length) {
4102
4102
  this.checkAll = false;
package/lib/selector.js CHANGED
@@ -2678,7 +2678,7 @@ module.exports = require("eoss-element");
2678
2678
  // ESM COMPAT FLAG
2679
2679
  __webpack_require__.r(__webpack_exports__);
2680
2680
 
2681
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/main.vue?vue&type=template&id=7bec503c&
2681
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/main.vue?vue&type=template&id=88396248&
2682
2682
  var render = function () {
2683
2683
  var _vm = this
2684
2684
  var _h = _vm.$createElement
@@ -3152,7 +3152,7 @@ var staticRenderFns = []
3152
3152
  render._withStripped = true
3153
3153
 
3154
3154
 
3155
- // CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=7bec503c&
3155
+ // CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=88396248&
3156
3156
 
3157
3157
  // EXTERNAL MODULE: ./src/utils/util.js
3158
3158
  var util = __webpack_require__(0);
@@ -3560,7 +3560,7 @@ var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
3560
3560
  selected: {
3561
3561
  deep: true,
3562
3562
  handler: function handler(val) {
3563
- this.$emit('change', val);
3563
+ this.$emit('change', Array.isArray(val) ? val : [val]);
3564
3564
  if (this.multiple) {
3565
3565
  this.resetInputHeight();
3566
3566
  }
package/lib/upload.js CHANGED
@@ -2657,8 +2657,8 @@ module.exports = require("qs");
2657
2657
  // ESM COMPAT FLAG
2658
2658
  __webpack_require__.r(__webpack_exports__);
2659
2659
 
2660
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=7fa5744f&
2661
- var mainvue_type_template_id_7fa5744f_render = function () {
2660
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=e88da89e&
2661
+ var mainvue_type_template_id_e88da89e_render = function () {
2662
2662
  var _vm = this
2663
2663
  var _h = _vm.$createElement
2664
2664
  var _c = _vm._self._c || _h
@@ -2793,44 +2793,54 @@ var mainvue_type_template_id_7fa5744f_render = function () {
2793
2793
  }),
2794
2794
  ]
2795
2795
  : [
2796
- _vm.selectType === "icon-plus"
2797
- ? _c("i", {
2798
- staticClass: "el-icon-plus es-uploader-icon",
2799
- })
2800
- : _c(
2801
- "el-button",
2802
- {
2803
- staticClass: "es-upload-button",
2804
- class: _vm.icon,
2805
- attrs: { type: _vm.selectType, size: _vm.btnSize },
2806
- },
2807
- [
2808
- _vm._v(
2809
- _vm._s(
2810
- _vm.text
2811
- ? _vm.text
2812
- : _vm.autoUpload
2813
- ? "点击上传"
2814
- : "选择文件"
2796
+ !_vm.isDisabled
2797
+ ? [
2798
+ _vm.selectType === "icon-plus"
2799
+ ? _c("i", {
2800
+ staticClass: "el-icon-plus es-uploader-icon",
2801
+ })
2802
+ : _c(
2803
+ "el-button",
2804
+ {
2805
+ staticClass: "es-upload-button",
2806
+ class: _vm.icon,
2807
+ attrs: {
2808
+ type: _vm.selectType,
2809
+ size: _vm.btnSize,
2810
+ },
2811
+ },
2812
+ [
2813
+ _vm._v(
2814
+ _vm._s(
2815
+ _vm.text
2816
+ ? _vm.text
2817
+ : _vm.autoUpload
2818
+ ? "点击上传"
2819
+ : "选择文件"
2820
+ )
2821
+ ),
2822
+ ]
2823
+ ),
2824
+ !_vm.autoUpload
2825
+ ? _c(
2826
+ "el-button",
2827
+ {
2828
+ staticClass: "es-upload-button",
2829
+ attrs: {
2830
+ type: _vm.uploadType,
2831
+ size: _vm.btnSize,
2832
+ },
2833
+ on: {
2834
+ click: function ($event) {
2835
+ $event.stopPropagation()
2836
+ return _vm.handleUpload($event)
2837
+ },
2838
+ },
2839
+ },
2840
+ [_vm._v("\n 上传文件\n ")]
2815
2841
  )
2816
- ),
2817
- ]
2818
- ),
2819
- !_vm.autoUpload
2820
- ? _c(
2821
- "el-button",
2822
- {
2823
- staticClass: "es-upload-button",
2824
- attrs: { type: _vm.uploadType, size: _vm.btnSize },
2825
- on: {
2826
- click: function ($event) {
2827
- $event.stopPropagation()
2828
- return _vm.handleUpload($event)
2829
- },
2830
- },
2831
- },
2832
- [_vm._v("\n 上传文件\n ")]
2833
- )
2842
+ : _vm._e(),
2843
+ ]
2834
2844
  : _vm._e(),
2835
2845
  _vm.showFileList && _vm.isDownloads
2836
2846
  ? _c(
@@ -2992,10 +3002,10 @@ var mainvue_type_template_id_7fa5744f_render = function () {
2992
3002
  )
2993
3003
  }
2994
3004
  var staticRenderFns = []
2995
- mainvue_type_template_id_7fa5744f_render._withStripped = true
3005
+ mainvue_type_template_id_e88da89e_render._withStripped = true
2996
3006
 
2997
3007
 
2998
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=7fa5744f&
3008
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=e88da89e&
2999
3009
 
3000
3010
  // EXTERNAL MODULE: ./src/config/api.js
3001
3011
  var api = __webpack_require__(1);
@@ -3186,6 +3196,10 @@ var _props;
3186
3196
  //
3187
3197
  //
3188
3198
  //
3199
+ //
3200
+ //
3201
+ //
3202
+ //
3189
3203
 
3190
3204
 
3191
3205
 
@@ -3950,7 +3964,7 @@ var _props;
3950
3964
  this.$message.success(response.msg);
3951
3965
  }
3952
3966
  }
3953
- var se = this.filesTotalSize + Math.ceil(file.size / 1024 * 100) / 100;
3967
+ var se = this.filesTotalSize + (this.resultFile ? Math.ceil(file.size / 1024 * 100) / 100 : 0);
3954
3968
  this.filesTotalSize = se;
3955
3969
  this.onSuccess && this.onSuccess(response, file, fileList);
3956
3970
  this.$emit('success', response, file, fileList);
@@ -4009,7 +4023,7 @@ var componentNormalizer = __webpack_require__(2);
4009
4023
 
4010
4024
  var component = Object(componentNormalizer["a" /* default */])(
4011
4025
  src_mainvue_type_script_lang_js_,
4012
- mainvue_type_template_id_7fa5744f_render,
4026
+ mainvue_type_template_id_e88da89e_render,
4013
4027
  staticRenderFns,
4014
4028
  false,
4015
4029
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.39",
3
+ "version": "0.4.40",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -3,7 +3,7 @@ export default {
3
3
  contents() {
4
4
  return [
5
5
  [
6
- { tips: '正文', value: this.tag, trigger: 'click', dropdown: this._tags },
6
+ { tips: '正文', value: this.tag, trigger: 'click', dropdown: this._tags, type: 'tag' },
7
7
  {
8
8
  tips: '引用',
9
9
  path: ['M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z']
@@ -28,6 +28,7 @@ export default {
28
28
  },
29
29
  {
30
30
  path: ['M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z', 'M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z', 'M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z'],
31
+ type: 'tag',
31
32
  dropdown: [
32
33
  {
33
34
  tips: '删除线',
@@ -68,9 +69,9 @@ export default {
68
69
  }
69
70
  ],
70
71
  [
71
- { tips: '字号', value: this.fontSize, trigger: 'click', dropdown: this._fontSizes },
72
- { tips: '字体', value: this.fontFamily, trigger: 'click', dropdown: this._fontFamilys },
73
- { tips: '字体', value: this.lineHeight, trigger: 'click', dropdown: this._lineHeights }
72
+ { tips: '字号', value: this.fontSize, trigger: 'click', dropdown: this._fontSizes, type: 'fontSize' },
73
+ { tips: '字体', value: this.fontFamily, trigger: 'click', dropdown: this._fontFamilys, type: 'fontFamily' },
74
+ { tips: '字体', value: this.lineHeight, trigger: 'click', dropdown: this._lineHeights, type: 'lineHeight' }
74
75
  ],
75
76
  [
76
77
  {
@@ -82,19 +83,120 @@ export default {
82
83
  path: ['M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z']
83
84
  },
84
85
  {
85
- tips: '',
86
- title: '',
87
- path: ['']
86
+ tips: '待办',
87
+ path: ['M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z']
88
88
  },
89
89
  {
90
- tips: '',
91
- title: '',
92
- path: ['']
90
+ path: ['M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z'],
91
+ type: 'textAlign',
92
+ dropdown: [
93
+ {
94
+ title: '左对齐',
95
+ path: ['M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z']
96
+ },
97
+ {
98
+ title: '右对齐',
99
+ path: ['M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z']
100
+ },
101
+ {
102
+ title: '居中对齐',
103
+ path: ['M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z']
104
+ },
105
+ {
106
+ title: '两端对齐',
107
+ path: ['M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z']
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ path: ['M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z'],
113
+ type: 'textIndent',
114
+ dropdown: [
115
+ {
116
+ title: '增加缩进',
117
+ path: ['M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z']
118
+ },
119
+ {
120
+ title: '减少缩进',
121
+ disabled: this.outdent,
122
+ path: ['M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z']
123
+ }
124
+ ]
125
+ }
126
+ ],
127
+ [
128
+ {
129
+ emojis: true,
130
+ tips: '表情',
131
+ path: ['M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z']
132
+ },
133
+ {
134
+ link: true,
135
+ tips: '插入链接',
136
+ path: ['M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z', 'M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z']
93
137
  },
94
138
  {
95
- tips: '',
96
- title: '',
97
- path: ['']
139
+ path: ['M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z'],
140
+ type: 'image',
141
+ dropdown: [
142
+ {
143
+ title: '网络图片',
144
+ path: ['M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z']
145
+ },
146
+ {
147
+ title: '上传图片',
148
+ path: ['M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z']
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ path: ['M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z'],
154
+ type: 'video',
155
+ dropdown: [
156
+ {
157
+ title: '插入视频',
158
+ path: ['M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z']
159
+ },
160
+ {
161
+ title: '上传视频',
162
+ path: ['M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z', 'M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z']
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ table: true,
168
+ tips: '插入表格',
169
+ path: ['M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z']
170
+ },
171
+ {
172
+ tips: '代码块',
173
+ path: ['M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z']
174
+ },
175
+ {
176
+ tips: '分割线',
177
+ path: [
178
+ 'M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z',
179
+ 'M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z',
180
+ 'M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z',
181
+ 'M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z',
182
+ 'M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z'
183
+ ]
184
+ }
185
+ ],
186
+ [
187
+ {
188
+ tips: '撤销',
189
+ path: ['M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z']
190
+ },
191
+ {
192
+ tips: '重做',
193
+ path: ['M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z']
194
+ }
195
+ ],
196
+ [
197
+ {
198
+ tips: '全屏',
199
+ path: ['M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z']
98
200
  }
99
201
  ]
100
202
  ];
@@ -1,5 +1,44 @@
1
1
  <template>
2
2
  <div class="es-editor-toolbar">
3
+ <div v-for="(items, indexs) in contents" :key="indexs">
4
+ <div
5
+ class="es-editor-toolbar-item"
6
+ v-for="(item, index) in items"
7
+ :key="index"
8
+ >
9
+ <el-dropdown
10
+ v-if="item.dropdown && item.dropdown.length"
11
+ placement="bottom"
12
+ :trigger="item.trigger"
13
+ @command="
14
+ (res) => {
15
+ handleCommand('tag', res);
16
+ }
17
+ "
18
+ >
19
+ <el-tooltip
20
+ v-if="item.tips"
21
+ effect="dark"
22
+ :content="item.tips"
23
+ :placement="item.placement ? item.placement : 'bottom'"
24
+ >
25
+ <el-button size="small">
26
+ {{ tag }}<i class="el-icon-caret-bottom el-icon--right"></i>
27
+ </el-button>
28
+ </el-tooltip>
29
+ <el-dropdown-menu slot="dropdown">
30
+ <el-dropdown-item
31
+ class="es-editor-dropdown-item"
32
+ v-for="item in _tags"
33
+ :class="{ active: item == tag }"
34
+ :key="item"
35
+ :command="item"
36
+ >{{ item }}</el-dropdown-item
37
+ >
38
+ </el-dropdown-menu>
39
+ </el-dropdown>
40
+ </div>
41
+ </div>
3
42
  <div class="es-editor-toolbar-item">
4
43
  <el-dropdown
5
44
  placement="bottom"
@@ -227,6 +266,11 @@
227
266
  placement="bottom"
228
267
  >
229
268
  <el-button size="small">
269
+ <svg class="es-icon-svg" viewBox="0 0 1024 1024">
270
+ <path
271
+ d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"
272
+ ></path>
273
+ </svg>
230
274
  {{ fontFamily }}<i class="el-icon-caret-bottom el-icon--right"></i>
231
275
  </el-button>
232
276
  </el-tooltip>
@@ -310,9 +354,11 @@
310
354
  </template>
311
355
  <script>
312
356
  import Colors from './color.vue';
357
+ import mixin from './minx';
313
358
  export default {
314
359
  name: 'Toolbars',
315
360
  components: { Colors },
361
+ mixins: [mixin],
316
362
  inject: {
317
363
  elForm: {
318
364
  default: ''
@@ -420,7 +466,8 @@ export default {
420
466
  tag: '正文',
421
467
  fontSize: '默认字号',
422
468
  fontFamily: '默认字体',
423
- lineHeight: '默认行高'
469
+ lineHeight: '默认行高',
470
+ outdent: true
424
471
  };
425
472
  },
426
473
  mounted() {},
@@ -391,7 +391,7 @@ export default {
391
391
  selected: {
392
392
  deep: true,
393
393
  handler(val) {
394
- this.$emit('change', val);
394
+ this.$emit('change', Array.isArray(val) ? val : [val]);
395
395
  if (this.multiple) {
396
396
  this.resetInputHeight();
397
397
  }
@@ -572,10 +572,10 @@ export default {
572
572
  },
573
573
  checkeds(res, old) {
574
574
  let val = res;
575
- if (!Array.isArray(val)) {
576
- this.checkeds = [res];
577
- return;
578
- }
575
+ // if (!Array.isArray(val)) {
576
+ // this.checkeds = [res];
577
+ // return;
578
+ // }
579
579
  if (old.length > 0) {
580
580
  if (val.length < old.length) {
581
581
  this.checkAll = false;
@@ -81,27 +81,31 @@
81
81
  ></i>
82
82
  </template>
83
83
  <template v-else>
84
- <i
85
- class="el-icon-plus es-uploader-icon"
86
- v-if="selectType === 'icon-plus'"
87
- ></i>
88
- <el-button
89
- v-else
90
- class="es-upload-button"
91
- :class="icon"
92
- :type="selectType"
93
- :size="btnSize"
94
- >{{ text ? text : autoUpload ? '点击上传' : '选择文件' }}</el-button
95
- >
96
- <el-button
97
- class="es-upload-button"
98
- v-if="!autoUpload"
99
- :type="uploadType"
100
- :size="btnSize"
101
- @click.stop="handleUpload"
102
- >
103
- 上传文件
104
- </el-button>
84
+ <template v-if="!isDisabled">
85
+ <i
86
+ class="el-icon-plus es-uploader-icon"
87
+ v-if="selectType === 'icon-plus'"
88
+ ></i>
89
+ <el-button
90
+ v-else
91
+ class="es-upload-button"
92
+ :class="icon"
93
+ :type="selectType"
94
+ :size="btnSize"
95
+ >{{
96
+ text ? text : autoUpload ? '点击上传' : '选择文件'
97
+ }}</el-button
98
+ >
99
+ <el-button
100
+ class="es-upload-button"
101
+ v-if="!autoUpload"
102
+ :type="uploadType"
103
+ :size="btnSize"
104
+ @click.stop="handleUpload"
105
+ >
106
+ 上传文件
107
+ </el-button>
108
+ </template>
105
109
  <el-button
106
110
  v-if="showFileList && isDownloads"
107
111
  slot="handle"
@@ -1062,7 +1066,9 @@ export default {
1062
1066
  this.$message.success(response.msg);
1063
1067
  }
1064
1068
  }
1065
- let se = this.filesTotalSize + Math.ceil((file.size / 1024) * 100) / 100;
1069
+ let se =
1070
+ this.filesTotalSize +
1071
+ (this.resultFile ? Math.ceil((file.size / 1024) * 100) / 100 : 0);
1066
1072
  this.filesTotalSize = se;
1067
1073
  this.onSuccess && this.onSuccess(response, file, fileList);
1068
1074
  this.$emit('success', response, file, fileList);
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.39',
120
+ version: '0.4.40',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,