opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.53k stars 251 forks source link

🐛 [Bug]: Display error when Grid component sets show-header-overflow and show-overflow to tooltip #253

Closed Felix-jk closed 9 months ago

Felix-jk commented 1 year ago

Version

3.8.1

Vue Version

3.2.47

Link to minimal reproduction

next

Step to reproduce

Grid 组件设置 show-header-overflow="tooltip" show-overflow="tooltip",当单元格内容超长时,内容不显示;鼠标移到单元格上,控制台⚠警告+❌报错。

但在GridColumn 组件设置 show-header-overflow="tooltip" show-overflow="tooltip",显示正常!

是否Grid 组件设置了,GridColumn 组件没有继承到Grid 的配置???

f525cdf08c21c4d6435aee613658062

5d28106371cd54c69ae891c1cc78c96

===================================================

<template>
  <tiny-grid :data="tableData" show-header-overflow="tooltip" show-overflow="tooltip">
    <tiny-grid-column type="index" width="60"></tiny-grid-column>
    <tiny-grid-column type="selection" width="60"></tiny-grid-column>
    <tiny-grid-column field="name" title="公司名称" show-header-tip></tiny-grid-column>
    <tiny-grid-column
      field="employees"
      title="员工数显示为省略号并用原生 title 显示---------------------"
      show-header-overflow="title"></tiny-grid-column>
    <tiny-grid-column
      field="createdDate"
      title="创建日期过长隐藏时显示为省略号并用 tooltip 显示"
      show-header-overflow="tooltip"></tiny-grid-column>
    <tiny-grid-column
      field="city"
      title="城市文字过长隐藏时显示为省略号可以通过 enterable 开启鼠标是否可进入到 tooltip 中"
      show-header-overflow="ellipsis"></tiny-grid-column>
  </tiny-grid>
</template>

<script lang="jsx">
  import { Grid, GridColumn } from "@opentiny/vue";

  export default {
    components: {
      TinyGrid: Grid,
      TinyGridColumn: GridColumn
    },
    data() {
      return {
        tableData: [
          {id: "1",name: "GFD科技YX公司",city: "福州",employees: 800,createdDate: "2014-04-30 00:56:00"}
        ]
      };
    }
  };
</script>

What is expected

No response

What is actually happening

No response

Any additional comments (optional)

No response

zzcr commented 1 year ago

新版本3.9.1版本已没有这个问题,麻烦升级下再试试哈~~