- 博客(11)
- 资源 (6)
- 收藏
- 关注
翻译 Vue组件化--祖先给后代传值
祖先给后代传值由于嵌套层数过多, 传递props不切实际,vue提供了 provide/inject API完成该任务provide/inject: 能够实现祖先给后代传值// 父 home<template> <div class="home"> <HelloWorld msg="Welcome to Your Vue.js App"/> </div></template><script&g
2020-10-13 17:50:51
1009
翻译 Vue组件化--父组件传值给子组件
父组件传值给子组件:属性props// child<template> <div class="hello"> <h1>{{ msg }}</h1> {{foo}} </div></template><script> export default { propd: { msg: String }, data () { foo: 'foo' } }</script>
2020-10-13 17:48:55
162
翻译 Vue组件化--兄弟组件之间通信
兄弟组件之间通信:通过共同祖辈组件通过共同的祖辈组件搭桥,parent或parent或parent或root// 父 home<template> <div class="home"> <HelloWorld msg="Welcome to Your Vue.js App"/> <Brother msg="Brother" ></Brother> </div></templa
2020-10-13 17:45:51
343
翻译 Vue组件化--子组件到父组件的通信
子组件到父组件的通信:自定义事件// child <HelloWorld/><template> <div class="hello"> <h1 @click="$emit('foo', 'bar')">{{ msg }}</h1> </div></template><script> export default { name: "HelloWor
2020-10-13 17:40:12
122
原创 vue input点击输入键盘顶起页面解决方案 ios
vue ios input点击输入键盘顶起页面解决方案在所有input失去焦点的时候执行window.scroll(0, 0)在所有input失去焦点的时候执行window.scroll(0, 0)<template> <div><input placeholder="请输入您的手机号" @blur="onBlurInput()"></div>...
2019-06-05 14:22:41
7495
1
转载 vue中rem的配置, px转rem, 适配移动端
1.下载lib-flexible我使用的是vue-cli+webpack,所以是通过npm来安装的npm i lib-flexible --save2.引入lib-flexible在main.js中引入lib-flexibleimport 'lib-flexible/flexible'3.设置meta标签通过meta标签,设置设备宽度以及缩放比例<met...
2018-11-08 11:52:22
680
转载 android ZXing扫描二维码图片变形
Zxing 修改 CameraConfigurationManager.java文件的void initFromCameraParameters(Camera camera)方法,在 Log.d(TAG, "Screen resolution: " + screenResolution);这句之后增加Point screenResolutionForCamera = new Poin
2016-03-09 09:32:45
1926
原创 沉浸式菜单栏,标题栏与状态栏的的距离
http://www.oschina.net/question/1590538_2134301沉浸式菜单栏,标题栏与状态栏的的这里的view一般是指根布局
2015-11-17 14:19:25
377
android Socket UDP通信
2016-07-13
Android语音播报功能实现
2016-06-15
TabLayout实现顶部tab选项卡,类似百度外卖登陆界面的tab选项卡
2016-04-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人