exploria-ui-mcp-server 2.0.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/LICENSE +194 -0
- package/README.md +242 -0
- package/dist/README.md +633 -0
- package/dist/components/advanced/e_parallax_scrolling/Document.vue +23 -0
- package/dist/components/advanced/e_parallax_scrolling/Using.vue +20 -0
- package/dist/components/advanced/e_parallax_scrolling/img.png +0 -0
- package/dist/components/advanced/e_parallax_scrolling/img_1.png +0 -0
- package/dist/components/advanced/e_parallax_scrolling//350/247/206/345/267/256/346/273/232/345/212/250 +0 -0
- package/dist/components/advanced/e_rolling_follow/Document.vue +21 -0
- package/dist/components/advanced/e_rolling_follow/Using.vue +54 -0
- package/dist/components/advanced/e_virtual_list/ComprehensiveCase.vue +209 -0
- package/dist/components/advanced/e_virtual_list/Document.vue +68 -0
- package/dist/components/advanced/e_virtual_list/DynamicData.vue +42 -0
- package/dist/components/advanced/e_virtual_list/Using.vue +32 -0
- package/dist/components/advanced/e_virtual_list/iconfont/iconfont.css +19 -0
- package/dist/components/advanced/e_virtual_list/iconfont/iconfont.ttf +0 -0
- package/dist/components/advanced/e_virtual_list/iconfont/iconfont.woff +0 -0
- package/dist/components/advanced/e_virtual_list/iconfont/iconfont.woff2 +0 -0
- package/dist/components/advanced/e_virtual_list/img.png +0 -0
- package/dist/components/advanced/e_watermark/AutoSize.vue +89 -0
- package/dist/components/advanced/e_watermark/BasicUsing.vue +9 -0
- package/dist/components/advanced/e_watermark/CustomFont.vue +73 -0
- package/dist/components/advanced/e_watermark/CustomStyle.vue +76 -0
- package/dist/components/advanced/e_watermark/Dense.vue +28 -0
- package/dist/components/advanced/e_watermark/Document.vue +197 -0
- package/dist/components/advanced/e_watermark/HighZIndex.vue +105 -0
- package/dist/components/advanced/e_watermark/ImageWatermark.vue +31 -0
- package/dist/components/advanced/e_watermark/MultiLine.vue +29 -0
- package/dist/components/advanced/e_watermark/OpacityWatermark.vue +73 -0
- package/dist/components/ai/typing_effect/Document.vue +47 -0
- package/dist/components/ai/typing_effect/Using1.vue +189 -0
- package/dist/components/ai/typing_effect/Using2.vue +167 -0
- package/dist/components/basic/e_badge/BasicBadge.vue +31 -0
- package/dist/components/basic/e_badge/Document.vue +137 -0
- package/dist/components/basic/e_badge/DotBadge.vue +35 -0
- package/dist/components/basic/e_badge/MaxBadge.vue +33 -0
- package/dist/components/basic/e_badge/ShowZeroBadge.vue +30 -0
- package/dist/components/basic/e_badge/SizeBadge.vue +29 -0
- package/dist/components/basic/e_badge/TypeBadge.vue +36 -0
- package/dist/components/basic/e_button/CircleButtons.vue +30 -0
- package/dist/components/basic/e_button/DisabledButtons.vue +30 -0
- package/dist/components/basic/e_button/Document.vue +171 -0
- package/dist/components/basic/e_button/LoadingButtons.vue +30 -0
- package/dist/components/basic/e_button/NormalButtons.vue +30 -0
- package/dist/components/basic/e_button/PlainButtons.vue +30 -0
- package/dist/components/basic/e_button/RoundButtons.vue +30 -0
- package/dist/components/basic/e_button/RoundedRectangleButtons.vue +35 -0
- package/dist/components/basic/e_button/SizeButtons.vue +19 -0
- package/dist/components/basic/e_button/Using.vue +89 -0
- package/dist/components/basic/e_card/BasicCard.vue +9 -0
- package/dist/components/basic/e_card/BorderlessCard.vue +8 -0
- package/dist/components/basic/e_card/ComplexContentCard.vue +92 -0
- package/dist/components/basic/e_card/CustomHeaderCard.vue +24 -0
- package/dist/components/basic/e_card/Document.vue +131 -0
- package/dist/components/basic/e_card/FooterCard.vue +12 -0
- package/dist/components/basic/e_card/ShadowCard.vue +30 -0
- package/dist/components/basic/e_card/SizesCard.vue +29 -0
- package/dist/components/basic/e_svg_icon/Document.vue +38 -0
- package/dist/components/basic/e_svg_icon/Using.vue +7 -0
- package/dist/components/basic/e_underline/BaseUsing.vue +13 -0
- package/dist/components/basic/e_underline/Document.vue +27 -0
- package/dist/components/basic/e_underline/ImgUsing.vue +36 -0
- package/dist/components/data/e_calendar/Document.vue +41 -0
- package/dist/components/data/e_calendar/Using.vue +9 -0
- package/dist/components/data/e_calendar//346/227/245/345/216/206 +0 -0
- package/dist/components/data/e_carousel/Document.vue +143 -0
- package/dist/components/data/e_carousel/Using.vue +20 -0
- package/dist/components/data/e_carousel/Using1.vue +23 -0
- package/dist/components/data/e_carousel/Using2.vue +17 -0
- package/dist/components/data/e_carousel/Using3.vue +17 -0
- package/dist/components/data/e_collapse/Document.vue +40 -0
- package/dist/components/data/e_collapse/Using.vue +9 -0
- package/dist/components/data/e_collapse//346/212/230/345/217/240/351/235/242/346/235/277 +0 -0
- package/dist/components/data/e_image/Document.vue +71 -0
- package/dist/components/data/e_image/Using.vue +21 -0
- package/dist/components/data/e_image/img.png +0 -0
- package/dist/components/data/e_list/BasicUsage.vue +18 -0
- package/dist/components/data/e_list/CustomCheckboxUsage.vue +22 -0
- package/dist/components/data/e_list/CustomEmptyDataUsage.vue +38 -0
- package/dist/components/data/e_list/CustomRowUsage.vue +64 -0
- package/dist/components/data/e_list/DividerUsage.vue +20 -0
- package/dist/components/data/e_list/Document.vue +261 -0
- package/dist/components/data/e_list/EmptyDataUsage.vue +3 -0
- package/dist/components/data/e_list/EventUsage.vue +23 -0
- package/dist/components/data/e_list/MultipleSelectUsage.vue +22 -0
- package/dist/components/data/e_list/SingleSelectUsage.vue +21 -0
- package/dist/components/data/e_list/SizeUsage.vue +35 -0
- package/dist/components/data/e_media_viewer/Document.vue +39 -0
- package/dist/components/data/e_media_viewer/Using.vue +30 -0
- package/dist/components/data/e_media_viewer/img.png +0 -0
- package/dist/components/data/e_progress/BasicProgress.vue +21 -0
- package/dist/components/data/e_progress/CircleProgress.vue +23 -0
- package/dist/components/data/e_progress/CustomColorProgress.vue +63 -0
- package/dist/components/data/e_progress/Document.vue +179 -0
- package/dist/components/data/e_progress/IndeterminateProgress.vue +49 -0
- package/dist/components/data/e_progress/ProgressSize.vue +50 -0
- package/dist/components/data/e_progress/ProgressStatus.vue +21 -0
- package/dist/components/data/e_progress/ProgressText.vue +52 -0
- package/dist/components/data/e_rolling_pagination/Document.vue +21 -0
- package/dist/components/data/e_rolling_pagination/Using.vue +33 -0
- package/dist/components/data/e_rolling_pagination//346/273/232/345/212/250/345/210/206/351/241/265 +0 -0
- package/dist/components/data/e_skeleton/Document.vue +26 -0
- package/dist/components/data/e_skeleton/Using.vue +18 -0
- package/dist/components/data/e_skeleton//351/252/250/346/236/266 +0 -0
- package/dist/components/data/e_table/Document.vue +85 -0
- package/dist/components/data/e_table/Using.vue +131 -0
- package/dist/components/data/e_timeline/Document.vue +90 -0
- package/dist/components/data/e_timeline/Using.vue +124 -0
- package/dist/components/feedback/e_dialog/AsyncUsing.vue +30 -0
- package/dist/components/feedback/e_dialog/BaseUsing.vue +15 -0
- package/dist/components/feedback/e_dialog/Document.vue +26 -0
- package/dist/components/feedback/e_drawer/BaseUsing.vue +35 -0
- package/dist/components/feedback/e_drawer/DirectionUsing.vue +93 -0
- package/dist/components/feedback/e_drawer/Document.vue +153 -0
- package/dist/components/feedback/e_drawer/LargeSizeDrawer.vue +29 -0
- package/dist/components/feedback/e_drawer/MediumSizeDrawer.vue +29 -0
- package/dist/components/feedback/e_drawer/SizeUsing.vue +67 -0
- package/dist/components/feedback/e_drawer/SmallSizeDrawer.vue +29 -0
- package/dist/components/feedback/e_message/Document.vue +18 -0
- package/dist/components/feedback/e_message/Using.vue +16 -0
- package/dist/components/feedback/e_message_box/BaseUsing.vue +11 -0
- package/dist/components/feedback/e_message_box/Document.vue +18 -0
- package/dist/components/feedback/e_message_box/intro.md +12 -0
- package/dist/components/feedback/e_notification/AllPositionsNotification.vue +35 -0
- package/dist/components/feedback/e_notification/BasicTypesNotification.vue +47 -0
- package/dist/components/feedback/e_notification/ClickableNotification.vue +18 -0
- package/dist/components/feedback/e_notification/Document.vue +147 -0
- package/dist/components/feedback/e_notification/ManualCloseNotification.vue +17 -0
- package/dist/components/feedback/e_notification/Using.vue +253 -0
- package/dist/components/feedback/e_popover/BasicUsage.vue +51 -0
- package/dist/components/feedback/e_popover/ContextmenuTrigger.vue +27 -0
- package/dist/components/feedback/e_popover/CustomContent.vue +43 -0
- package/dist/components/feedback/e_popover/CustomTrigger.vue +39 -0
- package/dist/components/feedback/e_popover/Document.vue +84 -0
- package/dist/components/feedback/e_popover/HoverTrigger.vue +29 -0
- package/dist/components/feedback/e_popover/SizeVariants.vue +36 -0
- package/dist/components/feedback/e_popover/Using.vue +177 -0
- package/dist/components/feedback/e_tooltip/Document.vue +42 -0
- package/dist/components/feedback/e_tooltip/SizeUsing.vue +28 -0
- package/dist/components/feedback/e_tooltip/Using.vue +44 -0
- package/dist/components/form/e_checkbox/Document.vue +88 -0
- package/dist/components/form/e_checkbox/Using.vue +10 -0
- package/dist/components/form/e_color_picker/Document.vue +55 -0
- package/dist/components/form/e_color_picker/Using.vue +10 -0
- package/dist/components/form/e_condition_group/Document.vue +52 -0
- package/dist/components/form/e_condition_group/Using.vue +165 -0
- package/dist/components/form/e_file_selector/Document.vue +50 -0
- package/dist/components/form/e_file_selector/Using.vue +44 -0
- package/dist/components/form/e_form/BaseUsage.vue +155 -0
- package/dist/components/form/e_form/Document.vue +93 -0
- package/dist/components/form/e_form/LoginForm.vue +150 -0
- package/dist/components/form/e_form/RegisterForm.vue +46 -0
- package/dist/components/form/e_form/iconfont/iconfont.css +67 -0
- package/dist/components/form/e_form/iconfont/iconfont.ttf +0 -0
- package/dist/components/form/e_form/iconfont/iconfont.woff +0 -0
- package/dist/components/form/e_form/iconfont/iconfont.woff2 +0 -0
- package/dist/components/form/e_input/BaseUsage.vue +16 -0
- package/dist/components/form/e_input/Clearable.vue +24 -0
- package/dist/components/form/e_input/Document.vue +111 -0
- package/dist/components/form/e_input/Number.vue +10 -0
- package/dist/components/form/e_input/Password.vue +52 -0
- package/dist/components/form/e_input/iconfont/iconfont.css +67 -0
- package/dist/components/form/e_input/iconfont/iconfont.ttf +0 -0
- package/dist/components/form/e_input/iconfont/iconfont.woff +0 -0
- package/dist/components/form/e_input/iconfont/iconfont.woff2 +0 -0
- package/dist/components/form/e_radio/Document.vue +88 -0
- package/dist/components/form/e_radio/Using.vue +14 -0
- package/dist/components/form/e_select/Document.vue +32 -0
- package/dist/components/form/e_select/Using.vue +24 -0
- package/dist/components/form/e_select//351/200/211/351/241/271/346/241/206 +0 -0
- package/dist/components/form/e_slider/BaseUsage.vue +10 -0
- package/dist/components/form/e_slider/CustomRange.vue +21 -0
- package/dist/components/form/e_slider/Disabled.vue +10 -0
- package/dist/components/form/e_slider/Document.vue +55 -0
- package/dist/components/form/e_slider/ShowValue.vue +10 -0
- package/dist/components/form/e_slider/Sizes.vue +47 -0
- package/dist/components/form/e_time_picker/Document.vue +58 -0
- package/dist/components/form/e_time_picker/Using.vue +13 -0
- package/dist/components/geometry/css_3d/Document.vue +17 -0
- package/dist/components/geometry/css_3d/Using.vue +9 -0
- package/dist/components/layout/e_scroll_x/Document.vue +39 -0
- package/dist/components/layout/e_scroll_x/Using.vue +38 -0
- package/dist/components/navigation/e_dropdown/BasicUsage.vue +64 -0
- package/dist/components/navigation/e_dropdown/Contextmenu.vue +41 -0
- package/dist/components/navigation/e_dropdown/Document.vue +72 -0
- package/dist/components/navigation/e_dropdown/HoverTrigger.vue +66 -0
- package/dist/components/navigation/e_dropdown/NestedDropdown.vue +143 -0
- package/dist/components/navigation/e_tabs/Document.vue +33 -0
- package/dist/components/navigation/e_tabs/Using.vue +40 -0
- package/dist/directives/e_uuid_util/Document.vue +15 -0
- package/dist/directives/e_uuid_util/Using.vue +13 -0
- package/dist/index.js +13708 -0
- package/dist/other/advanced/gsap/BasicUsing.vue +26 -0
- package/dist/other/advanced/gsap/Document.vue +45 -0
- package/dist/other/advanced/gsap/GSAP/345/212/250/347/224/273 +0 -0
- package/dist/other/advanced/gsap/ScrollTrigger.vue +195 -0
- package/dist/other/advanced/gsap/ScrollX.vue +81 -0
- package/dist/other/advanced/gsap/Timeline.vue +30 -0
- package/dist/other/advanced/lottie/BasicUsing.vue +33 -0
- package/dist/other/advanced/lottie/Document.vue +30 -0
- package/dist/other/advanced/lottie/Lottie /345/212/250/347/224/273 +0 -0
- package/dist/other/advanced/rich_text_editor/Document.vue +24 -0
- package/dist/other/advanced/rich_text_editor/RichTextEditor.vue +105 -0
- package/dist/other/advanced/rich_text_editor/wangeditor_style.css +684 -0
- package/dist/other/advanced/sortablejs/Document.vue +32 -0
- package/dist/other/advanced/sortablejs/ShuttleFrame.vue +181 -0
- package/dist/other/advanced/sortablejs/Using.vue +68 -0
- package/dist/other/advanced/sortablejs/iconfont/iconfont.ttf +0 -0
- package/dist/other/advanced/sortablejs/iconfont/iconfont.woff +0 -0
- package/dist/other/advanced/sortablejs/iconfont/iconfont.woff2 +0 -0
- package/dist/other/advanced/spelling/Document.vue +17 -0
- package/dist/other/advanced/spelling/Using.vue +104 -0
- package/dist/other/advanced/svg/BasicUsing.vue +12 -0
- package/dist/other/advanced/svg/Document.vue +24 -0
- package/dist/other/advanced/svg/FeDisplacementMap/FeDisplacementMap.vue +30 -0
- package/dist/other/advanced/svg/FeDisplacementMap/example/Image.vue +41 -0
- package/dist/other/advanced/svg/FeDisplacementMap/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/dist/other/advanced/svg/FeDisplacementMap//344/275/215/347/275/256/346/233/277/346/215/242/346/273/244/351/225/234 +0 -0
- package/dist/other/advanced/svg/FeTurbulence/FeTurbulence.vue +28 -0
- package/dist/other/advanced/svg/FeTurbulence/example/Image.vue +41 -0
- package/dist/other/advanced/svg/FeTurbulence/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/dist/other/advanced/svg/FeTurbulence//346/271/215/346/265/201/346/273/244/351/225/234 +0 -0
- package/dist/other/canvas/base/Document.vue +15 -0
- package/dist/other/canvas/base/Using.vue +125 -0
- package/dist/other/canvas/burrow/Clip.vue +66 -0
- package/dist/other/canvas/burrow/Document.vue +36 -0
- package/dist/other/canvas/burrow/Erase.vue +58 -0
- package/dist/other/canvas/burrow/NonZeroSurroundRule.vue +70 -0
- package/dist/other/canvas/clip/Clip.vue +58 -0
- package/dist/other/canvas/clip/Document.vue +26 -0
- package/dist/other/canvas/definition/Document.vue +26 -0
- package/dist/other/canvas/definition/Using.vue +60 -0
- package/dist/other/echarts/basic/Document.vue +36 -0
- package/dist/other/echarts/basic/Label.vue +98 -0
- package/dist/other/echarts/data_zoom/Document.vue +38 -0
- package/dist/other/echarts/data_zoom/Using.vue +119 -0
- package/dist/other/echarts/data_zoom/img.svg +33 -0
- package/dist/other/echarts/gauge/Document.vue +38 -0
- package/dist/other/echarts/gauge/Gauge.vue +340 -0
- package/dist/other/echarts/gauge//344/273/252/350/241/250/347/233/230 +0 -0
- package/dist/other/echarts/liquidfill/Document.vue +46 -0
- package/dist/other/echarts/liquidfill/Using.vue +239 -0
- package/dist/other/git/sample_set/Document.vue +43 -0
- package/dist/other/git/sample_set/img/img.png +0 -0
- package/dist/other/git/sample_set/img/img_1.png +0 -0
- package/dist/other/git/sample_set/img/img_2.png +0 -0
- package/dist/other/layout/flex/Advanced.vue +104 -0
- package/dist/other/layout/flex/Advanced2.vue +181 -0
- package/dist/other/layout/flex/Base.vue +48 -0
- package/dist/other/layout/flex/Document.vue +57 -0
- package/dist/other/layout/flex/Grid.vue +54 -0
- package/dist/other/layout/flex/Height100.vue +35 -0
- package/dist/other/layout/flex/intro.md +1 -0
- package/dist/other/layout/grid/Base.vue +29 -0
- package/dist/other/layout/grid/Document.vue +54 -0
- package/dist/other/layout/grid/Grid.vue +28 -0
- package/dist/other/layout/grid/Height100.vue +35 -0
- package/dist/other/layout/grid/intro.md +1 -0
- package/dist/other/navigation/new_tab_page/Document.vue +18 -0
- package/dist/other/navigation/new_tab_page/OpenNewTabPage.vue +7 -0
- package/dist/other/navigation/new_tab_page/new-tab-page-demo.html +450 -0
- package/dist/other/network/sse/Document.vue +21 -0
- package/dist/other/network/sse/Using.vue +24 -0
- package/dist/other/network/sse/server/app.ts +62 -0
- package/dist/other/network/sse/server/static/text.md +99 -0
- package/dist/other/network/sse/server/utils/sleep.ts +5 -0
- package/dist/other/observer/mutation_observer/Document.vue +15 -0
- package/dist/other/observer/mutation_observer/Using.vue +46 -0
- package/dist/other/optimize/Document.vue +19 -0
- package/dist/other/optimize/HeavyComp.vue +19 -0
- package/dist/other/optimize/Using.vue +14 -0
- package/dist/other/optimize/useDefer.ts +28 -0
- package/dist/other/svg/base/BasicUsing.vue +12 -0
- package/dist/other/svg/base/Document.vue +24 -0
- package/dist/other/svg/base/FeDisplacementMap/FeDisplacementMap.vue +30 -0
- package/dist/other/svg/base/FeDisplacementMap/example/Image.vue +41 -0
- package/dist/other/svg/base/FeDisplacementMap/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/dist/other/svg/base/FeDisplacementMap//344/275/215/347/275/256/346/233/277/346/215/242/346/273/244/351/225/234 +0 -0
- package/dist/other/svg/base/FeTurbulence/FeTurbulence.vue +28 -0
- package/dist/other/svg/base/FeTurbulence/example/Image.vue +41 -0
- package/dist/other/svg/base/FeTurbulence/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/dist/other/svg/base/FeTurbulence//346/271/215/346/265/201/346/273/244/351/225/234 +0 -0
- package/dist/other/threejs/base/Document.vue +17 -0
- package/dist/other/threejs/base/Using.vue +127 -0
- package/dist/other/threejs/controller_sync/Document.vue +15 -0
- package/dist/other/threejs/controller_sync/Using.vue +347 -0
- package/dist/other/threejs/controller_sync/bone//345/217/214/350/204/232/345/206/205/344/276/247/350/270/242/347/220/203.fbx +0 -0
- package/dist/other/threejs/controller_sync/motion//345/217/214/350/204/232/345/206/205/344/276/247/350/270/242/347/220/203.fbx +0 -0
- package/dist/other/threejs/controller_sync/scene/EnvMapTexture.jpg +0 -0
- package/dist/other/threejs/controller_sync/scene//347/257/256/347/220/203/345/234/272.glb +0 -0
- package/dist/other/threejs/controller_sync/scene//347/276/275/346/257/233/347/220/203/345/234/272.glb +0 -0
- package/dist/other/threejs/phoenix/Document.vue +17 -0
- package/dist/other/threejs/phoenix/Using.vue +79 -0
- package/dist/other/vue/life_cycle/Child.vue +43 -0
- package/dist/other/vue/life_cycle/Document.vue +15 -0
- package/dist/other/vue/life_cycle/Using.vue +16 -0
- package/dist/utils/e_echarts_util/Document.vue +14 -0
- package/dist/utils/e_echarts_util/Using.vue +81 -0
- package/dist/utils/e_image_util/Document.vue +15 -0
- package/dist/utils/e_image_util/Using.vue +24 -0
- package/dist/utils/e_image_util/author_avatar.png +0 -0
- package/dist/utils/e_uuid_util/Document.vue +15 -0
- package/dist/utils/e_uuid_util/Using.vue +13 -0
- package/dist/utils/type_utils/Document.vue +16 -0
- package/dist/utils/type_utils/TupleType.vue +16 -0
- package/package.json +33 -0
- package/public/README.md +633 -0
- package/public/components/advanced/e_parallax_scrolling/Document.vue +23 -0
- package/public/components/advanced/e_parallax_scrolling/Using.vue +20 -0
- package/public/components/advanced/e_parallax_scrolling/img.png +0 -0
- package/public/components/advanced/e_parallax_scrolling/img_1.png +0 -0
- package/public/components/advanced/e_parallax_scrolling//350/247/206/345/267/256/346/273/232/345/212/250 +0 -0
- package/public/components/advanced/e_rolling_follow/Document.vue +21 -0
- package/public/components/advanced/e_rolling_follow/Using.vue +54 -0
- package/public/components/advanced/e_virtual_list/ComprehensiveCase.vue +209 -0
- package/public/components/advanced/e_virtual_list/Document.vue +68 -0
- package/public/components/advanced/e_virtual_list/DynamicData.vue +42 -0
- package/public/components/advanced/e_virtual_list/Using.vue +32 -0
- package/public/components/advanced/e_virtual_list/iconfont/iconfont.css +19 -0
- package/public/components/advanced/e_virtual_list/iconfont/iconfont.ttf +0 -0
- package/public/components/advanced/e_virtual_list/iconfont/iconfont.woff +0 -0
- package/public/components/advanced/e_virtual_list/iconfont/iconfont.woff2 +0 -0
- package/public/components/advanced/e_virtual_list/img.png +0 -0
- package/public/components/advanced/e_watermark/AutoSize.vue +89 -0
- package/public/components/advanced/e_watermark/BasicUsing.vue +9 -0
- package/public/components/advanced/e_watermark/CustomFont.vue +73 -0
- package/public/components/advanced/e_watermark/CustomStyle.vue +76 -0
- package/public/components/advanced/e_watermark/Dense.vue +28 -0
- package/public/components/advanced/e_watermark/Document.vue +197 -0
- package/public/components/advanced/e_watermark/HighZIndex.vue +105 -0
- package/public/components/advanced/e_watermark/ImageWatermark.vue +31 -0
- package/public/components/advanced/e_watermark/MultiLine.vue +29 -0
- package/public/components/advanced/e_watermark/OpacityWatermark.vue +73 -0
- package/public/components/ai/typing_effect/Document.vue +47 -0
- package/public/components/ai/typing_effect/Using1.vue +189 -0
- package/public/components/ai/typing_effect/Using2.vue +167 -0
- package/public/components/basic/e_badge/BasicBadge.vue +31 -0
- package/public/components/basic/e_badge/Document.vue +137 -0
- package/public/components/basic/e_badge/DotBadge.vue +35 -0
- package/public/components/basic/e_badge/MaxBadge.vue +33 -0
- package/public/components/basic/e_badge/ShowZeroBadge.vue +30 -0
- package/public/components/basic/e_badge/SizeBadge.vue +29 -0
- package/public/components/basic/e_badge/TypeBadge.vue +36 -0
- package/public/components/basic/e_button/CircleButtons.vue +30 -0
- package/public/components/basic/e_button/DisabledButtons.vue +30 -0
- package/public/components/basic/e_button/Document.vue +171 -0
- package/public/components/basic/e_button/LoadingButtons.vue +30 -0
- package/public/components/basic/e_button/NormalButtons.vue +30 -0
- package/public/components/basic/e_button/PlainButtons.vue +30 -0
- package/public/components/basic/e_button/RoundButtons.vue +30 -0
- package/public/components/basic/e_button/RoundedRectangleButtons.vue +35 -0
- package/public/components/basic/e_button/SizeButtons.vue +19 -0
- package/public/components/basic/e_button/Using.vue +89 -0
- package/public/components/basic/e_card/BasicCard.vue +9 -0
- package/public/components/basic/e_card/BorderlessCard.vue +8 -0
- package/public/components/basic/e_card/ComplexContentCard.vue +92 -0
- package/public/components/basic/e_card/CustomHeaderCard.vue +24 -0
- package/public/components/basic/e_card/Document.vue +131 -0
- package/public/components/basic/e_card/FooterCard.vue +12 -0
- package/public/components/basic/e_card/ShadowCard.vue +30 -0
- package/public/components/basic/e_card/SizesCard.vue +29 -0
- package/public/components/basic/e_svg_icon/Document.vue +38 -0
- package/public/components/basic/e_svg_icon/Using.vue +7 -0
- package/public/components/basic/e_underline/BaseUsing.vue +13 -0
- package/public/components/basic/e_underline/Document.vue +27 -0
- package/public/components/basic/e_underline/ImgUsing.vue +36 -0
- package/public/components/data/e_calendar/Document.vue +41 -0
- package/public/components/data/e_calendar/Using.vue +9 -0
- package/public/components/data/e_calendar//346/227/245/345/216/206 +0 -0
- package/public/components/data/e_carousel/Document.vue +143 -0
- package/public/components/data/e_carousel/Using.vue +20 -0
- package/public/components/data/e_carousel/Using1.vue +23 -0
- package/public/components/data/e_carousel/Using2.vue +17 -0
- package/public/components/data/e_carousel/Using3.vue +17 -0
- package/public/components/data/e_collapse/Document.vue +40 -0
- package/public/components/data/e_collapse/Using.vue +9 -0
- package/public/components/data/e_collapse//346/212/230/345/217/240/351/235/242/346/235/277 +0 -0
- package/public/components/data/e_image/Document.vue +71 -0
- package/public/components/data/e_image/Using.vue +21 -0
- package/public/components/data/e_image/img.png +0 -0
- package/public/components/data/e_list/BasicUsage.vue +18 -0
- package/public/components/data/e_list/CustomCheckboxUsage.vue +22 -0
- package/public/components/data/e_list/CustomEmptyDataUsage.vue +38 -0
- package/public/components/data/e_list/CustomRowUsage.vue +64 -0
- package/public/components/data/e_list/DividerUsage.vue +20 -0
- package/public/components/data/e_list/Document.vue +261 -0
- package/public/components/data/e_list/EmptyDataUsage.vue +3 -0
- package/public/components/data/e_list/EventUsage.vue +23 -0
- package/public/components/data/e_list/MultipleSelectUsage.vue +22 -0
- package/public/components/data/e_list/SingleSelectUsage.vue +21 -0
- package/public/components/data/e_list/SizeUsage.vue +35 -0
- package/public/components/data/e_media_viewer/Document.vue +39 -0
- package/public/components/data/e_media_viewer/Using.vue +30 -0
- package/public/components/data/e_media_viewer/img.png +0 -0
- package/public/components/data/e_progress/BasicProgress.vue +21 -0
- package/public/components/data/e_progress/CircleProgress.vue +23 -0
- package/public/components/data/e_progress/CustomColorProgress.vue +63 -0
- package/public/components/data/e_progress/Document.vue +179 -0
- package/public/components/data/e_progress/IndeterminateProgress.vue +49 -0
- package/public/components/data/e_progress/ProgressSize.vue +50 -0
- package/public/components/data/e_progress/ProgressStatus.vue +21 -0
- package/public/components/data/e_progress/ProgressText.vue +52 -0
- package/public/components/data/e_rolling_pagination/Document.vue +21 -0
- package/public/components/data/e_rolling_pagination/Using.vue +33 -0
- package/public/components/data/e_rolling_pagination//346/273/232/345/212/250/345/210/206/351/241/265 +0 -0
- package/public/components/data/e_skeleton/Document.vue +26 -0
- package/public/components/data/e_skeleton/Using.vue +18 -0
- package/public/components/data/e_skeleton//351/252/250/346/236/266 +0 -0
- package/public/components/data/e_table/Document.vue +85 -0
- package/public/components/data/e_table/Using.vue +131 -0
- package/public/components/data/e_timeline/Document.vue +90 -0
- package/public/components/data/e_timeline/Using.vue +124 -0
- package/public/components/feedback/e_dialog/AsyncUsing.vue +30 -0
- package/public/components/feedback/e_dialog/BaseUsing.vue +15 -0
- package/public/components/feedback/e_dialog/Document.vue +26 -0
- package/public/components/feedback/e_drawer/BaseUsing.vue +35 -0
- package/public/components/feedback/e_drawer/DirectionUsing.vue +93 -0
- package/public/components/feedback/e_drawer/Document.vue +153 -0
- package/public/components/feedback/e_drawer/LargeSizeDrawer.vue +29 -0
- package/public/components/feedback/e_drawer/MediumSizeDrawer.vue +29 -0
- package/public/components/feedback/e_drawer/SizeUsing.vue +67 -0
- package/public/components/feedback/e_drawer/SmallSizeDrawer.vue +29 -0
- package/public/components/feedback/e_message/Document.vue +18 -0
- package/public/components/feedback/e_message/Using.vue +16 -0
- package/public/components/feedback/e_message_box/BaseUsing.vue +11 -0
- package/public/components/feedback/e_message_box/Document.vue +18 -0
- package/public/components/feedback/e_message_box/intro.md +12 -0
- package/public/components/feedback/e_notification/AllPositionsNotification.vue +35 -0
- package/public/components/feedback/e_notification/BasicTypesNotification.vue +47 -0
- package/public/components/feedback/e_notification/ClickableNotification.vue +18 -0
- package/public/components/feedback/e_notification/Document.vue +147 -0
- package/public/components/feedback/e_notification/ManualCloseNotification.vue +17 -0
- package/public/components/feedback/e_notification/Using.vue +253 -0
- package/public/components/feedback/e_popover/BasicUsage.vue +51 -0
- package/public/components/feedback/e_popover/ContextmenuTrigger.vue +27 -0
- package/public/components/feedback/e_popover/CustomContent.vue +43 -0
- package/public/components/feedback/e_popover/CustomTrigger.vue +39 -0
- package/public/components/feedback/e_popover/Document.vue +84 -0
- package/public/components/feedback/e_popover/HoverTrigger.vue +29 -0
- package/public/components/feedback/e_popover/SizeVariants.vue +36 -0
- package/public/components/feedback/e_popover/Using.vue +177 -0
- package/public/components/feedback/e_tooltip/Document.vue +42 -0
- package/public/components/feedback/e_tooltip/SizeUsing.vue +28 -0
- package/public/components/feedback/e_tooltip/Using.vue +44 -0
- package/public/components/form/e_checkbox/Document.vue +88 -0
- package/public/components/form/e_checkbox/Using.vue +10 -0
- package/public/components/form/e_color_picker/Document.vue +55 -0
- package/public/components/form/e_color_picker/Using.vue +10 -0
- package/public/components/form/e_condition_group/Document.vue +52 -0
- package/public/components/form/e_condition_group/Using.vue +165 -0
- package/public/components/form/e_file_selector/Document.vue +50 -0
- package/public/components/form/e_file_selector/Using.vue +44 -0
- package/public/components/form/e_form/BaseUsage.vue +155 -0
- package/public/components/form/e_form/Document.vue +93 -0
- package/public/components/form/e_form/LoginForm.vue +150 -0
- package/public/components/form/e_form/RegisterForm.vue +46 -0
- package/public/components/form/e_form/iconfont/iconfont.css +67 -0
- package/public/components/form/e_form/iconfont/iconfont.ttf +0 -0
- package/public/components/form/e_form/iconfont/iconfont.woff +0 -0
- package/public/components/form/e_form/iconfont/iconfont.woff2 +0 -0
- package/public/components/form/e_input/BaseUsage.vue +16 -0
- package/public/components/form/e_input/Clearable.vue +24 -0
- package/public/components/form/e_input/Document.vue +111 -0
- package/public/components/form/e_input/Number.vue +10 -0
- package/public/components/form/e_input/Password.vue +52 -0
- package/public/components/form/e_input/iconfont/iconfont.css +67 -0
- package/public/components/form/e_input/iconfont/iconfont.ttf +0 -0
- package/public/components/form/e_input/iconfont/iconfont.woff +0 -0
- package/public/components/form/e_input/iconfont/iconfont.woff2 +0 -0
- package/public/components/form/e_radio/Document.vue +88 -0
- package/public/components/form/e_radio/Using.vue +14 -0
- package/public/components/form/e_select/Document.vue +32 -0
- package/public/components/form/e_select/Using.vue +24 -0
- package/public/components/form/e_select//351/200/211/351/241/271/346/241/206 +0 -0
- package/public/components/form/e_slider/BaseUsage.vue +10 -0
- package/public/components/form/e_slider/CustomRange.vue +21 -0
- package/public/components/form/e_slider/Disabled.vue +10 -0
- package/public/components/form/e_slider/Document.vue +55 -0
- package/public/components/form/e_slider/ShowValue.vue +10 -0
- package/public/components/form/e_slider/Sizes.vue +47 -0
- package/public/components/form/e_time_picker/Document.vue +58 -0
- package/public/components/form/e_time_picker/Using.vue +13 -0
- package/public/components/geometry/css_3d/Document.vue +17 -0
- package/public/components/geometry/css_3d/Using.vue +9 -0
- package/public/components/layout/e_scroll_x/Document.vue +39 -0
- package/public/components/layout/e_scroll_x/Using.vue +38 -0
- package/public/components/navigation/e_dropdown/BasicUsage.vue +64 -0
- package/public/components/navigation/e_dropdown/Contextmenu.vue +41 -0
- package/public/components/navigation/e_dropdown/Document.vue +72 -0
- package/public/components/navigation/e_dropdown/HoverTrigger.vue +66 -0
- package/public/components/navigation/e_dropdown/NestedDropdown.vue +143 -0
- package/public/components/navigation/e_tabs/Document.vue +33 -0
- package/public/components/navigation/e_tabs/Using.vue +40 -0
- package/public/directives/e_uuid_util/Document.vue +15 -0
- package/public/directives/e_uuid_util/Using.vue +13 -0
- package/public/other/advanced/gsap/BasicUsing.vue +26 -0
- package/public/other/advanced/gsap/Document.vue +45 -0
- package/public/other/advanced/gsap/GSAP/345/212/250/347/224/273 +0 -0
- package/public/other/advanced/gsap/ScrollTrigger.vue +195 -0
- package/public/other/advanced/gsap/ScrollX.vue +81 -0
- package/public/other/advanced/gsap/Timeline.vue +30 -0
- package/public/other/advanced/lottie/BasicUsing.vue +33 -0
- package/public/other/advanced/lottie/Document.vue +30 -0
- package/public/other/advanced/lottie/Lottie /345/212/250/347/224/273 +0 -0
- package/public/other/advanced/rich_text_editor/Document.vue +24 -0
- package/public/other/advanced/rich_text_editor/RichTextEditor.vue +105 -0
- package/public/other/advanced/rich_text_editor/wangeditor_style.css +684 -0
- package/public/other/advanced/sortablejs/Document.vue +32 -0
- package/public/other/advanced/sortablejs/ShuttleFrame.vue +181 -0
- package/public/other/advanced/sortablejs/Using.vue +68 -0
- package/public/other/advanced/sortablejs/iconfont/iconfont.ttf +0 -0
- package/public/other/advanced/sortablejs/iconfont/iconfont.woff +0 -0
- package/public/other/advanced/sortablejs/iconfont/iconfont.woff2 +0 -0
- package/public/other/advanced/spelling/Document.vue +17 -0
- package/public/other/advanced/spelling/Using.vue +104 -0
- package/public/other/advanced/svg/BasicUsing.vue +12 -0
- package/public/other/advanced/svg/Document.vue +24 -0
- package/public/other/advanced/svg/FeDisplacementMap/FeDisplacementMap.vue +30 -0
- package/public/other/advanced/svg/FeDisplacementMap/example/Image.vue +41 -0
- package/public/other/advanced/svg/FeDisplacementMap/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/public/other/advanced/svg/FeDisplacementMap//344/275/215/347/275/256/346/233/277/346/215/242/346/273/244/351/225/234 +0 -0
- package/public/other/advanced/svg/FeTurbulence/FeTurbulence.vue +28 -0
- package/public/other/advanced/svg/FeTurbulence/example/Image.vue +41 -0
- package/public/other/advanced/svg/FeTurbulence/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/public/other/advanced/svg/FeTurbulence//346/271/215/346/265/201/346/273/244/351/225/234 +0 -0
- package/public/other/canvas/base/Document.vue +15 -0
- package/public/other/canvas/base/Using.vue +125 -0
- package/public/other/canvas/burrow/Clip.vue +66 -0
- package/public/other/canvas/burrow/Document.vue +36 -0
- package/public/other/canvas/burrow/Erase.vue +58 -0
- package/public/other/canvas/burrow/NonZeroSurroundRule.vue +70 -0
- package/public/other/canvas/clip/Clip.vue +58 -0
- package/public/other/canvas/clip/Document.vue +26 -0
- package/public/other/canvas/definition/Document.vue +26 -0
- package/public/other/canvas/definition/Using.vue +60 -0
- package/public/other/echarts/basic/Document.vue +36 -0
- package/public/other/echarts/basic/Label.vue +98 -0
- package/public/other/echarts/data_zoom/Document.vue +38 -0
- package/public/other/echarts/data_zoom/Using.vue +119 -0
- package/public/other/echarts/data_zoom/img.svg +33 -0
- package/public/other/echarts/gauge/Document.vue +38 -0
- package/public/other/echarts/gauge/Gauge.vue +340 -0
- package/public/other/echarts/gauge//344/273/252/350/241/250/347/233/230 +0 -0
- package/public/other/echarts/liquidfill/Document.vue +46 -0
- package/public/other/echarts/liquidfill/Using.vue +239 -0
- package/public/other/git/sample_set/Document.vue +43 -0
- package/public/other/git/sample_set/img/img.png +0 -0
- package/public/other/git/sample_set/img/img_1.png +0 -0
- package/public/other/git/sample_set/img/img_2.png +0 -0
- package/public/other/layout/flex/Advanced.vue +104 -0
- package/public/other/layout/flex/Advanced2.vue +181 -0
- package/public/other/layout/flex/Base.vue +48 -0
- package/public/other/layout/flex/Document.vue +57 -0
- package/public/other/layout/flex/Grid.vue +54 -0
- package/public/other/layout/flex/Height100.vue +35 -0
- package/public/other/layout/flex/intro.md +1 -0
- package/public/other/layout/grid/Base.vue +29 -0
- package/public/other/layout/grid/Document.vue +54 -0
- package/public/other/layout/grid/Grid.vue +28 -0
- package/public/other/layout/grid/Height100.vue +35 -0
- package/public/other/layout/grid/intro.md +1 -0
- package/public/other/navigation/new_tab_page/Document.vue +18 -0
- package/public/other/navigation/new_tab_page/OpenNewTabPage.vue +7 -0
- package/public/other/navigation/new_tab_page/new-tab-page-demo.html +450 -0
- package/public/other/network/sse/Document.vue +21 -0
- package/public/other/network/sse/Using.vue +24 -0
- package/public/other/network/sse/server/app.ts +62 -0
- package/public/other/network/sse/server/static/text.md +99 -0
- package/public/other/network/sse/server/utils/sleep.ts +5 -0
- package/public/other/observer/mutation_observer/Document.vue +15 -0
- package/public/other/observer/mutation_observer/Using.vue +46 -0
- package/public/other/optimize/Document.vue +19 -0
- package/public/other/optimize/HeavyComp.vue +19 -0
- package/public/other/optimize/Using.vue +14 -0
- package/public/other/optimize/useDefer.ts +28 -0
- package/public/other/svg/base/BasicUsing.vue +12 -0
- package/public/other/svg/base/Document.vue +24 -0
- package/public/other/svg/base/FeDisplacementMap/FeDisplacementMap.vue +30 -0
- package/public/other/svg/base/FeDisplacementMap/example/Image.vue +41 -0
- package/public/other/svg/base/FeDisplacementMap/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/public/other/svg/base/FeDisplacementMap//344/275/215/347/275/256/346/233/277/346/215/242/346/273/244/351/225/234 +0 -0
- package/public/other/svg/base/FeTurbulence/FeTurbulence.vue +28 -0
- package/public/other/svg/base/FeTurbulence/example/Image.vue +41 -0
- package/public/other/svg/base/FeTurbulence/example//346/225/205/351/232/234/346/263/242/347/272/271/346/225/210/346/236/234 +0 -0
- package/public/other/svg/base/FeTurbulence//346/271/215/346/265/201/346/273/244/351/225/234 +0 -0
- package/public/other/threejs/base/Document.vue +17 -0
- package/public/other/threejs/base/Using.vue +127 -0
- package/public/other/threejs/controller_sync/Document.vue +15 -0
- package/public/other/threejs/controller_sync/Using.vue +347 -0
- package/public/other/threejs/controller_sync/bone//345/217/214/350/204/232/345/206/205/344/276/247/350/270/242/347/220/203.fbx +0 -0
- package/public/other/threejs/controller_sync/motion//345/217/214/350/204/232/345/206/205/344/276/247/350/270/242/347/220/203.fbx +0 -0
- package/public/other/threejs/controller_sync/scene/EnvMapTexture.jpg +0 -0
- package/public/other/threejs/controller_sync/scene//347/257/256/347/220/203/345/234/272.glb +0 -0
- package/public/other/threejs/controller_sync/scene//347/276/275/346/257/233/347/220/203/345/234/272.glb +0 -0
- package/public/other/threejs/phoenix/Document.vue +17 -0
- package/public/other/threejs/phoenix/Using.vue +79 -0
- package/public/other/vue/life_cycle/Child.vue +43 -0
- package/public/other/vue/life_cycle/Document.vue +15 -0
- package/public/other/vue/life_cycle/Using.vue +16 -0
- package/public/utils/e_echarts_util/Document.vue +14 -0
- package/public/utils/e_echarts_util/Using.vue +81 -0
- package/public/utils/e_image_util/Document.vue +15 -0
- package/public/utils/e_image_util/Using.vue +24 -0
- package/public/utils/e_image_util/author_avatar.png +0 -0
- package/public/utils/e_uuid_util/Document.vue +15 -0
- package/public/utils/e_uuid_util/Using.vue +13 -0
- package/public/utils/type_utils/Document.vue +16 -0
- package/public/utils/type_utils/TupleType.vue +16 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { EThreeUtil } from 'exploria-ui';
|
|
3
|
+
import {
|
|
4
|
+
AmbientLight,
|
|
5
|
+
AnimationAction,
|
|
6
|
+
AnimationMixer,
|
|
7
|
+
Clock,
|
|
8
|
+
Color,
|
|
9
|
+
EquirectangularReflectionMapping,
|
|
10
|
+
GridHelper,
|
|
11
|
+
type Group,
|
|
12
|
+
PerspectiveCamera,
|
|
13
|
+
Scene,
|
|
14
|
+
SkeletonHelper,
|
|
15
|
+
TextureLoader,
|
|
16
|
+
WebGLRenderer,
|
|
17
|
+
} from 'three';
|
|
18
|
+
import type { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
19
|
+
import { onMounted, ref, useTemplateRef } from 'vue';
|
|
20
|
+
|
|
21
|
+
// 网格地面
|
|
22
|
+
const controllerSyncRef = useTemplateRef<HTMLElement>('controller-sync');
|
|
23
|
+
|
|
24
|
+
let fps = ref(30);
|
|
25
|
+
|
|
26
|
+
const isPlayingAction = ref(false);
|
|
27
|
+
const isPlayingVideo = ref(false);
|
|
28
|
+
const sliderMaxValue = ref<number>(100); // 动画总帧数
|
|
29
|
+
|
|
30
|
+
class MyScene {
|
|
31
|
+
static clock = new Clock();
|
|
32
|
+
action: AnimationAction | null = null;
|
|
33
|
+
mixer: AnimationMixer | null = null;
|
|
34
|
+
model: Group | null = null;
|
|
35
|
+
controls: OrbitControls | null = null;
|
|
36
|
+
scene = new Scene();
|
|
37
|
+
renderer: WebGLRenderer | null = null;
|
|
38
|
+
camera: PerspectiveCamera | null = null;
|
|
39
|
+
skeletonHelper: SkeletonHelper | null = null;
|
|
40
|
+
|
|
41
|
+
constructor(canvas: HTMLCanvasElement) {
|
|
42
|
+
this.camera = new PerspectiveCamera(
|
|
43
|
+
75,
|
|
44
|
+
canvas.offsetWidth / canvas.offsetHeight,
|
|
45
|
+
0.1,
|
|
46
|
+
1000
|
|
47
|
+
);
|
|
48
|
+
this.renderer = EThreeUtil.createWebGLRenderer(canvas);
|
|
49
|
+
this.renderer.setSize(canvas.offsetWidth, canvas.offsetHeight);
|
|
50
|
+
this.controls = EThreeUtil.createControls(this.camera, canvas);
|
|
51
|
+
this.camera.position.set(0, 200, 500);
|
|
52
|
+
this.camera.lookAt(0, 20, 0);
|
|
53
|
+
|
|
54
|
+
this.addAmbientLight();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
createAnimationMixer() {
|
|
58
|
+
this.mixer = new AnimationMixer(this.model!);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
createAction() {
|
|
62
|
+
this.action = this.mixer!.clipAction(this.model!.animations[0]!);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
playAction() {
|
|
66
|
+
this.action?.reset().fadeIn(0).play();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
removeModelFromScene() {
|
|
70
|
+
if (this.model) {
|
|
71
|
+
this.scene.remove(this.model);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
loadModel(src: string) {
|
|
76
|
+
return new Promise<void>((resolve, reject) => {
|
|
77
|
+
isLoading.value = true;
|
|
78
|
+
modelLoadingProgress.value = 0;
|
|
79
|
+
EThreeUtil.loadFBX(src, (xhr) => {
|
|
80
|
+
modelLoadingProgress.value = parseFloat(
|
|
81
|
+
((xhr.loaded / xhr.total) * 100).toFixed(2)
|
|
82
|
+
);
|
|
83
|
+
})
|
|
84
|
+
.then((model: Group) => {
|
|
85
|
+
modelLoadingProgress.value = 100;
|
|
86
|
+
// data.scale.set(0.01, 0.01, 0.01);
|
|
87
|
+
model.castShadow = true;
|
|
88
|
+
this.model = model;
|
|
89
|
+
resolve();
|
|
90
|
+
})
|
|
91
|
+
.catch((err) => {
|
|
92
|
+
reject(err);
|
|
93
|
+
})
|
|
94
|
+
.finally(() => {
|
|
95
|
+
isLoading.value = false;
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
loadBone(src: string) {
|
|
101
|
+
return new Promise<void>((resolve, reject) => {
|
|
102
|
+
isLoading.value = true;
|
|
103
|
+
modelLoadingProgress.value = 0;
|
|
104
|
+
EThreeUtil.loadFBX(
|
|
105
|
+
src,
|
|
106
|
+
(xhr: { loaded: number; total: number }) => {
|
|
107
|
+
modelLoadingProgress.value = parseFloat(
|
|
108
|
+
((xhr.loaded / xhr.total) * 100).toFixed(2)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
.then((model: Group) => {
|
|
113
|
+
modelLoadingProgress.value = 100;
|
|
114
|
+
// data.scale.set(0.01, 0.01, 0.01);
|
|
115
|
+
this.model = model;
|
|
116
|
+
resolve();
|
|
117
|
+
})
|
|
118
|
+
.catch((err) => {
|
|
119
|
+
reject(err);
|
|
120
|
+
})
|
|
121
|
+
.finally(() => {
|
|
122
|
+
isLoading.value = false;
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
showSkeletonHelperToScene() {
|
|
128
|
+
if (this.skeletonHelper) {
|
|
129
|
+
this.scene.remove(this.skeletonHelper);
|
|
130
|
+
}
|
|
131
|
+
// 显示骨骼
|
|
132
|
+
this.skeletonHelper = new SkeletonHelper(this.model!);
|
|
133
|
+
this.scene.add(this.skeletonHelper);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 添加模型到场景
|
|
138
|
+
*/
|
|
139
|
+
addModelToScene() {
|
|
140
|
+
this.scene.add(this.model!);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 添加环境贴图
|
|
145
|
+
*/
|
|
146
|
+
addEnvMapTexture() {
|
|
147
|
+
// 将渐变纹理设置为场景的环境贴图和背景
|
|
148
|
+
const textureLoader = new TextureLoader();
|
|
149
|
+
const envMapTexture = textureLoader.load(
|
|
150
|
+
new URL('/threejs/model/scene/EnvMapTexture.jpg', import.meta.url)
|
|
151
|
+
.pathname
|
|
152
|
+
);
|
|
153
|
+
envMapTexture.mapping = EquirectangularReflectionMapping; //正常只是一张图平铺,设置这个可以让图包围环绕整个环境
|
|
154
|
+
this.scene.environment = envMapTexture;
|
|
155
|
+
this.scene.background = envMapTexture;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 设置场景背景色
|
|
160
|
+
* @param color
|
|
161
|
+
*/
|
|
162
|
+
setBackgroundColor(color: Color) {
|
|
163
|
+
this.scene.background = color;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 添加环境光
|
|
168
|
+
*/
|
|
169
|
+
addAmbientLight() {
|
|
170
|
+
const ambientLight = new AmbientLight(0xffffff, 4);
|
|
171
|
+
this.scene.add(ambientLight);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
addGridHelper() {
|
|
175
|
+
const gridHelper = new GridHelper(10000, 200);
|
|
176
|
+
gridHelper.material.opacity = 0.2;
|
|
177
|
+
gridHelper.material.transparent = true;
|
|
178
|
+
this.scene.add(gridHelper);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 添加地面
|
|
183
|
+
*/
|
|
184
|
+
addFloor() {
|
|
185
|
+
EThreeUtil.loadGlb(
|
|
186
|
+
new URL('/threejs/model/scene/羽毛球场.glb', import.meta.url)
|
|
187
|
+
.pathname
|
|
188
|
+
).then((model) => {
|
|
189
|
+
const floor = model.scenes[0]!;
|
|
190
|
+
floor.castShadow = true;
|
|
191
|
+
floor.scale.set(70, 70, 70);
|
|
192
|
+
this.scene.add(floor);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const isLoading = ref(false);
|
|
198
|
+
const modelLoadingProgress = ref<number>(0);
|
|
199
|
+
|
|
200
|
+
const playMotion = () => {
|
|
201
|
+
isPlayingVideo.value = false;
|
|
202
|
+
isPlayingAction.value = false;
|
|
203
|
+
|
|
204
|
+
// 删除之前的模型
|
|
205
|
+
scene1?.removeModelFromScene();
|
|
206
|
+
scene2?.removeModelFromScene();
|
|
207
|
+
// 同时加载模型
|
|
208
|
+
Promise.all([
|
|
209
|
+
scene1?.loadModel(
|
|
210
|
+
new URL('/threejs/model/motion/双脚内侧踢球.fbx', import.meta.url)
|
|
211
|
+
.pathname
|
|
212
|
+
),
|
|
213
|
+
scene2?.loadBone(
|
|
214
|
+
new URL('/threejs/model/bone/双脚内侧踢球.fbx', import.meta.url)
|
|
215
|
+
.pathname
|
|
216
|
+
),
|
|
217
|
+
]).then(() => {
|
|
218
|
+
// 创建动画混合器
|
|
219
|
+
scene2?.createAnimationMixer();
|
|
220
|
+
scene1?.createAnimationMixer();
|
|
221
|
+
|
|
222
|
+
// 创建骨骼辅助器
|
|
223
|
+
scene2?.showSkeletonHelperToScene();
|
|
224
|
+
|
|
225
|
+
scene2?.addModelToScene();
|
|
226
|
+
scene1?.addModelToScene();
|
|
227
|
+
|
|
228
|
+
scene2?.createAction();
|
|
229
|
+
scene1?.createAction();
|
|
230
|
+
|
|
231
|
+
// 播放动画
|
|
232
|
+
scene1?.playAction();
|
|
233
|
+
scene2?.playAction();
|
|
234
|
+
|
|
235
|
+
isPlayingAction.value = true;
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
let scene1: MyScene | null = null;
|
|
240
|
+
let scene2: MyScene | null = null;
|
|
241
|
+
let controllerScene: MyScene | null = null;
|
|
242
|
+
onMounted(() => {
|
|
243
|
+
scene1 = new MyScene(
|
|
244
|
+
controllerSyncRef.value?.querySelector('.canvas-1') as HTMLCanvasElement
|
|
245
|
+
);
|
|
246
|
+
scene2 = new MyScene(
|
|
247
|
+
controllerSyncRef.value?.querySelector('.canvas-2') as HTMLCanvasElement
|
|
248
|
+
);
|
|
249
|
+
controllerScene = new MyScene(
|
|
250
|
+
controllerSyncRef.value?.querySelector(
|
|
251
|
+
'.controller-canvas'
|
|
252
|
+
) as HTMLCanvasElement
|
|
253
|
+
);
|
|
254
|
+
scene1.addFloor();
|
|
255
|
+
scene1.addEnvMapTexture();
|
|
256
|
+
scene2.addGridHelper();
|
|
257
|
+
scene2.setBackgroundColor(new Color(0x333333));
|
|
258
|
+
|
|
259
|
+
playMotion();
|
|
260
|
+
|
|
261
|
+
// 同步两个场景的控制器(观察者模式)
|
|
262
|
+
controllerScene?.controls?.addEventListener('change', () => {
|
|
263
|
+
scene1?.controls?.object.copy(controllerScene?.controls!.object!);
|
|
264
|
+
scene2?.controls?.object.copy(controllerScene?.controls!.object!);
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// 记录 FPS ——————————————————————————————————————————————— 记录 FPS ————————————
|
|
268
|
+
const setFPS = (_fps: number) => (fps.value = _fps);
|
|
269
|
+
|
|
270
|
+
let count = 0;
|
|
271
|
+
let prevTimestamp = 0;
|
|
272
|
+
|
|
273
|
+
(function animate(timestamp: number) {
|
|
274
|
+
prevTimestamp = timestamp;
|
|
275
|
+
count++;
|
|
276
|
+
// 间隔超过 1s,将之前计算的 count 输出
|
|
277
|
+
if (timestamp - prevTimestamp >= 1000) {
|
|
278
|
+
setFPS(count);
|
|
279
|
+
count = 0;
|
|
280
|
+
}
|
|
281
|
+
// ——————————————————————————————————————————————————————————— 记录 FPS ——
|
|
282
|
+
|
|
283
|
+
const delta = MyScene.clock.getDelta();
|
|
284
|
+
scene1?.mixer?.update(delta);
|
|
285
|
+
scene2?.mixer?.update(delta);
|
|
286
|
+
|
|
287
|
+
if (scene1!.action) {
|
|
288
|
+
sliderMaxValue.value =
|
|
289
|
+
scene1!.action.getClip().duration * fps.value;
|
|
290
|
+
// 只有加了这个才能保证同步,注意注意
|
|
291
|
+
scene2!.action!.time = scene1!.action.time;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
scene1?.controls?.update();
|
|
295
|
+
scene2?.controls?.update();
|
|
296
|
+
scene1?.renderer?.render(scene1.scene, scene1.camera!);
|
|
297
|
+
scene2?.renderer?.render(scene2.scene, scene2.camera!);
|
|
298
|
+
requestAnimationFrame((timestamp) => animate(timestamp));
|
|
299
|
+
})(new Date().getTime());
|
|
300
|
+
});
|
|
301
|
+
</script>
|
|
302
|
+
|
|
303
|
+
<template>
|
|
304
|
+
<div class="controller-sync" ref="controller-sync">
|
|
305
|
+
<div class="canvas-1-container">
|
|
306
|
+
<canvas class="canvas-1" />
|
|
307
|
+
<canvas class="controller-canvas" />
|
|
308
|
+
</div>
|
|
309
|
+
<canvas class="canvas-2" />
|
|
310
|
+
<div class="mark" v-show="isLoading">
|
|
311
|
+
<p>加载中...</p>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</template>
|
|
315
|
+
|
|
316
|
+
<style scoped lang="scss">
|
|
317
|
+
.controller-sync {
|
|
318
|
+
position: relative;
|
|
319
|
+
|
|
320
|
+
.mark {
|
|
321
|
+
position: absolute;
|
|
322
|
+
inset: 0;
|
|
323
|
+
display: flex;
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
gap: 20px;
|
|
328
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
329
|
+
backdrop-filter: blur(10px);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.canvas-1-container {
|
|
333
|
+
width: 300px;
|
|
334
|
+
height: 200px;
|
|
335
|
+
position: relative;
|
|
336
|
+
|
|
337
|
+
.controller-canvas {
|
|
338
|
+
position: absolute;
|
|
339
|
+
inset: 0;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
.canvas-2 {
|
|
343
|
+
width: 300px;
|
|
344
|
+
height: 200px;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DemoBox from '@/components/DemoBox/DemoBox.vue';
|
|
3
|
+
import PageLayout from '@/components/PageLayout.vue';
|
|
4
|
+
import Using from './Using.vue';
|
|
5
|
+
import src from './Using.vue?raw';
|
|
6
|
+
|
|
7
|
+
const section = ['凤凰模型'];
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<PageLayout :section="section">
|
|
12
|
+
<DemoBox :code="src" :libs="['three']" title="凤凰模型">
|
|
13
|
+
<Using />
|
|
14
|
+
<template #description> Three.js 凤凰模型展示</template>
|
|
15
|
+
</DemoBox>
|
|
16
|
+
</PageLayout>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { EThreeUtil } from 'exploria-ui';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { AmbientLight } from 'three';
|
|
5
|
+
import { onMounted, onUnmounted, useTemplateRef } from 'vue';
|
|
6
|
+
const threeDRef = useTemplateRef<HTMLCanvasElement>('threeDRef');
|
|
7
|
+
|
|
8
|
+
// 组件挂载时初始化
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
const clock = new THREE.Clock();
|
|
11
|
+
const scene = new THREE.Scene();
|
|
12
|
+
scene.add(new AmbientLight(0xffffff, 4)); // 添加环境光
|
|
13
|
+
const canvas = threeDRef.value!;
|
|
14
|
+
canvas.width = canvas.offsetWidth;
|
|
15
|
+
canvas.height = canvas.offsetHeight;
|
|
16
|
+
const camera = EThreeUtil.createCamera(canvas);
|
|
17
|
+
camera.position.set(0, 0, 400);
|
|
18
|
+
let mixer: THREE.AnimationMixer | null = null;
|
|
19
|
+
// 渲染器
|
|
20
|
+
const renderer = EThreeUtil.createWebGLRenderer(canvas);
|
|
21
|
+
let animationId: ReturnType<typeof requestAnimationFrame>;
|
|
22
|
+
// 动画循环
|
|
23
|
+
function animate() {
|
|
24
|
+
mixer?.update(clock.getDelta());
|
|
25
|
+
renderer.render(scene, camera);
|
|
26
|
+
animationId = requestAnimationFrame(animate);
|
|
27
|
+
}
|
|
28
|
+
animate();
|
|
29
|
+
|
|
30
|
+
// 组件卸载时清理
|
|
31
|
+
onUnmounted(() => {
|
|
32
|
+
cancelAnimationFrame(animationId);
|
|
33
|
+
renderer.dispose();
|
|
34
|
+
});
|
|
35
|
+
EThreeUtil.loadGlb('/threejs/model/fenghuang/source/phoenix_bird.glb').then(
|
|
36
|
+
(gltf) => {
|
|
37
|
+
gltf.scene.scale.set(-0.4, 0.4, 0.4);
|
|
38
|
+
gltf.scene.position.set(190, -50, 0);
|
|
39
|
+
gltf.scene.rotation.set((20 * Math.PI) / 180, 0, 0);
|
|
40
|
+
scene.add(gltf.scene);
|
|
41
|
+
|
|
42
|
+
mixer = new THREE.AnimationMixer(gltf.scene);
|
|
43
|
+
mixer.clipAction(gltf.animations[0]).play();
|
|
44
|
+
|
|
45
|
+
const action = mixer.clipAction(
|
|
46
|
+
new THREE.AnimationClip('xxx', 3, [
|
|
47
|
+
new THREE.KeyframeTrack(
|
|
48
|
+
'.position',
|
|
49
|
+
[0, 3],
|
|
50
|
+
[
|
|
51
|
+
[450, -50, 0],
|
|
52
|
+
[190, -50, 0],
|
|
53
|
+
].flat()
|
|
54
|
+
),
|
|
55
|
+
new THREE.KeyframeTrack(
|
|
56
|
+
'.scale',
|
|
57
|
+
[0, 3],
|
|
58
|
+
[
|
|
59
|
+
[-0.5, 0.5, 0.5],
|
|
60
|
+
[-0.4, 0.4, 0.4],
|
|
61
|
+
].flat()
|
|
62
|
+
),
|
|
63
|
+
])
|
|
64
|
+
);
|
|
65
|
+
action.setLoop(THREE.LoopOnce, 1);
|
|
66
|
+
action.play();
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
</script>
|
|
71
|
+
<template>
|
|
72
|
+
<canvas class="three-d" ref="threeDRef" />
|
|
73
|
+
</template>
|
|
74
|
+
<style lang="scss" scoped>
|
|
75
|
+
.three-d {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 500px;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/* -------------- 5. 生命周期钩子 -------------- */
|
|
3
|
+
import {
|
|
4
|
+
onBeforeMount,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
onMounted,
|
|
7
|
+
onUnmounted,
|
|
8
|
+
onUpdated,
|
|
9
|
+
onActivated,
|
|
10
|
+
onBeforeUpdate,
|
|
11
|
+
onDeactivated,
|
|
12
|
+
onErrorCaptured,
|
|
13
|
+
} from 'vue';
|
|
14
|
+
|
|
15
|
+
console.log('[setup] 同步执行,此时组件实例已创建,但尚未挂载');
|
|
16
|
+
|
|
17
|
+
onBeforeMount(() => console.log('[onBeforeMount] 挂载前,DOM 还未生成'));
|
|
18
|
+
onMounted(() => console.log('[onMounted] 挂载完成,DOM 已生成'));
|
|
19
|
+
|
|
20
|
+
onBeforeUpdate(() =>
|
|
21
|
+
console.log('[onBeforeUpdate] 数据改变,DOM 尚未重新渲染')
|
|
22
|
+
);
|
|
23
|
+
onUpdated(() => console.log('[onUpdated] DOM 重新渲染完成'));
|
|
24
|
+
|
|
25
|
+
onBeforeUnmount(() => console.log('[onBeforeUnmount] 卸载前,DOM 还存在'));
|
|
26
|
+
onUnmounted(() => console.log('[onUnmounted] 卸载完成,DOM 已销毁'));
|
|
27
|
+
|
|
28
|
+
/* -------------- 6. 仅对 KeepAlive 有用 -------------- */
|
|
29
|
+
onActivated(() => console.log('[onActivated] 被 KeepAlive 缓存后激活'));
|
|
30
|
+
onDeactivated(() => console.log('[onDeactivated] 被 KeepAlive 缓存后失活'));
|
|
31
|
+
|
|
32
|
+
/* -------------- 7. 错误捕获 -------------- */
|
|
33
|
+
onErrorCaptured((err, instance, info) => {
|
|
34
|
+
console.warn('[onErrorCaptured]', err, info, instance);
|
|
35
|
+
return true; // 返回 true 阻止错误继续向上传播
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div>请看控制台的输出</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DemoBox from '@/components/DemoBox/DemoBox.vue';
|
|
3
|
+
import UsingCode from './Using.vue?raw';
|
|
4
|
+
import Using from './Using.vue';
|
|
5
|
+
import PageLayout from '@/components/PageLayout.vue';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PageLayout>
|
|
10
|
+
<DemoBox :code="UsingCode" :libs="['vue3']" title="基本用法">
|
|
11
|
+
<Using />
|
|
12
|
+
<template #description> Key 对组件生命周期的影响 </template>
|
|
13
|
+
</DemoBox>
|
|
14
|
+
</PageLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* 适用于一次性返回所有内容的场景
|
|
4
|
+
*/
|
|
5
|
+
import { ref } from 'vue';
|
|
6
|
+
import Child from './Child.vue';
|
|
7
|
+
|
|
8
|
+
const key = ref(0);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="using" ref="using">
|
|
13
|
+
<button @click="key++">Key++</button>
|
|
14
|
+
<Child :key="key" />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DemoBox from '@/components/DemoBox/DemoBox.vue';
|
|
3
|
+
import src from './Using.vue?raw';
|
|
4
|
+
import Using from './Using.vue';
|
|
5
|
+
import PageLayout from '@/components/PageLayout.vue';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PageLayout>
|
|
10
|
+
<DemoBox :code="src" title="高精度百分比">
|
|
11
|
+
<Using />
|
|
12
|
+
</DemoBox>
|
|
13
|
+
</PageLayout>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { init } from 'echarts';
|
|
3
|
+
import { EEchartsUtil } from 'exploria-ui';
|
|
4
|
+
import { onMounted, useTemplateRef } from 'vue';
|
|
5
|
+
const usingRef = useTemplateRef<HTMLDivElement>('usingRef');
|
|
6
|
+
const data = [
|
|
7
|
+
{ value: 1, name: 'A' },
|
|
8
|
+
{ value: 999999999, name: 'B' },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const options = (
|
|
12
|
+
percentFormatter: (value: number, percent: number) => string
|
|
13
|
+
) => {
|
|
14
|
+
return {
|
|
15
|
+
tooltip: {
|
|
16
|
+
trigger: 'item',
|
|
17
|
+
formatter: (params: {
|
|
18
|
+
name: string;
|
|
19
|
+
value: number;
|
|
20
|
+
percent: number;
|
|
21
|
+
}) => {
|
|
22
|
+
const { name, value, percent } = params;
|
|
23
|
+
return `${name} - ${percentFormatter(value, percent)}%`;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
series: [
|
|
27
|
+
{
|
|
28
|
+
type: 'pie',
|
|
29
|
+
data,
|
|
30
|
+
label: {
|
|
31
|
+
show: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
legend: {
|
|
36
|
+
show: true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
const chart1 = usingRef.value!.querySelector('.chart-1') as HTMLElement;
|
|
43
|
+
const chart2 = usingRef.value!.querySelector('.chart-2') as HTMLElement;
|
|
44
|
+
|
|
45
|
+
const echart1 = init(chart1);
|
|
46
|
+
const echart2 = init(chart2);
|
|
47
|
+
|
|
48
|
+
echart1.setOption(options((_, percent) => percent.toString()));
|
|
49
|
+
echart2.setOption(
|
|
50
|
+
options((value, percent) => {
|
|
51
|
+
return EEchartsUtil.getPieHighPrecisionPercent(
|
|
52
|
+
value,
|
|
53
|
+
percent,
|
|
54
|
+
data,
|
|
55
|
+
6
|
|
56
|
+
);
|
|
57
|
+
})
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<div class="using" ref="usingRef">
|
|
64
|
+
<div class="chart-1"></div>
|
|
65
|
+
<div class="chart-2"></div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<style scoped lang="scss">
|
|
70
|
+
.using {
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 10px;
|
|
73
|
+
|
|
74
|
+
.chart-1,
|
|
75
|
+
.chart-2 {
|
|
76
|
+
flex: 1;
|
|
77
|
+
height: 400px;
|
|
78
|
+
border: solid 1px rgba(149, 149, 149, 0.49);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DemoBox from '@/components/DemoBox/DemoBox.vue';
|
|
3
|
+
import src from './Using.vue?raw';
|
|
4
|
+
import Using from './Using.vue';
|
|
5
|
+
import PageLayout from '@/components/PageLayout.vue';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PageLayout>
|
|
10
|
+
<DemoBox :code="src" title="镜像图片">
|
|
11
|
+
<Using />
|
|
12
|
+
<template #description> Three.js 基础用法</template>
|
|
13
|
+
</DemoBox>
|
|
14
|
+
</PageLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import { EImageUtil } from 'exploria-ui';
|
|
4
|
+
|
|
5
|
+
const src = ref<string>(new URL('./author_avatar.png', import.meta.url).href);
|
|
6
|
+
const mirror = () => {
|
|
7
|
+
EImageUtil.mirror(src.value).then((res) => {
|
|
8
|
+
src.value = URL.createObjectURL(res);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="using">
|
|
15
|
+
<button @click="mirror">镜像图片</button>
|
|
16
|
+
<img :src="src" alt="" />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<style scoped lang="scss">
|
|
21
|
+
img {
|
|
22
|
+
height: 100px;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DemoBox from '@/components/DemoBox/DemoBox.vue';
|
|
3
|
+
import src from './Using.vue?raw';
|
|
4
|
+
import Using from './Using.vue';
|
|
5
|
+
import PageLayout from '@/components/PageLayout.vue';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PageLayout>
|
|
10
|
+
<DemoBox :code="src" title="镜像图片">
|
|
11
|
+
<Using />
|
|
12
|
+
<template #description> Three.js 基础用法</template>
|
|
13
|
+
</DemoBox>
|
|
14
|
+
</PageLayout>
|
|
15
|
+
</template>
|