mirror of https://github.com/certd/certd
🔱: [client] sync upgrade with 3 commits [trident-sync]
fix: _index列 被conditionalRender影响的bug refactor:pull/14/head
parent
1173fb1e90
commit
a62230c195
|
@ -40,7 +40,8 @@ function install(app: any, options: any = {}) {
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
match(scope) {
|
match(scope) {
|
||||||
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
||||||
return scope.value == null || (scope.value instanceof Array && scope.value.length === 0);
|
const { value, key } = scope;
|
||||||
|
return !value && key != "_index" && value != false;
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
return "-";
|
return "-";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, ValueChangeContext } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, ValueChangeContext } from "@fast-crud/fast-crud";
|
||||||
export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function createCrudOptions({}: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
return await api.GetList(query);
|
return await api.GetList(query);
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||||
};
|
};
|
||||||
|
|
||||||
const remoteDict = dict({
|
const remoteDict = dict({
|
||||||
|
cloneable: true,
|
||||||
url: "/mock/dicts/OpenStatusEnum"
|
url: "/mock/dicts/OpenStatusEnum"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,17 @@ const options: any = {
|
||||||
const list = [
|
const list = [
|
||||||
{
|
{
|
||||||
status: "1",
|
status: "1",
|
||||||
remote: "2"
|
remote: "2",
|
||||||
|
modifyDict: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: "2",
|
status: "2",
|
||||||
remote: "0"
|
remote: "0",
|
||||||
|
modifyDict: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: "0"
|
status: "0",
|
||||||
|
modifyDict: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
options.list = list;
|
options.list = list;
|
||||||
|
|
Loading…
Reference in New Issue