提交 715d13e8 编写于 作者: D DCloud_LXH

chore: add compatConfig

上级 a4ba298b
......@@ -62,6 +62,9 @@ function getTempCanvas(width = 0, height = 0) {
export default {
name: "Canvas",
inheritAttrs: false,
compatConfig: {
MODE: 3
},
components: {
ResizeSensor,
},
......
......@@ -18,6 +18,9 @@ const OPEN_TYPES = ["navigate", "redirect", "switchTab", "reLaunch", "navigateBa
export default {
name: "Navigator",
compatConfig: {
MODE: 3
},
props: {
hoverClass: {
type: String,
......
......@@ -9,6 +9,9 @@ import parseNodes from './nodes-parser'
export default {
name: 'RichText',
compatConfig: {
MODE: 3
},
props: {
nodes: {
type: [Array, String],
......
......@@ -63,7 +63,6 @@
</template>
<script>
import { ref } from "vue";
import scroller from "../../mixins/scroller/index";
import { passive } from "@dcloudio/uni-shared";
import { initScrollBounce, disableScrollBounce } from "../../helpers/scroll";
import { useCustomEvent } from "../../helpers/useEvent";
......@@ -73,12 +72,11 @@ const passiveOptions = passive(true);
// const PULLING = 'pulling'
// const REFRESHING = 'refreshing'
export default /*#__PURE__*/ {
export default {
name: "ScrollView",
compatConfig: {
MODE: 3
},
mixins: [scroller],
props: {
scrollX: {
type: [Boolean, String],
......@@ -352,42 +350,6 @@ export default /*#__PURE__*/ {
this.content.style.webkitTransform = o;
}
},
_handleTrack: function ($event) {
if ($event.detail.state === "start") {
this._x = $event.detail.x;
this._y = $event.detail.y;
this._noBubble = null;
return;
}
if ($event.detail.state === "end") {
this._noBubble = false;
}
if (this._noBubble === null && this.scrollY) {
if (
Math.abs(this._y - $event.detail.y) / Math.abs(this._x - $event.detail.x) >
1
) {
this._noBubble = true;
} else {
this._noBubble = false;
}
}
if (this._noBubble === null && this.scrollX) {
if (
Math.abs(this._x - $event.detail.x) / Math.abs(this._y - $event.detail.y) >
1
) {
this._noBubble = true;
} else {
this._noBubble = false;
}
}
this._x = $event.detail.x;
this._y = $event.detail.y;
if (this._noBubble) {
$event.stopPropagation();
}
},
_handleScroll: function ($event) {
if (!($event.timeStamp - this._lastScrollTime < 20)) {
this._lastScrollTime = $event.timeStamp;
......
......@@ -12,6 +12,9 @@ import { useCustomEvent } from "@dcloudio/uni-components";
export default {
name: "CoverImage",
compatConfig: {
MODE: 3
},
props: {
src: {
type: String,
......
......@@ -10,6 +10,9 @@ import { ref } from "vue";
export default {
name: "CoverView",
compatConfig: {
MODE: 3
},
props: {
scrollTop: {
type: [String, Number],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册