This commit is contained in:
2025-12-09 16:42:38 +08:00
parent 89a1391b40
commit 4f8d37483e
9 changed files with 403 additions and 4 deletions

View File

@@ -38,6 +38,9 @@
</template>
<script setup>
import { useMobileTable } from '@/composables/useMobileTable'
import { watch, nextTick, onMounted } from 'vue'
defineProps({
title: {
type: String,
@@ -48,6 +51,23 @@ defineProps({
default: ''
}
})
// 移动端表格优化
const { isMobile, removeFixedColumns } = useMobileTable()
// 监听表格内容变化,重新应用优化
watch(() => isMobile.value, () => {
nextTick(() => {
removeFixedColumns()
})
})
// 在组件挂载后应用优化
onMounted(() => {
nextTick(() => {
removeFixedColumns()
})
})
</script>
<style scoped>