xieb
2023-09-13 3667807a7b7418efc090ee3fa6a6b734bc3080bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<template>
<div class="drone-control-info-wrap">
  <a-textarea v-model:value="info" placeholder="drc info" :rows="5" disabled/>
</div>
</template>
 
<script lang="ts" setup>
import { ref, defineProps, watch } from 'vue'
 
const props = defineProps<{
    message?: string,
}>()
 
const info = ref('')
watch(() => props.message, message => {
  info.value = message || ''
}, {
  immediate: true
})
 
// const emit = defineEmits(['cancel', 'confirm'])
</script>
 
<style lang="scss" scoped>
.drone-control-info-wrap {
  &::v-deep{
    textarea.ant-input {
      background-color: #000;
      color: #fff;
      white-space: pre-wrap;
    }
  }
}
</style>