|
@@ -2,30 +2,20 @@
|
|
|
<!-- 客户信息 -->
|
|
<!-- 客户信息 -->
|
|
|
<div class="custom">
|
|
<div class="custom">
|
|
|
<firstMenu :list="list"
|
|
<firstMenu :list="list"
|
|
|
- :value="'value'"
|
|
|
|
|
|
|
+ :value="'title'"
|
|
|
@selectMenu="selectMenu" />
|
|
@selectMenu="selectMenu" />
|
|
|
<router-view />
|
|
<router-view />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, ref } from 'vue';
|
|
|
import firstMenu from '@/components/firstMenu/index.vue';
|
|
import firstMenu from '@/components/firstMenu/index.vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
import { CustomInfo } from '@/enums/routerName';
|
|
import { CustomInfo } from '@/enums/routerName';
|
|
|
-
|
|
|
|
|
-// 处理菜单
|
|
|
|
|
-function handleMenu() {
|
|
|
|
|
- const router = useRouter();
|
|
|
|
|
- const list = [
|
|
|
|
|
- { key: CustomInfo.normal, value: '正常' },
|
|
|
|
|
- { key: CustomInfo.stop, value: '停用' },
|
|
|
|
|
- ];
|
|
|
|
|
- function selectMenu(item: any) {
|
|
|
|
|
- router.push({ name: item.key });
|
|
|
|
|
- }
|
|
|
|
|
- return { list, selectMenu };
|
|
|
|
|
-}
|
|
|
|
|
|
|
+import { initData } from '@/setup/methods/index';
|
|
|
|
|
+import { handleMenu } from '@/setup/router/index';
|
|
|
|
|
+import { OperationTabMenu } from '@/goServiceAPI/commonService/interface';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'custom',
|
|
name: 'custom',
|
|
@@ -33,7 +23,11 @@ export default defineComponent({
|
|
|
firstMenu,
|
|
firstMenu,
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
- const { list, selectMenu } = handleMenu();
|
|
|
|
|
|
|
+ const { list, selectMenu, getMenuList } = handleMenu();
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ getMenuList();
|
|
|
|
|
+ console.log('list', list);
|
|
|
|
|
+ });
|
|
|
return { list, selectMenu };
|
|
return { list, selectMenu };
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|