Commit ad7eb675 by cwq0219

取消权限按钮控制

1 parent 98e1cf68
...@@ -96,9 +96,9 @@ export default { ...@@ -96,9 +96,9 @@ export default {
*/ */
curBtns = showBtnName.length ? curBtns.filter(item => showBtnName.includes(item.label)) : curBtns curBtns = showBtnName.length ? curBtns.filter(item => showBtnName.includes(item.label)) : curBtns
curBtns.forEach(btn => { curBtns.forEach(btn => {
var judgeRes = data ? (data.yqMerchantId === _this.$store.state.d2admin.user.info.detail.merchantId) : true // var judgeRes = data ? (data.yqMerchantId === _this.$store.state.d2admin.user.info.detail.merchantId) : true
var isShow = !btn.judgeShow ? true : judgeRes // var isShow = !btn.judgeShow ? true : judgeRes
if ((btn.category === 'Button') || (data && isShow)) { // if ((btn.category === 'Button') || (data && isShow)) {
__aBtns.push(h('el-button', { __aBtns.push(h('el-button', {
props: { props: {
type: btn.type || (btn.category === 'Button' ? '' : 'text'), type: btn.type || (btn.category === 'Button' ? '' : 'text'),
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
click: (e) => btn.handle && _this[btn.handle](data, e) click: (e) => btn.handle && _this[btn.handle](data, e)
} }
}, [btn.ruleObj ? btn.ruleObj.rule[data[btn.ruleObj.attr]] : btn.label])) }, [btn.ruleObj ? btn.ruleObj.rule[data[btn.ruleObj.attr]] : btn.label]))
} // }
}) })
return h('span', {}, [...__aBtns, ctx.children]) return h('span', {}, [...__aBtns, ctx.children])
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!