提交 144c9b69 编写于 作者: Q qiang

fix: $listeners

上级 0b5210ed
<template>
<uni-editor
:id="id"
class="ql-container" />
class="ql-container"
v-on="$listeners" />
</template>
<script>
......
<template>
<uni-icon>
<uni-icon v-on="$listeners">
<i
:class="`uni-icon-${type}`"
:style="{'font-size': _converPx(size),'color': color}"
......
......@@ -96,9 +96,9 @@ export default {
if (this._scroller) {
switch (e.detail.state) {
case 'start':
this._handleTouchStart(e)
disableScrollBounce({
disable: true
this._handleTouchStart(e)
disableScrollBounce({
disable: true
})
break
case 'move':
......@@ -106,9 +106,9 @@ export default {
break
case 'end':
case 'cancel':
this._handleTouchEnd(e)
disableScrollBounce({
disable: false
this._handleTouchEnd(e)
disableScrollBounce({
disable: false
})
}
}
......@@ -182,12 +182,15 @@ export default {
this.length = (this.$slots.default && this.$slots.default.length) || 0
return createElement('uni-picker-view-column', {
on: {
wheel: this._handleWheel
on: this.$listeners
}
}, [
createElement('div', {
ref: 'main',
staticClass: 'uni-picker-view-group'
staticClass: 'uni-picker-view-group',
on: {
wheel: this._handleWheel
}
},
[
createElement('div', {
......@@ -332,4 +335,4 @@ export default {
height: 1px;
color: #e5e5e5;
}
</style>
</style>
......@@ -617,11 +617,11 @@ export default {
}
return createElement(
'uni-swiper',
[createElement('div', {
ref: 'slidesWrapper',
'class': 'uni-swiper-wrapper',
'uni-swiper', {
on: this.$listeners
}, [createElement('div', {
ref: 'slidesWrapper',
'class': 'uni-swiper-wrapper'
}, slidesWrapperChild)]
)
}
......
<template>
<uni-picker @click.stop="_show">
<uni-picker
@click.stop="_show"
v-on="$listeners">
<slot />
</uni-picker>
</template>
......
<template>
<uni-web-view />
<uni-web-view v-on="$listeners"/>
</template>
<script>
import {
WEBVIEW_INSERTED,
<script>
import {
WEBVIEW_INSERTED,
WEBVIEW_REMOVED
} from '../../../constants'
let webview = false
......@@ -30,7 +30,7 @@ const insertHTMLWebView = ({
}
})
})
}
}
plus.webview.currentWebview().append(webview)
}
......@@ -50,9 +50,9 @@ const updateHTMLWebView = ({
color: webviewStyles.progress.color
}
})
}
}
webview.loadURL(realPath)
}
}
const removeHTMLWebView = () => {
plus.webview.currentWebview().remove(webview)
......@@ -90,12 +90,12 @@ export default {
updateHTMLWebView({
src: this.$getRealPath(this.src),
webviewStyles: this.webviewStyles
})
UniViewJSBridge.publishHandler(WEBVIEW_INSERTED, {}, this.$page.id)
})
UniViewJSBridge.publishHandler(WEBVIEW_INSERTED, {}, this.$page.id)
},
beforeDestroy () {
removeHTMLWebView()
UniViewJSBridge.publishHandler(WEBVIEW_REMOVED, {}, this.$page.id)
removeHTMLWebView()
UniViewJSBridge.publishHandler(WEBVIEW_REMOVED, {}, this.$page.id)
}
}
</script>
......@@ -107,4 +107,4 @@ export default {
top: 0;
bottom: 0;
}
</style>
</style>
<template>
<uni-map :id="id">
<uni-map
:id="id"
v-on="$listeners">
<div
ref="map"
style="width: 100%; height: 100%; position: relative; overflow: hidden;" />
......
<template>
<uni-picker @click.stop="_show">
<uni-picker
@click.stop="_show"
v-on="$listeners">
<div
ref="picker"
class="uni-picker-container"
......
<template>
<uni-web-view />
<uni-web-view v-on="$listeners" />
</template>
<script>
export default {
......@@ -9,11 +9,11 @@ export default {
type: String,
default: ''
}
},
watch: {
src (val, oldVal) {
this.iframe && (this.iframe.src = this.$getRealPath(this.src))
}
},
watch: {
src (val, oldVal) {
this.iframe && (this.iframe.src = this.$getRealPath(this.src))
}
},
mounted () {
const {
......@@ -23,9 +23,9 @@ export default {
height
} = this.$el.getBoundingClientRect()
this.iframe = document.createElement('iframe')
this.iframe = document.createElement('iframe')
this.iframe.style.position = 'absolute'
this.iframe.style.display = 'block'
this.iframe.style.display = 'block'
this.iframe.style.border = 0
this.iframe.style.top = top + 'px'
this.iframe.style.bottom = bottom + 'px'
......@@ -54,4 +54,4 @@ export default {
top: 0;
bottom: 0;
}
</style>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册