Blame view

src/components/room/roomContractsDemo.vue 666 Bytes
af1bcbd6   wuxw   房屋页面开发中
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
  <template>
    <div>
      <el-button type="primary" @click="openByOwner">
        {{ $t('roomContractsDemo.openByOwner') }}
      </el-button>
      <el-button type="primary" @click="openByRoom">
        {{ $t('roomContractsDemo.openByRoom') }}
      </el-button>
      <room-contracts ref="contractsRef" />
    </div>
  </template>
  
  <script>
  import RoomContracts from './roomContracts'
  
  export default {
    components: {
      RoomContracts
    },
    methods: {
      openByOwner() {
        // 模拟业主ID
        this.$refs.contractsRef.open({ ownerId: '12345' })
      },
      openByRoom() {
        // 模拟房屋ID
        this.$refs.contractsRef.open({ roomId: '67890' })
      }
    }
  }
  </script>