perf: 修改 platform 更新

This commit is contained in:
ibuler
2023-04-17 11:21:24 +08:00
parent 5938ddbb35
commit 03cda9a47a

View File

@@ -6,7 +6,7 @@
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
import { assetFieldsMeta } from '@/views/assets/const'
import { encryptPassword } from '@/utils/crypto'
import { setUrlParam, getUpdateObjURL } from '@/utils/common'
import { getUpdateObjURL, setUrlParam } from '@/utils/common'
export default {
components: { GenericCreateUpdatePage },
@@ -87,7 +87,8 @@ export default {
iConfig() {
const { addFields, addFieldsMeta, defaultConfig } = this
let url = this.url
if (this.$route.query.platform) {
const { id = '' } = this.$route.params
if (this.$route.query.platform && !id) {
url = setUrlParam(url, 'platform', this.$route.query.platform)
}
// 过滤类型为null, undefined 的元素