Browse Source

YT-703库存余额,打印标签,现刚进入页面这样(如图),选择后变成如图,应一直保持选择后的样式,大小页面一致

intex_online20241111
张立 3 months ago
parent
commit
9ec4813ffc
  1. 13
      src/directives/permission/clientTable.ts

13
src/directives/permission/clientTable.ts

@ -27,19 +27,22 @@ export function clientTable(app: App<Element>) {
app.directive('clientSearchTable', (el, binding) => { app.directive('clientSearchTable', (el, binding) => {
nextTick(() => { nextTick(() => {
setTimeout(() => {
const top = el.getBoundingClientRect().top const top = el.getBoundingClientRect().top
const qustionHeight = 150 const qustionHeight = 260
let paginationHeight = 0 let paginationHeight = 0
if(el.children&&el.children.length>1){ if (el.children && el.children.length > 1) {
paginationHeight = 70 paginationHeight = 70
} }
const height = window.innerHeight - top - paginationHeight - qustionHeight const height = window.innerHeight - paginationHeight - qustionHeight
if(el.getBoundingClientRect().height>height){ if (el.getBoundingClientRect().height > height) {
console.log('高度',el.getBoundingClientRect().height)
el.style.height = height + 'px' el.style.height = height + 'px'
el.firstChild.style.height = '100%' el.firstChild.style.height = '100%'
} }
}) })
})
}) })
app.directive('clientTableForm', (el, binding) => { app.directive('clientTableForm', (el, binding) => {
nextTick(() => { nextTick(() => {

Loading…
Cancel
Save