11 2019 档案
摘要:/** * 将回调地狱转换为 Promise 形式 * https://blog.csdn.net/SEAYEHIN/article/details/88663740 * raw: wx.downloadFile({ url: this.data.curImg, success: res => { console.log(20191121213856, res) } }) now: async g
阅读全文
摘要:<template> <component :is='fuck' :data='data'></component> </template> <script> export default { data() { return { fuck: null } }, props: ['type', 'data'], mounted() { this.fuck = import(`/templates/$
阅读全文
摘要:用 Vue.extend 创造的组件构造器和组件,默认是不集成 store 和 router 的。 比如 main.js 中的这个,其实是挂载在根组件 vm 中。并不是注入到全局 Vue 中。所以你用 Vue.extend 构造的理所当然没有了。但是,你用 Vue.mixin 注入的就是有的。 所以
阅读全文