feat: update copyTool function to fetch tool data asynchronously
This commit is contained in:
parent
7f9caca5c7
commit
4001d0cded
@ -478,9 +478,10 @@ function refresh(data?: any) {
|
||||
getList()
|
||||
}
|
||||
|
||||
function copyTool(row: any) {
|
||||
async function copyTool(row: any) {
|
||||
ToolDrawertitle.value = t('views.tool.copyTool')
|
||||
const obj = cloneDeep(row)
|
||||
const res = await ToolApi.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
Block a user