diff --git a/src/pages/pc/components/BaseTable.vue b/src/pages/pc/components/BaseTable.vue index 4aa87c12..e2f6e594 100644 --- a/src/pages/pc/components/BaseTable.vue +++ b/src/pages/pc/components/BaseTable.vue @@ -17,11 +17,17 @@ const props = withDefaults(defineProps<{ activeId?: string, isActive?: boolean showBorder?: boolean + del?: Function + batchDel?: Function + add?: Function }>(), { activeIndex: -1, activeId: '', isActive: false, showBorder: false, + del: () => void 0, + add: () => void 0, + batchDel: () => void 0 }) const emit = defineEmits<{ @@ -105,8 +111,13 @@ function sort(type: Sort) { } } +function handleBatchDel() { + props.batchDel(selectIds) + selectIds = [] +} + const s = useSlots() -console.log('s', s) + defineRender( () => { const d = (item) => { selectIds.length ? : null } -
-
- {s.default({checkbox: d, item})} -
-
- {item.word} - {item.phonetic0} - -
-
-
-
-
-
- - -
-
+ {s.default({checkbox: d, item})} ) }) diff --git a/src/pages/pc/components/WordItem.vue b/src/pages/pc/components/WordItem.vue new file mode 100644 index 00000000..73513933 --- /dev/null +++ b/src/pages/pc/components/WordItem.vue @@ -0,0 +1,151 @@ + + + + + + \ No newline at end of file diff --git a/src/pages/pc/components/list/WordList.vue b/src/pages/pc/components/list/WordList.vue index 6e0bec7b..f1e77e49 100644 --- a/src/pages/pc/components/list/WordList.vue +++ b/src/pages/pc/components/list/WordList.vue @@ -1,6 +1,5 @@