[Bug][UI][V1.0.0-Beta] Fix action buttons not displayed on one line bug (#9700)

dev
Devosend 2022-04-25 10:04:04 +08:00 committed by GitHub
parent 3faa65ef0c
commit cd82f45d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import { useColumns } from './use-columns'
import { useTable } from './use-table' import { useTable } from './use-table'
import styles from './index.module.scss' import styles from './index.module.scss'
import type { TableColumns } from './types' import type { TableColumns } from './types'
import { DefaultTableWidth } from '@/utils/column-width-config'
const list = defineComponent({ const list = defineComponent({
name: 'list', name: 'list',
@ -39,7 +40,10 @@ const list = defineComponent({
const { t } = useI18n() const { t } = useI18n()
const showDetailModal = ref(false) const showDetailModal = ref(false)
const selectId = ref() const selectId = ref()
const columns = ref({ columns: [] as TableColumns, tableWidth: 0 }) const columns = ref({
columns: [] as TableColumns,
tableWidth: DefaultTableWidth
})
const { data, changePage, changePageSize, deleteRecord, updateList } = const { data, changePage, changePageSize, deleteRecord, updateList } =
useTable() useTable()

View File

@ -108,6 +108,7 @@ export function useColumns(onCallback: Function) {
{ {
circle: true, circle: true,
type: 'info', type: 'info',
size: 'small',
onClick: () => void onCallback(rowData.id, 'edit') onClick: () => void onCallback(rowData.id, 'edit')
}, },
{ {
@ -134,6 +135,7 @@ export function useColumns(onCallback: Function) {
{ {
circle: true, circle: true,
type: 'error', type: 'error',
size: 'small',
class: 'btn-delete' class: 'btn-delete'
}, },
{ {