releases 4.7.42
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: 'Title',
|
||||
colResizable: 'Column width (px)',
|
||||
colVisible: 'Display',
|
||||
colFixed: 'Freeze columns (Max. {0})',
|
||||
colFixed: 'Freeze columns',
|
||||
colFixedMax: 'Freeze columns (Max. {0})',
|
||||
fixedLeft: 'Left',
|
||||
fixedUnset: 'Unset',
|
||||
fixedRight: 'Right'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: 'Title',
|
||||
colResizable: 'Column width (px)',
|
||||
colVisible: 'Display',
|
||||
colFixed: 'Freeze columns (Max {0})',
|
||||
colFixed: 'Freeze columns',
|
||||
colFixedMax: 'Freeze columns (Max {0})',
|
||||
fixedLeft: 'Left',
|
||||
fixedUnset: 'Unset',
|
||||
fixedRight: 'Right'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: 'タイトル',
|
||||
colResizable: 'Column width (px)',
|
||||
colVisible: 'Display',
|
||||
colFixed: '冻结列(最多 {0} 列)',
|
||||
colFixed: '冻结列',
|
||||
colFixedMax: '冻结列(最多 {0} 列)',
|
||||
fixedLeft: '左側',
|
||||
fixedUnset: '指定しない',
|
||||
fixedRight: '右側'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: 'Title',
|
||||
colResizable: 'Column width (px)',
|
||||
colVisible: 'Display',
|
||||
colFixed: 'Freeze columns (Max {0})',
|
||||
colFixed: 'Freeze columns',
|
||||
colFixedMax: 'Freeze columns (Max {0})',
|
||||
fixedLeft: 'Left',
|
||||
fixedUnset: 'Unset',
|
||||
fixedRight: 'Right'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: '标题',
|
||||
colResizable: '列宽(像素)',
|
||||
colVisible: '是否显示',
|
||||
colFixed: '冻结列(最多 {0} 列)',
|
||||
colFixed: '冻结列',
|
||||
colFixedMax: '冻结列(最多 {0} 列)',
|
||||
fixedLeft: '左侧',
|
||||
fixedUnset: '不设置',
|
||||
fixedRight: '右侧'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* v4保留兼容,已废弃,即将删除文件
|
||||
* @deprecated
|
||||
*/
|
||||
export default {
|
||||
vxe: {
|
||||
base: {
|
||||
@@ -23,7 +19,7 @@ export default {
|
||||
useErr: '安裝 "{0}" 模組時發生錯誤,可能順序不正確,依賴的模組需要在Table之前安裝',
|
||||
barUnableLink: '工具欄無法關聯表格',
|
||||
expandContent: '展開行的插槽應該是 “content”,請檢查是否正確',
|
||||
reqComp: '缺少 "{0}" 組件,請檢查是否正確安裝',
|
||||
reqComp: '缺少 "{0}" 組件,请检查是否正确安装',
|
||||
reqModule: '缺少 "{0}" 模組',
|
||||
reqProp: '缺少必要的 "{0}" 參數,可能會導致出現錯誤',
|
||||
emptyProp: '參數 "{0}" 不允許為空',
|
||||
@@ -126,7 +122,8 @@ export default {
|
||||
colTitle: '標題',
|
||||
colResizable: '列宽(像素)',
|
||||
colVisible: '是否顯示',
|
||||
colFixed: '冻结列(最多 {0} 列)',
|
||||
colFixed: '冻结列',
|
||||
colFixedMax: '冻结列(最多 {0} 列)',
|
||||
fixedLeft: '左側',
|
||||
fixedUnset: '不設定',
|
||||
fixedRight: '右側'
|
||||
|
||||
@@ -495,6 +495,7 @@ export default defineComponent({
|
||||
const customOpts = computeCustomOpts.value
|
||||
const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
||||
const columnOpts = computeColumnOpts.value
|
||||
const { maxFixedSize } = columnOpts
|
||||
const modalOpts = Object.assign({}, modalOptions)
|
||||
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
||||
const trVNs: VNode[] = []
|
||||
@@ -630,12 +631,15 @@ export default defineComponent({
|
||||
minWidth: modalOpts.minWidth || 700,
|
||||
height: modalOpts.height || '50vh',
|
||||
minHeight: modalOpts.minHeight || 400,
|
||||
mask: true,
|
||||
lockView: true,
|
||||
showFooter: true,
|
||||
resize: true,
|
||||
escClosable: true,
|
||||
showZoom: modalOpts.showZoom,
|
||||
showMaximize: modalOpts.showMaximize,
|
||||
showMinimize: modalOpts.showMinimize,
|
||||
mask: modalOpts.mask,
|
||||
lockView: modalOpts.lockView,
|
||||
resize: modalOpts.resize,
|
||||
escClosable: !!modalOpts.escClosable,
|
||||
destroyOnClose: true,
|
||||
showFooter: true,
|
||||
'onUpdate:modelValue' (value: any) {
|
||||
customStore.visible = value
|
||||
}
|
||||
@@ -729,7 +733,7 @@ export default defineComponent({
|
||||
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
||||
: createCommentVNode(),
|
||||
allowFixed
|
||||
? h('th', {}, getI18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0]))
|
||||
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
||||
: createCommentVNode()
|
||||
])
|
||||
]),
|
||||
|
||||
@@ -541,7 +541,7 @@ export default defineComponent({
|
||||
let fixedSize = 0
|
||||
// 只判断第一层
|
||||
collectColumn.forEach((column) => {
|
||||
if (column.fixed) {
|
||||
if (column.renderFixed) {
|
||||
fixedSize++
|
||||
}
|
||||
})
|
||||
@@ -898,27 +898,29 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const handleCustomRestore = (storeData: VxeTableDefines.CustomStoreData) => {
|
||||
const { tableFullColumn } = internalData
|
||||
let { collectColumn } = internalData
|
||||
const { resizableData, sortData, visibleData, fixedData } = storeData
|
||||
let hasCustomSort = false
|
||||
// 处理还原
|
||||
if (resizableData || sortData || visibleData || fixedData) {
|
||||
tableFullColumn.forEach(column => {
|
||||
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
||||
const colKey = column.getKey()
|
||||
// 支持一级
|
||||
if (!parent) {
|
||||
if (fixedData && fixedData[colKey]) {
|
||||
column.fixed = fixedData[colKey]
|
||||
}
|
||||
if (sortData && XEUtils.isNumber(sortData[colKey])) {
|
||||
hasCustomSort = true
|
||||
column.renderSortNumber = sortData[colKey]
|
||||
}
|
||||
}
|
||||
if (resizableData && XEUtils.isNumber(resizableData[colKey])) {
|
||||
column.resizeWidth = resizableData[colKey]
|
||||
}
|
||||
if (visibleData && XEUtils.isBoolean(visibleData[colKey])) {
|
||||
column.visible = visibleData[colKey]
|
||||
}
|
||||
if (fixedData && fixedData[colKey]) {
|
||||
column.fixed = fixedData[colKey]
|
||||
}
|
||||
if (sortData && XEUtils.isNumber(sortData[colKey])) {
|
||||
hasCustomSort = true
|
||||
column.renderSortNumber = sortData[colKey]
|
||||
}
|
||||
})
|
||||
// 如果自定义了顺序
|
||||
if (hasCustomSort) {
|
||||
@@ -3318,14 +3320,13 @@ export default defineComponent({
|
||||
const targetColumn = getRootColumn($xeTable, column as any)
|
||||
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
||||
const columnOpts = computeColumnOpts.value
|
||||
const { maxFixedSize } = columnOpts
|
||||
if (targetColumn && targetColumn.fixed !== fixed) {
|
||||
// 是否超过最大固定列数量
|
||||
if (!targetColumn.fixed && isMaxFixedColumn) {
|
||||
if (VxeUI.modal) {
|
||||
VxeUI.modal.message({
|
||||
status: 'error',
|
||||
content: getI18n('vxe.table.maxFixedCol', [maxFixedSize])
|
||||
content: getI18n('vxe.table.maxFixedCol', [columnOpts.maxFixedSize])
|
||||
})
|
||||
}
|
||||
return nextTick()
|
||||
@@ -4595,7 +4596,7 @@ export default defineComponent({
|
||||
let hasFixedt = 0
|
||||
let hasVisible = 0
|
||||
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
||||
// 排序只支持一级
|
||||
// 只支持一级
|
||||
if (!parent) {
|
||||
collectColumn.forEach((column) => {
|
||||
const colKey = column.getKey()
|
||||
@@ -4604,6 +4605,13 @@ export default defineComponent({
|
||||
sortData[colKey] = column.renderSortNumber
|
||||
}
|
||||
})
|
||||
if (column.fixed && column.fixed !== column.defaultFixed) {
|
||||
const colKey = column.getKey()
|
||||
if (colKey) {
|
||||
hasFixedt = 1
|
||||
fixedData[colKey] = column.fixed
|
||||
}
|
||||
}
|
||||
}
|
||||
if (column.resizeWidth) {
|
||||
const colKey = column.getKey()
|
||||
@@ -4612,13 +4620,6 @@ export default defineComponent({
|
||||
resizableData[colKey] = column.renderWidth
|
||||
}
|
||||
}
|
||||
if (column.fixed && column.fixed !== column.defaultFixed) {
|
||||
const colKey = column.getKey()
|
||||
if (colKey) {
|
||||
hasFixedt = 1
|
||||
fixedData[colKey] = column.fixed
|
||||
}
|
||||
}
|
||||
if (!checkMethod || checkMethod({ column })) {
|
||||
if (!column.visible && column.defaultVisible) {
|
||||
const colKey = column.getKey()
|
||||
|
||||
@@ -68,9 +68,16 @@ VxeUI.setConfig({
|
||||
allowFixed: true,
|
||||
allowSort: true,
|
||||
showFooter: true,
|
||||
placement: 'top-right'
|
||||
placement: 'top-right',
|
||||
// storage: false,
|
||||
// checkMethod () {}
|
||||
// checkMethod () {},
|
||||
modalOptions: {
|
||||
showMaximize: true,
|
||||
mask: true,
|
||||
lockView: true,
|
||||
resize: true,
|
||||
escClosable: true
|
||||
}
|
||||
},
|
||||
sortConfig: {
|
||||
// remote: false,
|
||||
|
||||
Reference in New Issue
Block a user