|
287 | 287 | <!-- 头部标题 --> |
288 | 288 | <div class="section-header"> |
289 | 289 | <h3 class="section-title">管理对 API 资源的访问</h3> |
290 | | - <el-button type="primary" icon="el-icon-plus" @click="openApiAuthDialog">授权API资源</el-button> |
| 290 | + <el-button size="small" type="primary" icon="el-icon-plus" @click="openApiAuthDialog">授权API资源</el-button> |
291 | 291 | </div> |
292 | 292 |
|
293 | 293 | <!-- 已授权的API资源列表 --> |
|
296 | 296 | <span>已授权的API资源</span> |
297 | 297 | </div> |
298 | 298 |
|
299 | | - <el-table :data="authorizedApis" style="width: 100%" v-loading="apiAuthLoading"> |
| 299 | + <el-table v-loading="apiAuthLoading" :data="authorizedApis" style="width: 100%"> |
300 | 300 | <el-table-column prop="apiName" label="API资源名称" min-width="150"> |
301 | 301 | <template slot-scope="{ row }"> |
302 | 302 | <div class="api-name-cell"> |
303 | | - <i class="el-icon-s-operation" style="margin-right: 8px; color: #409eff;"></i> |
| 303 | + <i class="el-icon-s-operation" style="margin-right: 8px; color: #409eff;" /> |
304 | 304 | <span>{{ row.apiName }}</span> |
305 | 305 | </div> |
306 | 306 | </template> |
|
366 | 366 | <el-card class="config-card role-card" shadow="never"> |
367 | 367 | <div slot="header"> |
368 | 368 | <span>分配的角色</span> |
369 | | - <el-button type="primary" size="small" icon="el-icon-plus" @click="openRoleDialog" style="float: right;">添加角色</el-button> |
| 369 | + <el-button type="primary" size="small" icon="el-icon-plus" style="float: right;" @click="openRoleDialog">添加角色</el-button> |
370 | 370 | </div> |
371 | 371 |
|
372 | 372 | <el-table :data="assignedRoles" style="width: 100%"> |
|
407 | 407 |
|
408 | 408 | <!-- API授权添加/编辑弹窗 --> |
409 | 409 | <el-dialog :title="isEditApiAuth ? '编辑API授权' : '授权API资源'" :visible.sync="apiAuthDialogVisible" width="600px"> |
410 | | - <el-form :model="apiAuthForm" label-width="120px" :rules="apiAuthRules" ref="apiAuthForm"> |
| 410 | + <el-form ref="apiAuthForm" :model="apiAuthForm" label-width="120px" :rules="apiAuthRules"> |
411 | 411 | <el-form-item label="API资源" prop="apiId"> |
412 | 412 | <el-select v-model="apiAuthForm.apiId" placeholder="选择API资源" style="width: 100%" :disabled="isEditApiAuth"> |
413 | 413 | <el-option |
|
445 | 445 |
|
446 | 446 | <!-- 添加角色弹窗 --> |
447 | 447 | <el-dialog title="添加角色" :visible.sync="roleDialogVisible" width="500px"> |
448 | | - <el-form :model="roleForm" label-width="100px" :rules="roleRules" ref="roleForm"> |
| 448 | + <el-form ref="roleForm" :model="roleForm" label-width="100px" :rules="roleRules"> |
449 | 449 | <el-form-item label="选择角色" prop="roleId"> |
450 | 450 | <el-select v-model="roleForm.roleId" placeholder="选择要分配的角色" style="width: 100%"> |
451 | 451 | <el-option |
|
0 commit comments