Skip to content

Commit

Permalink
fix(useNodeConfig.ts): clear validate after switch language
Browse files Browse the repository at this point in the history
  • Loading branch information
oucb authored and ysfscream committed Dec 1, 2023
1 parent 7edd5b6 commit 205f3bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/composables/config/useNodeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import useNodeConfigParamCommon from '@/composables/config/useNodeConfigParamCom
import type { ParamInfo, PluginInfo } from '@/types/config'
import type { DriverDirection } from '@/types/enums'
import type { Ref } from 'vue'
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useGetPluginMsgIdMap } from './usePlugin'
import { EmqxMessage } from '@emqx/emqx-ui'
import { useI18n } from 'vue-i18n'
import { cloneDeep } from 'lodash'
import { randomString } from '@/utils/utils'
import i18n from '@/i18n/index'

interface Field {
key: string
Expand Down Expand Up @@ -47,6 +48,11 @@ export default (props: Props) => {

const node = computed(() => route.params.node.toString())

watch(i18n.global.locale, () => {
// TODO only udpate message
formCom.value.form.clearValidate()
})

/**
* Handle Hexadecimal
* Transfer int number to hexadecimal, when type = init & base = 16
Expand Down

0 comments on commit 205f3bb

Please sign in to comment.