- 博客(18)
- 收藏
- 关注
原创 js 对象操作
1.JS快速将对象中所有键赋值为空一,Object.keys(obj).forEach(key=>{obj[key]=’’})二,/*** 处理空的参数* @param datas* @returns*/function cleanParams(datas){var v_data ={};for(var a in datas){if (datas[a] != null && datas[a] instanceof Array) {v_data[a]=[];}el
2021-12-23 17:16:46 344
原创 flutter
1.获取状态栏高度:MediaQuery.of(context).padding.top2.Text上文字渐变:使用ShaderMask3.setSate((){code…}) 等价于code;(context as Element).markNeedsBuild()4.阴影:PhysicalModel(elevation:4.0,阴影大小shadowColor:red,阴影颜色圆形:borderRadius:BorderRadius.circular(100),或者 shape:Bo
2021-11-03 15:55:24 1249
原创 git 提交
remote: Access deny: You do not have permission to push to protection branch ‘develop’remote: Matching rule: ‘develop’. creation time: 2020-07-21 16:31:29remote: Please visit: https://gitee.com/helpTo https://gitee.com/gykeji/mmp-admin.git! [remote rej
2020-11-20 17:46:08 433
原创 vue 父子组件的生命周期的执行顺序
parent beforeCreatedparent createdparent beforeMountchiid beforeCreatedchild createdchild beforeMountchild mountedchild activated activated在子组件mounted(全部挂载到页面)之后,父组件mounted之前触发。parent beforeUpdatechiid updatedchiid beforeUpdate(chiid deactivat
2020-11-06 10:52:32 234
原创 伪数组转为数组
1.定义:有 length 属性,而且也是数值下标的对象,但不具备 Array.prototype 上的方法。2.常见伪数组:arguments,$(‘div’),document.getElementByClassName(’.name’)3.方法:[].slice.call(arguments)[].slice.apply(arguments)Array.prototype.call(arguments)Array.prototype.apply(arguments)Array.from(
2020-11-02 10:36:44 108
原创 移动app开发的几种方式
原生App->NativeAppWebApp->在手机浏览器打开的应用(如:黑马头条)HybridApp:合二为一跨平台的App其他类型的开发:小程序,微信公众号,快应用
2020-08-03 09:21:11 1198
原创 使用:not() 解决lists边框的问题
.nav li:not(:last-child) {border-right: 1px solid #666;}
2020-07-27 22:15:30 102
原创 promise
new Promise((resolve, reject) => {$.ajax({url: “xxxxxxxxxxxxx”,success: res => {if (res.code == 0) {resolve(res.data)} else {reject(res.desc)}}});}).then(res => {console.log(res)...
2020-01-15 11:37:56 113
原创 vue 再次点击路由不走created和mounted的解决
watch: { // 利用watch方法检测路由变化: ‘$route’: function (to, from) { // 拿到目标参数 to.query.id 去再次请求数据接口// this.loadPageData(to.query.id)}},...
2019-12-23 17:31:10 5383 1
原创 vue pull-to上拉加载
js:import TopNav from ‘@/components/TopNav.vue’;import PullTo from ‘vue-pull-to’;const BOTTOM_DEFAULT_CONFIG = { pullText: '上拉加载', triggerText: '释放更新', loadingText: '加载中...', doneTe...
2019-12-23 17:28:15 1326
原创 vue插件实现吸顶功能
html:<div v-sticky="{ stickyTop: 0, disabled: false }" class="stickTop"> <div>content</div></div>script:import VueSticky from “vue-sticky”;directives: {sticky: VueSt...
2019-11-20 10:30:46 1645
原创 使用cdn给静态资源加速,当cdn公共库的资源失败时怎么办?
if (!window.jQuery) {var script = document.createElement(‘script’);script.src = “/js/jquery.min.js”;document.body.appendChild(script);}
2019-11-19 18:15:09 589
原创 /* 小程序如何自定义tabbar上边框的颜色 */
page::before{content: ‘’;position: fixed;left: 0;top: 0;width: 100%;height: 2rpx;background-color: #48b25a;z-index: 9999;}page::after{content: ‘’;position: fixed;left: 0;bottom: 0;width...
2019-11-07 14:18:58 1242
原创 小程序侧边栏左右联动
<view class="classify {{classifySeleted==classify.id?'active':''}}" wx:for="{{cakeTypesTitle}}" wx:for-item="classify" wx:key="*this" data-id="{{classify.id}}" bindtap="tapClassify"> <v...
2019-10-30 17:36:27 709
原创 UNI-APP 生成APP 微信公众开放平台中申请移动应用,如何获取应用签名和应用包名称
生成签名工具连接:https://open.weixin.qq.com/cgi-bin/readtemplate?t=resource/app_download_android_tmpl&lang=zh_CN在手机上面安装应用https://res.wx.qq.com/open/zh_CN/htmledition/res/dev/download/sdk/Gen_Signature_A...
2019-10-28 19:33:28 1008
原创 微信小程序自带的 富文本的解析显示
//js页面(result.data.newdata.content----html标签)content = result.data.newdata.content.replace(/\<img/gi, '<img style="width:90%!important;height:auto;display:block;margin:0 auto" ') .repla...
2019-09-24 11:20:35 876
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人