摘要:
<!DOCTYPE html Document A组件 destroy msg:{{msg}} //生命周期:初始化阶段 运行中阶段 销毁阶段 Vue.component("aaa",{ template:" aaa", data:function(){ return {msg:'hello'} } 阅读全文
摘要:
一、通过路由带参数进行传值 1、两个组件 A和B,A组件通过query把orderId传递给B组件(触发事件可以是点击事件、钩子函数等) this.$router.push({ path: '/conponentsB', query: { orderId: 123 } }) // 跳转到B 2、在B 阅读全文
摘要:
1、元素获取 / 原生js / var ele = document.getElementById('idName'); var eleArr = document.getElementsByClassName('className'); var eleArr = document.getEleme 阅读全文