diff --git a/examples/App.vue b/examples/App.vue index d0fc17761..799a00d8e 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -453,6 +453,13 @@ export default { }, keywords: ['max-height'] }, + { + label: 'app.aside.nav.rowHeight', + locat: { + name: 'TableRowHeight' + }, + keywords: ['row-config', 'height'] + }, { label: 'app.aside.nav.resize', locat: { diff --git a/examples/api/table.js b/examples/api/table.js index 66db73dd5..d46552b82 100644 --- a/examples/api/table.js +++ b/examples/api/table.js @@ -925,7 +925,7 @@ const apis = [ list: [ { name: 'width', - desc: '列的默认宽度', + desc: '列的宽度', version: '', type: 'number, string', enum: 'auto, px, %', @@ -934,7 +934,7 @@ const apis = [ }, { name: 'minWidth', - desc: '列的默认最小宽度', + desc: '列的最小宽度', version: '', type: 'number, string', enum: 'auto, px, %', @@ -943,6 +943,25 @@ const apis = [ } ] }, + { + name: 'row-config', + desc: '行配置信息', + version: '3.3.17', + type: 'any', + enum: '', + defVal: '继承 setup.table.rowConfig', + list: [ + { + name: 'height', + desc: '只对 show-overflow 有效,行的高度', + version: '', + type: 'number', + enum: '', + defVal: '', + list: [] + } + ] + }, { name: 'resizable-config', descKey: 'app.api.table.desc.resizableConfig', diff --git a/examples/i18n/lang/en-US.js b/examples/i18n/lang/en-US.js index d0fb0c7a6..15c11bdc2 100644 --- a/examples/i18n/lang/en-US.js +++ b/examples/i18n/lang/en-US.js @@ -132,7 +132,7 @@ export default { scrollMode: 'Scroll mode', scrollRows: 'vertical', scrollFullRows: 'vertical + complicated', - scrollCols: 'horizontal and vertical', + scrollCols: 'horizontal', scrollFullCols: 'horizontal and vertical + complicated', moveHighlight: 'Keyboard move highlight row', scrollTree: 'Virtual tree', diff --git a/examples/i18n/lang/zh-CN.js b/examples/i18n/lang/zh-CN.js index 331785fac..d17645c2e 100644 --- a/examples/i18n/lang/zh-CN.js +++ b/examples/i18n/lang/zh-CN.js @@ -131,7 +131,7 @@ export default { scrollMode: '滚动模式', scrollRows: '纵向', scrollFullRows: '纵向 + 复杂渲染', - scrollCols: '横向&纵向', + scrollCols: '横向', scrollFullCols: '横向&纵向 + 复杂渲染', moveHighlight: '键盘移动高亮行', scrollTree: '虚拟树', diff --git a/examples/i18n/lang/zh-TC.js b/examples/i18n/lang/zh-TC.js index 40129dd10..c9c50f5c3 100644 --- a/examples/i18n/lang/zh-TC.js +++ b/examples/i18n/lang/zh-TC.js @@ -131,7 +131,7 @@ export default { scrollMode: '滚动模式', scrollRows: '纵向', scrollFullRows: '纵向 + 复杂渲染', - scrollCols: '横向&纵向', + scrollCols: '横向', scrollFullCols: '横向&纵向 + 复杂渲染', moveHighlight: '键盘移动高亮行', scrollTree: '虚拟树', diff --git a/examples/router.js b/examples/router.js index 3cc27b301..dbb067454 100644 --- a/examples/router.js +++ b/examples/router.js @@ -39,6 +39,7 @@ import TableHeaderHighlight from './views/table/base/HeaderHighlight.vue' import TableResizable from './views/table/base/Resizable.vue' import TableMaxHeight from './views/table/base/MaxHeight.vue' import TableHeight from './views/table/base/Height.vue' +import TableRowHeight from './views/table/base/RowHeight.vue' import TableAutoHeight from './views/table/base/AutoHeight.vue' import TableFixed from './views/table/base/Fixed.vue' import TableFixedFull from './views/table/base/FixedFull.vue' @@ -488,6 +489,11 @@ export default new Router({ name: 'TableHeight', component: TableHeight }, + { + path: '/table/base/rowHeight', + name: 'TableRowHeight', + component: TableRowHeight + }, { path: '/table/base/autoHeight', name: 'TableAutoHeight', diff --git a/examples/views/api/API.vue b/examples/views/api/API.vue index 8af2bac3f..388ecd2a0 100644 --- a/examples/views/api/API.vue +++ b/examples/views/api/API.vue @@ -89,50 +89,50 @@ import switchAPI from '../../api/switch' import listAPI from '../../api/list' import pulldownAPI from '../../api/pulldown' -// import i18n from '../../i18n' -// const attributes = window.attributes = {} -// const tags = window.tags = {} +import i18n from '../../i18n' +const attributes = window.attributes = {} +const tags = window.tags = {} -// const tagMaps = [ -// ['vxe-table', tableAPI, { subtags: ['vxe-colgroup', 'vxe-column'], description: '基础表格' }], -// ['vxe-colgroup', colgroupAPI, { subtags: ['vxe-column'], description: '基础表格 - 分组列' }], -// ['vxe-column', columnAPI, { description: '基础表格 - 列' }], -// ['vxe-grid', gridAPI, { description: '高级表格' }], -// ['vxe-toolbar', toolbarAPI, { description: '工具栏' }], -// ['vxe-pager', pagerAPI, { description: '分页' }], -// ['vxe-radio', radioAPI, { description: '单选框' }], -// ['vxe-radio-group', radioGroupAPI, { subtags: ['vxe-radio', 'vxe-radio-button'], description: '单选组' }], -// ['vxe-radio-button', radioButtonAPI, { description: '单选按钮' }], -// ['vxe-checkbox', checkboxAPI, { description: '复选框' }], -// ['vxe-checkbox-group', checkboxGroupAPI, { subtags: ['vxe-checkbox'], description: '复选组' }], -// ['vxe-switch', switchAPI, { description: '开关按钮' }], -// ['vxe-input', inputAPI, { description: '输入框' }], -// ['vxe-select', selectAPI, { subtags: ['vxe-optgroup', 'vxe-option'], description: '下拉框' }], -// ['vxe-optgroup', optgroupAPI, { subtags: ['vxe-option'], description: '下拉框 - 分组' }], -// ['vxe-option', optionAPI, { description: '下拉框 - 选项' }], -// ['vxe-button', buttonAPI, { description: '按钮' }], -// ['vxe-tooltip', tooltipAPI, { description: '工具提示' }], -// ['vxe-modal', modalAPI, { description: '弹窗' }], -// ['vxe-form', formAPI, { subtags: ['vxe-form-item'], description: '表单' }], -// ['vxe-form-item', formItemAPI, { description: '表单 - 项' }], -// ['vxe-form-gather', formGatherAPI, { description: '表单 - 项集合' }], -// ['vxe-list', listAPI, { description: '列表' }], -// ['vxe-pulldown', pulldownAPI, { description: '下拉容器' }] -// ] +const tagMaps = [ + ['vxe-table', tableAPI, { subtags: ['vxe-colgroup', 'vxe-column'], description: '基础表格' }], + ['vxe-colgroup', colgroupAPI, { subtags: ['vxe-column'], description: '基础表格 - 分组列' }], + ['vxe-column', columnAPI, { description: '基础表格 - 列' }], + ['vxe-grid', gridAPI, { description: '高级表格' }], + ['vxe-toolbar', toolbarAPI, { description: '工具栏' }], + ['vxe-pager', pagerAPI, { description: '分页' }], + ['vxe-radio', radioAPI, { description: '单选框' }], + ['vxe-radio-group', radioGroupAPI, { subtags: ['vxe-radio', 'vxe-radio-button'], description: '单选组' }], + ['vxe-radio-button', radioButtonAPI, { description: '单选按钮' }], + ['vxe-checkbox', checkboxAPI, { description: '复选框' }], + ['vxe-checkbox-group', checkboxGroupAPI, { subtags: ['vxe-checkbox'], description: '复选组' }], + ['vxe-switch', switchAPI, { description: '开关按钮' }], + ['vxe-input', inputAPI, { description: '输入框' }], + ['vxe-select', selectAPI, { subtags: ['vxe-optgroup', 'vxe-option'], description: '下拉框' }], + ['vxe-optgroup', optgroupAPI, { subtags: ['vxe-option'], description: '下拉框 - 分组' }], + ['vxe-option', optionAPI, { description: '下拉框 - 选项' }], + ['vxe-button', buttonAPI, { description: '按钮' }], + ['vxe-tooltip', tooltipAPI, { description: '工具提示' }], + ['vxe-modal', modalAPI, { description: '弹窗' }], + ['vxe-form', formAPI, { subtags: ['vxe-form-item'], description: '表单' }], + ['vxe-form-item', formItemAPI, { description: '表单 - 项' }], + ['vxe-form-gather', formGatherAPI, { description: '表单 - 项集合' }], + ['vxe-list', listAPI, { description: '列表' }], + ['vxe-pulldown', pulldownAPI, { description: '下拉容器' }] +] -// tagMaps.forEach(confs => { -// const props = confs[1].find(item => item.name === 'Props').list -// const keys = [] -// props.forEach(item => { -// const name = XEUtils.kebabCase(item.name) -// attributes[`${confs[0]}/${name}`] = { -// type: XEUtils.toValueString(item.type).toLowerCase(), -// description: item.descKey ? i18n.t(item.descKey) : item.desc -// } -// keys.push(name) -// }) -// tags[confs[0]] = Object.assign({ attributes: keys }, confs[2]) -// }) +tagMaps.forEach(confs => { + const props = confs[1].find(item => item.name === 'Props').list + const keys = [] + props.forEach(item => { + const name = XEUtils.kebabCase(item.name) + attributes[`${confs[0]}/${name}`] = { + type: XEUtils.toValueString(item.type).toLowerCase(), + description: item.descKey ? i18n.t(item.descKey) : item.desc + } + keys.push(name) + }) + tags[confs[0]] = Object.assign({ attributes: keys }, confs[2]) +}) export default { data () { diff --git a/examples/views/table/base/RowHeight.vue b/examples/views/table/base/RowHeight.vue new file mode 100644 index 000000000..dacb71a15 --- /dev/null +++ b/examples/views/table/base/RowHeight.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/examples/views/table/scroll/RowHeight.vue b/examples/views/table/scroll/RowHeight.vue index f0baf539c..0119ebf4d 100644 --- a/examples/views/table/scroll/RowHeight.vue +++ b/examples/views/table/scroll/RowHeight.vue @@ -1,6 +1,6 @@