vue

div

点击事件@click

摁下事件@mousedown

弹起事件@mouseup

移动事件 

class =“css” 

:class=“js变量 + css” 

ref  this.$refs.namexxxx.methodsxxx()

watch:{} 无法监听object -> undefined

Object.assign(object1,object2) 可以实现1、2对象的属性相互补充,2的属性值可以覆盖1的属性值

 

获取当前页面,执行指定页面方法传参

let pages = getCurrentPages()
                let lastPage = pages[pages.length - 2].$vm
                if (lastPage && lastPage.onSelectFriendsResult) {
                    lastPage.onSelectFriendsResult(result, this.request)
                }
                
                console.log("select-friends",this.request,result)
                this.$eventBus.$emit('select-friends-result', this.request, result)

:style 

<form-fill-in ref="formFillIn1" :style="recordType == 2 ? 'flex: 1;max-width: 585px' : 'flex:1'" />
<form-fill-in ref="formFillIn2" :style="recordType == 2 ? 'flex: 1;max-width: 585px' : 'flex:1'" v-show="recordType == 2"/>

 :class

<form-fill-in ref="formFillIn1" style="flex: 1;" :class="{'formStyle': recordType == 2}"/>
<form-fill-in ref="formFillIn2" style="flex: 1;max-width: 585px" v-show="recordType == 2"/>

&:formStyle{
   max-width: 585px;
}

this.$nextTick()

 

 

element 滑动条 Ignored attempt to cancel a touchstart event 问题 (加上 touch-action: none)

<slider style="touch-action: none;" :value="inputValue" :min="min" :max="max" :step="step" show-value :disabled="disabled" @change="onChange"/>

 

posted @ 2022-05-16 15:09  LoveDonkey  阅读(29)  评论(0编辑  收藏  举报