From c2e36c45578e63ad17c5e258c92d62d9ae03dadb Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 30 五月 2025 11:55:52 +0800 Subject: [PATCH] Merge branch 'master' of ssh://114.215.109.124:29418/underway-vue --- src/components/monitor/FactorRadio.vue | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/components/monitor/FactorRadio.vue b/src/components/monitor/FactorRadio.vue index c686f68..e95e72d 100644 --- a/src/components/monitor/FactorRadio.vue +++ b/src/components/monitor/FactorRadio.vue @@ -17,13 +17,17 @@ export default { props: { + modelValue: { + type: String, + default: defaultOptions(TYPE0).value + }, deviceType: { type: String, // type0: 杞﹁浇鎴栨棤浜烘満; type1:鏃犱汉鑸� default: TYPE0 } }, - emits: ['change'], + emits: ['change', 'update:modelValue'], data() { return { radio: defaultOptions(TYPE0).value @@ -38,6 +42,12 @@ deviceType(nV, oV) { if (nV != oV) { this.radio = this.options[0].value; + this.$emit('update:modelValue', this.radio) + } + }, + modelValue(nV, oV){ + if (nV != oV) { + this.radio = nV } } }, @@ -45,6 +55,7 @@ handleChange(value) { const item = this.options.find((v) => v.value == value); this.$emit('change', item.value, item); + this.$emit('update:modelValue', item.value) // todo 鍦板浘3d鍥惧儚鍒囨崲灞曠ず鐩戞祴鍥犲瓙 } } -- Gitblit v1.9.3