?? 基于 element-ui 組件庫的 af-table-column 組件 ??
- 支持自適應(yīng)列寬功能, 使用方法如下:
- 安裝
npm install af-table-column --registry=https://registry.npmmirror.com
- 引入
// main.js (需要先引入 Vue 和 Element-UI 依賴庫, 并在 <el-table></el-table> 組件下使用該組件)
import AFTableColumn from 'af-table-column'
Vue.use(AFTableColumn)
- 使用在需要自適應(yīng)的列上使用即可
<el-table-column label="手機(jī)號" align="center" prop="phoneNumber" />
<af-table-column label="簡歷" align="center" prop="resume" />
<el-table-column label="工作經(jīng)驗" align="center" prop="experience" />
?? 效果 ??
-
使用前效果
文章來源:http://www.zghlxwxcb.cn/news/detail-625446.html
-
使用后效果
文章來源地址http://www.zghlxwxcb.cn/news/detail-625446.html
到了這里,關(guān)于vue Element UI table表格根據(jù)內(nèi)容長度自適應(yīng)列寬(af-table-column解決)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!