| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div class="otherMonitor">
- <div class="container">
- <a-table ref="table" :row-selection="rowSelection" size="small" :scroll="monitorscroll2" :columns="columnsOther"
- :data-source="monitorlist" :pagination="false" :loading="loading">
- <span slot="action" slot-scope="text, record">
- </span>
- </a-table>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- import { onMounted, ref, computed, defineEmits, reactive, onUnmounted, watch, markRaw, defineAsyncComponent } from 'vue';
- import {columnsOther} from '../fire.data'
- //滚动条
- let monitorscroll2 = reactive({ y: 'calc(100% - 150px)' })
- //table列表
- let monitorlist = reactive([])
- //table加载状态
- let loading = ref(false)
- //table选中的数据
- let selectedRow = reactive([])
- //table复选框选择
- let rowSelection = computed(() => {
- return {
- onChange: (selectedRowKeys, selectedRows) => {
- selectedRow = selectedRows
- console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRow)
- },
- getCheckboxProps: (record) => ({
- props: {
- realId: record.realId,
- },
- }),
- }
- })
- </script>
- <style lang="less" scoped>
- .otherMonitor {
- width: 100%;
- height: 100%;
- padding: 20px;
- box-sizing: border-box;
- .container {
- height: 100%;
- }
- }
- </style>
|