zhangli 1 year ago
parent
commit
5de155dd14
  1. 14
      src/components/Search/src/Search.vue
  2. 5
      src/components/Table/src/Table.vue

14
src/components/Search/src/Search.vue

@ -102,13 +102,13 @@ const setVisible = () => {
} }
const Search = ref() const Search = ref()
onMounted(() => { onMounted(() => {
nextTick(() => { // nextTick(() => {
console.log(4) // console.log(4)
console.log(Search.value.offsetHeight) // console.log(Search.value.offsetHeight)
wsCache.set('SearchoffsetHeight', Search.value.offsetHeight) // wsCache.set('SearchoffsetHeight', Search.value.offsetHeight)
console.log(wsCache.get('SearchoffsetHeight')) // console.log(wsCache.get('SearchoffsetHeight'))
console.log(4) // console.log(4)
}) // })
}) })
</script> </script>

5
src/components/Table/src/Table.vue

@ -9,7 +9,8 @@ import { set } from 'lodash-es'
import { Pagination, TableColumn, TableSetPropsType, TableSlotDefault } from '@/types/table' import { Pagination, TableColumn, TableSetPropsType, TableSlotDefault } from '@/types/table'
import { useCache } from '@/hooks/web/useCache' import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache() const { wsCache } = useCache()
let SearchoffsetHeight =(wsCache.get('SearchoffsetHeight') + 310 )+'px'
export default defineComponent({ export default defineComponent({
// eslint-disable-next-line vue/no-reserved-component-names // eslint-disable-next-line vue/no-reserved-component-names
@ -17,7 +18,6 @@ export default defineComponent({
props: { props: {
pageSize: propTypes.number.def(10), pageSize: propTypes.number.def(10),
currentPage: propTypes.number.def(1), currentPage: propTypes.number.def(1),
height: propTypes.string.def('calc(100vh - '+SearchoffsetHeight+')'),
// //
selection: propTypes.bool.def(false), selection: propTypes.bool.def(false),
// schemashowOverflowTooltip, // schemashowOverflowTooltip,
@ -293,7 +293,6 @@ export default defineComponent({
// @ts-ignore // @ts-ignore
ref={elTableRef} ref={elTableRef}
data={unref(getProps).data} data={unref(getProps).data}
height={unref(getProps).height}
onSelection-change={selectionChange} onSelection-change={selectionChange}
onSort-change={sortChange} onSort-change={sortChange}
{...unref(getBindValue)} {...unref(getBindValue)}

Loading…
Cancel
Save