feiyu02
2025-05-15 026f17ebafb85250d9ae9b71b80ae5f07341c172
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图像切换展示监测因子
    }
  }