会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
无痕-范特西
博客园
首页
新随笔
联系
管理
订阅
2020年11月13日
uniapp实现多语言切换
摘要: 1.下载 npm install vue-i18n 2.创建语言包 3.在main.js中引入 import VueI18n from "vue-i18n"; Vue.use(VueI18n); const i18n = new VueI18n({ locale: uni.getStorageSyn
阅读全文
posted @ 2020-11-13 11:42 无痕-范特西
阅读(7166)
评论(0)
推荐(0)
2020年11月5日
vue进页面input自动获取焦点
摘要: 1.ref实现,要写在mounted里面 <input type="text" v-model="name" ref="getFocus" /> <script> export default { data() { return { name: '' } }, mounted() { this.$r
阅读全文
posted @ 2020-11-05 14:29 无痕-范特西
阅读(2088)
评论(0)
推荐(0)
2020年10月28日
vue-cli4使用less全局变量
摘要: 1.下载less npm install --save less less-loader 2.下载插件配置全局less变量 npm i style-resources-loader vue-cli-plugin-style-resources-loader -D 3.在vue.config.js文件
阅读全文
posted @ 2020-10-28 11:33 无痕-范特西
阅读(2188)
评论(0)
推荐(0)
2020年9月19日
用js实现隐藏手机号中间四位
摘要: 1.通过字符串截取 let phone = '18688886888' phone = phone.substring(0, 3) + '****' + phone.substr(phone.length - 4) console.log(phone) 2.使用正则 let phone = '186
阅读全文
posted @ 2020-09-19 14:20 无痕-范特西
阅读(1298)
评论(0)
推荐(0)
vue使用ECharts的折线图
摘要: 1.下载 npm install echarts --save 2.在main.js中引入 import echarts from 'echarts' Vue.prototype.$echarts = echarts 3.使用 <div id="map" style="width: 100%;hei
阅读全文
posted @ 2020-09-19 14:01 无痕-范特西
阅读(5894)
评论(2)
推荐(1)
2020年7月29日
js保留两位小数
摘要: 此方法会改变数据类型变为string,但是不会四舍五入,用的是字符串截取,不够两位小数补零 let value = 5.53 let numStr = Number(value).toString() let index = numStr.indexOf('.') let transformVal
阅读全文
posted @ 2020-07-29 10:24 无痕-范特西
阅读(193)
评论(0)
推荐(0)
2020年7月28日
vue中watch的基本用法
摘要: 1.在vue中,使用watch来响应数据的变化 <input type="text" v-model="userName" /> data() { return { userName: "wuHen", }; }, watch: { userName(newName, oldName) { cons
阅读全文
posted @ 2020-07-28 10:59 无痕-范特西
阅读(453)
评论(0)
推荐(0)
2020年7月24日
原生ajax请求
摘要: 一.ajax可以在不刷新当前页面的情况下,请求加载后台数据并在网页上呈现出来,可以提高用户体验,减少网络数据的传输量 二.ajax涉及的知识点 1、readyState:返回当前文档的载入状态 0-(未初始化)还没有调用send()方法 1-(载入)已调用send()方法,正在发送请求 2-(载入完
阅读全文
posted @ 2020-07-24 15:42 无痕-范特西
阅读(327)
评论(0)
推荐(0)
2020年7月23日
本地存储------Cookie
摘要: 1.Cookie 的作用就是用于解决 "如何记录客户端的用户信息";默认情况下,cookie 在浏览器关闭时删除: 2.Cookie 以名/值对形式存储,如: username=wu hen 3.创建Cookie document.cookie="username=wu hen"; 设置过期时间 d
阅读全文
posted @ 2020-07-23 17:21 无痕-范特西
阅读(130)
评论(0)
推荐(0)
2020年7月22日
vue-cli4打包配置
摘要: 1.在项目根目录建立vue.config.js module.exports = { publicPath: "./", // 公共路径(必须有的) outputDir: "dist", // 输出文件目录 assetsDir: "static", //静态资源文件名称 lintOnSave: fa
阅读全文
posted @ 2020-07-22 15:30 无痕-范特西
阅读(3350)
评论(0)
推荐(0)
下一页
公告