菜单的路由权限应该怎么写

请问要怎么根据角色加载相应的菜单呢?是在router中写吗
我的菜单数据库表如下:

img

img

取出菜单的代码如下:

<el-submenu :index="item.id+''" v-for="item in menuList" :key="item.id">
            <template slot="title">
              <i class="el-icon-location">i>
              <span>{{item.title}}span>
            template>
            
            <el-menu-item :index="it.path" v-for="it in item.sList" :key="it.id" @click="savePath(it.path)">
              <template slot="title">
                <i class="el-icon-location">i>
                <span>{{it.title}}span>
              template>
            el-menu-item>
          el-submenu>


不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^