
vue
﹏゛Aeljinh陌琳
这个作者很懒,什么都没留下…
展开
-
vue项目版本更新后文件存在缓存问题解决方案
vue 升级后有页面缓存问题原创 2022-10-11 16:30:36 · 2517 阅读 · 0 评论 -
VUE 使用 VueScrollTo 添加锚点跳转
一、引入npm install --save vue-scrollto// main.jsimport Vue from 'vue'var VueScrollTo = require('vue-scrollto');Vue.use(VueScrollTo)二、使用// xxx.vue//template<el-table:data="data"height="244"stripe:row-class-name="tableRowClassName"v-loading="原创 2022-05-11 10:40:37 · 1753 阅读 · 0 评论 -
vue+element 多选下拉选项树状列表
1.先上效果图二、父组件<template> <div class="city-tree-wraper"> <h4>选项树状列表多选</h4> <ElInputTag :suffix-icon="isShowSelectTree?'el-icon-arrow-up':'el-icon-arrow-down'" :value="checkedLabel" :addTagOnKeys="checkedkey"原创 2022-03-23 18:02:45 · 1935 阅读 · 0 评论 -
vue+element 下拉选项 树状单选
一、先上效果图:二、index.vue<template> <div class="city-tree-wraper"> <h4>选项树状列表单选</h4> <el-input placeholder="请选择" :suffix-icon="isShowSelectTree?'el-icon-arrow-up':'el-icon-arrow-down'" @click.native.stop="isShowSelect原创 2022-03-23 17:11:07 · 1421 阅读 · 0 评论 -
vue打包加时间戳
webpack.prod.conf.jslet timeStamp = new Date().getTime();const env = process.env.NODE_ENV === 'testing' ? require('../config/test.env') : require('../config/prod.env')...//const webpackConfig = merge(baseWebpackConfig, { output: { path: c原创 2021-10-21 13:45:32 · 1546 阅读 · 0 评论 -
router.onError
router.onError((error) => { const pattern = /Loading chunk (\d)+ failed/g; const isChunkLoadFailed = error.message.match(pattern); const targetPath = router.history.pending.fullPath; if (isChunkLoadFailed) { router.replace(targetPath);原创 2021-10-21 13:38:15 · 2939 阅读 · 1 评论 -
vue项目用webpack全局引用某个scss
首先引用scss一、目录 package.json"dependencies": { "vue": "^2.5.2", "vue-router": "^3.0.1", "node-sass": "^4.14.1", },"devDependencies": { "sass-loader": "^7.3.1", "sass-resources-loader": "^2.2.3",}目录 build/utils.js sass: generateLoa原创 2021-09-09 16:38:55 · 252 阅读 · 0 评论 -
vue 跨域 使用proxyTable解决
踩了一天的坑,终于完成了,废话不多说上代码config/index.js'use strict'// Template version: 1.3.1// see http://vuejs-templates.github.io/webpack for documentation.const path = require('path')const proxyConfig = require('./proxyConfig')module.exports = { dev: {原创 2021-01-22 20:32:59 · 401 阅读 · 1 评论 -
vue 首次加载缓慢
可参考 https://www.cnblogs.com/zyulike/p/11190012.html第一次打包vue的项目部署到服务器下时,发现初次加载特别的缓慢,将近20s页面才加载出来,完全没有开发环境上的那么流畅。主要原因是页面在打包后如果不进行相关配置会导致资源文件特别的大,一次想要全部加载完成会特别的耗时。这里简单总结一下自己用到的一些优化的方案。首先我们可以安装webpack-bundle-analyzer 插件,通过这个插件我们可以在打包的时候看到打包文件的大小,可以明显的看出哪些文件转载 2020-12-04 13:45:41 · 983 阅读 · 0 评论