mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +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:
@@ -27,7 +27,7 @@ let manyStatus = [
|
||||
{ value: "2", label: "停止", color: "cyan" },
|
||||
{ value: "0", label: "关闭", color: "red", icon: "ion:radio-button-off" }
|
||||
];
|
||||
for (let i = 0; i < 8; i++) {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
manyStatus = manyStatus.concat(_.cloneDeep(manyStatus));
|
||||
}
|
||||
let idIndex = 0;
|
||||
|
||||
@@ -8,6 +8,15 @@ export const crudResources = [
|
||||
icon: "ion:apps-sharp"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "debug",
|
||||
name: "debug",
|
||||
path: "/crud/debug",
|
||||
component: "/crud/debug/index.vue",
|
||||
meta: {
|
||||
isMenu: false
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "基本特性",
|
||||
name: "basis",
|
||||
|
||||
@@ -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