diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js index 1b8e7e4e..01a11f72 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js @@ -36,7 +36,7 @@ export default { :class="item.meta.htmlClass??'el-button--primary'" v-if="item.meta.isTop" @click="click(item,selectedRows)" - v-show="item.meta.disabled && item.meta.disabled.constructor === Function && item.meta.disabled(selectedRows,queryModel)" + :disabled="item.meta.disabled && item.meta.disabled.constructor === Function && item.meta.disabled(selectedRows,queryModel)" > {{item.meta.title}} @@ -127,7 +127,7 @@ export default { :class="item.meta.htmlClass??'el-button--primary'" v-if="!item.meta.isTop" @click="click(item,[scope.row])" - v-show="item.meta.disabled && item.meta.disabled(scope.row)" + :disabled="item.meta.disabled && item.meta.disabled(scope.row)" > {{item.meta.title}} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js index 3c149eeb..66603861 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js @@ -10,13 +10,13 @@ export default [ createButton("query", "title=查询&isTop=true"), createButton("create", "title=新建&isTop=true"), createButton("update", "title=编辑"), - createButton("delete", "title=删除", (o) => o.userName !== "admin"), + createButton("delete", "title=删除&disabled=o=>o.userName==='admin'"), createButton("reset-password", "title=重置密码&method=PUT"), ], }, { ...createPage("role", "title=角色管理"), - children: [createButton("query", "title=查询&isTop=true"), createButton("create", "title=新建&isTop=true"), createButton("delete", "title=删除", (o) => o.isStatic)], + children: [createButton("query", "title=查询&isTop=true"), createButton("create", "title=新建&isTop=true"), createButton("delete", "title=删除&disabled=o => o.isStatic")], }, { ...createPage("material", "title=物料主数据"),