@jx3box/jx3box-editor 1.8.1 → 1.8.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/Upload.vue +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Upload.vue CHANGED
@@ -4,7 +4,7 @@
4
4
  <el-button type="primary" @click="dialogVisible = true" icon="el-icon-upload" :disabled="!enable">{{ btn_txt }}</el-button>
5
5
 
6
6
  <!-- 弹出界面 -->
7
- <el-dialog class="c-large-dialog" title="上传" :visible.sync="dialogVisible" append-to-body>
7
+ <el-dialog class="c-large-dialog" title="上传" :visible.sync="dialogVisible">
8
8
  <!-- 清空按钮 -->
9
9
  <el-button class="u-upload-clear" plain icon="el-icon-delete" size="mini" @click="clear">清空</el-button>
10
10
 
@@ -80,12 +80,21 @@ export default {
80
80
  type: Boolean,
81
81
  default: true,
82
82
  },
83
+ max: {
84
+ type: Number,
85
+ default: 10,
86
+ },
87
+ // 文件大小限制
88
+ sizeLimit: {
89
+ type: Number,
90
+ default: 30
91
+ },
83
92
  },
84
93
  data: function () {
85
94
  return {
86
95
  API: API,
87
96
  dialogVisible: false,
88
- tip: this.desc || "一次最多同时上传10个文件(单个文件不超过20M),格式限常见的图片、文档、数据表及压缩包",
97
+ tip: this.desc || `一次最多同时上传${this.max}个文件(单个文件不超过${this.sizeLimit}M),格式限常见的图片、文档、数据表及压缩包`,
89
98
  btn_txt: this.text || "上传附件",
90
99
 
91
100
  fileList: [],