diff --git a/src/assets/css/layout.less b/src/assets/css/layout.less index de87522..57f831f 100644 --- a/src/assets/css/layout.less +++ b/src/assets/css/layout.less @@ -341,7 +341,7 @@ html { .fixedHeader.muiltTab { z-index: 600; #content { - height: calc(~"(100% - 51px)"); + height: calc(~"(100% - 38px)"); -ms-overflow-style: none; overflow: -moz-scrollbars-none; } @@ -433,4 +433,4 @@ html { overflow: hidden; display: flex; flex-direction: column; -} \ No newline at end of file +} diff --git a/src/component/lib/ATableEllipsisDefault.js b/src/component/lib/ATableEllipsisDefault.js new file mode 100644 index 0000000..f34e43f --- /dev/null +++ b/src/component/lib/ATableEllipsisDefault.js @@ -0,0 +1,23 @@ +import { h, defineComponent } from 'vue'; +import { Table } from '@hwork/ant-design-vue'; + +function patchColumns(cols) { + if (!Array.isArray(cols)) return cols; + return cols.map((col) => { + if (!col) return col; + const next = { ...col }; + if (next.ellipsis === undefined) next.ellipsis = true; + if (Array.isArray(next.children)) next.children = patchColumns(next.children); + return next; + }); +} + +export default defineComponent({ + name: 'ATable', + inheritAttrs: false, + setup(_, { attrs, slots }) { + const patchedColumns = patchColumns(attrs.columns); + return () => h(Table, { ...attrs, columns: patchedColumns }, slots); + }, +}); + diff --git a/src/component/query/src/index.vue b/src/component/query/src/index.vue index 3eb905f..8105ba8 100644 --- a/src/component/query/src/index.vue +++ b/src/component/query/src/index.vue @@ -71,7 +71,7 @@ export default defineComponent({ const generateFormState = array => { array.length > 0 && array.forEach(it => { const {key, rules = [], value,defaultValue} = it - formState[key] = defaultValue || (value === undefined ? "" : value); + formState[key] = defaultValue || (it.type !== 'select' && value === undefined ? "" : value); formRules[key] = rules }) } diff --git a/src/component/table/src/index.vue b/src/component/table/src/index.vue index 5e5ba1e..6e88bae 100644 --- a/src/component/table/src/index.vue +++ b/src/component/table/src/index.vue @@ -95,7 +95,7 @@ @@ -155,12 +155,12 @@ - + - +