Giter VIP home page Giter VIP logo

Comments (13)

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

No description provided.

用户是哪个版本的库,有没有报错或者警告;
image
确定一下这里渲染的表格行数是否是十几条,而不是全部渲染了

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

No description provided.

用户是哪个版本的库,有没有报错或者警告; image 确定一下这里渲染的表格行数是否是十几条,而不是全部渲染了

版本号:^1.0.20
渲染的不是固定的条数,全屏一页28条,然后父级的transform: translateY(900px);这个只为什么我这是100递增的。我看你的案例都是到都含有个位数的

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

No description provided.

用户是哪个版本的库,有没有报错或者警告; image 确定一下这里渲染的表格行数是否是十几条,而不是全部渲染了

慢慢滚动也是100递增吗,有点奇怪,但看不出哪里有问题,能提供demo吗

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

代码片段等会,我弄一个。另外我设置了itemSize="50" 和 dynamic="false" 还是会有滚动白屏问题,所以设置没设置都会有滚动白屏

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024
<template>
  <div>
    <el-radio-group v-model="value" style="height: 600px;background-color: red;">
      <el-radio :label="undefined">表格不固定高(自动查找父层滚动容器)</el-radio>
      <el-radio label="600px">表格高度600px(表格内滚动)</el-radio>
      <el-radio label="100%">表格高度100%撑满屏幕</el-radio>
    </el-radio-group>
    <!-- :key="value" 为了value变化时刷新VirtualScroll组件 -->
    <virtual-scroll
      ref="virtualScroll"
      :data="list"
      :item-size="62"
      :key="value"
      key-prop="id"
      :style="{height: value === '100%' ? 'calc(100vh - 55px - 25px)' : ''}"
      @change="(virtualList) => tableData = virtualList">
      <el-table
        :data="tableData"
        border
        row-key="id"
        :height="value"
        style="width: 100%">
        <el-table-column
          v-for="item,index in column" :key="index"
          :fixed="index === 0"
          :prop="item.prop"
          :label="item.label"
          width="160">
        </el-table-column>
        <el-table-column
          label="操作"
          fixed="right"
          width="100">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
            <el-button type="text" size="small">编辑</el-button>
          </template>
        </el-table-column>
      </el-table>
    </virtual-scroll>
  </div>
</template>

<script>
import VirtualScroll from 'el-table-virtual-scroll'
import { mockData } from '@/utils'

export default {
  components: {
    VirtualScroll
  },
  data () {
    return {
      column: [
        { prop:'id',label:'ID' },
        { prop:'name',label:'ID' },
        { prop:'operation_type',label:'ID' },
        { prop:'operation_mode',label:'ID' },
        { prop:'business_type',label:'ID' },
        { prop:'transaction_amount',label:'ID' },
        { prop:'cash_money',label:'ID' },
        { prop:'account_money',label:'ID' },
        { prop:'account_score',label:'ID' },
        { prop:'now_total_money',label:'ID' },
        { prop:'account_time',label:'ID' },
        { prop:'order_time',label:'ID' },
        { prop:'pay_code',label:'ID' },
        { prop:'remark',label:'ID' },
        { prop:'tag_content',label:'ID' },
        { prop:'discount_money',label:'ID' },
        { prop:'original_price',label:'ID' },
        { prop:'user_discount',label:'ID' },
        { prop:'seller_name',label:'ID' },
        { prop:'admin_surename',label:'ID' },
        { prop:'seller_name',label:'ID' },
        { prop:'sell_team_name',label:'ID' },
        { prop:'user_addtime',label:'ID' }
      ],
      list: mockData(0, 20000),
      value: undefined,
      tableData: []
    }
  },
  methods: {

  },
  created () {
  }
}
</script>

<style lang='less'>
.el-table .el-table__cell {
  padding: 8.5px 0 !important;
}
</style>
`

我在你这个稍微改了一下,没复现出滚动空白问题,但是慢慢滚动也是100递增复现出来了,因为设置了show-overflow-tooltip,计算的滚动高度就固定了

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

我不知道是不是我的问题,表格如果有自定义排序的话,就是排序走接口,排序后会变成空白。

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

image 排序后试试调用update方法

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

表格高度是没用固定的

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

image 排序后试试调用update方法

还是不能解决

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

表格高度是没用固定的

不使用固定列试试,不使用v-for试试

from el-table-virtual-scroll.

song285 avatar song285 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

表格高度是没用固定的

不使用固定列试试,不使用v-for试试

这是我点击排序后发生的变化

image

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on July 3, 2024

项目中试下把固定布局去掉试试,看看是不是因为固定布局导致的

表格高度是没用固定的

不使用固定列试试,不使用v-for试试

这是我点击排序后发生的变化

image

排序白屏在demo上能复现出来吗

from el-table-virtual-scroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.