Skip to content

Commit

Permalink
perf: 优化上传图片大小
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed May 28, 2024
1 parent 5d69a03 commit 007b97d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jx3box/jx3box-comment-ui",
"version": "1.9.1",
"version": "1.9.2",
"scripts": {
"dev": "env DEV_SERVER=true vue-cli-service serve",
"serve": "vue-cli-service serve",
Expand Down
8 changes: 7 additions & 1 deletion src/components/upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@

<script>
export default {
props: {
fileMaxSize: {
type: Number,
default: 10,
},
},
data() {
return {
dialogImageUrl: "",
Expand All @@ -39,7 +45,7 @@ export default {
acceptedExtensions: ["jpg", "jpeg", "png", "gif"],
maxCount: 5,
maxSize: 2 * 1024 * 1024,
maxSize: this.fileMaxSize * 1024 * 1024,
};
},
methods: {
Expand Down

0 comments on commit 007b97d

Please sign in to comment.