|
@@ -7,24 +7,31 @@ import { BrandListApi } from '/@/api/order/list';
|
|
|
|
|
|
export const padsSchemas: FormSchema[] = [
|
|
|
{
|
|
|
- field: 'title',
|
|
|
- component: 'Input',
|
|
|
- label: '正文标题',
|
|
|
+ field: 'image',
|
|
|
+ component: 'Upload',
|
|
|
+ label: '封面',
|
|
|
+ rules: [{ required: true, message: '请选择上传文件' }],
|
|
|
+ itemProps: {
|
|
|
+ validateTrigger: 'blur',
|
|
|
+ },
|
|
|
componentProps: {
|
|
|
- placeholder: '轮播图正文标题',
|
|
|
+ api: uploadApi,
|
|
|
+ maxNumber: 1,
|
|
|
+ accept: ['jpg', 'jpeg', 'gif', 'png'],
|
|
|
+ afterFetch: function (data) {
|
|
|
+ console.log('data', data);
|
|
|
+ Reflect.set(data, 'url', data.message);
|
|
|
+ return data;
|
|
|
+ },
|
|
|
},
|
|
|
required: true,
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
- field: 'orderNum',
|
|
|
+ field: 'title',
|
|
|
component: 'Input',
|
|
|
- label: '轮播排序',
|
|
|
- defaultValue: 0,
|
|
|
+ label: '标题',
|
|
|
componentProps: {
|
|
|
- placeholder: '轮播排序',
|
|
|
- type: 'number',
|
|
|
- min: 0,
|
|
|
+ placeholder: '标题',
|
|
|
},
|
|
|
required: true,
|
|
|
},
|
|
@@ -49,6 +56,18 @@ export const padsSchemas: FormSchema[] = [
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ field: 'orderNum',
|
|
|
+ component: 'Input',
|
|
|
+ label: '排序',
|
|
|
+ defaultValue: 0,
|
|
|
+ componentProps: {
|
|
|
+ placeholder: '推荐排序',
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ },
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
// {
|
|
|
// field: 'connectId',
|
|
|
// component: 'Input',
|
|
@@ -58,26 +77,6 @@ export const padsSchemas: FormSchema[] = [
|
|
|
// },
|
|
|
// // required: true,
|
|
|
// },
|
|
|
- {
|
|
|
- field: 'image',
|
|
|
- component: 'Upload',
|
|
|
- label: '封面图',
|
|
|
- rules: [{ required: true, message: '请选择上传文件' }],
|
|
|
- itemProps: {
|
|
|
- validateTrigger: 'blur',
|
|
|
- },
|
|
|
- componentProps: {
|
|
|
- api: uploadApi,
|
|
|
- maxNumber: 1,
|
|
|
- accept: ['jpg', 'jpeg', 'gif', 'png'],
|
|
|
- afterFetch: function (data) {
|
|
|
- console.log('data', data);
|
|
|
- Reflect.set(data, 'url', data.message);
|
|
|
- return data;
|
|
|
- },
|
|
|
- },
|
|
|
- required: true,
|
|
|
- },
|
|
|
];
|
|
|
export const schemas: FormSchema[] = [
|
|
|
{
|