js 精确计算求和
摘要:accAdd(arg1, arg2) { var r1 = this.deal(arg1); var r2 = this.deal(arg2); var m = Math.pow(10, Math.max(r1, r2)) return (this.accMul(arg1, m) + this.ac
阅读全文
posted @
2020-09-25 16:34
心意如水hucuie22
阅读(426)
推荐(0) 编辑
小程序简单收缩菜单
摘要:<view bindtap="bindIsDown" class="nav-Title" data-isdown="{{isDown}}" > <text class="nav-titles">2222</text> <image src="../../image/exam/{{isDown==0?
阅读全文
posted @
2020-09-23 10:27
心意如水hucuie22
阅读(241)
推荐(0) 编辑
小程序更改头像
摘要:changeAvatar: function (e) { var _this = this wx.chooseImage({ count: 1,// 默认9 sizeType: ['original', 'compressed'],// 可以指定是原图还是压缩图,默认二者都有 sourceType:
阅读全文
posted @
2020-09-23 09:19
心意如水hucuie22
阅读(296)
推荐(0) 编辑
城市列表接口
摘要:{ "S": [{ "id": 1, "name": "上海", "abbr": "SH", "area_code": "021", "sort": 1, "latitude": 31.23037, "longitude": 121.473701, "is_map": true, "pinyin":
阅读全文
posted @
2020-09-18 15:09
心意如水hucuie22
阅读(2524)
推荐(0) 编辑
排序接口
摘要:{ "navTab": [{ "name": "综合排序", "icon": "caret-down" }, { "name": "距离最近", "condition": "distance" }, { "name": "品质联盟", "condition": "is_premium" }, { "
阅读全文
posted @
2020-09-18 15:07
心意如水hucuie22
阅读(182)
推荐(0) 编辑
vue 封装tarbar组件
摘要:1。新建index.vue。引入tarbar组件 <template> <div class="index"> <router-view></router-view> <TabBar :data="tabbarData"/> </div> </template> <script> import Ta
阅读全文
posted @
2020-09-18 13:40
心意如水hucuie22
阅读(263)
推荐(0) 编辑
vue 路由守卫
摘要:1.登录成功后 .then(res => { // console.log(res); // 检验成功 设置登录状态并且跳转到/ localStorage.setItem("ele_login", true); this.$router.push("/"); } router.js里面 // 路由守
阅读全文
posted @
2020-09-18 11:27
心意如水hucuie22
阅读(165)
推荐(0) 编辑
mint ui switch 开关
摘要:1.总结:去掉scoped ,加上lang=less, 在最外层上的div加上/deep/ <style lang="less"> .mint-switch /deep/ { .mint-switch-core { height: 25px; width: 45px; } .mint-switch-
阅读全文
posted @
2020-09-18 11:00
心意如水hucuie22
阅读(344)
推荐(0) 编辑
vue 锚点定位 一种方法
摘要:import BScroll from "better-scroll"; selectkey(index){ 获取右侧所有元素的 classname const citylist = this.$refs.area_scroll.getElementsByClassName( "citylist"
阅读全文
posted @
2020-09-16 16:46
心意如水hucuie22
阅读(219)
推荐(0) 编辑
vue BScroll使用
摘要:子组件中<div class="area" ref="area_scroll" v-if="cityInfo"> import BScroll from "better-scroll"; methods: { initScroll() { this.scroll = new BScroll(this
阅读全文
posted @
2020-09-16 16:03
心意如水hucuie22
阅读(580)
推荐(0) 编辑
vue 验证表单
摘要:<input v-model="name" @blur="blurishow5" type="text" class="input" placeholder="请输入姓名" /> <div style="clear:both;"></div> <div v-show="item.ishow5" cl
阅读全文
posted @
2020-09-15 10:42
心意如水hucuie22
阅读(165)
推荐(0) 编辑
vue 头部header封装
摘要:<template> <header class="header"> <!-- 左侧返回按钮 --> <div class="header-button is-left" v-show="isLeft"> <i class="fa fa-chevron-left"></i> <button @cli
阅读全文
posted @
2020-09-10 13:38
心意如水hucuie22
阅读(855)
推荐(0) 编辑