@shijiu/jsview-vue 2.2.201 → 2.2.426-test.0
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/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +3288 -2312
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +72 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +3 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +64 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -2
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +1 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +13 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer-0.9.vue.d.ts +45 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue.d.ts +597 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +420 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +57 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +588 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +10 -0
- package/bin/types/utils/JsViewVueTools/ForgeHandles.d.ts +6 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +3 -1
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +4 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +4 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +3 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +2 -3
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +42 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +3 -1
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +63 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +8 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +1 -1
- package/bin/types/utils/JsViewVueTools/TextureManagerTools.d.ts +7 -0
- package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +84 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFragShaderView/JsvFragShaderView.vue.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +12 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +45 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +26 -0
- package/bin/types/{JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts → utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts} +7 -5
- package/bin/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +13 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +16 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +16 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +6 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNinePatch.vue.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +4 -2
- package/index.d.ts +9 -1
- package/package.json +1 -1
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +67 -21
- package/tsconfig.json +27 -0
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +175 -65
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +4 -6
- 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/JsvHashHistory.js +26 -29
- 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 +125 -59
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +156 -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/TypeCheckAndSet.ts +66 -0
- package/utils/JsViewVueTools/index.js +4 -1
- 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 +140 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +214 -63
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
- 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 +353 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +255 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +294 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +61 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +5 -48
- 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 +3 -2
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +23 -44
- package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +12 -12
- 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 +5 -7
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +43 -23
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -5
- 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 +48 -50
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
- 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 +4 -2
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -63
- package/bin/browser/BrowserPreload.vue.mjs +0 -143
- package/bin/browser/BrowserQrcode.vue.mjs +0 -180
- package/bin/browser/BrowserSpray.vue.mjs +0 -66
- package/bin/browser/BrowserTextureAnim.vue.mjs +0 -332
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +0 -102
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +0 -6
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -37
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +0 -13
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +0 -36
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -210
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -17
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -11
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -25
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -151
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -14
- package/tools/config/tsconfig.json +0 -15
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
- package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -48
- package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +0 -144
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +0 -189
- package/utils/JsViewVueWidget/JsvQrcode/index.js +0 -18
- package/utils/JsViewVueWidget/JsvSpray/BrowserSpray.vue +0 -55
- package/utils/JsViewVueWidget/JsvSpray/index.js +0 -17
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +0 -359
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusManager.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/AudioProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/Color.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDemoTester.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMove.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/ArcLineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/JsvConnectLine.vue.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +9 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvHole.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/JsvLine.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/LineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMarquee.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPieChart.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPreload/JsvPreload.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvProgressBar.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRadarChart.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/JsvRipple.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScaleTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpray/JsvSpray.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/sAnimationToken.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +6 -6
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +6 -6
- /package/bin/types/{index.d.ts → utils/index.d.ts} +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
style: {
|
|
4
|
-
type: Object,
|
|
5
|
-
required: true,
|
|
6
|
-
},
|
|
7
|
-
duration: {
|
|
8
|
-
type: Number,
|
|
9
|
-
default: -1,
|
|
10
|
-
},
|
|
11
|
-
autoplay: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: false,
|
|
14
|
-
},
|
|
15
|
-
shaderStr: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
// [{ name: string, value: number }]
|
|
20
|
-
uniforms: {
|
|
21
|
-
type: Array,
|
|
22
|
-
},
|
|
23
|
-
// [{ name: string, type: number, resource: object/string }]
|
|
24
|
-
textures: {
|
|
25
|
-
type: Array,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
defineExpose({
|
|
30
|
-
startAnim: () => {},
|
|
31
|
-
stopAnim: () => {},
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
34
|
-
<template>
|
|
35
|
-
<div :style="{
|
|
36
|
-
left: style.left,
|
|
37
|
-
top: style.top,
|
|
38
|
-
width: style.width,
|
|
39
|
-
height: style.height,
|
|
40
|
-
backgroundColor: '#00000077',
|
|
41
|
-
fontSize: 50,
|
|
42
|
-
color: '#ffffff',
|
|
43
|
-
textAlign: 'center',
|
|
44
|
-
lineHeight: style.height,
|
|
45
|
-
}">
|
|
46
|
-
浏览器端未支持JsvFragShaderView
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { reactive, watchEffect, onBeforeUnmount } from "vue";
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
preloadList: Array,
|
|
6
|
-
downloadList: Array,
|
|
7
|
-
onPreloadDone: Function, // 预加载完成回调
|
|
8
|
-
onDownloadDone: Function, // 预下载完成回调
|
|
9
|
-
onPreloading: Function,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const loadViewList = reactive({
|
|
13
|
-
preloadViewList: [],
|
|
14
|
-
downloadViewList: [],
|
|
15
|
-
});
|
|
16
|
-
// 记录传入的preload为null的数量,由于vue不支持在子组件修改props值,所有在删除值为null时,需要++,这样才能保证与传入数据的length相等从而触发回调
|
|
17
|
-
let preloadIsNullNum = 0;
|
|
18
|
-
let downloadIsNullNum = 0;
|
|
19
|
-
|
|
20
|
-
let preloadResultMap = {};
|
|
21
|
-
let downloadResultMap = {};
|
|
22
|
-
let downloadUrlList = [];
|
|
23
|
-
let unmountStatus = { unmount: false };
|
|
24
|
-
let preloadStateList = null;
|
|
25
|
-
let downloadStateList = null;
|
|
26
|
-
|
|
27
|
-
const getPreloadList = () => {
|
|
28
|
-
preloadStateList = new Array(props.preloadList.length).fill(false);
|
|
29
|
-
let preloadListData = props.preloadList;
|
|
30
|
-
for (let i = 0; i < preloadListData.length; i++) {
|
|
31
|
-
if (!preloadListData[i] || !preloadListData[i].url) {
|
|
32
|
-
preloadListData.splice(i, 1);
|
|
33
|
-
preloadIsNullNum++;
|
|
34
|
-
i--;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
loadViewList.preloadViewList = preloadListData.map((item, index) => {
|
|
38
|
-
if (!item || !item.url) {
|
|
39
|
-
preloadStateList[index] = true;
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const image = new Image();
|
|
43
|
-
const unmount_track = unmountStatus;
|
|
44
|
-
image.onload = () => {
|
|
45
|
-
if (unmount_track.unmount) {
|
|
46
|
-
// 子组件已经卸载不再回调
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
preloadResultMap[item.url] = {
|
|
51
|
-
width: image.width,
|
|
52
|
-
height: image.height,
|
|
53
|
-
};
|
|
54
|
-
preloadStateList[index] = true;
|
|
55
|
-
let loadedNum = 0;
|
|
56
|
-
preloadStateList.map((item) => {
|
|
57
|
-
loadedNum += item ? 1 : 0;
|
|
58
|
-
});
|
|
59
|
-
props.onPreloading?.(loadedNum / preloadStateList.length);
|
|
60
|
-
if (
|
|
61
|
-
props.onPreloadDone &&
|
|
62
|
-
loadedNum + preloadIsNullNum == preloadStateList.length
|
|
63
|
-
) {
|
|
64
|
-
props.onPreloadDone?.(preloadResultMap);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
image.src = item.url;
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const getDownloadList = () => {
|
|
72
|
-
downloadStateList = new Array(props.downloadList.length).fill(false);
|
|
73
|
-
downloadUrlList = new Array(downloadStateList.length);
|
|
74
|
-
let downloadListData = props.downloadList;
|
|
75
|
-
for (let i = 0; i < downloadListData.length; i++) {
|
|
76
|
-
if (!downloadListData[i] || !downloadListData[i].url) {
|
|
77
|
-
downloadListData.splice(i, 1);
|
|
78
|
-
downloadUrlList[i] = "invalid";
|
|
79
|
-
downloadIsNullNum++;
|
|
80
|
-
i--;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
loadViewList.downloadViewList = downloadListData.map((item, index) => {
|
|
84
|
-
if (!item || !item.url) {
|
|
85
|
-
downloadStateList[index] = true;
|
|
86
|
-
downloadUrlList[index] = "invalid";
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
const image = new Image();
|
|
90
|
-
const unmount_track = unmountStatus;
|
|
91
|
-
image.onload = () => {
|
|
92
|
-
if (unmount_track.unmount) {
|
|
93
|
-
// 子组件已经卸载不再回调
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
downloadStateList[index] = true;
|
|
98
|
-
downloadUrlList[index] = item.url;
|
|
99
|
-
downloadResultMap[item.url] = {
|
|
100
|
-
width: image.width,
|
|
101
|
-
height: image.height,
|
|
102
|
-
};
|
|
103
|
-
console.log(`pre download succeed ${item.url}`);
|
|
104
|
-
if (props.onDownloadDone) {
|
|
105
|
-
let downloadNum = 0;
|
|
106
|
-
downloadStateList.map((item) => {
|
|
107
|
-
downloadNum += item ? 1 : 0;
|
|
108
|
-
});
|
|
109
|
-
if (downloadNum + downloadIsNullNum == downloadStateList.length) {
|
|
110
|
-
props.onDownloadDone?.(downloadUrlList, downloadResultMap);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
image.src = item.url;
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
watchEffect(() => {
|
|
119
|
-
if (props.preloadList) {
|
|
120
|
-
console.log("JsvPreload: update preloadList");
|
|
121
|
-
preloadIsNullNum = 0;
|
|
122
|
-
preloadResultMap = {};
|
|
123
|
-
getPreloadList();
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
watchEffect(() => {
|
|
127
|
-
if (props.downloadList) {
|
|
128
|
-
console.log("JsvPreload: update downloadList");
|
|
129
|
-
downloadIsNullNum = 0;
|
|
130
|
-
downloadResultMap = {};
|
|
131
|
-
downloadUrlList = [];
|
|
132
|
-
getDownloadList();
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
onBeforeUnmount(() => {
|
|
137
|
-
unmountStatus.unmount = true;
|
|
138
|
-
});
|
|
139
|
-
</script>
|
|
140
|
-
|
|
141
|
-
<template>
|
|
142
|
-
<!-- 保证该组件不描画任何东西,只是为了触发onload,让网页自行下载图片 -->
|
|
143
|
-
<div v-if="!preloadList"></div>
|
|
144
|
-
</template>
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { onMounted, ref } from "vue";
|
|
3
|
-
import QRCode from "qr.js";
|
|
4
|
-
|
|
5
|
-
const renderDocument = window.JsvCode.Dom.RenderDocument
|
|
6
|
-
? window.JsvCode.Dom.RenderDocument
|
|
7
|
-
: window.JsvCode.Dom.BrowserDocument;
|
|
8
|
-
|
|
9
|
-
const props = defineProps({
|
|
10
|
-
value: String,
|
|
11
|
-
size: Number,
|
|
12
|
-
fgColor: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "#000000",
|
|
15
|
-
},
|
|
16
|
-
bgColor: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "#ffffff",
|
|
19
|
-
},
|
|
20
|
-
level: {
|
|
21
|
-
type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
|
|
22
|
-
default: "L",
|
|
23
|
-
},
|
|
24
|
-
imageSettings: Object,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const convertStr = (str) => {
|
|
28
|
-
let out = "";
|
|
29
|
-
for (let i = 0; i < str.length; i++) {
|
|
30
|
-
let charcode = str.charCodeAt(i);
|
|
31
|
-
if (charcode < 0x0080) {
|
|
32
|
-
out += String.fromCharCode(charcode);
|
|
33
|
-
} else if (charcode < 0x0800) {
|
|
34
|
-
out += String.fromCharCode(0xc0 | (charcode >> 6));
|
|
35
|
-
out += String.fromCharCode(0x80 | (charcode & 0x3f));
|
|
36
|
-
} else if (charcode < 0xd800 || charcode >= 0xe000) {
|
|
37
|
-
out += String.fromCharCode(0xe0 | (charcode >> 12));
|
|
38
|
-
out += String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f));
|
|
39
|
-
out += String.fromCharCode(0x80 | (charcode & 0x3f));
|
|
40
|
-
} else {
|
|
41
|
-
// This is a surrogate pair, so we'll reconsitute the pieces and work
|
|
42
|
-
// from that
|
|
43
|
-
i++;
|
|
44
|
-
charcode =
|
|
45
|
-
0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));
|
|
46
|
-
out += String.fromCharCode(0xf0 | (charcode >> 18));
|
|
47
|
-
out += String.fromCharCode(0x80 | ((charcode >> 12) & 0x3f));
|
|
48
|
-
out += String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f));
|
|
49
|
-
out += String.fromCharCode(0x80 | (charcode & 0x3f));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return out;
|
|
53
|
-
};
|
|
54
|
-
const generatePath = (modules, margin = 0) => {
|
|
55
|
-
const ops = [];
|
|
56
|
-
modules.forEach((row, y) => {
|
|
57
|
-
let start = null;
|
|
58
|
-
row.forEach((cell, x) => {
|
|
59
|
-
if (!cell && start !== null) {
|
|
60
|
-
// M0 0h7v1H0z injects the space with the move and drops the comma,
|
|
61
|
-
// saving a char per operation
|
|
62
|
-
ops.push(
|
|
63
|
-
`M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`
|
|
64
|
-
);
|
|
65
|
-
start = null;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// end of row, clean up or skip
|
|
70
|
-
if (x === row.length - 1) {
|
|
71
|
-
if (!cell) {
|
|
72
|
-
// We would have closed the op above already so this can only mean
|
|
73
|
-
// 2+ light modules in a row.
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (start === null) {
|
|
77
|
-
// Just a single dark module.
|
|
78
|
-
ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);
|
|
79
|
-
} else {
|
|
80
|
-
// Otherwise finish the current line.
|
|
81
|
-
ops.push(
|
|
82
|
-
`M${start + margin},${y + margin} h${x + 1 - start}v1H${
|
|
83
|
-
start + margin
|
|
84
|
-
}z`
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (cell && start === null) {
|
|
91
|
-
start = x;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
return ops.join("");
|
|
96
|
-
};
|
|
97
|
-
const getImageSettings = (props) => {
|
|
98
|
-
// const { imageSettings, size } = props;
|
|
99
|
-
const imageSettings = props.imageSettings;
|
|
100
|
-
const size = props.size;
|
|
101
|
-
if (!imageSettings) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
const w = imageSettings.width;
|
|
105
|
-
const h = imageSettings.height;
|
|
106
|
-
const x = !imageSettings.x ? size / 2 - w / 2 : imageSettings.x;
|
|
107
|
-
const y = !imageSettings.y ? size / 2 - h / 2 : imageSettings.y;
|
|
108
|
-
|
|
109
|
-
return { x, y, h, w };
|
|
110
|
-
};
|
|
111
|
-
const renderQrcode = () => {
|
|
112
|
-
const qrcode = QRCode(convertStr(props.value), {
|
|
113
|
-
errorCorrectLevel: QRCode.ErrorCorrectLevel[props.level],
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const cells = qrcode.modules;
|
|
117
|
-
if (cells === null) {
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const margin = 2;
|
|
122
|
-
const numCells = cells.length + margin * 2;
|
|
123
|
-
const propsData = {
|
|
124
|
-
value: props.value,
|
|
125
|
-
size: props.size,
|
|
126
|
-
level: props.level,
|
|
127
|
-
bgColor: props.bgColor,
|
|
128
|
-
fgColor: props.fgColor,
|
|
129
|
-
imageSettings: props.imageSettings,
|
|
130
|
-
};
|
|
131
|
-
const calculatedImageSettings = getImageSettings(propsData);
|
|
132
|
-
if (props.imageSettings) {
|
|
133
|
-
imageStyle = {
|
|
134
|
-
backgroundImage: `url(${props.imageSettings.src})`,
|
|
135
|
-
height: calculatedImageSettings.h,
|
|
136
|
-
width: calculatedImageSettings.w,
|
|
137
|
-
left: calculatedImageSettings.x + margin,
|
|
138
|
-
top: calculatedImageSettings.y + margin,
|
|
139
|
-
};
|
|
140
|
-
} else {
|
|
141
|
-
imageStyle = {};
|
|
142
|
-
}
|
|
143
|
-
const fgPath = generatePath(cells, margin);
|
|
144
|
-
return { numCells, fgPath };
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const svgRoot = ref(null);
|
|
148
|
-
let imageStyle = null;
|
|
149
|
-
const qrcodeRes = renderQrcode();
|
|
150
|
-
|
|
151
|
-
onMounted(() => {
|
|
152
|
-
svgRoot.value.jsvGetProxyView().RegisterOnProxyReady(() => {
|
|
153
|
-
const root = svgRoot.value.jsvGetProxyView().HtmlGetElement();
|
|
154
|
-
const doc = renderDocument;
|
|
155
|
-
const svg = doc.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
156
|
-
svg.setAttribute("type", "qrcode");
|
|
157
|
-
svg.setAttribute("shapeRendering", "crispEdges");
|
|
158
|
-
svg.setAttribute("height", props.size);
|
|
159
|
-
svg.setAttribute("width", props.size);
|
|
160
|
-
svg.setAttribute(
|
|
161
|
-
"viewBox",
|
|
162
|
-
"0 0 " + qrcodeRes.numCells + " " + qrcodeRes.numCells
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
const path1 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
166
|
-
path1.setAttribute("fill", props.bgColor);
|
|
167
|
-
path1.setAttribute(
|
|
168
|
-
"d",
|
|
169
|
-
"M0,0 h" + qrcodeRes.numCells + "v" + qrcodeRes.numCells + "H0z"
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
const path2 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
173
|
-
path2.setAttribute("fill", props.fgColor);
|
|
174
|
-
path2.setAttribute("d", qrcodeRes.fgPath);
|
|
175
|
-
|
|
176
|
-
svg.appendChild(path1);
|
|
177
|
-
svg.appendChild(path2);
|
|
178
|
-
|
|
179
|
-
root.appendChild(svg);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
</script>
|
|
183
|
-
|
|
184
|
-
<template>
|
|
185
|
-
<div>
|
|
186
|
-
<div ref="svgRoot" :style="{ width: 100, height: 100 }"></div>
|
|
187
|
-
<div :style="imageStyle"></div>
|
|
188
|
-
</div>
|
|
189
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 15:12:45
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-13 17:41:34
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
//! 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
9
|
-
import * as JsvQrcode from "./JsvQrcode.vue";
|
|
10
|
-
|
|
11
|
-
let _JsvQrcode;
|
|
12
|
-
if (window.JsView) {
|
|
13
|
-
_JsvQrcode = JsvQrcode.default;
|
|
14
|
-
} else {
|
|
15
|
-
const BrowserQrcode = await import("./BrowserQrcode.vue");
|
|
16
|
-
_JsvQrcode = BrowserQrcode.default;
|
|
17
|
-
}
|
|
18
|
-
export default _JsvQrcode;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 11:02:42
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-13 15:10:01
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
pointRes: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
sprayStyle: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
viewId: -1,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
computed: {
|
|
28
|
-
viewWidth() {
|
|
29
|
-
return this.sprayStyle.deltaWidth === 0 ? 1 : this.sprayStyle.deltaWidth * 2;
|
|
30
|
-
},
|
|
31
|
-
viewHeight() {
|
|
32
|
-
return this.sprayStyle.deltaHeight === 0 ? 1 : this.sprayStyle.deltaHeight * 2;
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
mounted() {
|
|
36
|
-
const viewSize = {
|
|
37
|
-
width: this.viewWidth,
|
|
38
|
-
height: this.viewHeight,
|
|
39
|
-
};
|
|
40
|
-
this.viewId = Forge.sParticleManager.addParticle(
|
|
41
|
-
this.sprayStyle,
|
|
42
|
-
this.pointRes,
|
|
43
|
-
viewSize,
|
|
44
|
-
this.$refs.element.jsvGetProxyView()
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
beforeUnmount() {
|
|
48
|
-
Forge.sParticleManager.recycleView(this.viewId);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div ref="element" :style="{ width: viewWidth, height: viewHeight }" />
|
|
55
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 15:14:29
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-18 14:09:04
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
//! 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
9
|
-
import * as JsvSpray from "./JsvSpray.vue";
|
|
10
|
-
let _JsvSpray;
|
|
11
|
-
if (window.JsView) {
|
|
12
|
-
_JsvSpray = JsvSpray.default;
|
|
13
|
-
} else {
|
|
14
|
-
const BrowserSpray = await import("./BrowserSpray.vue");
|
|
15
|
-
_JsvSpray = BrowserSpray.default;
|
|
16
|
-
}
|
|
17
|
-
export default _JsvSpray;
|