style: perfect tableDemo

This commit is contained in:
kailong321200875
2022-08-13 09:03:52 +08:00
parent c43e833582
commit c589edd960
7 changed files with 22 additions and 5 deletions

View File

@@ -125,6 +125,10 @@ const showExpandedRows = (show: boolean) => {
expand: show
})
}
const selectAllNone = () => {
unref(tableRef)?.elTableRef?.toggleAllSelection()
}
</script>
<template>
@@ -146,6 +150,8 @@ const showExpandedRows = (show: boolean) => {
<ElButton @click="showExpandedRows(true)">{{ t('tableDemo.showExpandedRows') }}</ElButton>
<ElButton @click="showExpandedRows(false)">{{ t('tableDemo.hiddenExpandedRows') }}</ElButton>
<ElButton @click="selectAllNone">{{ t('tableDemo.selectAllNone') }}</ElButton>
</ContentWrap>
<ContentWrap :title="`RefTable ${t('tableDemo.example')}`">
<Table