feat: 创建API增加clone_from查询参数

This commit is contained in:
Jiangjie.Bai
2022-06-06 15:52:26 +08:00
committed by Jiangjie.Bai
parent 1cb10902d5
commit 7b566ae46f

View File

@@ -138,6 +138,16 @@ export default {
if (params.id) {
url = getUpdateObjURL(url, params.id)
}
const clone_from = this.$route.query['clone_from']
const query = clone_from ? `clone_from=${clone_from}` : ''
if (query) {
if (url.indexOf('?') === -1) {
url = `${url}?${query}`
} else {
url = `${url}&${query}`
}
}
return url
}
},