修改分页定义
This commit is contained in:
@@ -15,118 +15,118 @@ const data = [
|
||||
'status': 1,
|
||||
'rolename': '管理员',
|
||||
},
|
||||
{
|
||||
'id': '652286556713195552',
|
||||
'username': 'operator_A',
|
||||
'password': '12345678',
|
||||
'realname': '潘霞',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '373930342176416776',
|
||||
'username': 'operator_B',
|
||||
'password': '12345678',
|
||||
'realname': '郝秀英',
|
||||
'status': 0,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '429621442453555775',
|
||||
'username': 'operator_C',
|
||||
'password': '12345678',
|
||||
'realname': '吕洋',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '387231964476618937',
|
||||
'username': 'operator_D',
|
||||
'password': '12345678',
|
||||
'realname': '江磊',
|
||||
'status': 0,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '604013348875476647',
|
||||
'username': 'operator_E',
|
||||
'password': '12345678',
|
||||
'realname': '姚静',
|
||||
'status': 0,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '028222596330483467',
|
||||
'username': 'operator_F',
|
||||
'password': '12345678',
|
||||
'realname': '龙艳',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '739427478368274267',
|
||||
'username': 'operator_G',
|
||||
'password': '12345678',
|
||||
'realname': '武涛',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127243',
|
||||
'username': 'operator_H',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳',
|
||||
'status': 0,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127244',
|
||||
'username': 'operator_I',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳1',
|
||||
'status': 0,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127245',
|
||||
'username': 'operator_J',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳2',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127245',
|
||||
'username': 'operator_J',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳2',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127245',
|
||||
'username': 'operator_J',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳2',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127245',
|
||||
'username': 'operator_J',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳2',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
},
|
||||
{
|
||||
'id': '448686878612127245',
|
||||
'username': 'operator_J',
|
||||
'password': '12345678',
|
||||
'realname': '孙芳2',
|
||||
'status': 1,
|
||||
'rolename': '操作员',
|
||||
}
|
||||
// {
|
||||
// 'id': '652286556713195552',
|
||||
// 'username': 'operator_A',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '潘霞',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '373930342176416776',
|
||||
// 'username': 'operator_B',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '郝秀英',
|
||||
// 'status': 0,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '429621442453555775',
|
||||
// 'username': 'operator_C',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '吕洋',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '387231964476618937',
|
||||
// 'username': 'operator_D',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '江磊',
|
||||
// 'status': 0,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '604013348875476647',
|
||||
// 'username': 'operator_E',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '姚静',
|
||||
// 'status': 0,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '028222596330483467',
|
||||
// 'username': 'operator_F',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '龙艳',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '739427478368274267',
|
||||
// 'username': 'operator_G',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '武涛',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127243',
|
||||
// 'username': 'operator_H',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳',
|
||||
// 'status': 0,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127244',
|
||||
// 'username': 'operator_I',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳1',
|
||||
// 'status': 0,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127245',
|
||||
// 'username': 'operator_J',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳2',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127245',
|
||||
// 'username': 'operator_J',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳2',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127245',
|
||||
// 'username': 'operator_J',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳2',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127245',
|
||||
// 'username': 'operator_J',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳2',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// },
|
||||
// {
|
||||
// 'id': '448686878612127245',
|
||||
// 'username': 'operator_J',
|
||||
// 'password': '12345678',
|
||||
// 'realname': '孙芳2',
|
||||
// 'status': 1,
|
||||
// 'rolename': '操作员',
|
||||
// }
|
||||
|
||||
]
|
||||
|
||||
|
||||
@@ -3,17 +3,16 @@ import { ref } from 'vue'
|
||||
export const useViewSize = () => {
|
||||
|
||||
const popupBaseView = ref(null)
|
||||
const viewWidth = ref("0")
|
||||
const viewHeight = ref("0")
|
||||
const unit = 'px'
|
||||
const viewWidth = ref(0)
|
||||
const viewHeight = ref(0)
|
||||
|
||||
/**
|
||||
* 更新宽和高的数据
|
||||
*/
|
||||
const updateDimensions = () => {
|
||||
if (popupBaseView.value) {
|
||||
viewWidth.value = popupBaseView.value.offsetWidth + unit
|
||||
viewHeight.value = popupBaseView.value.offsetHeight + unit
|
||||
viewWidth.value = popupBaseView.value.offsetWidth
|
||||
viewHeight.value = popupBaseView.value.offsetHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<el-dialog class='table-box'
|
||||
v-model='dialogVisible'
|
||||
top='114px'
|
||||
:style="{height:height,maxHeight:height,overflow:'hidden'}"
|
||||
:style="{height:height+'px',maxHeight:height+'px',overflow:'hidden'}"
|
||||
:title='title'
|
||||
:width='width'
|
||||
:modal='false'>
|
||||
<div class='table-box'>
|
||||
<div class='table-box' :style="{height:(height-64)+'px',maxHeight:(height-64)+'px',overflow:'hidden'}">
|
||||
<ProTable
|
||||
ref='proTable'
|
||||
:columns='columns'
|
||||
@@ -140,12 +140,12 @@ defineExpose({ open })
|
||||
|
||||
const props = defineProps({
|
||||
width: {
|
||||
type: String,
|
||||
default: '800px',
|
||||
type: Number,
|
||||
default: 800,
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '744px',
|
||||
type: Number,
|
||||
default: 744,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user