随笔分类 -  vue3.0

摘要:setup的执行时组件对象还没有创建,此时不能使用this来访问data/computed/methods/props我们可以通过 getCurrentInstance这个函数来返回当前组件的实例对象,也就是当前vue这个实例对象 <template> <div> </div> </template 阅读全文
posted @ 2022-02-23 10:18 abcByme 阅读(2088) 评论(0) 推荐(0) 编辑
摘要:const path = require('path') const resolve = function (dir) { return path.join(__dirname, dir) } module.exports = { publicPath: process.env.NODE_ENV ' 阅读全文
posted @ 2022-02-10 17:05 abcByme 阅读(526) 评论(0) 推荐(0) 编辑
摘要:1.定义组件 <template> <h1>{{result}}</h1> </template> <script> export default { name: "NewModel", setup(){ return new Promise((resolve)=>{ setTimeout(()=> 阅读全文
posted @ 2022-02-10 11:20 abcByme 阅读(66) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示