fix: Table的addColumn不能添加首列

This commit is contained in:
GGBOND-L 2023-10-10 21:43:06 +08:00
parent a4d1391390
commit 240178fd38
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ export default defineComponent({
const addColumn = (column: TableColumn, index?: number) => {
const { columns } = unref(getProps)
if (index) {
if (index || index === 0) {
columns.splice(index, 0, column)
} else {
columns.push(column)