import index from "../pages/index.vue";
import crop from "../pages/crop.vue";
import environment from "../pages/environment.vue";
import device from "../pages/device.vue";
import market from "../pages/market.vue";
import {createRouter, createWebHashHistory} from "vue-router";

const routes = [
    {
        path: '/',
        component: index
    },
    {
        path: '/index',
        component: index
    },
    {
        path: '/crop',
        component: crop
    },
    {
        path: '/environment',
        component: environment
    },
    {
        path: '/device',
        component: device
    },
    {
        path: '/market',
        component: market
    }
]
const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHashHistory(),
    routes, // `routes: routes` 的缩写
})
export default router