@shijiu/jsview-vue 0.9.502 → 0.9.631
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/target_core_revision.js +4 -3
- package/index.js +10 -0
- package/package.json +8 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +16 -5
- package/samples/AnimPicture/App.vue +89 -106
- package/samples/Basic/App.vue +65 -68
- package/samples/Basic/components/ContentBlock.vue +31 -36
- package/samples/Basic/components/anim/AnimGroup.vue +61 -75
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +54 -43
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +25 -31
- package/samples/Basic/components/anim/AnimTransition.vue +142 -105
- package/samples/Basic/components/div/DivBackground.vue +38 -16
- package/samples/Basic/components/div/DivClip.vue +143 -78
- package/samples/Basic/components/div/DivCssScoped.vue +10 -10
- package/samples/Basic/components/div/DivCssVar.vue +40 -42
- package/samples/Basic/components/div/DivGroup1.vue +45 -39
- package/samples/Basic/components/div/DivGroup2.vue +56 -45
- package/samples/Basic/components/div/DivLayout.vue +63 -5
- package/samples/Basic/components/div/DivRadius.vue +51 -42
- package/samples/Basic/components/div/DivTransform.vue +21 -16
- package/samples/Basic/components/panel/Panel1.vue +46 -44
- package/samples/Basic/components/panel/Panel2.vue +22 -26
- package/samples/Basic/components/panel/TitleBar.vue +12 -12
- package/samples/Basic/components/text/TextAlign.vue +54 -44
- package/samples/Basic/components/text/TextEmoji.vue +16 -20
- package/samples/Basic/components/text/TextFontStyle.vue +77 -53
- package/samples/Basic/components/text/TextGroup1.vue +46 -38
- package/samples/Basic/components/text/TextGroup2.vue +25 -28
- package/samples/Basic/components/text/TextOverflow.vue +78 -59
- package/samples/BasicFocusControl/App.vue +22 -43
- package/samples/BasicFocusControl/components/BaseBlock.vue +42 -43
- package/samples/BasicFocusControl/components/MainArea.vue +55 -70
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +11 -15
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +21 -24
- package/samples/BasicFocusControl/components/SideBar.vue +32 -47
- package/samples/BasicFocusControl/components/SideBarBlock.vue +20 -23
- package/samples/Collision/App.vue +452 -0
- package/samples/ColorSpace/App.vue +15 -24
- package/samples/DemoHomepage/App.vue +7 -11
- package/samples/DemoHomepage/components/BodyFrame.vue +21 -9
- package/samples/DemoHomepage/components/TabFrame.vue +7 -8
- package/samples/DemoHomepage/router.js +52 -33
- package/samples/DemoHomepage/views/Homepage.vue +18 -9
- package/samples/FilterDemo/AnimatePic.vue +58 -0
- package/samples/FilterDemo/App.vue +99 -61
- package/samples/FilterDemo/VideoLayer.vue +62 -0
- package/samples/FlipCard/App.vue +32 -41
- package/samples/FlipCard/FlipCard.vue +48 -54
- package/samples/GridDemo/App.vue +109 -77
- package/samples/GridDemo/ButtonBlock.vue +50 -49
- package/samples/GridDemo/FocusItem.vue +19 -38
- package/samples/GridDemo/Item.vue +46 -54
- package/samples/HashHistory/App.vue +63 -79
- package/samples/HashHistory/components/HorizontalButtonList.vue +72 -95
- package/samples/HashHistory/components/Item.vue +42 -56
- package/samples/HashHistory/router.js +23 -12
- package/samples/HashHistory/views/MainPage.vue +35 -46
- package/samples/HashHistory/views/SubPage.vue +34 -47
- package/samples/ImpactStop/App.vue +435 -0
- package/samples/Input/App.vue +8 -18
- package/samples/Input/FullKeyboard.vue +2 -6
- package/samples/Input/InputPanel.vue +18 -12
- package/samples/Input/KeyboardItem.vue +1 -1
- package/samples/LongImage/App.vue +11 -27
- package/samples/LongImage/Button.vue +50 -145
- package/samples/LongImage/ButtonItem.vue +44 -0
- package/samples/LongImage/LongImageScroll.vue +71 -106
- package/samples/LongImage/Scroll.vue +7 -9
- package/samples/LongText/App.vue +13 -28
- package/samples/LongText/Button.vue +43 -145
- package/samples/LongText/ButtonItem.vue +44 -0
- package/samples/LongText/LongTextScroll.vue +68 -101
- package/samples/LongText/Scroll.vue +7 -9
- package/samples/Marquee/App.vue +34 -37
- package/samples/MaskClip/App.vue +17 -30
- package/samples/MetroWidgetDemos/Advanced/App.vue +47 -0
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
- package/samples/MetroWidgetDemos/Advanced/Widgets.vue +71 -0
- package/samples/MetroWidgetDemos/Item.vue +67 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/App.vue +80 -104
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/Item.vue +7 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/bg.jpg +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_content.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/focus_border.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/holder_logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/jrbm.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/loading.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/mcjx.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tao.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tmall.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/border.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/ContentItem.vue +60 -86
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/MyTab.vue +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/data.js +45 -0
- package/samples/MetroWidgetDemos/PingPong/App.vue +135 -0
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +73 -0
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +84 -0
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
- package/samples/MetroWidgetDemos/Simple/App.vue +45 -0
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
- package/samples/MetroWidgetDemos/WidgetItem.vue +89 -0
- package/samples/MetroWidgetDemos/data.js +204 -0
- package/samples/NinePatchDemo/App.vue +114 -115
- package/samples/NinePatchDemo/Item.vue +7 -8
- package/samples/Preload/App.vue +67 -64
- package/samples/Preload/Item.vue +21 -29
- package/samples/QrcodeDemo/App.vue +24 -29
- package/samples/SoundPool/App.vue +77 -106
- package/samples/SprayView/App.vue +10 -8
- package/samples/SpriteImage/App.vue +1 -2
- package/samples/TextBox/App.vue +86 -101
- package/samples/TextBox/RenderCenter.vue +1 -1
- package/samples/TextBox/RenderLeft.vue +1 -1
- package/samples/TextBox/RenderOneLine.vue +1 -1
- package/samples/TextBox/RenderRight.vue +1 -1
- package/samples/TextShadowDemo/App.vue +1 -2
- package/samples/TextureAnimation/App.vue +16 -13
- package/samples/TextureAnimation/App2.vue +111 -0
- package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/samples/TextureAnimation/assets/light.png +0 -0
- package/samples/TextureAnimation/assets/light2.png +0 -0
- package/samples/TextureAnimation/assets/mask.png +0 -0
- package/samples/TextureSize/App.vue +15 -25
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +2 -4
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +2 -3
- package/samples/ThrowMoveDemo/TargetDemo.vue +3 -4
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +2 -3
- package/samples/TouchSample/App.vue +2 -3
- package/samples/TouchSample/Item.vue +15 -13
- package/samples/TouchSample/MetroWidgetHorizontal.vue +2 -2
- package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
- package/samples/TouchSample/TouchContainerHorizontal.vue +4 -3
- package/samples/TouchSample/TouchContainerVertical.vue +3 -2
- package/samples/TransitPage/App.vue +20 -32
- package/samples/VideoDemo/App.vue +65 -81
- package/samples/VideoDemo/components/Button.vue +41 -52
- package/samples/VideoDemo/components/Controllor.vue +171 -169
- package/samples/VideoDemo/components/VideoFrame.vue +87 -99
- package/samples/VisibleSensorDemo/App.vue +234 -0
- package/scripts/jsview-jsmap-serve.js +42 -0
- package/scripts/jsview-post-install.js +1 -1
- package/tsconfig.json +3 -0
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +204 -193
- package/utils/JsViewEngineWidget/JsvFocusManager.js +30 -17
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +1561 -1656
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.js +136 -0
- package/utils/JsViewEngineWidget/MetroWidget/ToolFunctions.js +18 -0
- package/utils/JsViewEngineWidget/TemplateParser.js +111 -1
- package/utils/JsViewEngineWidget/WidgetCommon.js +8 -2
- package/utils/JsViewEngineWidget/index.js +4 -4
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +301 -58
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +22 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +8 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvImpactTracer.js +113 -0
- package/utils/JsViewVueTools/JsvRefTaker.js +35 -0
- package/utils/JsViewVueTools/index.js +20 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +11 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +8 -4
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +203 -14
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvFilterView.vue +59 -51
- package/utils/JsViewVueWidget/JsvGrid.vue +139 -41
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +4 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +13 -12
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +8 -17
- package/utils/JsViewVueWidget/JsvNinePatch.vue +1 -1
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +37 -7
- package/utils/JsViewVueWidget/JsvPosterImage.vue +34 -13
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +39 -53
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +1 -1
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +13 -10
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +282 -285
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -3
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +142 -61
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +9 -5
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +7 -8
- package/utils/JsViewVueWidget/JsvVideo.vue +9 -12
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +141 -0
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +9 -0
- package/utils/JsViewVueWidget/index.js +42 -0
- package/samples/AdvanceMetroWidget/App.vue +0 -123
- package/samples/AdvanceMetroWidget/Frame.vue +0 -102
- package/samples/AdvanceMetroWidget/Item.vue +0 -63
- package/samples/AdvanceMetroWidget/data.js +0 -137
- package/samples/ClassNameDemo/App.vue +0 -119
- package/samples/ClassNameDemo/components/ContentItem.vue +0 -253
- package/samples/ClassNameDemo/components/LoadingView.vue +0 -43
- package/samples/ClassNameDemo/components/TitleView.vue +0 -24
- package/samples/ClassNameDemo/data.js +0 -24
- package/samples/FlowMultiWidget/App.vue +0 -91
- package/samples/FlowMultiWidget/assets/nine_patch_focus.png +0 -0
- package/samples/FlowMultiWidget/components/Block.vue +0 -107
- package/samples/FlowMultiWidget/components/FlowPage.vue +0 -60
- package/samples/FlowMultiWidget/components/Item.vue +0 -103
- package/samples/FlowMultiWidget/components/MenuItem.vue +0 -72
- package/samples/FlowMultiWidget/components/MyMenu.vue +0 -90
- package/samples/FlowMultiWidget/data.js +0 -446
- package/samples/HashHistory/views/BasePage.vue +0 -19
- package/samples/HashHistory/views/SubPageFirst.vue +0 -10
- package/samples/HashHistory/views/SubPageSecond.vue +0 -10
- package/samples/SimpleWidgetDemo/assets/bg.jpg +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_content.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/focus_border.png +0 -0
- package/samples/SimpleWidgetDemo/assets/holder_logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/jrbm.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/loading.png +0 -0
- package/samples/SimpleWidgetDemo/assets/logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/mcjx.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tao.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tmall.png +0 -0
- package/samples/SimpleWidgetDemo/data.js +0 -124
- package/utils/JsViewEngineWidget/MetroWidget/ContentView.vue +0 -63
- package/utils/JsViewEngineWidget/MetroWidget/DivWrapper.vue +0 -51
- package/utils/JsViewEngineWidget/MetroWidget/ItemView.vue +0 -213
- package/utils/JsViewEngineWidget/MetroWidget/RootView.vue +0 -154
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* backgroundImage {String} 组件背景图
|
|
24
24
|
* backgroundColor {String} 组件背景颜色
|
|
25
25
|
* scale {float} 当前 item 的放大倍数, 默认为1
|
|
26
|
+
* reverseSwipe {boolean} 反转滚动方向,默认值为false. 默认滚动方向是正向, 既向index增大的方向, 反转后为反向, 既向index减小的方向
|
|
26
27
|
-->
|
|
27
28
|
|
|
28
29
|
<script>
|
|
@@ -120,6 +121,10 @@ export default {
|
|
|
120
121
|
backgroundColor: {
|
|
121
122
|
type: String,
|
|
122
123
|
},
|
|
124
|
+
reverseSwipe: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false,
|
|
127
|
+
}
|
|
123
128
|
},
|
|
124
129
|
computed: {
|
|
125
130
|
indicatorLayout() {
|
|
@@ -311,7 +316,7 @@ export default {
|
|
|
311
316
|
if (this.autoplayInterval > 0) {
|
|
312
317
|
this.intervalHandler = setInterval(() => {
|
|
313
318
|
this.preOffset = this.offset;
|
|
314
|
-
this.offset = this.offset + 1;
|
|
319
|
+
this.offset = this.offset + this.reverseSwipe ? -1 : 1;
|
|
315
320
|
}, this.autoplayInterval);
|
|
316
321
|
}
|
|
317
322
|
},
|
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-02-07 14:21:37
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-08-24 13:18:21
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script>
|
|
9
9
|
import { Forge, ForgeExtension } from "../../../dom/jsv-forge-define";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import {
|
|
11
|
+
numberCheckSet,
|
|
12
|
+
urlCheckSet,
|
|
13
|
+
} from "../../JsViewVueTools/TypeCheckAndSet";
|
|
14
|
+
import { toNinePatchForgeViewSet } from "../../JsViewVueTools/NinePatchHelper";
|
|
15
|
+
import {
|
|
16
|
+
DECORATE_BORDER_RADIUS,
|
|
17
|
+
DECORATE_NINEPATCH_ALPHA_MIX,
|
|
18
|
+
} from "./CommonType";
|
|
13
19
|
|
|
14
20
|
/*
|
|
15
21
|
* JsvTextureAnim:对view的内容进行动画的控件
|
|
@@ -29,23 +35,23 @@ import { DECORATE_BORDER_RADIUS, DECORATE_NINEPATCH_ALPHA_MIX } from "./CommonTy
|
|
|
29
35
|
* bottomLeft {number}: // 左下角圆弧半径 默认 0
|
|
30
36
|
* bottomRight {number}: // 右下角圆弧半径 默认 0
|
|
31
37
|
* }
|
|
32
|
-
*
|
|
38
|
+
*
|
|
33
39
|
* NinePatchAlphaMix NinePatch图片的alpha叠加
|
|
34
40
|
* {
|
|
35
41
|
* type {string}: // 装饰类型,固定值"NinePatchAlphaMix"
|
|
36
42
|
* url {string}: // (必填)Alpha mix叠加的图片
|
|
37
43
|
* imageWidth {int} // (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
|
|
38
44
|
* centerWidth {int} // (必填)原图信息: .9图的中心区域宽度(repeat区域)
|
|
39
|
-
* imageDspWidth {int} // (选填)原图缩放后的显示宽度,计算方法:
|
|
45
|
+
* imageDspWidth {int} // (选填)原图缩放后的显示宽度,计算方法:
|
|
40
46
|
* 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
|
|
41
47
|
* 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
|
|
42
48
|
* 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
|
|
43
49
|
* borderOutset {int} // (必填)原图信息: 图片边缘到中心内容区域边缘的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
|
|
44
50
|
* animTime {int} // (必填)缩放动画的时长(单位毫秒)
|
|
45
51
|
* }
|
|
46
|
-
*
|
|
52
|
+
*
|
|
47
53
|
* animation {string} texture的动画, 为keyframe的格式
|
|
48
|
-
* duration {number} 动画时长, 毫秒
|
|
54
|
+
* duration {number} 动画时长, 毫秒
|
|
49
55
|
* onAnimationEnd {function} 动画结束回调
|
|
50
56
|
* repeat {number} 动画执行次数, 默认1次, -1为无限循环
|
|
51
57
|
* delay {number} 动画延迟时间, 毫秒
|
|
@@ -53,11 +59,29 @@ import { DECORATE_BORDER_RADIUS, DECORATE_NINEPATCH_ALPHA_MIX } from "./CommonTy
|
|
|
53
59
|
* autoStart {boolean} 是否自动开始动画, 默认 false
|
|
54
60
|
* transform {string} texture的transform, 计算时transform矩阵在动画矩阵右侧
|
|
55
61
|
* transformOrigin {string} transform的锚点, 锚点不设置的话默认为中心点(0.5, 0.5)
|
|
56
|
-
*
|
|
62
|
+
* texCoord {object} {
|
|
63
|
+
* alignAnchor: 偏差的基准点, 具体为TexAlignAnchor的enum
|
|
64
|
+
* left: 距离anchor的偏差
|
|
65
|
+
* top: 距离anchor的偏差
|
|
66
|
+
* width: texture的宽
|
|
67
|
+
* height: texture的高
|
|
68
|
+
* }
|
|
57
69
|
* public methods:
|
|
58
70
|
* start
|
|
59
71
|
* @description 开始动画
|
|
60
72
|
*/
|
|
73
|
+
const TexAlignAnchor = {
|
|
74
|
+
LEFT_TOP: 1,
|
|
75
|
+
CENTER_TOP: 2,
|
|
76
|
+
RIGHT_TOP: 3,
|
|
77
|
+
LEFT_MIDDLE: 4,
|
|
78
|
+
CENTER: 5,
|
|
79
|
+
RIGHT_MIDDLE: 6,
|
|
80
|
+
LEFT_BOTTOM: 7,
|
|
81
|
+
CENTER_BOTTOM: 8,
|
|
82
|
+
RIGHT_BOTTOM: 9,
|
|
83
|
+
};
|
|
84
|
+
export { TexAlignAnchor };
|
|
61
85
|
|
|
62
86
|
export default {
|
|
63
87
|
props: {
|
|
@@ -88,7 +112,18 @@ export default {
|
|
|
88
112
|
autoStart: {
|
|
89
113
|
type: Boolean,
|
|
90
114
|
default: false,
|
|
91
|
-
}
|
|
115
|
+
},
|
|
116
|
+
texCoord: {
|
|
117
|
+
type: Object,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
watch: {
|
|
121
|
+
texCoord: {
|
|
122
|
+
handler(newValue, oldValue) {
|
|
123
|
+
this._updateTexCoord();
|
|
124
|
+
},
|
|
125
|
+
deep: true,
|
|
126
|
+
},
|
|
92
127
|
},
|
|
93
128
|
setup() {
|
|
94
129
|
return {
|
|
@@ -100,7 +135,10 @@ export default {
|
|
|
100
135
|
methods: {
|
|
101
136
|
_createForgeView(view_texture, decorate_setting) {
|
|
102
137
|
if (decorate_setting) {
|
|
103
|
-
return this._createLayoutViewWithDecorate(
|
|
138
|
+
return this._createLayoutViewWithDecorate(
|
|
139
|
+
view_texture,
|
|
140
|
+
decorate_setting
|
|
141
|
+
);
|
|
104
142
|
} else {
|
|
105
143
|
// 无特异修饰类型的view
|
|
106
144
|
let texture_set = new Forge.ExternalTextureSetting(view_texture);
|
|
@@ -120,24 +158,27 @@ export default {
|
|
|
120
158
|
topLeft: top_left,
|
|
121
159
|
topRight: top_right,
|
|
122
160
|
bottomRight: match.length > 2 ? match[2] : top_left,
|
|
123
|
-
bottomLeft: match.length > 3 ? match[3] : top_right
|
|
124
|
-
}
|
|
161
|
+
bottomLeft: match.length > 3 ? match[3] : top_right,
|
|
162
|
+
};
|
|
125
163
|
}
|
|
126
164
|
}
|
|
127
165
|
return null;
|
|
128
166
|
},
|
|
129
167
|
|
|
130
168
|
_createLayoutViewWithDecorate(view_texture, decorate_setting) {
|
|
131
|
-
if (decorate_setting && typeof decorate_setting ==
|
|
132
|
-
switch(decorate_setting.type) {
|
|
169
|
+
if (decorate_setting && typeof decorate_setting == "object") {
|
|
170
|
+
switch (decorate_setting.type) {
|
|
133
171
|
case DECORATE_NINEPATCH_ALPHA_MIX: {
|
|
134
172
|
// NinePatch alpha mix view
|
|
135
|
-
return this._createNinePatchAlphaMixView(
|
|
136
|
-
|
|
173
|
+
return this._createNinePatchAlphaMixView(
|
|
174
|
+
view_texture,
|
|
175
|
+
decorate_setting
|
|
176
|
+
);
|
|
177
|
+
}
|
|
137
178
|
case DECORATE_BORDER_RADIUS: {
|
|
138
179
|
// 圆角view
|
|
139
180
|
return this._createBorderRadius(view_texture, decorate_setting);
|
|
140
|
-
}
|
|
181
|
+
}
|
|
141
182
|
default:
|
|
142
183
|
console.error("Unknown set=", decorate_setting);
|
|
143
184
|
return null;
|
|
@@ -157,8 +198,7 @@ export default {
|
|
|
157
198
|
if (decorate_setting.url) {
|
|
158
199
|
let converted_url = urlCheckSet(decorate_setting.url);
|
|
159
200
|
let view_texture = textureManager.GetImage2(converted_url);
|
|
160
|
-
|
|
161
|
-
nine_patch_view.EnableAlphaMix(view_texture, true);
|
|
201
|
+
nine_patch_view.EnableAlphaMix(view_texture);
|
|
162
202
|
} else {
|
|
163
203
|
console.error("ninepatch url not set");
|
|
164
204
|
return null;
|
|
@@ -166,13 +206,17 @@ export default {
|
|
|
166
206
|
|
|
167
207
|
// calculate padding and repeat
|
|
168
208
|
let view_set = toNinePatchForgeViewSet(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
209
|
+
numberCheckSet(decorate_setting.imageWidth),
|
|
210
|
+
numberCheckSet(decorate_setting.centerWidth),
|
|
211
|
+
decorate_setting.imageDspWidth,
|
|
212
|
+
numberCheckSet(decorate_setting.borderOutset)
|
|
213
|
+
);
|
|
173
214
|
nine_patch_view.SetPadding(view_set.padding, view_set.padding); // 方图横纵一致
|
|
174
215
|
nine_patch_view.SetRepeat(view_set.repeat, view_set.repeat); // 方图横纵一致
|
|
175
|
-
nine_patch_view.SetImageDspSize(
|
|
216
|
+
nine_patch_view.SetImageDspSize(
|
|
217
|
+
view_set.imageDspSize,
|
|
218
|
+
view_set.imageDspSize
|
|
219
|
+
); // 方图横纵一致
|
|
176
220
|
|
|
177
221
|
return nine_patch_view;
|
|
178
222
|
},
|
|
@@ -180,11 +224,15 @@ export default {
|
|
|
180
224
|
_createBorderRadius(view_texture, decorate_setting) {
|
|
181
225
|
// 圆角view
|
|
182
226
|
let texture_mask = new Forge.ViewRoundCornerMask(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
227
|
+
numberCheckSet(decorate_setting.topLeft),
|
|
228
|
+
numberCheckSet(decorate_setting.topRight),
|
|
229
|
+
numberCheckSet(decorate_setting.bottomLeft),
|
|
230
|
+
numberCheckSet(decorate_setting.bottomRight)
|
|
231
|
+
);
|
|
232
|
+
let texture_set = new Forge.ExternalTextureSetting(
|
|
233
|
+
view_texture,
|
|
234
|
+
texture_mask
|
|
235
|
+
);
|
|
188
236
|
return new Forge.LayoutView(texture_set);
|
|
189
237
|
},
|
|
190
238
|
|
|
@@ -192,6 +240,31 @@ export default {
|
|
|
192
240
|
this.onAnimationEnd?.();
|
|
193
241
|
},
|
|
194
242
|
|
|
243
|
+
_updateTexCoord() {
|
|
244
|
+
if (this.texCoord) {
|
|
245
|
+
if (this.texCoord.width > 0 && this.texCoord.height > 0) {
|
|
246
|
+
const offsetLeft = !isNaN(this.texCoord.left)
|
|
247
|
+
? this.texCoord.left
|
|
248
|
+
: -this.texCoord.width / 2;
|
|
249
|
+
const offsetTop = !isNaN(this.texCoord.top)
|
|
250
|
+
? this.texCoord.top
|
|
251
|
+
: -this.texCoord.height / 2;
|
|
252
|
+
const anchor = Number.isInteger(this.texCoord.alignAnchor)
|
|
253
|
+
? this.texCoord.alignAnchor
|
|
254
|
+
: 5;
|
|
255
|
+
this.innerView.SetTextureCoord(
|
|
256
|
+
offsetLeft,
|
|
257
|
+
offsetTop,
|
|
258
|
+
this.texCoord.width,
|
|
259
|
+
this.texCoord.height,
|
|
260
|
+
anchor
|
|
261
|
+
);
|
|
262
|
+
} else {
|
|
263
|
+
console.error("JsvTextureAnim");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
|
|
195
268
|
start() {
|
|
196
269
|
if (this.forgeAnimation && this.innerView) {
|
|
197
270
|
this.innerView.StartTextureAnimation(this.forgeAnimation);
|
|
@@ -200,15 +273,20 @@ export default {
|
|
|
200
273
|
|
|
201
274
|
getTransition() {
|
|
202
275
|
let transition = "";
|
|
203
|
-
let decorate = this
|
|
276
|
+
let decorate = this.decorate;
|
|
204
277
|
|
|
205
|
-
if (
|
|
278
|
+
if (
|
|
279
|
+
decorate &&
|
|
280
|
+
decorate.type == DECORATE_NINEPATCH_ALPHA_MIX &&
|
|
281
|
+
decorate.animTime > 0
|
|
282
|
+
) {
|
|
206
283
|
// Ninepatch模式可以设置长宽的过渡动画
|
|
207
|
-
|
|
284
|
+
let anim_time = decorate.animTime;
|
|
285
|
+
transition = `left ${anim_time}s, top ${anim_time}s, width ${anim_time}s, height ${anim_time}s`;
|
|
208
286
|
}
|
|
209
287
|
|
|
210
288
|
return transition;
|
|
211
|
-
}
|
|
289
|
+
},
|
|
212
290
|
},
|
|
213
291
|
|
|
214
292
|
created() {
|
|
@@ -217,8 +295,13 @@ export default {
|
|
|
217
295
|
|
|
218
296
|
// 1.获得主view的展示内容图片 texture
|
|
219
297
|
let image_url = urlCheckSet(this.src);
|
|
220
|
-
let view_texture = textureManager.GetImage2(
|
|
221
|
-
|
|
298
|
+
let view_texture = textureManager.GetImage2(
|
|
299
|
+
image_url,
|
|
300
|
+
false,
|
|
301
|
+
null,
|
|
302
|
+
"RGB_8888",
|
|
303
|
+
null
|
|
304
|
+
);
|
|
222
305
|
// 1.1 兼容border转为decorate
|
|
223
306
|
let decorate = this.$props.decorate;
|
|
224
307
|
if (this.$props.borderRadius) {
|
|
@@ -227,7 +310,6 @@ export default {
|
|
|
227
310
|
|
|
228
311
|
// 2.创建view
|
|
229
312
|
this.innerView = this._createForgeView(view_texture, decorate);
|
|
230
|
-
|
|
231
313
|
// 3.设置texture基本形变
|
|
232
314
|
if (this.transform) {
|
|
233
315
|
this.innerView.ResetTextureCssTransform(
|
|
@@ -235,23 +317,24 @@ export default {
|
|
|
235
317
|
this.transformOrigin
|
|
236
318
|
);
|
|
237
319
|
}
|
|
320
|
+
this._updateTexCoord();
|
|
238
321
|
|
|
239
322
|
// 4.设置texture的动画形变
|
|
240
|
-
this.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
1,
|
|
245
|
-
1
|
|
246
|
-
);
|
|
247
|
-
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
248
|
-
this.forgeAnimation.SetAnimationListener(
|
|
249
|
-
new Forge.AnimationListener(
|
|
323
|
+
if (this.animation) {
|
|
324
|
+
this.forgeAnimation = new Forge.CssKeyframeAnimation(
|
|
325
|
+
"@keyframes test" + this.animation,
|
|
326
|
+
this.duration,
|
|
250
327
|
null,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
)
|
|
254
|
-
|
|
328
|
+
1,
|
|
329
|
+
1
|
|
330
|
+
);
|
|
331
|
+
this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
|
|
332
|
+
this.forgeAnimation.SetAnimationListener(
|
|
333
|
+
new Forge.AnimationListener(null, this._onAnimationEnd, null)
|
|
334
|
+
);
|
|
335
|
+
} else {
|
|
336
|
+
this.forgeAnimation = null;
|
|
337
|
+
}
|
|
255
338
|
|
|
256
339
|
// 5. inner view标准处理
|
|
257
340
|
this.viewStoreRef = ForgeExtension.RootActivity
|
|
@@ -259,12 +342,7 @@ export default {
|
|
|
259
342
|
: Forge.sViewStore;
|
|
260
343
|
|
|
261
344
|
this.innerViewId = this.viewStoreRef.add(
|
|
262
|
-
new Forge.ViewInfo(this.innerView
|
|
263
|
-
x: 0,
|
|
264
|
-
y: 0,
|
|
265
|
-
width: this.width,
|
|
266
|
-
height: this.height,
|
|
267
|
-
})
|
|
345
|
+
new Forge.ViewInfo(this.innerView)
|
|
268
346
|
);
|
|
269
347
|
}
|
|
270
348
|
},
|
|
@@ -283,11 +361,14 @@ export default {
|
|
|
283
361
|
</script>
|
|
284
362
|
|
|
285
363
|
<template>
|
|
286
|
-
<div
|
|
364
|
+
<div
|
|
287
365
|
:style="{
|
|
366
|
+
top: top,
|
|
367
|
+
left: left,
|
|
368
|
+
width: width,
|
|
369
|
+
height: height,
|
|
288
370
|
transition: getTransition(),
|
|
289
371
|
}"
|
|
290
|
-
:jsv_innerview="innerViewId"
|
|
291
|
-
|
|
292
|
-
</div>
|
|
372
|
+
:jsv_innerview="innerViewId"
|
|
373
|
+
></div>
|
|
293
374
|
</template>
|
|
@@ -2,16 +2,20 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2021-10-13 15:14:29
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-08-18 11:17:37
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
//考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
9
9
|
import * as JsvTextureAnim from "./JsvTextureAnim.vue";
|
|
10
|
-
console.log("cchtest texture anim", JsvTextureAnim)
|
|
11
10
|
let _JsvTextureAnim = JsvTextureAnim;
|
|
12
|
-
if (
|
|
11
|
+
if (
|
|
12
|
+
window.JsvWidgetWrapperGroup &&
|
|
13
|
+
window.JsvWidgetWrapperGroup.BrowserTextureAnim
|
|
14
|
+
) {
|
|
13
15
|
_JsvTextureAnim = window.JsvWidgetWrapperGroup.BrowserTextureAnim;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
export * from "./CommonType"
|
|
17
|
-
export default _JsvTextureAnim.default
|
|
18
|
+
export * from "./CommonType";
|
|
19
|
+
export default _JsvTextureAnim.default;
|
|
20
|
+
const TexAlignAnchor = JsvTextureAnim.TexAlignAnchor;
|
|
21
|
+
export { TexAlignAnchor };
|
|
@@ -41,15 +41,9 @@ export default {
|
|
|
41
41
|
// 通过内置函数构造定制的LayoutView
|
|
42
42
|
this.innerView = new Forge.LayoutView(textureSetting);
|
|
43
43
|
this.innerViewId = ForgeExtension.RootActivity.ViewStore.add(
|
|
44
|
-
new Forge.ViewInfo(this.innerView
|
|
44
|
+
new Forge.ViewInfo(this.innerView)
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
// 更新宽高
|
|
49
|
-
this.innerView.ResetLayoutParams({
|
|
50
|
-
width: this.style.width,
|
|
51
|
-
height: this.style.height,
|
|
52
|
-
});
|
|
53
47
|
},
|
|
54
48
|
},
|
|
55
49
|
created() {
|
|
@@ -81,7 +75,12 @@ export default {
|
|
|
81
75
|
></div>
|
|
82
76
|
<div
|
|
83
77
|
:jsv_innerview="innerViewId"
|
|
84
|
-
:style="{
|
|
78
|
+
:style="{
|
|
79
|
+
left: style.left,
|
|
80
|
+
top: style.top,
|
|
81
|
+
width: style.width,
|
|
82
|
+
height: style.height
|
|
83
|
+
}"
|
|
85
84
|
>
|
|
86
85
|
<slot></slot>
|
|
87
86
|
</div>
|
|
@@ -10,21 +10,18 @@
|
|
|
10
10
|
-->
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Options({
|
|
13
|
+
export default {
|
|
16
14
|
props: {
|
|
17
|
-
onRef: {
|
|
18
|
-
|
|
15
|
+
onRef: {
|
|
16
|
+
type: Function,
|
|
17
|
+
default: () => {}
|
|
18
|
+
},
|
|
19
|
+
useTexture: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
19
23
|
},
|
|
20
|
-
})
|
|
21
|
-
class JsvVideo extends Vue {
|
|
22
|
-
constructor(props) {
|
|
23
|
-
super(props);
|
|
24
|
-
}
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
export default JsvVideo;
|
|
28
25
|
</script>
|
|
29
26
|
|
|
30
27
|
<template>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* 【模块 export 内容】
|
|
3
|
+
* JsvVisibleSensor: 可视区域监控器
|
|
4
|
+
* props说明:
|
|
5
|
+
* horizonShown {number} (可选, 可响应式, 默认1.0完全露出)横轴百分比区域完全显示时(左边或右边完全露出,仅中间段判断会失效),
|
|
6
|
+
* 横轴切换到显示状态,否则为不可视状态
|
|
7
|
+
* verticalShown {number} (可选, 可响应式)纵轴百分比区域完全显示时(上边或下边完全露出,仅中间段判断会失效),
|
|
8
|
+
* 纵轴切换到显示状态,否则为不可视状态
|
|
9
|
+
* left {number} (可选, 可响应式)可视检测区域的left
|
|
10
|
+
* top {number} (可选, 可响应式)可视检测区域的top
|
|
11
|
+
* width {number} (可选, 可响应式)可视检测区域的width
|
|
12
|
+
* height {number} (可选, 可响应式)可视检测区域的height
|
|
13
|
+
*
|
|
14
|
+
* container {div reference} (可选, 可响应式)子区域参照,若为null,则认为检测可视区域为全屏幕
|
|
15
|
+
*
|
|
16
|
+
* callback {function} (必须, 可响应式)可视变化时的回调处理, 参数
|
|
17
|
+
* (old_horizantal_visible, new_horizantal_visible, old_vertical_visible, new_vertical_visible)
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div ref="viewRef" :style="{
|
|
22
|
+
top: props.top,
|
|
23
|
+
left: props.left,
|
|
24
|
+
width: props.width,
|
|
25
|
+
height: props.height,
|
|
26
|
+
}" >
|
|
27
|
+
<slot/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { reactive, ref, toRaw, watchEffect, onMounted, defineExpose } from 'vue'
|
|
33
|
+
import { Forge } from "jsview/dom/jsv-forge-define";
|
|
34
|
+
|
|
35
|
+
const props = defineProps({
|
|
36
|
+
// (支持reactive)可视区域设定
|
|
37
|
+
horizonShown: Number,
|
|
38
|
+
verticalShown: Number,
|
|
39
|
+
|
|
40
|
+
// (支持reactive)Container, 父区域的div引用,
|
|
41
|
+
container: Object,
|
|
42
|
+
|
|
43
|
+
// (不支持reactive)回调处理
|
|
44
|
+
callback: Function,
|
|
45
|
+
|
|
46
|
+
// (支持reactive)位置信息
|
|
47
|
+
left: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0,
|
|
50
|
+
},
|
|
51
|
+
top: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 0,
|
|
54
|
+
},
|
|
55
|
+
width: {
|
|
56
|
+
type: Number,
|
|
57
|
+
require: true,
|
|
58
|
+
},
|
|
59
|
+
height: {
|
|
60
|
+
type: Number,
|
|
61
|
+
require: true,
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// (支持reactive)是否激活,仍然在渲染树时,非必须可以通过enable关闭以节省CPU开销
|
|
65
|
+
enable: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true,
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// 内部状态变量
|
|
72
|
+
const viewRef = ref(null);
|
|
73
|
+
const viewMounted = reactive({status: false})
|
|
74
|
+
let sensorRef = null;
|
|
75
|
+
|
|
76
|
+
// 变更检测范围
|
|
77
|
+
watchEffect(()=>{
|
|
78
|
+
if (viewMounted.status) {
|
|
79
|
+
let horizon = fixAreaValue(props.horizonShown);
|
|
80
|
+
let vertical = fixAreaValue(props.verticalShown);
|
|
81
|
+
|
|
82
|
+
sensorRef.ResetArea({horizon, vertical})
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
// 变更enable状态
|
|
87
|
+
watchEffect(()=>{
|
|
88
|
+
if (viewMounted.status) {
|
|
89
|
+
sensorRef.Enable(props.enable)
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
// 检测container变化
|
|
94
|
+
watchEffect(()=>{
|
|
95
|
+
if (viewMounted.status) {
|
|
96
|
+
if (props.container) {
|
|
97
|
+
window.MyContainerView = toRaw(props.container);
|
|
98
|
+
|
|
99
|
+
let jsv_main_view_ref = toRaw(props.container).jsvMainView;
|
|
100
|
+
if (jsv_main_view_ref) {
|
|
101
|
+
sensorRef.ResetContainer(toRaw(props.container).jsvMainView);
|
|
102
|
+
} else {
|
|
103
|
+
console.error("Error: container is NOT a div");
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
sensorRef.ResetContainer(null); // 无container
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
onMounted(()=>{
|
|
112
|
+
console.log("JsvVisibleSensor: on mounted");
|
|
113
|
+
|
|
114
|
+
sensorRef = new Forge.VisibleSensor(toRaw(viewRef.value).jsvMainView, (old_h, new_h, old_v, new_v)=>{
|
|
115
|
+
// 获得横向和纵向的新旧状态值
|
|
116
|
+
if (props.callback) {
|
|
117
|
+
props.callback(old_h, new_h, old_v, new_v);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
viewMounted.status = true;
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// 外部方法
|
|
124
|
+
defineExpose({
|
|
125
|
+
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
// 内部方法
|
|
129
|
+
function fixAreaValue(origin_value) {
|
|
130
|
+
if (origin_value > 1) {
|
|
131
|
+
console.warn(`will limited to 1 origin=${origin_value}`);
|
|
132
|
+
return 1;
|
|
133
|
+
} else if (origin_value < 0) {
|
|
134
|
+
console.warn(`will limited to 0 origin=${origin_value}`);
|
|
135
|
+
return 0;
|
|
136
|
+
} else {
|
|
137
|
+
return origin_value;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
2
|
+
import * as JsvVisibleSensor from "./JsvVisibleSensor.vue";
|
|
3
|
+
|
|
4
|
+
let _JsvVisibleSensor = JsvVisibleSensor;
|
|
5
|
+
// if (window.JsvWidgetWrapperGroup && window.JsvWidgetWrapperGroup.BrowserVisibleSensor) {
|
|
6
|
+
// JsvVisibleSensor = window.JsvWidgetWrapperGroup.BrowserVisibleSensor;
|
|
7
|
+
// }
|
|
8
|
+
|
|
9
|
+
export default _JsvVisibleSensor.default
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-07-05 11:00:51
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-08-18 13:17:17
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
|
|
9
|
+
export { default as JsvApic, LoopType } from "./JsvApic";
|
|
10
|
+
export { default as JsvInput, InputType } from "./JsvInput";
|
|
11
|
+
export {
|
|
12
|
+
default as JsvPreload,
|
|
13
|
+
buildPreloadInfo,
|
|
14
|
+
buildDownloadInfo,
|
|
15
|
+
} from "./JsvPreload";
|
|
16
|
+
export { default as JsvQrcode } from "./JsvQrcode";
|
|
17
|
+
export { default as JsvSpray } from "./JsvSpray";
|
|
18
|
+
export { default as JsvSpriteAnim, SpriteController } from "./JsvSpriteAnim";
|
|
19
|
+
export { default as JsvSwiper } from "./JsvSwiper";
|
|
20
|
+
export { default as JsvSwiper3D } from "./JsvSwiper3D";
|
|
21
|
+
export { default as JsvTextureAnim, TexAlignAnchor, DECORATE_NINEPATCH_ALPHA_MIX, DECORATE_BORDER_RADIUS } from "./JsvTextureAnim";
|
|
22
|
+
export { default as JsvVisibleSensor } from "./JsvVisibleSensor";
|
|
23
|
+
export { default as JsvFilterView } from "./JsvFilterView.vue";
|
|
24
|
+
export {
|
|
25
|
+
default as JsvGrid,
|
|
26
|
+
PageType,
|
|
27
|
+
LineType,
|
|
28
|
+
FocusMoveType,
|
|
29
|
+
} from "./JsvGrid.vue";
|
|
30
|
+
export { default as JsvHole } from "./JsvHole.js";
|
|
31
|
+
export { default as JsvMarquee } from "./JsvMarquee.vue";
|
|
32
|
+
export { default as JsvMaskClipDiv } from "./JsvMaskClipDiv.vue";
|
|
33
|
+
export { default as JsvNativeSharedDiv } from "./JsvNativeSharedDiv.vue";
|
|
34
|
+
export { default as JsvNinePatch } from "./JsvNinePatch.vue";
|
|
35
|
+
export { default as JsvPosterDiv } from "./JsvPosterDiv.vue";
|
|
36
|
+
export { default as JsvPosterImage } from "./JsvPosterImage.vue";
|
|
37
|
+
export { default as JsvScaleTextBox } from "./JsvScaleTextBox.vue";
|
|
38
|
+
export { JsvSoundPool } from "./JsvSoundPool.js";
|
|
39
|
+
export { default as JsvTextBox } from "./JsvTextBox.vue";
|
|
40
|
+
export { default as JsvTouchContainer } from "./JsvTouchContainer.vue";
|
|
41
|
+
export { default as JsvTransparentDiv } from "./JsvTransparentDiv.vue";
|
|
42
|
+
export { default as JsvVideo } from "./JsvVideo.vue";
|