mirror of https://github.com/certd/certd
🔱: [client] sync upgrade with 4 commits [trident-sync]
build: publish success fix: 修复cloneable模式下的dict 无法动态修改data的bug chore:pull/349/head
parent
407b11fdf9
commit
957d9d8307
|
@ -3,6 +3,12 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.12](https://github.com/fast-crud/fast-crud/compare/v1.25.11...v1.25.12) (2025-05-26)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复cloneable模式下的dict 无法动态修改data的bug ([1dd5cd1](https://github.com/fast-crud/fast-crud/commit/1dd5cd1e1445b126451c6e1b68f453a70bf920de))
|
||||||
|
|
||||||
## [1.25.11](https://github.com/fast-crud/fast-crud/compare/v1.25.10...v1.25.11) (2025-05-14)
|
## [1.25.11](https://github.com/fast-crud/fast-crud/compare/v1.25.10...v1.25.11) (2025-05-14)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fast-crud/fs-admin-antdv4",
|
"name": "@fast-crud/fs-admin-antdv4",
|
||||||
"version": "1.25.11",
|
"version": "1.25.12",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
"@aws-sdk/client-s3": "^3.535.0",
|
"@aws-sdk/client-s3": "^3.535.0",
|
||||||
"@aws-sdk/s3-request-presigner": "^3.535.0",
|
"@aws-sdk/s3-request-presigner": "^3.535.0",
|
||||||
"@ctrl/tinycolor": "^4.1.0",
|
"@ctrl/tinycolor": "^4.1.0",
|
||||||
"@fast-crud/fast-crud": "^1.25.10",
|
"@fast-crud/fast-crud": "^1.25.12",
|
||||||
"@fast-crud/fast-extends": "^1.25.10",
|
"@fast-crud/fast-extends": "^1.25.12",
|
||||||
"@fast-crud/ui-antdv4": "^1.25.10",
|
"@fast-crud/ui-antdv4": "^1.25.12",
|
||||||
"@fast-crud/ui-interface": "^1.25.10",
|
"@fast-crud/ui-interface": "^1.25.12",
|
||||||
"@iconify/tailwind": "^1.2.0",
|
"@iconify/tailwind": "^1.2.0",
|
||||||
"@iconify/vue": "^4.1.1",
|
"@iconify/vue": "^4.1.1",
|
||||||
"@manypkg/get-packages": "^2.2.2",
|
"@manypkg/get-packages": "^2.2.2",
|
||||||
|
|
|
@ -1,5 +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, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, ValueChangeContext } from "@fast-crud/fast-crud";
|
||||||
|
import { createUploaderRules } from "@fast-crud/fast-extends";
|
||||||
export default async function createCrudOptions({}: CreateCrudOptionsProps): Promise<CreateCrudOptionsRet> {
|
export default async function createCrudOptions({}: CreateCrudOptionsProps): Promise<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);
|
||||||
|
@ -53,6 +54,20 @@ export default async function createCrudOptions({}: CreateCrudOptionsProps): Pro
|
||||||
component: { dict: { cache: false } }
|
component: { dict: { cache: false } }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
localSet: {
|
||||||
|
title: "本地修改",
|
||||||
|
search: { show: true },
|
||||||
|
dict: dict({
|
||||||
|
cloneable: true,
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "本地字典"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
type: "dict-select"
|
||||||
|
},
|
||||||
modifyDict: {
|
modifyDict: {
|
||||||
title: "动态修改字典",
|
title: "动态修改字典",
|
||||||
search: { show: false },
|
search: { show: false },
|
||||||
|
@ -65,9 +80,16 @@ export default async function createCrudOptions({}: CreateCrudOptionsProps): Pro
|
||||||
valueChange({ row, getComponentRef }: ValueChangeContext) {
|
valueChange({ row, getComponentRef }: ValueChangeContext) {
|
||||||
// 这里不能使用remoteDict,因为在分发时已经clone到form配置中了
|
// 这里不能使用remoteDict,因为在分发时已经clone到form配置中了
|
||||||
// 这里dict修改不会影响列里面的数据
|
// 这里dict修改不会影响列里面的数据
|
||||||
const targetDict = getComponentRef("remote").dict;
|
const targetDict = getComponentRef("remote").getDict();
|
||||||
targetDict.url = row.modifyDict ? "/mock/dicts/moreOpenStatusEnum?remote" : "/mock/dicts/OpenStatusEnum?remote";
|
targetDict.url = row.modifyDict ? "/mock/dicts/moreOpenStatusEnum?remote" : "/mock/dicts/OpenStatusEnum?remote";
|
||||||
targetDict.reloadDict();
|
targetDict.reloadDict();
|
||||||
|
|
||||||
|
const targetDict2 = getComponentRef("localSet").getDict();
|
||||||
|
if (row.modifyDict) {
|
||||||
|
targetDict2.setData([{ value: 1, label: "修改后的字典" }]);
|
||||||
|
} else {
|
||||||
|
targetDict2.setData([{ value: 1, label: "原字典" }]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
|
@ -78,12 +100,23 @@ export default async function createCrudOptions({}: CreateCrudOptionsProps): Pro
|
||||||
valueChange({ form, getComponentRef }: ValueChangeContext) {
|
valueChange({ form, getComponentRef }: ValueChangeContext) {
|
||||||
// 这里不能使用remoteDict,因为在分发时已经clone到form配置中了
|
// 这里不能使用remoteDict,因为在分发时已经clone到form配置中了
|
||||||
// 这里dict修改不会影响列里面的数据
|
// 这里dict修改不会影响列里面的数据
|
||||||
const targetDict = getComponentRef("remote").dict;
|
const targetDict = getComponentRef("remote").getDict();
|
||||||
targetDict.url = form.modifyDict ? "/mock/dicts/moreOpenStatusEnum?remote" : "/mock/dicts/OpenStatusEnum?remote";
|
targetDict.url = form.modifyDict ? "/mock/dicts/moreOpenStatusEnum?remote" : "/mock/dicts/OpenStatusEnum?remote";
|
||||||
targetDict.reloadDict();
|
targetDict.reloadDict();
|
||||||
|
|
||||||
|
const targetDict2 = getComponentRef("localSet").getDict();
|
||||||
|
if (form.modifyDict) {
|
||||||
|
targetDict2.setData([{ value: 1, label: "修改后的字典" }]);
|
||||||
|
} else {
|
||||||
|
targetDict2.setData([{ value: 1, label: "原字典" }]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
pictureCard: {
|
||||||
|
title: "照片墙",
|
||||||
|
type: "image-uploader"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,8 @@ const list = [
|
||||||
{
|
{
|
||||||
status: "1",
|
status: "1",
|
||||||
remote: "2",
|
remote: "2",
|
||||||
modifyDict: true
|
modifyDict: true,
|
||||||
|
localSet: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: "2",
|
status: "2",
|
||||||
|
|
|
@ -121,6 +121,10 @@ export default async function ({ crudExpose }: CreateCrudOptionsProps): Promise<
|
||||||
title: "动态Url",
|
title: "动态Url",
|
||||||
dict: dynamicUrlDict,
|
dict: dynamicUrlDict,
|
||||||
type: "dict-select"
|
type: "dict-select"
|
||||||
|
},
|
||||||
|
pictureCard: {
|
||||||
|
title: "照片墙",
|
||||||
|
type: "image-uploader"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,6 +131,10 @@ export default async function ({ crudExpose }: CreateCrudOptionsProps): Promise<
|
||||||
cache: true
|
cache: true
|
||||||
}),
|
}),
|
||||||
type: "dict-select"
|
type: "dict-select"
|
||||||
|
},
|
||||||
|
pictureCard: {
|
||||||
|
title: "test",
|
||||||
|
type: "image-uploader"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue