摘要: vue过滤器的作用: 在不改变原数据的前提下,对数据进行一定程度的处理,在返回并显示在页面上 过滤器的定义和使用 // 全局注册 Vue.filter('toRMB', function (value) { return `¥${value}` }) new Vue({ el: '#app', da 阅读全文
posted @ 2021-10-29 10:01 前端白雪 阅读(1301) 评论(0) 推荐(0)
摘要: vue生命周期函数created与mounted执行顺序 created 为第二个生命周期函数,在 created 中,data 和 methods 都已经被初始化好了! 如果要调用 methods 中的方法,或者操作 data 中的数据,最早,只能在 created 中操作 mounted 为第四 阅读全文
posted @ 2021-10-29 09:08 前端白雪 阅读(2110) 评论(0) 推荐(0)