perf(table): 新增 v-model:selectedKeys 选中项

This commit is contained in:
就眠仪式
2021-10-14 00:12:38 +08:00
parent e5f53064a3
commit c559a2d74a
5 changed files with 96 additions and 42 deletions

View File

@@ -16,7 +16,7 @@
</template>
<script setup name="LayCheckbox" lang="ts">
import { defineProps, ref } from 'vue'
import { defineProps } from 'vue'
const props =
defineProps<{
@@ -32,7 +32,7 @@ const emit = defineEmits(['update:checked', 'change'])
const handleClick = function () {
if (!props.disabled) {
emit('update:checked', !props.checked)
emit('change', !props.checked)
emit('change', { checked: !props.checked, value: props.label })
}
}
</script>