
VUE
飞飞翼
这个作者很懒,什么都没留下…
展开
-
el-select多选回显数据
el-select多选回显数据el-select多选回显数据el-select多选回显数据el-select多选回显数据原创 2022-12-28 10:53:38 · 1014 阅读 · 0 评论 -
CENTOS7 部署若依前后端分离项目
centos上线原创 2022-06-11 12:37:45 · 1294 阅读 · 0 评论 -
Nginx 配置 h5
nginx的配置原创 2022-06-10 18:16:08 · 3176 阅读 · 0 评论 -
vue项目实战
1.创建项目vue init webpack projectName2.安装elementUIhttps://element.eleme.cn/#/zh-CN/component/installationmain.js 引入wlwmentUi// 引入 element muiimport ElementUI from 'element-ui'import 'element-ui/lib/theme-chalk/index.css';//全局注入项目Vue.use(Eleme原创 2022-05-26 11:05:16 · 168 阅读 · 0 评论 -
VUE-商品详情多规格-拿来即用--插件式
效果图具体代码<template> <div class="title-small colonn"> <div class="colonn" style="padding:20px 20px;border-radius: 10px;margin-top:10px;"> <div class="roww"> <div style="color: #606266;margin-right: 10.原创 2022-05-18 15:26:12 · 1947 阅读 · 0 评论 -
vue 引入 echarts,init初始化报错
vue 引入 echarts,init初始化报错1.下载echartsnpm install echarts --save12.页面中引入,我只有一个页面需要引用到echarts,所以就直接在页面中引入import echarts from 'echarts'13.在methods中写对应的例子myEcharts() { this.chart = echarts.init(document.getElementById('main')) this.chart....原创 2022-04-29 22:36:56 · 3117 阅读 · 0 评论 -
Vue--LocalStorage在本地缓存中读写数据
使用LocalStorage将一些无关安全问题的用户信息保存在本地,方便一次请求之后多页面共用数据,可以减少浏览器的get请求。1.安装good-storage插件cnpm i good-storage --save2.读/写的方法common/js/cache.js:import storage from 'good-storage'class cache { constructor(key, session) { this.key = key; if (原创 2022-04-24 23:37:22 · 1372 阅读 · 0 评论 -
vue.prototype和vue.use的区别
Vue.use和Vue.prototype区别相同点:都是注册插件的方式,没有本质区别,都是在vue.prototype上添加了一个方法不同点:vue.use适用于注册vue生态内的插件,vue.prototype适用于注册生态外的插件vue.prototype用法需要设置全局变量,在main.js中,Vue实例化的代码里添加。 不想污染全局作用域。这种情况下,你可以通过在 原型 上定义它们使其在每个Vue实例中可用。vue.prototype.$echarts = echarts1Tip原创 2022-04-16 16:35:15 · 507 阅读 · 0 评论 -
VUE 路由 自己理解
import Vue from 'vue'import Router from 'vue-router'//引入组件import HelloWorld from '@/components/HelloWorld'import demo1 from '@/components/demo1'import demo2 from '@/components/demo2'import demo3 from '@/components/demo3'Vue.use(Router)export def.原创 2022-04-07 17:43:42 · 491 阅读 · 0 评论 -
NavigationDuplicated:Avoided redundant navigation to current location(重复请求相同路径警告)解决办法
个人理解:在Vue中为了节约资源,一样的内容不会重复加载(浏览器如果发现请求地址一样也不会跳)。所以当你请求跳转相同的路径时,虽然不影响程序运行但是控制台中还是会跳出警告。我在此前做ASP.NET的时候一般出现这种情况解决办法是加随机数,在每次请求的地址中加一下不重复但又无关紧要的随机数就可以了。但是vue中$router.push让我不知道怎么加随机数了(希望有知道的同学评论区留言),所以考虑他法。1.prototype方法:在router.js文件中加上如下图所示代码段即可。//解决vue路.原创 2022-04-07 15:57:19 · 2858 阅读 · 0 评论