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