Recently, I've encountered some changes while using Element UI
with the latest release of Vue.js 2.3
In my project, a dialog
should only be displayed if certain conditions are met:
private.userCanManageUsers && private.pendingUsers.length > 0 && private.pendingDialogVisible
I attempted to implement the new attribute visible.sync
, you can find more information in the documentation here
While it works fine with a single condition, it fails to work when there are multiple conditions present.
Working Case
<el-dialog
:visible.sync="private.pendingDialogVisible"
</el-dialog>
Not Working Case
<el-dialog
:visible.sync="private.userCanManageUsers && private.pendingUsers.length > 0 && private.pendingDialogVisible"
</el-dialog>
- Is there a solution to use
el-dialog
withvisible.sync
and multiple conditions? - If not, what steps should I take to make it function as expected?