feat(upload): 配置文件上传组件的业务路径和文本提示
- 在 JImageUpload 组件中添加 bizPath 属性以指定上传路径 - 为头像上传功能统一设置 bizPath: 'avatar' - 为图片上传功能设置 bizPath: 'img' - 为视频上传功能设置 bizPath: 'video' - 为PDF文件上传设置 bizPath: 'bizfile' - 为APP文件上传设置 bizPath: 'appfile' - 添加 text 属性统一显示 '上传头像' 提示文本 - 在系统横幅管理中配置图片上传的业务路径 - 为新资源管理模块添加完整的数据结构定义
This commit is contained in:
@@ -102,6 +102,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'image',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
fileMax: 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -266,6 +266,8 @@ export const formSchema: FormSchema[] = [
|
||||
component: 'JImageUpload',
|
||||
// rules: [{ required: true, message: '请选择头像' }],
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
//@ts-ignore
|
||||
maxCount: 1,
|
||||
},
|
||||
|
||||
@@ -190,6 +190,8 @@ export const formSchema: FormSchema[] = [
|
||||
label: '头像',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
// @ts-ignore
|
||||
maxCount: 1,
|
||||
},
|
||||
|
||||
@@ -169,6 +169,7 @@ export const formSchema: FormSchema[] = [
|
||||
field: 'img',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
fileMax: 1,
|
||||
},
|
||||
rules: [{ required: false }],
|
||||
|
||||
@@ -306,6 +306,7 @@ export const getFormSchema = () => {
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'video',
|
||||
maxCount: 1,
|
||||
accept: '.mp4,video/mp4',
|
||||
tipText: '支持MP4格式,最大200M',
|
||||
@@ -319,6 +320,7 @@ export const getFormSchema = () => {
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'bizfile',
|
||||
maxCount: 1,
|
||||
accept: 'application/pdf',
|
||||
tipText: '仅支持PDF格式文件,最大200M',
|
||||
|
||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
||||
component: 'JImageUpload',
|
||||
required: true,
|
||||
componentProps: () => ({
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -74,6 +74,8 @@ export const searchFormSchema: FormSchema[] = [
|
||||
},
|
||||
];
|
||||
//表单数据
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '序号',
|
||||
@@ -91,6 +93,10 @@ export const formSchema: FormSchema[] = [
|
||||
label: '图片',
|
||||
field: 'photoUrl',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
bizPath: 'img',
|
||||
maxCount: 1,
|
||||
},
|
||||
rules: [{ required: true, message: '请上传图片' }],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -330,6 +330,8 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
||||
field: 'avatar',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -207,6 +207,8 @@ export const formSchema: FormSchema[] = [
|
||||
label: '头像',
|
||||
component: 'JImageUpload',
|
||||
componentProps: {
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -141,6 +141,8 @@ export const formSchema = function (showGoodAt: boolean): FormSchema[] {
|
||||
component: 'JImageUpload',
|
||||
required: true,
|
||||
componentProps: () => ({
|
||||
text: '上传头像',
|
||||
bizPath: 'avatar',
|
||||
maxCount: 1,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -154,6 +154,7 @@ export const itemFormSchema: FormSchema[] = [
|
||||
component: 'JUpload',
|
||||
componentProps: () => {
|
||||
return {
|
||||
bizPath: 'appfile',
|
||||
maxCount: 1,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user