feat: Add example-dialog demo
This commit is contained in:
@@ -100,7 +100,7 @@ const toggleClick = () => {
|
||||
</template>
|
||||
|
||||
<template #default>
|
||||
<slot :name="item.field">{{ data[item.field] }}</slot>
|
||||
<slot :name="item.field" :row="data">{{ data[item.field] }}</slot>
|
||||
</template>
|
||||
</ElDescriptionsItem>
|
||||
</ElDescriptions>
|
||||
|
||||
@@ -3,6 +3,7 @@ import Table from './src/Table.vue'
|
||||
export interface TableExpose {
|
||||
setProps: (props: Recordable) => void
|
||||
setColumn: (columnProps: TableSetPropsType[]) => void
|
||||
selections: Recordable[]
|
||||
}
|
||||
|
||||
export { Table }
|
||||
|
||||
@@ -89,9 +89,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const selections = ref<Recordable[]>([])
|
||||
|
||||
const selectionChange = (selection: Recordable[]) => {
|
||||
selections.value = selection
|
||||
}
|
||||
|
||||
expose({
|
||||
setProps,
|
||||
setColumn
|
||||
setColumn,
|
||||
selections
|
||||
})
|
||||
|
||||
const pagination = computed(() => {
|
||||
@@ -226,7 +233,7 @@ export default defineComponent({
|
||||
align={v.align || align}
|
||||
headerAlign={v.headerAlign || headerAlign}
|
||||
label={v.label}
|
||||
width="100px"
|
||||
width="65px"
|
||||
></ElTableColumn>
|
||||
)
|
||||
} else {
|
||||
@@ -264,6 +271,7 @@ export default defineComponent({
|
||||
// @ts-ignore
|
||||
ref={elTableRef}
|
||||
data={unref(getProps).data}
|
||||
onSelection-change={selectionChange}
|
||||
{...getBindValue}
|
||||
>
|
||||
{{
|
||||
|
||||
Reference in New Issue
Block a user