feat: Add example-dialog demo

This commit is contained in:
kailong321200875
2022-02-19 13:17:38 +08:00
parent 41533c15e7
commit 262f4211cf
16 changed files with 311 additions and 24 deletions

View File

@@ -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>

View File

@@ -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 }

View File

@@ -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}
>
{{