File tree 3 files changed +22
-1
lines changed
src/modules/upload/components
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 10
10
},
11
11
"dependencies" : {
12
12
"@cool-vue/admin" : " ^5.0.3" ,
13
- "@cool-vue/crud" : " ^5.7.0 " ,
13
+ "@cool-vue/crud" : " ^5.7.1 " ,
14
14
"@element-plus/icons-vue" : " ^2.0.6" ,
15
15
"@vueuse/core" : " ^9.1.0" ,
16
16
"axios" : " ^0.27.2" ,
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ import { useCool, module } from "/@/cool";
143
143
import { extname , uuid } from " /@/cool/utils" ;
144
144
import { useBase } from " /$/base" ;
145
145
import { fileSize , fileName , fileType } from " ../utils" ;
146
+ import { useForm } from " @cool-vue/crud" ;
146
147
147
148
interface Item {
148
149
url: string ;
@@ -190,6 +191,9 @@ const { service } = useCool();
190
191
// 缓存
191
192
const { user } = useBase ();
192
193
194
+ // 表单
195
+ const Form = useForm ();
196
+
193
197
// 模块配置
194
198
const { options } = module .get (" upload" );
195
199
@@ -202,6 +206,11 @@ const size = computed(() => {
202
206
return (isArray (d ) ? d : [d , d ]).map ((e : string | number ) => (isNumber (e ) ? e + " px" : e ));
203
207
});
204
208
209
+ // 是否禁用
210
+ const disabled = computed (() => {
211
+ return Form .value ?.disabled || props .disabled ;
212
+ });
213
+
205
214
// 最大上传数量
206
215
const limit = props .limit || options .limit .upload ;
207
216
Original file line number Diff line number Diff line change 1091
1091
mitt "^3.0.0"
1092
1092
vue "^3.2.39"
1093
1093
1094
+ " @cool-vue/crud@^5.7.1 " :
1095
+ version "5.7.1"
1096
+ resolved "https://registry.npmjs.org/@cool-vue/crud/-/crud-5.7.1.tgz#b8f935c6aeb5bcc2830fdb38f79f2b14d1acc4e6"
1097
+ integrity sha512-rSb9lobCG9NlFlb+8WRiZfEwjTFrIo5/93Qx+cRHQgzVE8tXxsnNCwlMZNC0Tr3kkmuROQGP9ClkuJV8YwhyYA==
1098
+ dependencies :
1099
+ array.prototype.flat "^1.2.4"
1100
+ core-js "^3.21.1"
1101
+ element-plus "^2.2.17"
1102
+ merge "^2.1.1"
1103
+ mitt "^3.0.0"
1104
+ vue "^3.2.39"
1105
+
1094
1106
" @ctrl/tinycolor@^3.4.1 " :
1095
1107
version "3.4.1"
1096
1108
resolved "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz#75b4c27948c81e88ccd3a8902047bcd797f38d32"
You can’t perform that action at this time.
0 commit comments