|
|
@@ -1,25 +1,12 @@
|
|
|
<script setup lang='ts'>
|
|
|
-import {
|
|
|
- useTablePageContext,
|
|
|
- useTableSearchContext,
|
|
|
- useTableSearchToolContext,
|
|
|
-} from '@hooks';
|
|
|
-import {
|
|
|
- pageSymbol,
|
|
|
- searchSymbol,
|
|
|
- filterSymbol,
|
|
|
- filterDataSymbol,
|
|
|
-} from './state';
|
|
|
+import {TableSearchContext, useTableSearchToolContext} from '@hooks';
|
|
|
+import {filterSymbol, filterDataSymbol, searchSymbol} from '../state';
|
|
|
import {LDFilterGroup, type LDFilterTool} from '@components';
|
|
|
import {GetMenuListParams, OriginalListParams} from '@models';
|
|
|
-import {computed} from 'vue';
|
|
|
+import {computed, inject} from 'vue';
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
-import Table from './table/index.vue';
|
|
|
-
|
|
|
-defineOptions({name: 'MenuPage'});
|
|
|
|
|
|
-useTablePageContext(pageSymbol);
|
|
|
-const searchContext = useTableSearchContext(searchSymbol);
|
|
|
+defineOptions({name: 'MenuPageFilter'});
|
|
|
|
|
|
const [
|
|
|
{filterSource},
|
|
|
@@ -45,6 +32,7 @@ const tools = computed<LDFilterTool<OriginalListParams<GetMenuListParams>>[]>(
|
|
|
},
|
|
|
);
|
|
|
|
|
|
+const searchContext = inject<TableSearchContext>(searchSymbol)!;
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -56,6 +44,5 @@ const tools = computed<LDFilterTool<OriginalListParams<GetMenuListParams>>[]>(
|
|
|
:sourceTools="filterSource"
|
|
|
:isSearching="searchContext.isSearching"
|
|
|
/>
|
|
|
-
|
|
|
- <Table />
|
|
|
</template>
|
|
|
+
|