- 博客(26)
- 收藏
- 关注
原创 vuecli开发环境-做代理服务器
devServer: { proxy: { // http://c.m.163.com/nc/article/headline/T1348647853363/0-40.html '/api': { target: 'http://c.m.163.com', // 后台接口域名 changeOrigin: true, // 改变请求来源(欺骗后台你的请求是从http://c.m.163.com) - 在浏览器调试窗口看到的是localhost:8
2021-08-25 13:50:46 111
原创 取出数组中相同的数据
需要取出图片中数组中相同的数据需要的数据格式tableData = { 0: [{},{},{}], 1: [{},{},{}], 2: [{},{},{}], 3: [{},{},{}], 4: [{},{},{}]}转换代码// 取出数组中相同的数据 let arr = []; this.TableD.forEach((item,index) => { let obj = [] for(let i = 0; i<
2021-08-20 12:15:26 583
原创 2010/8/12 记录关于组件缓存的问题
路由 { path: '/article/:gsbm', name: 'article', component: () => import('@/views/Article') }组件 <keep-alive> <router-view :key="$route.fullPath"></router-view> </keep-alive>问题:在使用keep-alive做组件缓存的时候, 发现上面的设置没
2021-08-12 11:40:50 90
原创 Vue中使用RSA加密
安装插件jsencryptnpm install jsencrypt导入import JSEncrypt from 'jsencrypt'使用utils/index.js // 封装RSA加密方法export function encryptedData(data) { // 新建JSEncrypt对象 const encryptor = new JSEncrypt(undefined) // 设置公钥 const publicKey = '公钥' enc..
2021-07-23 10:21:11 293
原创 vue配置rem适配(postcss-pxtorem和amfe-flexible)
移动端vue配置 REM 适配Vant 中的样式默认使用px作为单位,如果需要使用rem单位,推荐使用以下两个工具:postcss-pxtorem 是一款 postcss 插件,用于将单位转化为 remamfe-flexible 用于设置 rem 基准值使用 amfe-flexible 动态设置 REM 基准值(html 标签的字体大小)1、安装`yarn add amfe-flexible` 或`npm i amfe-flexible`2、然后在 main.js 中加载
2021-06-26 23:04:08 975
原创 图片懒加载-自定义指令
创建自定义指令directives/index<img v-imgLazy="url"/> // url=图片地址 v-imgLazy代替src// =====================================// 定制图片懒加载指令import defaultImg from '@/assets/images/200.png' // 默认显示图片import { useIntersectionObserver } from '@vueuse/core' // 引入
2021-06-08 21:26:33 123
原创 2021-05-25
:props="{ label: ‘name’ }" 设置以哪个字段为准来显示节点 <el-tree :data="treeData" :props="{ label: 'name' }" />
2021-05-25 09:21:43 62
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人