12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <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>
- <environment v-else-if="type === 'environment'"></environment>
- <control v-else-if="type === 'control'" :title="title"></control>
- </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';
- import environment from '@/components/device/environment';
- import control from '@/components/device/control'
- 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
- },
- onPageScroll(e) {
- // 获取页面滚动的垂直距离
- uni.$emit('onPageScroll', e.scrollTop);
- },
- methods: {
- },
- components: {
- aircondition,
- lighting,
- meterShow,
- water,
- environment,
- control
- },
- }
- </script>
- <style>
- </style>
|