LumalSchemaTable
Schema 表格:选择列、序号、列设置、分页、字典色标、错误恢复。
ts
import { LumalSchemaTable } from '@lumal/core/components'示例
vue
<script setup lang="ts">
import type { SchemaTableColumn } from '@lumal/core/components'
import { LumalSchemaTable } from '@lumal/core/components'
import { shallowRef } from 'vue'
const page = shallowRef(1)
const pageSize = shallowRef(10)
const columns: SchemaTableColumn[] = [
{ field: 'name', label: '名称' },
{ field: 'status', label: '状态', dictionary: 'status' },
]
const rows = [{ id: 1, name: 'Lumal', status: 'enabled' }]
</script>
<template>
<LumalSchemaTable
v-model:page="page"
v-model:page-size="pageSize"
:columns="columns"
:rows="rows"
row-key="id"
selection
show-index
show-column-settings
pagination
:total="1"
/>
</template>能力摘要
selection→selection-change(rows, rowKeys)showColumnSettings+columnSettings.storageKey持久化pagination+v-model:page/page-sizetable-${field}/actions插槽error/retry错误态
详情:Core API