@shijiu/jsview-vue 2.2.201 → 2.2.373
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/bin/browser/BrowserApic.vue.mjs +2 -13
- package/bin/browser/BrowserApic2.vue.mjs +2 -13
- package/bin/browser/BrowserApicLib.mjs +24 -24
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +21 -5
- package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/browser/BrowserPreload.vue.mjs +1 -5
- package/bin/browser/BrowserQrcode.vue.mjs +1 -5
- package/bin/browser/BrowserSpray.vue.mjs +2 -12
- package/bin/browser/BrowserTextureAnim.vue.mjs +2 -12
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +3216 -2086
- package/bin/types/JsViewEngineWidget/CheckType.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +37 -33
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +15 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +14 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +280 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +7 -1
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/RangeModel.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/index.d.ts +5 -1
- package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +24 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +4 -0
- package/bin/types/JsViewPlugin/index.d.ts +4 -0
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugTool.d.ts +4 -0
- package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +4 -0
- package/bin/types/JsViewVueTools/FeatureActive.d.ts +14 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +4 -0
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +7 -3
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +20 -1
- package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +8 -4
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +24 -2
- package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +28 -3
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +50 -0
- package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +21 -1
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +85 -27
- package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +30 -4
- package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
- package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +5 -1
- package/bin/types/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +4 -0
- package/bin/types/JsViewVueTools/index.d.ts +7 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +38 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +28 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +34 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +106 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +6 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +48 -1
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +73 -0
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +14 -34
- package/bin/types/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +48 -0
- package/bin/types/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +64 -209
- package/bin/types/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +7 -1
- package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +90 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +30 -0
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +45 -0
- package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSector.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +40 -0
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +52 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +16 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +39 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +26 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +7 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +100 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/index.d.ts +6 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/tsconfig.json +1 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +66 -21
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.ts +22 -3
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +208 -84
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -2
- package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
- package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
- package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
- package/utils/JsViewVueTools/FeatureActive.ts +84 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -1
- package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +67 -1
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +223 -0
- package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +7 -3
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/index.js +3 -0
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +10 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +12 -1
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +4 -2
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +11 -9
- package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +145 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +39 -12
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +210 -62
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
- package/utils/JsViewVueWidget/JsvHole.js +2 -0
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +320 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +222 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +281 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +47 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
- package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +5 -0
- package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterImage.vue +2 -0
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -0
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +10 -11
- package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
- package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +9 -0
- package/utils/JsViewVueWidget/JsvSector.vue +2 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +2 -0
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +30 -13
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +44 -41
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
- package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
- package/utils/JsViewVueWidget/index.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* 【模块 export 内容】
|
|
5
|
+
* JsvDragBox:在一定限制区域内拖动的容器
|
|
6
|
+
* props说明:
|
|
7
|
+
* boxRect {Object} (必填) 限制区域 { left?: number, top?: number, width: number, height: number }
|
|
8
|
+
* dragRect {Object} (必填) 拖拽区域 { left?: number, top?: number, width: number, height: number }
|
|
9
|
+
* expose函数说明:
|
|
10
|
+
* 定义: type CBK = ({left: number, top: number}) => void;
|
|
11
|
+
* setSensor {(callback: CBK, sensitivity: number) => void}
|
|
12
|
+
* 设置运动后触发的回调, sensitivity为回调敏感度, 每移动多少像素进行回调,适当放大(推荐10以上)可以极大减小对js回调过多引起的性能降低
|
|
13
|
+
* setTouchCallback { (onDragStart: CBK, onDragRelease: CBK) => void }
|
|
14
|
+
* 设置触控开始和结束回调
|
|
15
|
+
* moveTo { (left: number, top: number) => void },
|
|
16
|
+
* 将拖拽块移动到指定位置
|
|
17
|
+
* getPosition { () => {left: number, top: number} }
|
|
18
|
+
* 获取当前拖拽块的位置
|
|
19
|
+
*
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import ActControl from "../../JsViewVueWidget/JsvFreeMoveActor/ActorControl";
|
|
24
|
+
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine";
|
|
25
|
+
import { shallowRef, onMounted, computed } from "vue";
|
|
26
|
+
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
boxRect: {
|
|
29
|
+
type: Object,
|
|
30
|
+
require: true,
|
|
31
|
+
validator(value) {
|
|
32
|
+
return (
|
|
33
|
+
typeof value?.width == "number" && typeof value?.height == "number"
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
dragRect: {
|
|
38
|
+
type: Object,
|
|
39
|
+
require: true,
|
|
40
|
+
validator(value) {
|
|
41
|
+
return (
|
|
42
|
+
typeof value?.width == "number" && typeof value?.height == "number"
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const valide = true;
|
|
49
|
+
if (
|
|
50
|
+
props.boxRect.width <= props.dragRect.width ||
|
|
51
|
+
props.boxRect.height <= props.dragRect.height
|
|
52
|
+
) {
|
|
53
|
+
console.error("JsvDragBox: box size must be large than drag size.");
|
|
54
|
+
valide = false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let rMainDiv = shallowRef(null);
|
|
58
|
+
let cController = new ActControl();
|
|
59
|
+
const cWallConditionGroup = 1;
|
|
60
|
+
const cSensorConditionGroup = 2;
|
|
61
|
+
const rBoxStyle = computed(() => {
|
|
62
|
+
return {
|
|
63
|
+
left: props.boxRect.left ?? 0,
|
|
64
|
+
top: props.boxRect.top ?? 0,
|
|
65
|
+
width: props.boxRect.width,
|
|
66
|
+
height: props.boxRect.height,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
let vLeft = 0;
|
|
71
|
+
let vTop = 0;
|
|
72
|
+
let vSensitivity = 10;
|
|
73
|
+
let vSensorCallback = null;
|
|
74
|
+
let vOnDragStart = null;
|
|
75
|
+
let vOnDragRelease = null;
|
|
76
|
+
|
|
77
|
+
function initDragBox() {
|
|
78
|
+
cController.run((cmds) => [
|
|
79
|
+
cmds.state().removeConditionByGroup(cWallConditionGroup),
|
|
80
|
+
cmds
|
|
81
|
+
.condition(cWallConditionGroup, true)
|
|
82
|
+
.boxPosition(
|
|
83
|
+
0,
|
|
84
|
+
0,
|
|
85
|
+
props.boxRect.width - props.dragRect.width,
|
|
86
|
+
props.boxRect.height - props.dragRect.height
|
|
87
|
+
)
|
|
88
|
+
.then([cmds.action().stopMoving(true)]),
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function onSensor(pos) {
|
|
93
|
+
vLeft = pos.xPos;
|
|
94
|
+
vTop = pos.yPos;
|
|
95
|
+
vSensorCallback?.({ left: pos.xPos, top: pos.yPos });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function setSensor(callback, sensitivity) {
|
|
99
|
+
if (!callback) {
|
|
100
|
+
cController.run((cmds) => [
|
|
101
|
+
cmds.state().removeConditionByGroup(cSensorConditionGroup),
|
|
102
|
+
]);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
vSensorCallback = callback;
|
|
107
|
+
if (sensitivity != vSensitivity) {
|
|
108
|
+
cController.run((cmds) => [
|
|
109
|
+
cmds.state().removeConditionByGroup(cSensorConditionGroup),
|
|
110
|
+
]);
|
|
111
|
+
if (callback != null) {
|
|
112
|
+
cController.run((cmds) => [
|
|
113
|
+
cmds
|
|
114
|
+
.condition(cSensorConditionGroup, true)
|
|
115
|
+
.onMovement(sensitivity) // 设置x或y移动超过12时才触发回调,以此减少回调的频次,规避js的性能影响
|
|
116
|
+
.then([onSensor]),
|
|
117
|
+
]);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function setTouchCallback(onDragStart, onDragEnd) {
|
|
123
|
+
vOnDragStart = onDragStart;
|
|
124
|
+
vOnDragRelease = onDragEnd;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function moveTo(left, top) {
|
|
128
|
+
if (typeof left !== "number" || typeof top !== "number") {
|
|
129
|
+
console.error(
|
|
130
|
+
`JsvDragBox: moveTo params type must be number, current params:{${left}, ${top}}`
|
|
131
|
+
);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
cController.run((cmds) => [cmds.action().teleportTo(left, top)]);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getPosition() {
|
|
138
|
+
return { left: vLeft, top: vTop };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
onMounted(() => {
|
|
142
|
+
if (!valide) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
let divView = rMainDiv.value.jsvGetProxyView();
|
|
146
|
+
cController.bindForgeView(divView, true);
|
|
147
|
+
divView.DragEnables?.(
|
|
148
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT |
|
|
149
|
+
// (cEnableFling ? ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT : 0) |
|
|
150
|
+
ForgeConst.DragFlags.TOUCH_RECV_FIRST_START |
|
|
151
|
+
ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
152
|
+
); // 激活 Move | TouchDown | TouchEnd
|
|
153
|
+
|
|
154
|
+
initDragBox();
|
|
155
|
+
|
|
156
|
+
let initLeft =
|
|
157
|
+
typeof props.dragRect.left == "number" ? props.dragRect.left : 0;
|
|
158
|
+
let initTop = typeof props.dragRect.top == "number" ? props.dragRect.top : 0;
|
|
159
|
+
if (initLeft != 0 || initTop != 0) {
|
|
160
|
+
cController.run((cmds) => [cmds.action().teleportTo(initLeft, initTop)]);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
cController.run((cmds) => [
|
|
164
|
+
cmds
|
|
165
|
+
.condition(undefined, true)
|
|
166
|
+
.onDragStart()
|
|
167
|
+
.then([
|
|
168
|
+
(data) => {
|
|
169
|
+
vLeft = data.xPos;
|
|
170
|
+
vTop = data.yPos;
|
|
171
|
+
vOnDragStart?.({
|
|
172
|
+
left: data.xPos,
|
|
173
|
+
top: data.yPos,
|
|
174
|
+
});
|
|
175
|
+
},
|
|
176
|
+
]),
|
|
177
|
+
cmds
|
|
178
|
+
.condition(undefined, true)
|
|
179
|
+
.onTouchRelease()
|
|
180
|
+
.then([
|
|
181
|
+
(data) => {
|
|
182
|
+
vLeft = data.xPos;
|
|
183
|
+
vTop = data.yPos;
|
|
184
|
+
vOnDragRelease?.({
|
|
185
|
+
left: data.xPos,
|
|
186
|
+
top: data.yPos,
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
]),
|
|
190
|
+
cmds
|
|
191
|
+
.condition(cSensorConditionGroup, true)
|
|
192
|
+
.onMovement(10) // 默认设置x或y移动超过10时才触发回调,以此减少回调的频次,规避js的性能影响
|
|
193
|
+
.then([onSensor]),
|
|
194
|
+
]);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
defineExpose({
|
|
198
|
+
setSensor,
|
|
199
|
+
setTouchCallback,
|
|
200
|
+
moveTo,
|
|
201
|
+
getPosition,
|
|
202
|
+
});
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
<template>
|
|
206
|
+
<div :style="rBoxStyle">
|
|
207
|
+
<div
|
|
208
|
+
ref="rMainDiv"
|
|
209
|
+
:style="{
|
|
210
|
+
left: 0,
|
|
211
|
+
top: 0,
|
|
212
|
+
width: props.dragRect.width,
|
|
213
|
+
height: props.dragRect.height,
|
|
214
|
+
}"
|
|
215
|
+
>
|
|
216
|
+
<slot></slot>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</template>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
2
4
|
* 【模块 export 内容】
|
|
3
5
|
* JsvDriftScope: Vue高阶组件,放大镜或者望远镜效果, 分为 frame 区域和 scene 区域,frame是游离的ClipView, scene是被Clip部分
|
|
4
6
|
* props说明:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
* top {Number} (可选, 响应式)组件的top, 不填写时默认值为0
|
|
8
|
+
* left {Number} (可选, 响应式)组件的left, 不填写时默认值为0
|
|
9
|
+
* frameStyle: {Object} (可选, 响应式) 透视(裁剪)区域外框的style, 此层次无色透明,但是决定Frame层的变化, 支持以下属性
|
|
10
|
+
* {top, left, width, height, transition, animation, transform, transformOrigin}
|
|
11
|
+
* scopeStyle: {Object} (必选, 响应式) 透视(裁剪)区域的div的尺寸style, 会叠加frameStyle已经做的形变, 支持以下属性
|
|
12
|
+
* {width, height, transition, animation, transform, transformOrigin}
|
|
13
|
+
* 做动画时,frameStyle负责位置变化,scope则主要负责尺寸变化
|
|
12
14
|
*
|
|
13
15
|
* template说明:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
* Frame 透视窗(裁剪层)的外框的装饰层
|
|
17
|
+
* Scene 被透视的内容
|
|
16
18
|
* expose函数说明:
|
|
17
19
|
*
|
|
18
20
|
-->
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<!--
|
|
9
|
+
* @file
|
|
10
|
+
*
|
|
9
11
|
* 【模块 export 内容】
|
|
10
12
|
* JsvFlexDiv: 包装成一个支持flex属性的div
|
|
11
13
|
* props说明:
|
|
@@ -19,11 +21,12 @@
|
|
|
19
21
|
* alignItems: flex-start|flex-end|center|stretch 默认center
|
|
20
22
|
* 副轴方向单行内的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
|
|
21
23
|
* alignContent: flex-start|flex-end|center 默认flex-start
|
|
22
|
-
*
|
|
24
|
+
* 副轴方向多行内容总体的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
|
|
25
|
+
* 若未设置,当遇到多行场景,行为为flex-start + 剩余空间每行平均瓜分(特别适合单行填充整个副轴空间的需求)
|
|
23
26
|
* 作为item(二级container):
|
|
24
27
|
* alignSelf: auto|flex-start|flex-end|center|stretch 默认auto, 覆盖container的alignItems设置
|
|
25
28
|
* 特别注意: 这些属性会引起位置对齐问题, 所以会自动去掉: "overflow:hidden"
|
|
26
|
-
* askSize: boolean 设置会跟进flex
|
|
29
|
+
* askSize: boolean 设置会跟进flex的尺寸变化,设置后可通过getWidth/getHeight拿到尺寸,但会降低性能
|
|
27
30
|
* onSized: Function 比askSize更进一步,可以通过回调知道尺寸变化后的时机,回调参数(width, height)为flex后的尺寸
|
|
28
31
|
*
|
|
29
32
|
* expose说明:
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* 【模块 export 内容】
|
|
5
|
+
* JsvScreenFlex: 包装成一个支持flex属性的div, 背景图片等同于objectFit:cover的模式
|
|
6
|
+
* props说明:
|
|
7
|
+
* style: 不能设置top/left/height/width, 这些信息自动来自屏幕的宽高
|
|
8
|
+
* 主要用于设置flex的属性,目前支持属性如下:
|
|
9
|
+
* flexDirection: row|row-reverse|column|column-reverse 默认row, 决定主轴为行还是列,正向还是反向
|
|
10
|
+
* flexWrap: nowrap|wrap 默认nowrap, 主轴方向是否换行
|
|
11
|
+
* justifyContent: flex-start|flex-end|center 默认flex-start
|
|
12
|
+
* 主轴对齐方式(与direction相关决定start为左还是右)
|
|
13
|
+
* alignItems: flex-start|flex-end|center|stretch 默认center
|
|
14
|
+
* 副轴方向单行内的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
|
|
15
|
+
* alignContent: flex-start|flex-end|center 默认flex-start
|
|
16
|
+
* 副轴方向多行内容总体的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
|
|
17
|
+
* 特别注意: 这些属性会引起位置对齐问题, 所以会自动去掉: "overflow:hidden"
|
|
18
|
+
* askSize: boolean 设置会跟进flex的尺寸变化,设置后可通过getWidth/getHeight拿到尺寸,但会降低性能
|
|
19
|
+
* onSized: Function 比askSize更进一步,可以通过回调知道尺寸变化后的时机,回调参数(width, height)为flex后的尺寸
|
|
20
|
+
* background: {string} (选填)背景图案 可选值: 绝对路径url|url(相对路径url)|#FFFFFF|rbga(255,0,0,1.0)
|
|
21
|
+
*
|
|
22
|
+
* expose说明:
|
|
23
|
+
* getWidth(): 当askSize或者onSize生效时,获取元素的宽度
|
|
24
|
+
* getHeight(): 当askSize或者onSize生效时,获取元素的高度
|
|
25
|
+
*
|
|
26
|
+
-->
|
|
27
|
+
<script setup>
|
|
28
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
29
|
+
import { shallowRef, watchEffect, onUnmounted } from "vue";
|
|
30
|
+
import JsvFlexDiv from "./JsvFlexDiv.vue";
|
|
31
|
+
import { ForgeTextureApis } from "../../JsViewVueTools/TextureManagerTools.ts";
|
|
32
|
+
import ForgeHandles from "../../JsViewVueTools/ForgeHandles";
|
|
33
|
+
|
|
34
|
+
const rProps = defineProps({
|
|
35
|
+
style: Object,
|
|
36
|
+
askSize: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
onSized: {
|
|
41
|
+
type: Function,
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
44
|
+
background: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: null,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// 此div的宽度是固定的全屏尺寸,在jsview体系下,全屏的宽度就是designMapWidth
|
|
51
|
+
const cDivWidth = Forge.sRenderBridge.GetScreenInfo().designedWidth;
|
|
52
|
+
|
|
53
|
+
let rConfig = shallowRef({});
|
|
54
|
+
|
|
55
|
+
let vTextreStringCache = null; // 用于判断是否需要texture更换的flag
|
|
56
|
+
let vStretchViewRef = null;
|
|
57
|
+
|
|
58
|
+
// 创建AutoStretchView来自动识别JsView的视窗大小
|
|
59
|
+
const fncBuildForgeView = () => {
|
|
60
|
+
vStretchViewRef = new Forge.AutoStretchView();
|
|
61
|
+
return Forge.sViewStore.add(new Forge.ViewInfo(vStretchViewRef, null));
|
|
62
|
+
};
|
|
63
|
+
let vViewId = fncBuildForgeView();
|
|
64
|
+
|
|
65
|
+
// 规范化style和入参的内容
|
|
66
|
+
watchEffect(() => {
|
|
67
|
+
if (rProps.style) {
|
|
68
|
+
const { top, left, width, height, ...others } = rProps.style;
|
|
69
|
+
rConfig.value.style = {
|
|
70
|
+
width: cDivWidth, // 全屏的宽度就是designMapWidth, 并且高度作为自动不进行设置
|
|
71
|
+
...others,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
rConfig.value.askSize = rProps.askSize;
|
|
75
|
+
rConfig.value.onSized = rProps.onSized;
|
|
76
|
+
|
|
77
|
+
if (rProps.background != vTextreStringCache) {
|
|
78
|
+
// 构建背景Texture
|
|
79
|
+
vTextreStringCache = rProps.background;
|
|
80
|
+
|
|
81
|
+
let texture_setting = null;
|
|
82
|
+
|
|
83
|
+
if (vTextreStringCache != null) {
|
|
84
|
+
const texture_manager = ForgeHandles.TextureManager;
|
|
85
|
+
if (
|
|
86
|
+
vTextreStringCache.trim().startsWith("#") ||
|
|
87
|
+
vTextreStringCache.trim().startsWith("rgba")
|
|
88
|
+
) {
|
|
89
|
+
texture_setting = new Forge.TextureSetting(
|
|
90
|
+
ForgeTextureApis.GetColorTexture(texture_manager, vTextreStringCache)
|
|
91
|
+
);
|
|
92
|
+
} else {
|
|
93
|
+
const base_url = vTextreStringCache;
|
|
94
|
+
let image_url = base_url;
|
|
95
|
+
if (base_url && base_url.indexOf("http") === 0) {
|
|
96
|
+
image_url = base_url;
|
|
97
|
+
} else if (window.JsView?.Dom.UrlRef) {
|
|
98
|
+
image_url = new window.JsView.Dom.UrlRef(base_url).href;
|
|
99
|
+
}
|
|
100
|
+
texture_setting = new Forge.ExternalTextureSetting(
|
|
101
|
+
ForgeTextureApis.GetImage(texture_manager, image_url)
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
vStretchViewRef.ResetTexture(texture_setting);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
onUnmounted(() => {
|
|
110
|
+
if (vViewId != -1) {
|
|
111
|
+
// 清理viewStore, 防止泄漏问题
|
|
112
|
+
Forge.sViewStore.remove(vViewId);
|
|
113
|
+
vViewId = -1;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// 使用内置的flex节点来进行尺寸变化的回调和完成其子内容的flex处理
|
|
118
|
+
let rStretchedFlex = shallowRef(null);
|
|
119
|
+
|
|
120
|
+
defineExpose({
|
|
121
|
+
// TODO: PC模拟环境中目前没有浏览器的类似ResizeObserver接口
|
|
122
|
+
// 可以监听到left/ top变化,所以先关闭Left / Top的获取
|
|
123
|
+
// getLeft: () => {
|
|
124
|
+
// return SizeX.value;
|
|
125
|
+
// },
|
|
126
|
+
// getTop: () => {
|
|
127
|
+
// return SizeY.value;
|
|
128
|
+
// },
|
|
129
|
+
|
|
130
|
+
getWidth: () => {
|
|
131
|
+
return rStretchedFlex.value?.getWidth();
|
|
132
|
+
},
|
|
133
|
+
getHeight: () => {
|
|
134
|
+
return rStretchedFlex.value?.getHeight();
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<template>
|
|
140
|
+
<div :data-jsv-vw-innerview="vViewId">
|
|
141
|
+
<jsv-flex-div ref="rStretchedFlex" v-bind="{ ...rConfig }">
|
|
142
|
+
<slot />
|
|
143
|
+
</jsv-flex-div>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { onMounted, onUnmounted } from "vue";
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
style: {
|
|
4
6
|
type: Object,
|
|
@@ -24,25 +26,50 @@ const props = defineProps({
|
|
|
24
26
|
textures: {
|
|
25
27
|
type: Array,
|
|
26
28
|
},
|
|
29
|
+
onEnd: {
|
|
30
|
+
type: Function,
|
|
31
|
+
},
|
|
32
|
+
onStart: {
|
|
33
|
+
type: Function,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
let vMounted = false;
|
|
38
|
+
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
vMounted = true;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
onUnmounted(() => {
|
|
44
|
+
vMounted = false;
|
|
27
45
|
});
|
|
28
46
|
|
|
29
47
|
defineExpose({
|
|
30
|
-
startAnim: () => {
|
|
48
|
+
startAnim: () => {
|
|
49
|
+
props.onStart?.();
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
if (vMounted) {
|
|
52
|
+
props.onEnd?.();
|
|
53
|
+
}
|
|
54
|
+
}, 0);
|
|
55
|
+
},
|
|
31
56
|
stopAnim: () => {},
|
|
32
57
|
});
|
|
33
58
|
</script>
|
|
34
59
|
<template>
|
|
35
|
-
<div
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
<div
|
|
61
|
+
:style="{
|
|
62
|
+
left: style.left,
|
|
63
|
+
top: style.top,
|
|
64
|
+
width: style.width,
|
|
65
|
+
height: style.height,
|
|
66
|
+
backgroundColor: '#00000077',
|
|
67
|
+
fontSize: 50,
|
|
68
|
+
color: '#ffffff',
|
|
69
|
+
textAlign: 'center',
|
|
70
|
+
lineHeight: style.height,
|
|
71
|
+
}"
|
|
72
|
+
>
|
|
46
73
|
浏览器端未支持JsvFragShaderView
|
|
47
74
|
</div>
|
|
48
75
|
</template>
|