| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <template>
- <!-- 客户信息 -->
- <div class="custom">
- <firstMenu :list="list"
- :value="'value'"
- @selectMenu="selectMenu" />
- <router-view />
- </div>
- </template>
- <script lang="ts">
- import { defineComponent } from 'vue';
- import firstMenu from '@/components/firstMenu/index.vue';
- import { useRouter } from 'vue-router';
- // 处理菜单
- function handleMenu() {
- const router = useRouter();
- const list = [
- { key: 'custom_info_normal', value: '正常' },
- { key: 'custom_info_stop', value: '停用' },
- ];
- function selectMenu(item: any) {
- router.push({ name: item.key });
- }
- return { list, selectMenu };
- }
- export default defineComponent({
- name: 'custom',
- components: {
- firstMenu,
- },
- setup() {
- const { list, selectMenu } = handleMenu();
- return { list, selectMenu };
- },
- });
- </script>
- <style lang="less"></style>;
|