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

fix: $listeners

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