一、新建按钮
1、前端代码
添加按钮组件--“菜单权限测试”
<el-col :span="1.5">
<el-button
type="test"
plain
icon="el-icon-download"
size="mini"
@click="testAdd"
v-hasPermi="['test']"
>菜单权限测试</el-button>
</el-col>
按钮响应事件
/**菜单权限测试*/
testAdd() {
alert("测试成功")
},
添加Api请求
// 菜单权限测试
export function test() {
return request({
url: '/system/student/test',
method: 'get'
})
}