分类: Vue

38 篇文章

服务端渲染 Nuxt3 部署方案
场景描述 线上服务器系统是 centos7.9 版本,系统最高只能安装 <= 16 版本的 node,在使用 Nuxt3 中至少需要 18 以上版本的 node 进行运行。参考现有网上资料都是升级系统底层插件来支持更高版本的 node 环境,这种方式对系统的破环性较高,且尝试后并不生效,下面介绍成本更优的方式,采用 docker 进行容器部署运行,相…
服务端渲染总结
创建项目 yarn create nuxt-app <project-name> 引入第三方 UI 以 Element UI 为例 yarn add element-ui -S 在 plugins /element-ui.js import Vue from "vue"import Element from "element-ui"Vu…
22. vue根据表格导出execl文件
需要的引入的 SDN 资源 <script src="https://cdn.jsdelivr.net/npm/xlsx-style@0.8.13/dist/jszip.js"></script><script src="https://cdn.jsdelivr.net/npm/xlsx-style@0.8.13/di…
Vue打开新页面被浏览器拦截
方式一 let tempPage = window.open ("", '_blank');tempPage.location =" 跳转的路径 " 方式二 Vue 单独打开页面,显示独立路由 let routeUrl = this.$router.resolve ({   name:' 路由的名字 ',    quer…
Vue实现懒加载
前端优化思路在海量数据中渲染中,前端在初始化拿到数据的后,只对少量数据进行渲染。监听滚动轴的位置,使其到达一定高度后,再渲染后面的部分数据 <template> <div> <ul> <li v-for="(item,index) in data">{{data}}</li> </u…
Vue配置本地代理
基于 vue-cli 2.0 module.exports = { dev:{ assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable:{ '/scoket': { target: 'xxx', changeOrigin: true, secure: false, pathRe…
Vue路由传参
// 传参 this.$router.push ({name:"ExamChange", params:{ routeParams: xxx} }) // 接收参数 this.$route.params.routeParams vue 获取 url 参数 this.$route.query."url 后缀的参数名"