- 博客(6)
- 收藏
- 关注
原创 vue中的js文件如何使用i18n 国际化
1.在main.js文件中引入:方式1://main.jsimport VueI18n from 'vue-i18n'Vue.use(VueI18n) // 通过插件的形式挂载,通过全局方法 Vue.use() 使用插件const i18n = new VueI18n({ locale: 'zh', // 语言标识 //this.$i18n.locale // 通过切换loca...
2020-01-03 14:32:55
6459
2
原创 vue01-组件通信
父组件 -->子组件属性props//childprops:{msg:String}//parent<HelloWorld msg="***********"/>refs//parent<HelloWorld ref="hw"/>//赋值this.$refs.hw.msg = "******";children//parentth...
2019-12-03 23:07:31
162
原创 js 颜色格式rgb->16进制的转换
http://www.zhangxinxu.com/wordpress/2010/03/javascript-hex-rgb-hsl-color-convert/这个链接是一篇对颜色格式转换的必要性和原理介绍的比较清晰的一篇文章,需要的小伙伴可以借鉴一下~今天看到一段做转换的代码,较于之前用过的代码更加精简,个人觉得很棒~特此记录。 function zero_fill_hex
2017-10-11 10:34:37
1356
原创 图片瀑布流
* {margin: 0;padding: 0;}#flow {list-style: none;margin: 0 auto;position: relative;}#flow li {position: absolute;width: 200px;transition: all 0.5s;overflow: hidden;}#flow li img {width
2016-12-08 16:21:57
767
原创 JS中加载图片问题
JS中经常使用的创建img标签的方法var img = new Image();img.src = “ http://img0.imgtn.bdimg.com/it/u=1999746274,3629967018&fm=21&gp=0.jpg” //网络地址img.onload = function{ //图片的加载事件 图片加载完成时调用alert(“这是一张图片”);
2016-12-08 14:38:52
2803
原创 变量提升/函数提升
很多人在初学JS接触到变量,函数的时候,总会碰到一个很棘手的问题----变量/函数提升.然而变量提升之所以存在疑点,是因为它涉及到了作用域(scoping)的问题.所以在讲变量/函数提升之前,我们先来研究一下作用域的问题.
2016-12-06 19:33:25
4318
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人