diff --git a/package.json b/package.json index 135c41d..b00c01f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "0.5.2", + "version": "0.5.3", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit --skipLibCheck && vite build", @@ -11,7 +11,7 @@ "dependencies": { "array.prototype.flat": "^1.2.4", "axios": "^0.21.1", - "cl-admin-crud-vue3": "^0.3.12", + "cl-admin-crud-vue3": "^0.3.14", "clipboard": "^2.0.8", "clone-deep": "^4.0.1", "codemirror": "^5.60.0", diff --git a/src/cool/modules/upload/components/index.vue b/src/cool/modules/upload/components/index.vue index 0100256..a99f9c4 100644 --- a/src/cool/modules/upload/components/index.vue +++ b/src/cool/modules/upload/components/index.vue @@ -189,7 +189,12 @@ export default { // 上传文件之前的钩子 beforeUpload: Function, // 删除文件之前的钩子 - beforeRemove: Function + beforeRemove: Function, + // 是否拼接 + urlJoin: { + type: Boolean, + default: true + } }, emits: ["update:modelValue", "change"], @@ -270,7 +275,7 @@ export default { _urls() { const format = { - image: ["bmp", "jpg", "jpeg", "png", "tif", "gif", "svg"] + image: ["bmp", "jpg", "jpeg", "png", "tif", "gif", "svg", "webp"] }; return this.urls @@ -354,10 +359,12 @@ export default { // 更新值 update() { - const urls = this.urls - .filter((e) => Boolean(e.url)) - .map((e) => e.url) - .join(","); + let urls = this.urls.filter((e) => Boolean(e.url)).map((e) => e.url); + + // 是否拼接 + if (this.urlJoin) { + urls = urls.join(","); + } this.$emit("update:modelValue", urls); this.$emit("change", urls); diff --git a/src/cool/modules/upload/components/space/file-item.vue b/src/cool/modules/upload/components/space/file-item.vue index 391fe11..0efe001 100644 --- a/src/cool/modules/upload/components/space/file-item.vue +++ b/src/cool/modules/upload/components/space/file-item.vue @@ -48,6 +48,8 @@