2021-08-07 17:55:16 +09:00
|
|
|
<template>
|
|
|
|
<div class="">
|
|
|
|
<XAntenna v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-11-12 02:02:25 +09:00
|
|
|
import MkButton from '@/components/ui/button.vue';
|
2021-08-07 17:55:16 +09:00
|
|
|
import XAntenna from './editor.vue';
|
2021-11-12 02:02:25 +09:00
|
|
|
import * as symbols from '@/symbols';
|
|
|
|
import * as os from '@/os';
|
2021-08-07 17:55:16 +09:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkButton,
|
|
|
|
XAntenna,
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
antennaId: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
[symbols.PAGE_INFO]: {
|
|
|
|
title: this.$ts.manageAntennas,
|
|
|
|
icon: 'fas fa-satellite',
|
|
|
|
},
|
|
|
|
antenna: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
antennaId: {
|
|
|
|
async handler() {
|
|
|
|
this.antenna = await os.api('antennas/show', { antennaId: this.antennaId });
|
|
|
|
},
|
|
|
|
immediate: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
onAntennaUpdated() {
|
|
|
|
this.$router.push('/my/antennas');
|
|
|
|
},
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
</style>
|