mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 23:32:48 +00:00
feat: enhance copyTool function to load tool data asynchronously
--bug=1057318 --user=刘瑞斌 【工具】复制工具,工具内容没有复制到新的工具中 https://www.tapd.cn/62980211/s/1718332
This commit is contained in:
parent
d1fe600d80
commit
7f09a22518
|
|
@ -453,9 +453,13 @@ function refresh(data?: any) {
|
|||
}
|
||||
}
|
||||
|
||||
function copyTool(row: any) {
|
||||
async function copyTool(row: any) {
|
||||
ToolDrawertitle.value = t('views.tool.copyTool')
|
||||
const obj = cloneDeep(row)
|
||||
const res = await loadSharedApi({ type: 'tool', systemType: apiType.value }).getToolById(
|
||||
row.id,
|
||||
changeStateloading,
|
||||
)
|
||||
const obj = cloneDeep(res.data)
|
||||
delete obj['id']
|
||||
obj['name'] = obj['name'] + ` ${t('views.tool.form.title.copy')}`
|
||||
ToolFormDrawerRef.value.open(obj)
|
||||
|
|
|
|||
Loading…
Reference in New Issue