Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
https://happy-coding-clans.github.io/vue-easytable/
MIT License
3.69k stars 738 forks source link

有没有全局的配置表格行高及表格中字体和字号功能? #21

Closed yichangle closed 6 years ago

yichangle commented 6 years ago

如标题。

huangshuwei commented 6 years ago

设置表头行高以及表格体行高通过 api 文档设置,分别对应 title-row-heightrow-height

字体和字号,默认依赖于外部的字体和字号。当然也对外开放了class 去控制,这个样式放到项目的样式表里即可(下次文档升级我加下说明):

.v-table-class{
      /* 设置表格的字号和字体*/
}
huangshuwei commented 6 years ago

如果要全局的设置表头行高和表格体行高,建议通过vuex 设置,如 :

rootState:{
   titleRowHeight:30,
   rowHeight:30
}

然后每个使用table的地方直接用就vuex中定义的常量就好了,这样可以避免多人协同开发,设置的行高不一致的问题

huangshuwei commented 6 years ago

文档已更新,包含详细说明: http://doc.huangsw.com/vue-easytable/app.html#/start

yichangle commented 6 years ago

谢谢!太棒啦。