Browse Source

表格优化提交

main
likunming 1 year ago
parent
commit
3624591645
  1. 6
      io.sc.platform.core.frontend/src/platform/components/grid/TreeGridRow.vue

6
io.sc.platform.core.frontend/src/platform/components/grid/TreeGridRow.vue

@ -1,6 +1,6 @@
<template> <template>
<q-tr :class="row.selected ? 'selected' : ''"> <q-tr :class="row.selected ? 'selected' : ''">
<q-td class="nowrap text-nowrap"> <q-td :style="tdWidthComputed" class="nowrap text-nowrap">
<div class="flex flex-nowrap items-center"> <div class="flex flex-nowrap items-center">
<!--层级占位符--> <!--层级占位符-->
<span :style="`width:${27 * props.level}px;`"></span> <span :style="`width:${27 * props.level}px;`"></span>
@ -93,7 +93,9 @@ const state = reactive({
}); });
const tdWidthComputed = computed(() => { const tdWidthComputed = computed(() => {
return { width: 100 * props.level + 'px' }; let width = props.gridProps.checkboxSelection ? 28 * (3 + props.level) : 28 * (2 + props.level);
const padding = 8 * 3;
return { width: width + padding + 'px', minWidth: width + padding + 'px' };
}); });
watch( watch(

Loading…
Cancel
Save