vue 表头指定字符换行
//表头指定字符换行
function install(Vue) {
Vue.prototype.renderheader = function (h, { column }) {
return h("span", {}, [
h("span", {}, column.label.split("//")[0]), // 其中//也可以用其他符号替代
h("br"),
h("span", {}, column.label.split("//")[1]),
]);
};
}
使用 <el-table-column :render-header="renderHeader" label="xxxx" width="120" align="center" />