fix: update vue and fix type issues (#1112)

* chore: bump vue version to show type errors

* fix: address type issues
This commit is contained in:
Daniel Roe
2023-12-19 10:54:00 +01:00
committed by GitHub
parent b22bd70d54
commit 5c99ae131d
4 changed files with 181 additions and 180 deletions

View File

@@ -156,7 +156,7 @@ export default defineComponent({
setup (props, { emit, attrs: $attrs }) {
const { ui, attrs } = useUI('table', toRef(props, 'ui'), config, toRef(props, 'class'))
const columns = computed(() => props.columns ?? Object.keys(props.rows[0] ?? {}).map((key) => ({ key, label: upperFirst(key), sortable: false })))
const columns = computed(() => props.columns ?? Object.keys(props.rows[0] ?? {}).map((key) => ({ key, label: upperFirst(key), sortable: false, class: undefined })))
const sort = ref(defu({}, props.sort, { column: null, direction: 'asc' }))

View File

@@ -104,7 +104,8 @@ export default defineComponent({
return props.state
}
async function onSubmit (event: SubmitEvent) {
async function onSubmit (payload: Event) {
const event = payload as SubmitEvent
try {
if (props.validateOn?.includes('submit')) {
await validate()