【Vue】路由组件中失去焦点和获得焦点的两个事件
2023-09-11 14:14:57 时间
<template>
<div class="m_box">
{{ id }}.{{ name }}
<br />
<input type="text" />
</div>
</template>
<script>
export default {
name: "Menu_1",
props: ["id", "name"],
mounted() {
console.log("=============");
console.log(this);
},
activated() {
alert("进来了");
},
deactivated() {
alert("离开了");
},
};
</script>
<style scoped>
.m_box {
width: 95%;
height: 68px;
border: 1px rgb(253, 211, 211) solid;
margin-top: 5px;
text-align: center;
line-height: 28px;
overflow: hidden;
background-color: rgb(248, 248, 248);
}
</style>
相关文章
- 结合Vue.js的前端压缩图片方案
- Vue_(Router路由)-vue-router路由的基本用法
- VUE - 取消默认事件
- vue 【 子子组件 => 子组件 => 父组件 】 的事件和参数的传递
- [Vue] Get up and running with vue-router
- vue.js3.x安装tinymce 5.8.2并应用(vue 3.0.5)
- vue 实站技巧总结
- vue全局组件和局部组件
- vue.config.js常用配置详解
- [VueJS + Typescript] Decouple Dependencies Using IoC Containers in Vue with TypeScript and InversifyJS
- [Vue @Component] Control Template Contents with Vue's Render Function
- [Vue @Component] Simplify Vue Components with vue-class-component
- vue elementui el-select通过@Change触发事件
- vue elementUI表单输入时触发事件@input
- vue事件修饰符:通过@click.prevent 阻止事件的默认行为
- vue事件修饰符:通过@click.self的self属性来阻止内层向外层冒泡
- vue 过滤器
- SAP Fiori + Vue = ?
- vue 的 render 函数的用法:new Vue({ render: h => h(App), }).$mount(‘#app‘)
- Vue学习之--------全局事件总线(2022/8/22)
- vue-router 2 跳转失败原因
- vue中如何引入全局样式或方法
- Vue中vue-i18n结合element-ui实现国际化
- 180:vue+openlayers 模仿共享单车,判断点是否放在规划的电子围栏内
- 116:vue+openlayers的loadstart事件和loadend事件( 示例代码 )
- Error: Cannot find module ‘../../xxx.vue‘
- 【三十天精通Vue 3】第五天 Vue 3指令详解
- Vue:第一个vue-cli项目