Appearance
π Installation β
To start using WBC-Routes2, you need to install the core plugin and ensure vue-router is enabled in your project.
1. Install Dependencies β
If you havenβt installed wbc-ui2 yet, run:
bash
npm install wbc-ui2
# or
yarn add wbc-ui2Make sure you also have vue-router set up:
bash
npm install vue-router
# or
yarn add vue-router2. Register the WBC Component Globally (Optional) β
In your main.js or app.js:
js
import Vue from "vue";
import VueRouter from "vue-router";
import WBC from "wbc-ui2";
Vue.use(VueRouter);
Vue.component("WBC", WBC);3. Set Up the Routes β
Hereβs a basic example of how to use WBC in a route:
js
const routes = [
{
path: "/dynamic",
name: "DynamicRoute",
component: WBC,
props: {
item: "./docs/helloWorld.md"
},
},
];