123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <view class="device-detail-box">
- <aircondition v-if="type === 'aircondition'" :title="title"></aircondition>
- <lighting v-else-if="type === 'lighting'" :title="title" :space="space"></lighting>
- <meter-show v-else-if="type === 'meter'" :title="title" :space="space"></meter-show>
- <water v-else-if="type === 'water'" :title="title" :space="space"></water>
- </view>
- </template>
- <script>
- import aircondition from '@/components/device/aircondition';
- import lighting from '@/components/device/lighting';
- import meterShow from '@/components/device/meter';
- import water from '@/components/device/water';
- export default {
- data() {
- return {
- type: '',
- title: '',
- space: ''
- }
- },
- onLoad(body) {
- this.title = body.name;
- this.space = body.space || '';
- uni.setNavigationBarTitle({
- title: body.name
- });
- this.type = body.type
- },
- methods: {
- },
- components: {
- aircondition,
- lighting,
- meterShow,
- water
- },
- }
- </script>
- <style>
- </style>
|