-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mdc-menu): Support v-model for open/close
- Loading branch information
Showing
3 changed files
with
66 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
<template> | ||
<div class="mdc-demo mdc-demo--container"> | ||
<mdc-menu-anchor class="myAnchor"> | ||
<mdc-button raised @click="$refs.menu.show()">Open Menu</mdc-button> | ||
<mdc-menu ref="menu"> | ||
<mdc-menu-item >A Menu Item</mdc-menu-item> | ||
<mdc-menu-item >Another Menu Item</mdc-menu-item> | ||
<mdc-menu-item disabled >Disabled Menu Item</mdc-menu-item> | ||
<mdc-menu-divider>Another Menu Item</mdc-menu-divider> | ||
<mdc-menu-item >Parted Menu Item</mdc-menu-item> | ||
</mdc-menu> | ||
</mdc-menu-anchor> | ||
</div> | ||
<div class="mdc-demo mdc-demo--container"> | ||
<mdc-menu-anchor class="myAnchor"> | ||
<mdc-button raised @click="open=true">Open Menu</mdc-button> | ||
<mdc-menu v-model="open"> | ||
<mdc-menu-item>A Menu Item</mdc-menu-item> | ||
<mdc-menu-item>Another Menu Item</mdc-menu-item> | ||
<mdc-menu-item disabled>Disabled Menu Item</mdc-menu-item> | ||
<mdc-menu-divider>Another Menu Item</mdc-menu-divider> | ||
<mdc-menu-item>Parted Menu Item</mdc-menu-item> | ||
</mdc-menu> | ||
</mdc-menu-anchor> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
open: false, | ||
}; | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters