mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
🔱: [client] sync upgrade with 8 commits [trident-sync]
Merge remote-tracking branch 'origin/main' refactor: circle check refactor: circle check refactor: 1.11.8 refactor: upload demo test perf: 优化dict性能 refactor: debug
This commit is contained in:
@@ -74,12 +74,12 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
type: "image-uploader",
|
||||
form: {
|
||||
component: {
|
||||
limit: 1,
|
||||
limit: 2,
|
||||
uploader: {
|
||||
type: "form"
|
||||
}
|
||||
},
|
||||
helper: "最大可上传1个文件"
|
||||
helper: "最大可上传2个文件"
|
||||
},
|
||||
column: {
|
||||
component: {
|
||||
@@ -217,12 +217,12 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
type: "file-uploader",
|
||||
form: {
|
||||
component: {
|
||||
limit: 1,
|
||||
limit: 2,
|
||||
uploader: {
|
||||
type: "form"
|
||||
}
|
||||
},
|
||||
helper: "最大可上传1个文件"
|
||||
helper: "最大可上传2个文件"
|
||||
}
|
||||
},
|
||||
sizeLimit: {
|
||||
|
||||
+28
-40
@@ -1,5 +1,7 @@
|
||||
import * as api from "./api";
|
||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
|
||||
import dayjs from "dayjs";
|
||||
import { computed, Ref, ref } from "vue";
|
||||
|
||||
export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||
@@ -17,6 +19,29 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
return await api.AddObj(form);
|
||||
};
|
||||
|
||||
const options: Ref = ref([]);
|
||||
|
||||
let arr = [
|
||||
{
|
||||
value: "1",
|
||||
label: "test"
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "test2"
|
||||
}
|
||||
];
|
||||
|
||||
for (let i = 0; i < 10; i++) {
|
||||
arr = arr.concat(arr);
|
||||
}
|
||||
let i = 0;
|
||||
for (const item of arr) {
|
||||
i++;
|
||||
item.value = i + "";
|
||||
}
|
||||
options.value = arr;
|
||||
|
||||
return {
|
||||
crudOptions: {
|
||||
request: {
|
||||
@@ -46,18 +71,14 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
show: false
|
||||
}
|
||||
},
|
||||
|
||||
statusRemote: {
|
||||
title: "单选远程",
|
||||
search: {
|
||||
show: true,
|
||||
value: []
|
||||
show: false
|
||||
},
|
||||
type: "dict-select",
|
||||
dict: dict({
|
||||
url: "/mock/dicts/_OpenStatusEnum2?simple",
|
||||
value: "id",
|
||||
label: "text"
|
||||
url: "/mock/dicts/ManyOpenStatusEnum?from=dict1"
|
||||
}),
|
||||
form: {
|
||||
component: { mode: "multiple" },
|
||||
@@ -66,39 +87,6 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
column: {
|
||||
width: 200
|
||||
}
|
||||
},
|
||||
id2: {
|
||||
title: "ID",
|
||||
key: "id",
|
||||
type: "number",
|
||||
column: {
|
||||
width: 300
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
id3: {
|
||||
title: "ID",
|
||||
key: "id",
|
||||
type: "number",
|
||||
column: {
|
||||
width: 300
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
id4: {
|
||||
title: "ID",
|
||||
key: "id",
|
||||
type: "number",
|
||||
column: {
|
||||
width: 300
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-2
@@ -1,9 +1,20 @@
|
||||
import mockUtil from "/src/mock/base";
|
||||
const options: any = {
|
||||
name: "DebugSelect",
|
||||
idGenerator: 0
|
||||
idGenerator: 0,
|
||||
copyTimes: 500
|
||||
};
|
||||
const list: any = [];
|
||||
const list: any = [
|
||||
{
|
||||
statusRemote: "1"
|
||||
},
|
||||
{
|
||||
statusRemote: "2"
|
||||
},
|
||||
{
|
||||
statusRemote: "3"
|
||||
}
|
||||
];
|
||||
options.list = list;
|
||||
const mock = mockUtil.buildMock(options);
|
||||
export default mock;
|
||||
Reference in New Issue
Block a user