| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <div class="limit-purchase-container">
- <el-container>
- <el-header height="60px">
- <el-menu
- :default-active="activeMenu"
- mode="horizontal"
- @select="handleMenuSelect"
- class="el-menu-horizontal"
- >
- <el-menu-item index="limitPurchaseRule">
- <span>限购规则管理</span>
- </el-menu-item>
- </el-menu>
- </el-header>
-
- <el-main>
- <component
- :is="currentComponent"
- :axios-instance="axiosInstance"
- />
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- import LimitPurchaseRule from './LimitPurchaseRule.vue'
- export default {
- name: 'LimitPurchaseAdmin',
- components: {
- LimitPurchaseRule
- },
- props: {
- axiosInstance: {
- type: Object,
- default: null
- }
- },
- data() {
- return {
- activeMenu: 'limitPurchaseRule'
- }
- },
- computed: {
- currentComponent() {
- if (this.activeMenu === 'limitPurchaseRule') {
- return 'LimitPurchaseRule'
- }
- return 'LimitPurchaseRule'
- }
- },
- methods: {
- handleMenuSelect(key) {
- this.activeMenu = key
- }
- }
- }
- </script>
- <style scoped>
- .limit-purchase-container {
- padding: 0;
- height: calc(100vh - 120px);
- }
- .el-menu-horizontal {
- height: 60px;
- font-size: 16px;
- }
- .el-header {
- padding: 0;
- background-color: #fff;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- }
- .el-main {
- padding: 30px;
- background: #fff;
- margin: 20px;
- border-radius: 8px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- flex: 1;
- }
- </style>
|