This file contains hidden or 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
| // child component | |
| <template> | |
| <input | |
| @keyup="getData" | |
| > | |
| </template> | |
| <script> | |
| export default { | |
| name: 'child', |
This file contains hidden or 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
| module.exports = { | |
| root: true, | |
| env: { | |
| browser: true, | |
| node: true | |
| }, | |
| extends: [ | |
| 'eslint:recommended', | |
| 'plugin:vue/vue3-strongly-recommended', | |
| ], |
This file contains hidden or 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
| <template> | |
| <div> | |
| <span>{{ branch.label }}</span> | |
| <span | |
| v-show="hasChildren" | |
| > | |
| 🌠 | |
| </span> | |
| <!-- add toggle function to show or hide children --> | |
| <!-- try to use a flat array --> |
This file contains hidden or 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
| <template> | |
| <render-component :key="count" /> | |
| <span @click="renderComponent">Click to reload render-component</span> | |
| </template> | |
| <script> | |
| import { ref } from 'vue' | |
| export default { | |
| name: 're-render', | |
This file contains hidden or 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
| <template> | |
| <el-dropdown trigger="click" ref="elDropDownRef"> | |
| <span class="el-dropdown-link"> | |
| Dropdown list | |
| </span> | |
| <template #dropdown> | |
| <el-dropdown-menu @mouseleave="triggerHandle"> | |
| <el-dropdown-item>Action 1</el-dropdown-item> | |
| <el-dropdown-item>Action 2</el-dropdown-item> | |
| <el-dropdown-item>Action 3</el-dropdown-item> |
This file contains hidden or 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
| <script> | |
| import { onMounted, getCurrentInstance } from 'vue' | |
| export default { | |
| name: 'Component', | |
| props: { | |
| name: { | |
| type: String, | |
| default: '', |
This file contains hidden or 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
| <template> | |
| <form @submit.prevent="action"> | |
| <label>Your name: | |
| <input name="name" required> | |
| </label> | |
| <button :disabled="disabled"> | |
| Action | |
| </button> | |
| </form> | |
| </template> |