随笔分类 -  Vue

摘要:网上搜了下,有好多写的用法是不对的,下面是正确用法 import { Component, Vue, Mixins } from 'vue-property-decorator' import sendMixins1 from './sendMixins' import sendMixins2 fr 阅读全文
posted @ 2021-03-02 20:18 James2019 阅读(1640) 评论(0) 推荐(2) 编辑
摘要:官方:https://vuex.vuejs.org/zh/guide/ 有说明: 为了在 Vue 组件中访问 this.$store property,你需要为 Vue 实例提供创建好的 store。Vuex 提供了一个从根组件向所有子组件,以 store 选项的方式“注入”该 store 的机制: 阅读全文
posted @ 2020-12-23 12:02 James2019 阅读(2077) 评论(0) 推荐(0) 编辑
摘要:使用区别: params要用name来引入,使用 this.$route.params 来获取。 query要用path来引入(name也可以), 使用 this.$route.query来获取。 外观展示区别: query同ajax中get的URL传参,浏览器地址栏中显示参数。 params则类似 阅读全文
posted @ 2020-12-05 11:24 James2019 阅读(167) 评论(0) 推荐(0) 编辑
摘要:了解一下 . 阅读全文
posted @ 2020-12-04 14:15 James2019 阅读(132) 评论(0) 推荐(0) 编辑
摘要:src/bus.js import Vue from 'vue' export default new Vue() src/main.js import Bus from '@/lib/bus' // 引入Bus组件 Vue.prototype.$bus = Bus components01.vue 阅读全文
posted @ 2020-11-20 10:36 James2019 阅读(1316) 评论(0) 推荐(0) 编辑
摘要:第一种: <template> <keep-alive> <router-view v-if="$route.meta.keepAlive"></router-view> </keep-alive> <router-view v-if="!$route.meta.keepAlive"></route 阅读全文
posted @ 2020-11-13 11:56 James2019 阅读(2871) 评论(0) 推荐(0) 编辑
摘要:记录一下: 都会缓存,那我们在特定的情况下强制刷新某些组件: 利用include、exclude属性 <keep-alive include="bookLists,bookLists"> <router-view></router-view> </keep-alive> <keep-alive ex 阅读全文
posted @ 2020-10-14 18:27 James2019 阅读(2498) 评论(0) 推荐(0) 编辑
摘要:Object.assign(this.$data, this.$options.data()) // 全部重置 Object.assign(this.$data.form, this.$options.data().form) // 部分重置 this.$data是当前状态的data数据this.$ 阅读全文
posted @ 2019-11-12 22:27 James2019 阅读(8975) 评论(0) 推荐(2) 编辑
摘要:https://github.com/PanJiaChen/vue-element-admin https://github.com/PanJiaChen/vue-admin-template . 阅读全文
posted @ 2019-09-10 17:17 James2019 阅读(366) 评论(0) 推荐(0) 编辑
摘要:xxx.vue <template> <a-modal class="dialogRecharge" title="活动链接及二维码" v-model="visible" width="520px" :destroyOnClose="true" :footer="null" @cancel="$em 阅读全文
posted @ 2019-09-09 19:34 James2019 阅读(400) 评论(0) 推荐(0) 编辑
摘要:在VUE 中的使用 附:向上向下取整等 . 阅读全文
posted @ 2019-09-07 22:56 James2019 阅读(3852) 评论(0) 推荐(0) 编辑
摘要:a.js 或者: a.js export跟export default 有什么区别呢?如下: 1、export与export default均可用于导出常量、函数、文件、模块等2、你可以在其它文件或模块中通过import+(常量 | 函数 | 文件 | 模块)名的方式,将其导入,以便能够对其进行使用 阅读全文
posted @ 2019-06-19 21:37 James2019 阅读(167) 评论(0) 推荐(0) 编辑
摘要:1. 首选npm安装plupload 2. 阿里云OSS PHP 安全上传 3. 了解更多plupload的配置参考: 前端上传组件Plupload使用指南: https://www.cnblogs.com/2050/p/3913184.html https://www.jianshu.com/p/ 阅读全文
posted @ 2019-05-17 17:14 James2019 阅读(6490) 评论(0) 推荐(1) 编辑
摘要:Github 上很多点击弹出日历选择某个时间的组件,却没有找到单纯展示日历并且能点击获取时间的组件 使用 组件GIT: https://github.com/zwhGithub/vue-calendar 阅读全文
posted @ 2019-05-04 20:34 James2019 阅读(5638) 评论(0) 推荐(1) 编辑
摘要:https://www.cnblogs.com/mmzuo-798/p/10438071.html 阅读全文
posted @ 2019-04-28 21:21 James2019 阅读(1206) 评论(0) 推荐(0) 编辑
摘要:vue-cli3.X 默认配置 比2.X体验好很多,比如路由 如图,本地正常,传到服务器,因为二级目录,刷新就404,或 502等,找不到文件 nginx解决: 用宝塔工具的同学,直接粘贴进去即可,如下图: 再次刷新线上/home,已正常访问了 . 阅读全文
posted @ 2019-03-18 17:48 James2019 阅读(3659) 评论(0) 推荐(0) 编辑
摘要:vue父路由默认选中第一个子路由,切换子路由让父路由高亮不会消失 正常默认会有 .router-active-class 识别高亮 达到以上注意: 1. exact 不要加 注意是不要加,exact 属性表示精确匹配,这里不要加 2. 整理来自: https://www.cnblogs.com/mm 阅读全文
posted @ 2019-03-17 18:39 James2019 阅读(2999) 评论(0) 推荐(0) 编辑
摘要:Mpvue中使用Vant Weapp组件库 https://segmentfault.com/a/1190000016228410?utm_source=tag-newest 小程序采坑记 mpvue + Vant Weapp https://blog.csdn.net/halo1416/artic 阅读全文
posted @ 2019-03-03 14:38 James2019 阅读(307) 评论(0) 推荐(0) 编辑
摘要:介绍 mpvue (github 地址请参见)是一个使用 Vue.js 开发小程序的前端框架。框架基于 Vue.js 核心,mpvue 修改了 Vue.js的 runtime 和 compiler 实现,使其可以运行在小程序环境中,从而为小程序开发引入了整套 Vue.js 开发体验。 官方网址:ht 阅读全文
posted @ 2019-02-26 00:12 James2019 阅读(3623) 评论(0) 推荐(1) 编辑
摘要:项目中,当组件文件过多,webpack-dev-server 编译时,容易内存溢出, 在 \node_modules\.bin\webpack-dev-server.cmd 加以下红色配置,暂可解决 注意空格 和 双引号 阅读全文
posted @ 2018-11-29 16:52 James2019 阅读(2820) 评论(0) 推荐(0) 编辑

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