fix bug floating size element in th is not same with parent

This commit is contained in:
Geriano
2022-07-17 13:44:41 +07:00
parent 50c55a2de4
commit 755b5f352d

View File

@@ -35,8 +35,8 @@ const floating = () => {
const { th, float } = self.refs
if (th && float) {
float.style.width = th.clientWidth + 'px'
float.style.height = th.clientHeight + 'px'
// float.style.width = th.clientWidth + 'px'
// float.style.height = th.clientHeight + 'px'
const parent = th.parentElement
@@ -74,7 +74,7 @@ onMounted(() => {
</template>
</div>
<div ref="float" v-if="table?.config?.sticky" class="absolute top-0 left-0" :class="`${sort && 'cursor-pointer'} ${$props.class} bg-transparent dark:bg-transparent`">
<div ref="float" v-if="table?.config?.sticky" class="absolute top-0 left-0 w-full h-full" :class="`${sort && 'cursor-pointer'} ${$props.class} bg-transparent dark:bg-transparent`">
</div>
</th>
</template>