@quicktvui/ai 1.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/README.md +36 -0
- package/index.js +2 -0
- package/package.json +23 -0
- package/postinstall.js +61 -0
- package/rules/.claude/commands/create-component.md +39 -0
- package/rules/.claude/commands/create-page.md +44 -0
- package/rules/.claude/commands/create-project.md +25 -0
- package/rules/.claude/commands/lookup-api.md +28 -0
- package/rules/.claude/commands/lookup-css.md +53 -0
- package/rules/.claude/settings.local.json +11 -0
- package/rules/.clinerules +367 -0
- package/rules/.cursorrules +367 -0
- package/rules/.docs/examples/component/animation/alpha-props.vue +130 -0
- package/rules/.docs/examples/component/animation/alpha.vue +169 -0
- package/rules/.docs/examples/component/animation/animator-props.vue +101 -0
- package/rules/.docs/examples/component/animation/animators-props.vue +145 -0
- package/rules/.docs/examples/component/animation/animators.vue +322 -0
- package/rules/.docs/examples/component/animation/basic.vue +96 -0
- package/rules/.docs/examples/component/animation/interpolator.vue +330 -0
- package/rules/.docs/examples/component/animation/listener.vue +151 -0
- package/rules/.docs/examples/component/animation/repeat.vue +113 -0
- package/rules/.docs/examples/component/animation/rotation-props.vue +148 -0
- package/rules/.docs/examples/component/animation/rotation-xy.vue +255 -0
- package/rules/.docs/examples/component/animation/rotation.vue +188 -0
- package/rules/.docs/examples/component/animation/scale-props.vue +129 -0
- package/rules/.docs/examples/component/animation/scale.vue +169 -0
- package/rules/.docs/examples/component/animation/translation-props.vue +128 -0
- package/rules/.docs/examples/component/animation/translation.vue +169 -0
- package/rules/.docs/examples/component/aside/basic.vue +34 -0
- package/rules/.docs/examples/component/audio-player/basic.vue +104 -0
- package/rules/.docs/examples/component/audio-player/event-global.vue +492 -0
- package/rules/.docs/examples/component/audio-player/event.vue +447 -0
- package/rules/.docs/examples/component/audio-player/player-manager.vue +100 -0
- package/rules/.docs/examples/component/audio-player-service/basic.vue +102 -0
- package/rules/.docs/examples/component/audio-player-service/event-global.vue +488 -0
- package/rules/.docs/examples/component/audio-player-service/event.vue +420 -0
- package/rules/.docs/examples/component/audio-player-service/player-manager.vue +100 -0
- package/rules/.docs/examples/component/button/background.vue +28 -0
- package/rules/.docs/examples/component/button/basic.vue +13 -0
- package/rules/.docs/examples/component/button/border.vue +18 -0
- package/rules/.docs/examples/component/button/custom-content.vue +18 -0
- package/rules/.docs/examples/component/button/custom-icon-style.vue +25 -0
- package/rules/.docs/examples/component/button/custom-icon.vue +19 -0
- package/rules/.docs/examples/component/button/custom-net-icon.vue +20 -0
- package/rules/.docs/examples/component/button/custom-style.vue +17 -0
- package/rules/.docs/examples/component/button/custom-text.vue +23 -0
- package/rules/.docs/examples/component/button/disabled.vue +13 -0
- package/rules/.docs/examples/component/button/round.vue +13 -0
- package/rules/.docs/examples/component/button/size.vue +16 -0
- package/rules/.docs/examples/component/button/square.vue +13 -0
- package/rules/.docs/examples/component/checkbox-group/basic.vue +97 -0
- package/rules/.docs/examples/component/collapse/basic.vue +156 -0
- package/rules/.docs/examples/component/column/basic.vue +15 -0
- package/rules/.docs/examples/component/container/layout-ahm.vue +48 -0
- package/rules/.docs/examples/component/container/layout-ahmf.vue +51 -0
- package/rules/.docs/examples/component/container/layout-am.vue +43 -0
- package/rules/.docs/examples/component/container/layout-ham.vue +48 -0
- package/rules/.docs/examples/component/container/layout-hamf.vue +53 -0
- package/rules/.docs/examples/component/container/layout-hm.vue +43 -0
- package/rules/.docs/examples/component/container/layout-hmf.vue +46 -0
- package/rules/.docs/examples/component/dialog/basic.vue +72 -0
- package/rules/.docs/examples/component/div/background-img.vue +49 -0
- package/rules/.docs/examples/component/div/background.vue +28 -0
- package/rules/.docs/examples/component/div/basic.vue +28 -0
- package/rules/.docs/examples/component/div/border.vue +72 -0
- package/rules/.docs/examples/component/div/click.vue +66 -0
- package/rules/.docs/examples/component/div/focus-background.vue +60 -0
- package/rules/.docs/examples/component/div/focus.vue +58 -0
- package/rules/.docs/examples/component/div/gradient-background.vue +36 -0
- package/rules/.docs/examples/component/footer/basic.vue +34 -0
- package/rules/.docs/examples/component/grid-view/basic.vue +59 -0
- package/rules/.docs/examples/component/grid-view/page.vue +80 -0
- package/rules/.docs/examples/component/grid-view/ref-base.vue +50 -0
- package/rules/.docs/examples/component/grid-view/ref-page.vue +102 -0
- package/rules/.docs/examples/component/header/basic.vue +39 -0
- package/rules/.docs/examples/component/html/alert.vue +28 -0
- package/rules/.docs/examples/component/html/audio.vue +24 -0
- package/rules/.docs/examples/component/html/h.vue +30 -0
- package/rules/.docs/examples/component/html/sound.vue +33 -0
- package/rules/.docs/examples/component/html/video.vue +23 -0
- package/rules/.docs/examples/component/image/assets.vue +40 -0
- package/rules/.docs/examples/component/image/network.vue +36 -0
- package/rules/.docs/examples/component/img/assets.vue +40 -0
- package/rules/.docs/examples/component/img/network.vue +36 -0
- package/rules/.docs/examples/component/indicator-list-view/basic.vue +476 -0
- package/rules/.docs/examples/component/input/basic.vue +26 -0
- package/rules/.docs/examples/component/list-view/basic.vue +58 -0
- package/rules/.docs/examples/component/list-view/ref-basic.vue +33 -0
- package/rules/.docs/examples/component/list-view/ref-operations.vue +58 -0
- package/rules/.docs/examples/component/list-view/ref-page.vue +82 -0
- package/rules/.docs/examples/component/loading/basic.vue +12 -0
- package/rules/.docs/examples/component/lottie/basic.vue +83 -0
- package/rules/.docs/examples/component/lottie/event.vue +126 -0
- package/rules/.docs/examples/component/lottie/local.vue +90 -0
- package/rules/.docs/examples/component/lottie/network.vue +82 -0
- package/rules/.docs/examples/component/main/basic.vue +34 -0
- package/rules/.docs/examples/component/nav-bar/basic.vue +45 -0
- package/rules/.docs/examples/component/p/basic.vue +40 -0
- package/rules/.docs/examples/component/p/gravity.vue +62 -0
- package/rules/.docs/examples/component/player-manager/aspect-ratio.vue +286 -0
- package/rules/.docs/examples/component/player-manager/basic.vue +87 -0
- package/rules/.docs/examples/component/player-manager/control.vue +356 -0
- package/rules/.docs/examples/component/player-manager/custom-player-view.vue +105 -0
- package/rules/.docs/examples/component/player-manager/custom-player.vue +100 -0
- package/rules/.docs/examples/component/player-manager/decode.vue +218 -0
- package/rules/.docs/examples/component/player-manager/definition.vue +199 -0
- package/rules/.docs/examples/component/player-manager/event-global.vue +581 -0
- package/rules/.docs/examples/component/player-manager/event.vue +632 -0
- package/rules/.docs/examples/component/player-manager/image-player.vue +331 -0
- package/rules/.docs/examples/component/player-manager/media-item-interceptor.vue +105 -0
- package/rules/.docs/examples/component/player-manager/media-item-list-interceptor.vue +104 -0
- package/rules/.docs/examples/component/player-manager/media-item-list.vue +268 -0
- package/rules/.docs/examples/component/player-manager/media-source-interceptor.vue +115 -0
- package/rules/.docs/examples/component/player-manager/media-source-list-interceptor.vue +111 -0
- package/rules/.docs/examples/component/player-manager/multi-player.vue +130 -0
- package/rules/.docs/examples/component/player-manager/play-mode.vue +260 -0
- package/rules/.docs/examples/component/player-manager/play-rate.vue +244 -0
- package/rules/.docs/examples/component/player-manager/player-size.vue +119 -0
- package/rules/.docs/examples/component/player-manager/player-view.vue +381 -0
- package/rules/.docs/examples/component/player-manager/post-roll-ad.vue +189 -0
- package/rules/.docs/examples/component/player-manager/previous-roll-ad.vue +172 -0
- package/rules/.docs/examples/component/player-manager/start-position.vue +108 -0
- package/rules/.docs/examples/component/player-manager/text-left-player.vue +306 -0
- package/rules/.docs/examples/component/player-manager/text-right-player.vue +306 -0
- package/rules/.docs/examples/component/player-manager/window.vue +140 -0
- package/rules/.docs/examples/component/poster/basic.vue +144 -0
- package/rules/.docs/examples/component/poster/corner.vue +123 -0
- package/rules/.docs/examples/component/poster/decoration.vue +82 -0
- package/rules/.docs/examples/component/poster/float-title.vue +103 -0
- package/rules/.docs/examples/component/poster/ripple.vue +118 -0
- package/rules/.docs/examples/component/poster/score.vue +108 -0
- package/rules/.docs/examples/component/poster/shadow.vue +113 -0
- package/rules/.docs/examples/component/poster/shimmer.vue +113 -0
- package/rules/.docs/examples/component/poster/sub-title.vue +110 -0
- package/rules/.docs/examples/component/poster/title.vue +106 -0
- package/rules/.docs/examples/component/progress-bar/basic.vue +61 -0
- package/rules/.docs/examples/component/qr-code/basic.vue +16 -0
- package/rules/.docs/examples/component/radio-group/basic.vue +105 -0
- package/rules/.docs/examples/component/rating-bar/basic.vue +152 -0
- package/rules/.docs/examples/component/row/basic.vue +15 -0
- package/rules/.docs/examples/component/seek-bar/bar.vue +49 -0
- package/rules/.docs/examples/component/seek-bar/basic.vue +191 -0
- package/rules/.docs/examples/component/seek-bar/indicator.vue +74 -0
- package/rules/.docs/examples/component/seek-bar/range-mode.vue +130 -0
- package/rules/.docs/examples/component/seek-bar/single-mode.vue +113 -0
- package/rules/.docs/examples/component/seek-bar/step.vue +186 -0
- package/rules/.docs/examples/component/seek-bar/thumb.vue +148 -0
- package/rules/.docs/examples/component/seek-bar/tick-mark.vue +121 -0
- package/rules/.docs/examples/component/switch/basic.vue +26 -0
- package/rules/.docs/examples/component/tabs/basic.vue +109 -0
- package/rules/.docs/examples/component/tabs/custom-tab-item.vue +120 -0
- package/rules/.docs/examples/component/tabs/data.vue +121 -0
- package/rules/.docs/examples/component/tabs/horizontal.vue +118 -0
- package/rules/.docs/examples/component/tabs/item-add.vue +127 -0
- package/rules/.docs/examples/component/tabs/item-custom.vue +132 -0
- package/rules/.docs/examples/component/tabs/item-delete.vue +123 -0
- package/rules/.docs/examples/component/tabs/item-get.vue +124 -0
- package/rules/.docs/examples/component/tabs/item-update.vue +129 -0
- package/rules/.docs/examples/component/tabs/ref-basic.vue +63 -0
- package/rules/.docs/examples/component/tabs/ref-operations.vue +97 -0
- package/rules/.docs/examples/component/tabs/ref-page.vue +89 -0
- package/rules/.docs/examples/component/tabs/section-add.vue +138 -0
- package/rules/.docs/examples/component/tabs/section-delete.vue +126 -0
- package/rules/.docs/examples/component/tabs/section-get.vue +128 -0
- package/rules/.docs/examples/component/tabs/section-update.vue +137 -0
- package/rules/.docs/examples/component/tabs/section-vue.vue +111 -0
- package/rules/.docs/examples/component/tabs/single-tab.vue +112 -0
- package/rules/.docs/examples/component/text/basic.vue +20 -0
- package/rules/.docs/examples/component/text/ellipsize-mode.vue +122 -0
- package/rules/.docs/examples/component/text/gravity.vue +119 -0
- package/rules/.docs/examples/component/video-player/aspect-ratio.vue +242 -0
- package/rules/.docs/examples/component/video-player/basic.vue +82 -0
- package/rules/.docs/examples/component/video-player/control.vue +240 -0
- package/rules/.docs/examples/component/video-player/decode.vue +174 -0
- package/rules/.docs/examples/component/video-player/definition.vue +194 -0
- package/rules/.docs/examples/component/video-player/event-global.vue +89 -0
- package/rules/.docs/examples/component/video-player/event.vue +448 -0
- package/rules/.docs/examples/component/video-player/page.vue +150 -0
- package/rules/.docs/examples/component/video-player/play-mode.vue +220 -0
- package/rules/.docs/examples/component/video-player/play-rate.vue +198 -0
- package/rules/.docs/examples/component/video-player/progress.vue +211 -0
- package/rules/.docs/examples/component/video-player/render.vue +187 -0
- package/rules/.docs/examples/component/video-player/type.vue +133 -0
- package/rules/.docs/examples/component/view/background-img.vue +49 -0
- package/rules/.docs/examples/component/view/background.vue +28 -0
- package/rules/.docs/examples/component/view/basic.vue +28 -0
- package/rules/.docs/examples/component/view/border.vue +72 -0
- package/rules/.docs/examples/component/view/click.vue +66 -0
- package/rules/.docs/examples/component/view/focus-background.vue +60 -0
- package/rules/.docs/examples/component/view/focus.vue +58 -0
- package/rules/.docs/examples/component/view/gradient-background.vue +36 -0
- package/rules/.docs/examples/component/waterfall/basic.vue +167 -0
- package/rules/.docs/examples/component/waterfall/event.vue +154 -0
- package/rules/.docs/examples/component/waterfall/item-add.vue +82 -0
- package/rules/.docs/examples/component/waterfall/item-card-placeholder.vue +67 -0
- package/rules/.docs/examples/component/waterfall/item-card.vue +66 -0
- package/rules/.docs/examples/component/waterfall/item-custom.vue +81 -0
- package/rules/.docs/examples/component/waterfall/item-decoration.vue +63 -0
- package/rules/.docs/examples/component/waterfall/item-delete.vue +90 -0
- package/rules/.docs/examples/component/waterfall/item-get.vue +68 -0
- package/rules/.docs/examples/component/waterfall/item-update.vue +85 -0
- package/rules/.docs/examples/component/waterfall/ref-base.vue +141 -0
- package/rules/.docs/examples/component/waterfall/ref-operations.vue +192 -0
- package/rules/.docs/examples/component/waterfall/section-add.vue +72 -0
- package/rules/.docs/examples/component/waterfall/section-background.vue +94 -0
- package/rules/.docs/examples/component/waterfall/section-blank.vue +62 -0
- package/rules/.docs/examples/component/waterfall/section-card-placeholder.vue +90 -0
- package/rules/.docs/examples/component/waterfall/section-card.vue +83 -0
- package/rules/.docs/examples/component/waterfall/section-custom.vue +68 -0
- package/rules/.docs/examples/component/waterfall/section-decoration.vue +80 -0
- package/rules/.docs/examples/component/waterfall/section-delete.vue +76 -0
- package/rules/.docs/examples/component/waterfall/section-end.vue +91 -0
- package/rules/.docs/examples/component/waterfall/section-get.vue +74 -0
- package/rules/.docs/examples/component/waterfall/section-list.vue +56 -0
- package/rules/.docs/examples/component/waterfall/section-tabs-list.vue +149 -0
- package/rules/.docs/examples/component/waterfall/section-tabs.vue +153 -0
- package/rules/.docs/examples/component/waterfall/section-time.vue +48 -0
- package/rules/.docs/examples/component/waterfall/section-update.vue +118 -0
- package/rules/.docs/examples/component/waterfall/section-vue.vue +81 -0
- package/rules/.docs/examples/component/web-view/basic.vue +54 -0
- package/rules/.docs/examples/component/web-view/js-2-vue.vue +49 -0
- package/rules/.docs/examples/component/web-view/vue-2-js.vue +60 -0
- package/rules/.docs/examples/component/x5-web-view/basic.vue +54 -0
- package/rules/.docs/examples/css/gradient/basic.vue +43 -0
- package/rules/.docs/examples/css/gradient/corner-radii4.vue +86 -0
- package/rules/.docs/examples/css/gradient/corner-radius.vue +86 -0
- package/rules/.docs/examples/css/gradient/orientation.vue +168 -0
- package/rules/.docs/examples/css/gradient/shape.vue +97 -0
- package/rules/.docs/examples/css/gradient/type.vue +83 -0
- package/rules/.docs/examples/guide/router/app.vue +52 -0
- package/rules/.docs/examples/guide/slot/basic.vue +32 -0
- package/rules/.docs/examples/guide/slot/lifecycle.vue +106 -0
- package/rules/.docs/examples/module/action-bar/es-basic.vue +51 -0
- package/rules/.docs/examples/module/action-bar/qt-basic.vue +47 -0
- package/rules/.docs/examples/module/app-list/es-basic.vue +53 -0
- package/rules/.docs/examples/module/app-list/qt-basic.vue +50 -0
- package/rules/.docs/examples/module/audio/es-basic.vue +71 -0
- package/rules/.docs/examples/module/audio/qt-basic.vue +63 -0
- package/rules/.docs/examples/module/brightness/es-basic.vue +118 -0
- package/rules/.docs/examples/module/brightness/qt-basic.vue +115 -0
- package/rules/.docs/examples/module/broadcast/es-basic.vue +340 -0
- package/rules/.docs/examples/module/broadcast/qt-basic.vue +331 -0
- package/rules/.docs/examples/module/content-provider/es-basic.vue +92 -0
- package/rules/.docs/examples/module/content-provider/qt-basic.vue +86 -0
- package/rules/.docs/examples/module/develop/es-basic.vue +45 -0
- package/rules/.docs/examples/module/develop/qt-basic.vue +43 -0
- package/rules/.docs/examples/module/device/es-basic.vue +169 -0
- package/rules/.docs/examples/module/device/qt-basic.vue +166 -0
- package/rules/.docs/examples/module/display/es-basic.vue +45 -0
- package/rules/.docs/examples/module/display/qt-basic.vue +43 -0
- package/rules/.docs/examples/module/download/es-basic.vue +174 -0
- package/rules/.docs/examples/module/download/qt-basic.vue +168 -0
- package/rules/.docs/examples/module/es/es-basic.vue +74 -0
- package/rules/.docs/examples/module/es/qt-basic.vue +74 -0
- package/rules/.docs/examples/module/event-bus/es-emit.vue +31 -0
- package/rules/.docs/examples/module/event-bus/es-off.vue +53 -0
- package/rules/.docs/examples/module/event-bus/es-on.vue +56 -0
- package/rules/.docs/examples/module/event-bus/es-once.vue +47 -0
- package/rules/.docs/examples/module/event-bus/qt-emit.vue +28 -0
- package/rules/.docs/examples/module/event-bus/qt-off.vue +51 -0
- package/rules/.docs/examples/module/event-bus/qt-on.vue +53 -0
- package/rules/.docs/examples/module/event-bus/qt-once.vue +45 -0
- package/rules/.docs/examples/module/file/es-basic.vue +188 -0
- package/rules/.docs/examples/module/iac/es-basic.vue +211 -0
- package/rules/.docs/examples/module/iac/qt-basic.vue +208 -0
- package/rules/.docs/examples/module/key/es-back.vue +32 -0
- package/rules/.docs/examples/module/key/es-dispatch.vue +34 -0
- package/rules/.docs/examples/module/key/es-event.vue +34 -0
- package/rules/.docs/examples/module/local-storage/es-basic.vue +92 -0
- package/rules/.docs/examples/module/local-storage/qt-basic.vue +86 -0
- package/rules/.docs/examples/module/location/es-basic.vue +69 -0
- package/rules/.docs/examples/module/location/qt-basic.vue +67 -0
- package/rules/.docs/examples/module/log/es-basic.vue +45 -0
- package/rules/.docs/examples/module/log/qt-basic.vue +44 -0
- package/rules/.docs/examples/module/network/es-basic.vue +64 -0
- package/rules/.docs/examples/module/network/qt-basic.vue +60 -0
- package/rules/.docs/examples/module/page/es-app-lifecycle.vue +83 -0
- package/rules/.docs/examples/module/page/es-page-lifecycle.vue +80 -0
- package/rules/.docs/examples/module/page/es-page-state.vue +36 -0
- package/rules/.docs/examples/module/permission/es-basic.vue +62 -0
- package/rules/.docs/examples/module/permission/qt-basic.vue +59 -0
- package/rules/.docs/examples/module/plugin/es-basic.vue +71 -0
- package/rules/.docs/examples/module/plugin/qt-basic.vue +69 -0
- package/rules/.docs/examples/module/power/es-basic.vue +45 -0
- package/rules/.docs/examples/module/power/qt-basic.vue +41 -0
- package/rules/.docs/examples/module/runtime/es-basic.vue +42 -0
- package/rules/.docs/examples/module/runtime/qt-basic.vue +40 -0
- package/rules/.docs/examples/module/service/es-basic.vue +34 -0
- package/rules/.docs/examples/module/service/qt-basic.vue +31 -0
- package/rules/.docs/examples/module/share-data/es-basic.vue +266 -0
- package/rules/.docs/examples/module/share-data/qt-basic.vue +259 -0
- package/rules/.docs/examples/module/toast/es-basic.vue +47 -0
- package/rules/.docs/examples/module/toast/qt-basic.vue +44 -0
- package/rules/.docs/examples/module/upload/es-basic.vue +65 -0
- package/rules/.docs/examples/module/upload/qt-basic.vue +63 -0
- package/rules/.docs/examples/module/usb/es-basic.vue +138 -0
- package/rules/.docs/examples/module/usb/qt-basic.vue +135 -0
- package/rules/.docs/examples/module/xlog/es-basic.vue +45 -0
- package/rules/.docs/examples/module/xlog/qt-basic.vue +44 -0
- package/rules/.docs/examples/test/basic.vue +48 -0
- package/rules/.docs/index.md +7 -0
- package/rules/.docs/zh-CN/component/animation/alpha.md +22 -0
- package/rules/.docs/zh-CN/component/animation/animators.md +227 -0
- package/rules/.docs/zh-CN/component/animation/interpolator.md +59 -0
- package/rules/.docs/zh-CN/component/animation/introduction.md +101 -0
- package/rules/.docs/zh-CN/component/animation/listener.md +175 -0
- package/rules/.docs/zh-CN/component/animation/method.md +87 -0
- package/rules/.docs/zh-CN/component/animation/props.md +76 -0
- package/rules/.docs/zh-CN/component/animation/repeat.md +46 -0
- package/rules/.docs/zh-CN/component/animation/rotation-xy.md +17 -0
- package/rules/.docs/zh-CN/component/animation/rotation.md +23 -0
- package/rules/.docs/zh-CN/component/animation/scale.md +24 -0
- package/rules/.docs/zh-CN/component/animation/translation.md +22 -0
- package/rules/.docs/zh-CN/component/app-icon.md +22 -0
- package/rules/.docs/zh-CN/component/aside.md +14 -0
- package/rules/.docs/zh-CN/component/audio-player/basic.md +52 -0
- package/rules/.docs/zh-CN/component/audio-player/installation.md +26 -0
- package/rules/.docs/zh-CN/component/audio-player/introduction.md +12 -0
- package/rules/.docs/zh-CN/component/audio-player/player-manager.md +72 -0
- package/rules/.docs/zh-CN/component/audio-service-player/basic.md +52 -0
- package/rules/.docs/zh-CN/component/audio-service-player/installation.md +26 -0
- package/rules/.docs/zh-CN/component/audio-service-player/introduction.md +13 -0
- package/rules/.docs/zh-CN/component/audio-service-player/player-manager.md +71 -0
- package/rules/.docs/zh-CN/component/button.md +120 -0
- package/rules/.docs/zh-CN/component/card-container.md +24 -0
- package/rules/.docs/zh-CN/component/card.md +17 -0
- package/rules/.docs/zh-CN/component/checkbox-group.md +57 -0
- package/rules/.docs/zh-CN/component/classified-list-view.md +44 -0
- package/rules/.docs/zh-CN/component/collapse.md +45 -0
- package/rules/.docs/zh-CN/component/column.md +26 -0
- package/rules/.docs/zh-CN/component/container.md +81 -0
- package/rules/.docs/zh-CN/component/dialog.md +26 -0
- package/rules/.docs/zh-CN/component/div.md +234 -0
- package/rules/.docs/zh-CN/component/flex-view.md +14 -0
- package/rules/.docs/zh-CN/component/footer.md +14 -0
- package/rules/.docs/zh-CN/component/grid-view.md +221 -0
- package/rules/.docs/zh-CN/component/header.md +15 -0
- package/rules/.docs/zh-CN/component/html/alert.md +14 -0
- package/rules/.docs/zh-CN/component/html/audio.md +37 -0
- package/rules/.docs/zh-CN/component/html/h.md +15 -0
- package/rules/.docs/zh-CN/component/html/installation.md +67 -0
- package/rules/.docs/zh-CN/component/html/introduction.md +10 -0
- package/rules/.docs/zh-CN/component/html/video.md +39 -0
- package/rules/.docs/zh-CN/component/image.md +88 -0
- package/rules/.docs/zh-CN/component/img.md +118 -0
- package/rules/.docs/zh-CN/component/indicator-list-view.md +118 -0
- package/rules/.docs/zh-CN/component/input.md +54 -0
- package/rules/.docs/zh-CN/component/item-store.md +14 -0
- package/rules/.docs/zh-CN/component/item-view.md +14 -0
- package/rules/.docs/zh-CN/component/js-view.md +14 -0
- package/rules/.docs/zh-CN/component/js2vue.md +43 -0
- package/rules/.docs/zh-CN/component/large-list.md +20 -0
- package/rules/.docs/zh-CN/component/li.md +16 -0
- package/rules/.docs/zh-CN/component/list-item.md +34 -0
- package/rules/.docs/zh-CN/component/list-view.md +233 -0
- package/rules/.docs/zh-CN/component/loading.md +22 -0
- package/rules/.docs/zh-CN/component/lottie/assets.md +19 -0
- package/rules/.docs/zh-CN/component/lottie/basic.md +51 -0
- package/rules/.docs/zh-CN/component/lottie/event.md +23 -0
- package/rules/.docs/zh-CN/component/lottie/introduction.md +93 -0
- package/rules/.docs/zh-CN/component/lottie/network.md +12 -0
- package/rules/.docs/zh-CN/component/main.md +14 -0
- package/rules/.docs/zh-CN/component/media-series.md +44 -0
- package/rules/.docs/zh-CN/component/nav-bar.md +51 -0
- package/rules/.docs/zh-CN/component/overview.md +20 -0
- package/rules/.docs/zh-CN/component/p.md +55 -0
- package/rules/.docs/zh-CN/component/play-mark-view.md +25 -0
- package/rules/.docs/zh-CN/component/player/global-event.md +24 -0
- package/rules/.docs/zh-CN/component/player/interceptor.md +48 -0
- package/rules/.docs/zh-CN/component/player/media-player.md +43 -0
- package/rules/.docs/zh-CN/component/player/page-player.md +118 -0
- package/rules/.docs/zh-CN/component/player/player.md +190 -0
- package/rules/.docs/zh-CN/component/player-manager/aspect-ratio.md +51 -0
- package/rules/.docs/zh-CN/component/player-manager/basic.md +69 -0
- package/rules/.docs/zh-CN/component/player-manager/control.md +32 -0
- package/rules/.docs/zh-CN/component/player-manager/custom-control.md +105 -0
- package/rules/.docs/zh-CN/component/player-manager/data-structure.md +29 -0
- package/rules/.docs/zh-CN/component/player-manager/decode.md +46 -0
- package/rules/.docs/zh-CN/component/player-manager/definition.md +85 -0
- package/rules/.docs/zh-CN/component/player-manager/event.md +16 -0
- package/rules/.docs/zh-CN/component/player-manager/global-event.md +304 -0
- package/rules/.docs/zh-CN/component/player-manager/installation.md +33 -0
- package/rules/.docs/zh-CN/component/player-manager/introduction.md +207 -0
- package/rules/.docs/zh-CN/component/player-manager/media-item-interceptor.md +197 -0
- package/rules/.docs/zh-CN/component/player-manager/media-item-list-interceptor.md +189 -0
- package/rules/.docs/zh-CN/component/player-manager/media-item-list.md +31 -0
- package/rules/.docs/zh-CN/component/player-manager/media-source-interceptor.md +166 -0
- package/rules/.docs/zh-CN/component/player-manager/media-source-list-interceptor.md +168 -0
- package/rules/.docs/zh-CN/component/player-manager/mode.md +46 -0
- package/rules/.docs/zh-CN/component/player-manager/multiple-player.md +124 -0
- package/rules/.docs/zh-CN/component/player-manager/player-type.md +38 -0
- package/rules/.docs/zh-CN/component/player-manager/player-view.md +31 -0
- package/rules/.docs/zh-CN/component/player-manager/player.md +73 -0
- package/rules/.docs/zh-CN/component/player-manager/position.md +27 -0
- package/rules/.docs/zh-CN/component/player-manager/rate.md +53 -0
- package/rules/.docs/zh-CN/component/player-manager/size.md +17 -0
- package/rules/.docs/zh-CN/component/player-manager/window.md +65 -0
- package/rules/.docs/zh-CN/component/plugin-view.md +21 -0
- package/rules/.docs/zh-CN/component/poster.md +102 -0
- package/rules/.docs/zh-CN/component/progress-bar.md +347 -0
- package/rules/.docs/zh-CN/component/qr-code.md +23 -0
- package/rules/.docs/zh-CN/component/radio-group.md +57 -0
- package/rules/.docs/zh-CN/component/rating-bar.md +43 -0
- package/rules/.docs/zh-CN/component/replace-child.md +20 -0
- package/rules/.docs/zh-CN/component/ripple-view.md +14 -0
- package/rules/.docs/zh-CN/component/row.md +29 -0
- package/rules/.docs/zh-CN/component/scroll-view.md +21 -0
- package/rules/.docs/zh-CN/component/seek-bar.md +377 -0
- package/rules/.docs/zh-CN/component/surface-view.md +14 -0
- package/rules/.docs/zh-CN/component/swift-list.md +21 -0
- package/rules/.docs/zh-CN/component/swiper-slide.md +18 -0
- package/rules/.docs/zh-CN/component/swiper.md +34 -0
- package/rules/.docs/zh-CN/component/switch.md +37 -0
- package/rules/.docs/zh-CN/component/tabs-view.md +44 -0
- package/rules/.docs/zh-CN/component/tabs.md +286 -0
- package/rules/.docs/zh-CN/component/test.md +58 -0
- package/rules/.docs/zh-CN/component/text.md +115 -0
- package/rules/.docs/zh-CN/component/transition-img.md +22 -0
- package/rules/.docs/zh-CN/component/ul.md +83 -0
- package/rules/.docs/zh-CN/component/video-player/aspect-ratio.md +49 -0
- package/rules/.docs/zh-CN/component/video-player/basic.md +55 -0
- package/rules/.docs/zh-CN/component/video-player/control.md +23 -0
- package/rules/.docs/zh-CN/component/video-player/decode.md +46 -0
- package/rules/.docs/zh-CN/component/video-player/definition.md +85 -0
- package/rules/.docs/zh-CN/component/video-player/event.md +16 -0
- package/rules/.docs/zh-CN/component/video-player/global-event.md +268 -0
- package/rules/.docs/zh-CN/component/video-player/installation.md +33 -0
- package/rules/.docs/zh-CN/component/video-player/introduction.md +18 -0
- package/rules/.docs/zh-CN/component/video-player/mode.md +50 -0
- package/rules/.docs/zh-CN/component/video-player/progress.md +51 -0
- package/rules/.docs/zh-CN/component/video-player/rate.md +53 -0
- package/rules/.docs/zh-CN/component/video-player/render.md +47 -0
- package/rules/.docs/zh-CN/component/video-player/type.md +32 -0
- package/rules/.docs/zh-CN/component/view-pager.md +14 -0
- package/rules/.docs/zh-CN/component/view.md +234 -0
- package/rules/.docs/zh-CN/component/virtual-dom.md +4 -0
- package/rules/.docs/zh-CN/component/virtual.md +8 -0
- package/rules/.docs/zh-CN/component/vue-section.md +29 -0
- package/rules/.docs/zh-CN/component/vue2js.md +47 -0
- package/rules/.docs/zh-CN/component/waterfall.md +447 -0
- package/rules/.docs/zh-CN/component/web-view.md +100 -0
- package/rules/.docs/zh-CN/component/x5web-view.md +100 -0
- package/rules/.docs/zh-CN/cooperation/index.md +6 -0
- package/rules/.docs/zh-CN/css/color/gradient.md +111 -0
- package/rules/.docs/zh-CN/css/color/hsl.md +11 -0
- package/rules/.docs/zh-CN/css/color/name.md +151 -0
- package/rules/.docs/zh-CN/css/color/rgb.md +16 -0
- package/rules/.docs/zh-CN/css/color/transparent.md +9 -0
- package/rules/.docs/zh-CN/css/layout/align-items.md +13 -0
- package/rules/.docs/zh-CN/css/layout/align-self.md +12 -0
- package/rules/.docs/zh-CN/css/layout/background-position-x.md +12 -0
- package/rules/.docs/zh-CN/css/layout/background-position-y.md +12 -0
- package/rules/.docs/zh-CN/css/layout/background-size.md +12 -0
- package/rules/.docs/zh-CN/css/layout/collapsable.md +13 -0
- package/rules/.docs/zh-CN/css/layout/display.md +12 -0
- package/rules/.docs/zh-CN/css/layout/flex-basis.md +12 -0
- package/rules/.docs/zh-CN/css/layout/flex-direction.md +15 -0
- package/rules/.docs/zh-CN/css/layout/flex-grow.md +15 -0
- package/rules/.docs/zh-CN/css/layout/flex-shrink.md +12 -0
- package/rules/.docs/zh-CN/css/layout/flex-wrap.md +12 -0
- package/rules/.docs/zh-CN/css/layout/flex.md +12 -0
- package/rules/.docs/zh-CN/css/layout/height.md +12 -0
- package/rules/.docs/zh-CN/css/layout/justify-content.md +12 -0
- package/rules/.docs/zh-CN/css/layout/left.md +13 -0
- package/rules/.docs/zh-CN/css/layout/line-height.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-bottom.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-horizontal.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-left.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-right.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-top.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin-vertical.md +12 -0
- package/rules/.docs/zh-CN/css/layout/margin.md +12 -0
- package/rules/.docs/zh-CN/css/layout/max-height.md +10 -0
- package/rules/.docs/zh-CN/css/layout/max-width.md +10 -0
- package/rules/.docs/zh-CN/css/layout/min-height.md +10 -0
- package/rules/.docs/zh-CN/css/layout/min-width.md +10 -0
- package/rules/.docs/zh-CN/css/layout/overflow.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-bottom.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-horizontal.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-left.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-right.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-top.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding-vertical.md +12 -0
- package/rules/.docs/zh-CN/css/layout/padding.md +12 -0
- package/rules/.docs/zh-CN/css/layout/position.md +14 -0
- package/rules/.docs/zh-CN/css/layout/right.md +13 -0
- package/rules/.docs/zh-CN/css/layout/text-align.md +12 -0
- package/rules/.docs/zh-CN/css/layout/top.md +12 -0
- package/rules/.docs/zh-CN/css/layout/width.md +12 -0
- package/rules/.docs/zh-CN/css/layout/z-index.md +12 -0
- package/rules/.docs/zh-CN/css/overview.md +8 -0
- package/rules/.docs/zh-CN/css/style/background-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-bottom-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-bottom-left-radius.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-bottom-right-radius.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-bottom-width.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-left-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-left-width.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-radius.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-right-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-right-width.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-style.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-top-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-top-left-radius.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-top-right-radius.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-top-width.md +10 -0
- package/rules/.docs/zh-CN/css/style/border-width.md +10 -0
- package/rules/.docs/zh-CN/css/style/box-shadow.md +10 -0
- package/rules/.docs/zh-CN/css/style/color.md +10 -0
- package/rules/.docs/zh-CN/css/style/font-family.md +10 -0
- package/rules/.docs/zh-CN/css/style/font-size.md +10 -0
- package/rules/.docs/zh-CN/css/style/font-style.md +10 -0
- package/rules/.docs/zh-CN/css/style/font-weight.md +10 -0
- package/rules/.docs/zh-CN/css/style/letter-spacing.md +10 -0
- package/rules/.docs/zh-CN/css/style/opacity.md +10 -0
- package/rules/.docs/zh-CN/css/style/text-decoration-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/text-decoration-line.md +10 -0
- package/rules/.docs/zh-CN/css/style/text-decoration.md +12 -0
- package/rules/.docs/zh-CN/css/style/tint-color.md +10 -0
- package/rules/.docs/zh-CN/css/style/visibility.md +10 -0
- package/rules/.docs/zh-CN/guide/basic/appendix.md +35 -0
- package/rules/.docs/zh-CN/guide/basic/dev-debug.md +94 -0
- package/rules/.docs/zh-CN/guide/basic/dev-tools.md +22 -0
- package/rules/.docs/zh-CN/guide/basic/installation.md +144 -0
- package/rules/.docs/zh-CN/guide/basic/language.md +10 -0
- package/rules/.docs/zh-CN/guide/basic/package-manager.md +8 -0
- package/rules/.docs/zh-CN/guide/basic/quick-start.md +150 -0
- package/rules/.docs/zh-CN/guide/changelog.md +20 -0
- package/rules/.docs/zh-CN/guide/commit-examples.md +90 -0
- package/rules/.docs/zh-CN/guide/compile/obfuscator.md +56 -0
- package/rules/.docs/zh-CN/guide/compile/pack.md +8 -0
- package/rules/.docs/zh-CN/guide/compile/resource.md +96 -0
- package/rules/.docs/zh-CN/guide/compile/split-chunks.md +66 -0
- package/rules/.docs/zh-CN/guide/dark-mode.md +84 -0
- package/rules/.docs/zh-CN/guide/design.md +34 -0
- package/rules/.docs/zh-CN/guide/dev-faq.md +41 -0
- package/rules/.docs/zh-CN/guide/dev-guide.md +55 -0
- package/rules/.docs/zh-CN/guide/device/ch.md +18 -0
- package/rules/.docs/zh-CN/guide/device/haier.md +12 -0
- package/rules/.docs/zh-CN/guide/device/hisense.md +24 -0
- package/rules/.docs/zh-CN/guide/device/huawei.md +16 -0
- package/rules/.docs/zh-CN/guide/device/konka.md +12 -0
- package/rules/.docs/zh-CN/guide/device/le.md +19 -0
- package/rules/.docs/zh-CN/guide/device/skyworth.md +25 -0
- package/rules/.docs/zh-CN/guide/device/tcl.md +21 -0
- package/rules/.docs/zh-CN/guide/device/tencent.md +24 -0
- package/rules/.docs/zh-CN/guide/device/tmall.md +18 -0
- package/rules/.docs/zh-CN/guide/device/xiaomi.md +46 -0
- package/rules/.docs/zh-CN/guide/faq/dev-faq.md +100 -0
- package/rules/.docs/zh-CN/guide/faq/develop-faq.md +39 -0
- package/rules/.docs/zh-CN/guide/faq/launch-params-faq.md +119 -0
- package/rules/.docs/zh-CN/guide/faq/layout-style-faq.md +66 -0
- package/rules/.docs/zh-CN/guide/focus/auto-focus.md +94 -0
- package/rules/.docs/zh-CN/guide/focus/basic.md +133 -0
- package/rules/.docs/zh-CN/guide/focus/debug-tool.md +40 -0
- package/rules/.docs/zh-CN/guide/focus/focus-method.md +317 -0
- package/rules/.docs/zh-CN/guide/focus/list-auto-focus.md +94 -0
- package/rules/.docs/zh-CN/guide/focus/request-focus.md +10 -0
- package/rules/.docs/zh-CN/guide/interaction/click.md +39 -0
- package/rules/.docs/zh-CN/guide/interaction/focus.md +44 -0
- package/rules/.docs/zh-CN/guide/key/back.md +65 -0
- package/rules/.docs/zh-CN/guide/key/dispatch-key-event.md +41 -0
- package/rules/.docs/zh-CN/guide/key/key-event.md +87 -0
- package/rules/.docs/zh-CN/guide/layout/adapter.md +33 -0
- package/rules/.docs/zh-CN/guide/layout/layout.md +42 -0
- package/rules/.docs/zh-CN/guide/layout/style.md +64 -0
- package/rules/.docs/zh-CN/guide/layout/theming.md +154 -0
- package/rules/.docs/zh-CN/guide/migration.md +25 -0
- package/rules/.docs/zh-CN/guide/namespace.md +69 -0
- package/rules/.docs/zh-CN/guide/nav.md +73 -0
- package/rules/.docs/zh-CN/guide/network/axios.md +47 -0
- package/rules/.docs/zh-CN/guide/network/fetch.md +70 -0
- package/rules/.docs/zh-CN/guide/network/websocket.md +107 -0
- package/rules/.docs/zh-CN/guide/node/install.md +179 -0
- package/rules/.docs/zh-CN/guide/npm/install.md +74 -0
- package/rules/.docs/zh-CN/guide/overview.md +41 -0
- package/rules/.docs/zh-CN/guide/page/application-lifecycle.md +37 -0
- package/rules/.docs/zh-CN/guide/page/lifecycle.md +32 -0
- package/rules/.docs/zh-CN/guide/page/page-lifecycle.md +35 -0
- package/rules/.docs/zh-CN/guide/page/page-state.md +31 -0
- package/rules/.docs/zh-CN/guide/page/type.md +49 -0
- package/rules/.docs/zh-CN/guide/publish/hub.md +31 -0
- package/rules/.docs/zh-CN/guide/publish/release-apk.md +51 -0
- package/rules/.docs/zh-CN/guide/publish/release-rpk.md +45 -0
- package/rules/.docs/zh-CN/guide/router/async.md +25 -0
- package/rules/.docs/zh-CN/guide/router/entry.md +60 -0
- package/rules/.docs/zh-CN/guide/router/error.md +25 -0
- package/rules/.docs/zh-CN/guide/router/install.md +70 -0
- package/rules/.docs/zh-CN/guide/router/introduction.md +35 -0
- package/rules/.docs/zh-CN/guide/router/launch.md +88 -0
- package/rules/.docs/zh-CN/guide/router/limit.md +33 -0
- package/rules/.docs/zh-CN/guide/router/native.md +104 -0
- package/rules/.docs/zh-CN/guide/router/result.md +42 -0
- package/rules/.docs/zh-CN/guide/sfc-component/async-component.md +88 -0
- package/rules/.docs/zh-CN/guide/sfc-component/native-component.md +127 -0
- package/rules/.docs/zh-CN/guide/slot/develop.md +42 -0
- package/rules/.docs/zh-CN/guide/slot/install.md +59 -0
- package/rules/.docs/zh-CN/guide/slot/introduction.md +45 -0
- package/rules/.docs/zh-CN/guide/slot/lifecycle.md +18 -0
- package/rules/.docs/zh-CN/guide/slot/project.md +22 -0
- package/rules/.docs/zh-CN/guide/test.md +8 -0
- package/rules/.docs/zh-CN/guide/theming.md +254 -0
- package/rules/.docs/zh-CN/guide/translation.md +39 -0
- package/rules/.docs/zh-CN/index.md +9 -0
- package/rules/.docs/zh-CN/module/action-bar.md +32 -0
- package/rules/.docs/zh-CN/module/app-list.md +57 -0
- package/rules/.docs/zh-CN/module/audio.md +45 -0
- package/rules/.docs/zh-CN/module/brightness.md +33 -0
- package/rules/.docs/zh-CN/module/broadcast.md +77 -0
- package/rules/.docs/zh-CN/module/content-provider.md +64 -0
- package/rules/.docs/zh-CN/module/develop.md +45 -0
- package/rules/.docs/zh-CN/module/device.md +108 -0
- package/rules/.docs/zh-CN/module/display.md +33 -0
- package/rules/.docs/zh-CN/module/download.md +97 -0
- package/rules/.docs/zh-CN/module/es.md +74 -0
- package/rules/.docs/zh-CN/module/event-bus.md +68 -0
- package/rules/.docs/zh-CN/module/file.md +62 -0
- package/rules/.docs/zh-CN/module/iac.md +51 -0
- package/rules/.docs/zh-CN/module/local-storage.md +35 -0
- package/rules/.docs/zh-CN/module/location.md +48 -0
- package/rules/.docs/zh-CN/module/log.md +52 -0
- package/rules/.docs/zh-CN/module/network.md +77 -0
- package/rules/.docs/zh-CN/module/overview.md +10 -0
- package/rules/.docs/zh-CN/module/permission.md +42 -0
- package/rules/.docs/zh-CN/module/plugin.md +38 -0
- package/rules/.docs/zh-CN/module/power.md +51 -0
- package/rules/.docs/zh-CN/module/runtime.md +41 -0
- package/rules/.docs/zh-CN/module/service.md +33 -0
- package/rules/.docs/zh-CN/module/share-data.md +85 -0
- package/rules/.docs/zh-CN/module/toast.md +30 -0
- package/rules/.docs/zh-CN/module/upload.md +53 -0
- package/rules/.docs/zh-CN/module/usb.md +52 -0
- package/rules/.docs/zh-CN/module/xlog.md +48 -0
- package/rules/.docs/zh-CN/resource/runtime.md +88 -0
- package/rules/.docs/zh-CN/resource/test-flight.md +27 -0
- package/rules/.docs/zh-CN/runtime/runtime.md +81 -0
- package/rules/.docs/zh-CN/runtime/test-flight.md +23 -0
- package/rules/.docs/zh-CN/sample/ai-dev.md +250 -0
- package/rules/.docs/zh-CN/sample/api-demo.md +26 -0
- package/rules/.docs/zh-CN/sample/app-list.md +12 -0
- package/rules/.docs/zh-CN/sample/hello-tv.md +98 -0
- package/rules/.docs/zh-CN/sdk/cus_component.md +249 -0
- package/rules/.docs/zh-CN/sdk/cus_module.md +163 -0
- package/rules/.docs/zh-CN/sdk/cus_splash.md +97 -0
- package/rules/.docs/zh-CN/sdk/empty.md +0 -0
- package/rules/.docs/zh-CN/sdk/first_implementation.md +15 -0
- package/rules/.docs/zh-CN/sdk/first_init.md +13 -0
- package/rules/.docs/zh-CN/sdk/first_start_app.md +4 -0
- package/rules/.docs/zh-CN/sdk/light-card.md +116 -0
- package/rules/.docs/zh-CN/sdk/overview.md +5 -0
- package/rules/.docs/zh-CN/tool/api/overview.md +103 -0
- package/rules/.docs/zh-CN/tool/cli/adb.md +32 -0
- package/rules/.docs/zh-CN/tool/cli/build.md +14 -0
- package/rules/.docs/zh-CN/tool/cli/clean.md +12 -0
- package/rules/.docs/zh-CN/tool/cli/config.md +37 -0
- package/rules/.docs/zh-CN/tool/cli/create.md +28 -0
- package/rules/.docs/zh-CN/tool/cli/debug.md +30 -0
- package/rules/.docs/zh-CN/tool/cli/info.md +14 -0
- package/rules/.docs/zh-CN/tool/cli/installation.md +12 -0
- package/rules/.docs/zh-CN/tool/cli/introduction.md +26 -0
- package/rules/.docs/zh-CN/tool/cli/logcat.md +10 -0
- package/rules/.docs/zh-CN/tool/cli/migrate.md +12 -0
- package/rules/.docs/zh-CN/tool/cli/pack.md +14 -0
- package/rules/.docs/zh-CN/tool/cli/preview.md +18 -0
- package/rules/.docs/zh-CN/tool/cli/publish.md +12 -0
- package/rules/.docs/zh-CN/tool/cli/setup.md +58 -0
- package/rules/.docs/zh-CN/tool/cli/start.md +54 -0
- package/rules/.docs/zh-CN/tool/cli/test.md +22 -0
- package/rules/.docs/zh-CN/tool/cli/upgrade.md +12 -0
- package/rules/.github/copilot-instructions.md +456 -0
- package/rules/.windsurfrules +367 -0
- package/rules/AGENTS.md +456 -0
- package/rules/AI_HANDOFF.md +376 -0
- package/rules/CLAUDE.md +836 -0
- package/rules/GEMINI.md +463 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Adapter'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 适配
|
|
7
|
+
|
|
8
|
+
## 开发尺寸
|
|
9
|
+
|
|
10
|
+
::: warning 注意: 实际中根据 1920x1080 的开发尺寸进行设计、布局。
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
框架本身会自动拉伸适配其他电视屏幕尺寸。
|
|
14
|
+
|
|
15
|
+
## 长度单位
|
|
16
|
+
|
|
17
|
+
::: warning 注意: 仅使用 px 来设定单位。暂不支持百分比等其它的长度值,只支持具体数值。
|
|
18
|
+
:::
|
|
19
|
+
|
|
20
|
+
例如:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
#div {
|
|
24
|
+
margin-left: 10px;
|
|
25
|
+
width: 100px;
|
|
26
|
+
height: 60px;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
``` vue
|
|
31
|
+
<div style="{width: '100px',height:'60px'}">
|
|
32
|
+
</div>
|
|
33
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Layout'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 布局
|
|
7
|
+
|
|
8
|
+
* [点击查看支持的布局](/zh-CN/css/overview)
|
|
9
|
+
* [点击查看布局样式相关问题](/zh-CN/guide/faq/layout-style-faq)
|
|
10
|
+
|
|
11
|
+
::: warning 注意:
|
|
12
|
+
* ***布局中基础组件都需要明确指定组件的宽高尺寸***
|
|
13
|
+
|
|
14
|
+
* ***仅使用 px 来设定单位。暂不支持百分比等其它的长度值,只支持具体数值。***
|
|
15
|
+
:::
|
|
16
|
+
|
|
17
|
+
## 盒子模型
|
|
18
|
+
|
|
19
|
+
布局样式用`CSS`的盒模型构建。 绘制布局的时,引擎会根据 `CSS-Box` 模型将所有元素表示为一个矩形盒子,样式配置决定这些盒子的`大小`,`位置`以及`属性` (颜色,背景,边框尺寸...)。
|
|
20
|
+
使用标准盒模型描述这些矩形盒子中的每一个元素。
|
|
21
|
+
这个模型描述了元素所占空间的内容。每个盒子有四个边:`外边距边`, `边框边`, `内填充边` 与 `内容边`。
|
|
22
|
+
|
|
23
|
+
[box-sizing参考文档](https://developer.mozilla.org/zh-CN/docs/Web/CSS/box-sizing)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<img src="/guide/layout/border-box.png">
|
|
27
|
+
|
|
28
|
+
## 布局(Flex)
|
|
29
|
+
|
|
30
|
+
默认采用现在移动端最流行的 `Flex` 布局。
|
|
31
|
+
因为仅支持 `Flex` 布局,所以不需要手写 `display: flex` 即可使用。
|
|
32
|
+
`Flex` 布局与 `Web` 的 `Flex` 类似,它们都旨在提供一个更加有效的方式制定、调整和分布一个容器里的项目布局,即使他们的大小是未知或者是动态的。
|
|
33
|
+
`Flex` 规定了弹性元素如何伸长或缩短,以适应`flex容器`中的可用空间。
|
|
34
|
+
|
|
35
|
+
[CSS教程文档参考](https://www.w3cplus.com/css3/a-visual-guide-to-css3-flexbox-properties.html)
|
|
36
|
+
|
|
37
|
+
::: warning 注意:
|
|
38
|
+
|
|
39
|
+
***1、默认使用 flex 布局***
|
|
40
|
+
|
|
41
|
+
***2、flex 布局中`flex-direction`默认值为`column`***
|
|
42
|
+
:::
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Style'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 样式
|
|
7
|
+
|
|
8
|
+
* [点击查看支持的样式](/zh-CN/css/overview)
|
|
9
|
+
* [点击查看布局样式相关问题](/zh-CN/guide/faq/layout-style-faq)
|
|
10
|
+
|
|
11
|
+
::: warning 注意:
|
|
12
|
+
* ***布局中基础组件都需要明确指定组件的宽高尺寸***
|
|
13
|
+
|
|
14
|
+
* ***仅使用 px 来设定单位。暂不支持百分比等其它的长度值,只支持具体数值。***
|
|
15
|
+
:::
|
|
16
|
+
|
|
17
|
+
## 样式主要依靠 css、sass、less 样式来实现。
|
|
18
|
+
|
|
19
|
+
::: warning 注意:目前仅支持基本的 ID、Class、Tag 选择器,而且可以支持基本的嵌套关系,其余选择器和 scoped 还未支持。
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
|
|
24
|
+
<div class="div" />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
|
|
29
|
+
.div {
|
|
30
|
+
width: 100px;
|
|
31
|
+
height: 100px;
|
|
32
|
+
background-color: red;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 只支持部分CSS样式
|
|
37
|
+
|
|
38
|
+
::: warning 注意:
|
|
39
|
+
|
|
40
|
+
***1、不支持的 CSS 样式如下:***
|
|
41
|
+
* `background`
|
|
42
|
+
* `% 百分比尺寸`
|
|
43
|
+
* `auto`
|
|
44
|
+
* `!important`
|
|
45
|
+
|
|
46
|
+
***2、不支持 CSS 自定义属性(变量):***
|
|
47
|
+
|
|
48
|
+
```css
|
|
49
|
+
element {
|
|
50
|
+
background-color: var(--main-bg-color);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
***3、不支持 CSS 复合属性写法:***
|
|
55
|
+
|
|
56
|
+
```css
|
|
57
|
+
element {
|
|
58
|
+
margin: 5px 10px 20px 15px;
|
|
59
|
+
padding: 5px 10px;
|
|
60
|
+
font: oblique bold 16px Helvetica, Arial, Sans-Serif;
|
|
61
|
+
border: 2px 5px 10px 3px;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
:::
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Theming'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 自定义主题
|
|
7
|
+
|
|
8
|
+
QuickTVUI 默认提供一套主题,CSS 命名采用 BEM 的风格,方便使用者覆盖样式。 但是如果需要大规模替换样式,例如: 将主题颜色从蓝色改为橙色或绿色,也许一个个将其覆盖起来不是一个好主意。
|
|
9
|
+
|
|
10
|
+
我们提供通过 SCSS 变量的方法来改变样式变量。
|
|
11
|
+
|
|
12
|
+
`theme-chalk` 使用SCSS编写而成。
|
|
13
|
+
你可以在 [`packages/theme-chalk/src/common/var.scss`](https://github.com/quicktvui/quicktvui/blob/dev/packages/theme-chalk/src/common/var.scss)
|
|
14
|
+
文件中查找SCSS变量。
|
|
15
|
+
|
|
16
|
+
:::warning
|
|
17
|
+
|
|
18
|
+
我们使用 sass 模块 ([sass:map](https://sass-lang.com/documentation/values/maps)...) 和 `@use` 来重构所有的 SCSS 变量。 通过对所有 SCSS
|
|
19
|
+
变量使用 `@use` ,解决了由 `@import` 造成的重复输出问题。
|
|
20
|
+
|
|
21
|
+
> [介绍 Sass 模块 | CSS-TRICKS](https://css-tricks.com/introducing-sass-modules/)
|
|
22
|
+
|
|
23
|
+
例如,我们使用 `$colors` 作为 map 来保存不同类型的颜色。
|
|
24
|
+
|
|
25
|
+
今后,我们将为每个组件自定义的变量编写文档。
|
|
26
|
+
你也可以直接查看源代码 [var.scss](https://github.com/element-plus/element-plus/blob/dev/packages/theme-chalk/src/common/var.scss)
|
|
27
|
+
|
|
28
|
+
:::
|
|
29
|
+
|
|
30
|
+
```scss
|
|
31
|
+
$colors: () !default;
|
|
32
|
+
$colors: map.deep-merge(
|
|
33
|
+
(
|
|
34
|
+
'white': #ffffff,
|
|
35
|
+
'black': #000000,
|
|
36
|
+
'primary': (
|
|
37
|
+
'base': #409eff,
|
|
38
|
+
),
|
|
39
|
+
'success': (
|
|
40
|
+
'base': #67c23a,
|
|
41
|
+
),
|
|
42
|
+
'warning': (
|
|
43
|
+
'base': #e6a23c,
|
|
44
|
+
),
|
|
45
|
+
'danger': (
|
|
46
|
+
'base': #f56c6c,
|
|
47
|
+
),
|
|
48
|
+
'error': (
|
|
49
|
+
'base': #f56c6c,
|
|
50
|
+
),
|
|
51
|
+
'info': (
|
|
52
|
+
'base': #909399,
|
|
53
|
+
),
|
|
54
|
+
),
|
|
55
|
+
$colors
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 如何覆盖它?
|
|
60
|
+
|
|
61
|
+
如果您的项目也使用了 SCSS,可以直接修改 QuickTVUI 的样式变量。 新建一个样式文件,例如
|
|
62
|
+
`./src/styles/quicktvui/index.scss`:
|
|
63
|
+
|
|
64
|
+
:::warning
|
|
65
|
+
|
|
66
|
+
您应该使用 `@use 'xxx.scss' as *;` 代替 `@import 'xxx.scss';`.
|
|
67
|
+
|
|
68
|
+
因为 sass 团队说他们最终会删除 `@import` 语法。
|
|
69
|
+
|
|
70
|
+
> [Sass: @use](https://sass-lang.com/documentation/at-rules/use) vs [Sass: @import](https://sass-lang.com/documentation/at-rules/import)
|
|
71
|
+
|
|
72
|
+
:::
|
|
73
|
+
|
|
74
|
+
```scss
|
|
75
|
+
// styles/quicktvui/index.scss
|
|
76
|
+
/* 只需要重写你需要的即可 */
|
|
77
|
+
@forward 'quicktvui/theme-chalk/src/common/var.scss' with (
|
|
78
|
+
$bg-color: (
|
|
79
|
+
'normal': gold,
|
|
80
|
+
'focus': red,
|
|
81
|
+
'select': #ffffff,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
// 如果只是按需导入,则可以忽略以下内容。
|
|
86
|
+
// 如果你想导入所有样式:
|
|
87
|
+
// @use "quicktvui/theme-chalk/src/index.scss" as *;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
然后在你的项目入口文件中,导入这个样式文件以替换 QuickTVUI 内置的 CSS:
|
|
91
|
+
|
|
92
|
+
:::tip
|
|
93
|
+
|
|
94
|
+
在 `quicktvui scss` 文件之前导入 quicktvui/index.scss 以避免 sass 混合变量的问题,因为我们需要通过你的自定义变量生成 light-x。
|
|
95
|
+
|
|
96
|
+
:::
|
|
97
|
+
|
|
98
|
+
创建一个 `quicktvui/index.scss`文件来合并你的变量和 quicktvui 的变量。 (如果你在 TypeScript 中导入了它们,他们将不会被合并)
|
|
99
|
+
|
|
100
|
+
:::tip
|
|
101
|
+
|
|
102
|
+
除此以外,你应该将你的 scss 文件与 quicktvui 变量的 scss 文件区分开来。 如果将它们混合在一起,`QuickTVUI` 每次热更新都需要编译大量的 scss 文件,这将会导致编译速度变慢。
|
|
103
|
+
|
|
104
|
+
:::
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
import { createApp } from 'vue'
|
|
108
|
+
import './src/styles/quicktvui/index.scss'
|
|
109
|
+
import QuickTVUI from 'quicktvui'
|
|
110
|
+
import App from './App.vue'
|
|
111
|
+
|
|
112
|
+
const app: ESApp = createESApp(App, router)
|
|
113
|
+
app.use(QuickTVUI)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
如果您正在使用 webpack,并且需要在按需导入时自定义主题。
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
// webpack.config.ts
|
|
120
|
+
// use unplugin-quicktvui
|
|
121
|
+
|
|
122
|
+
import QuickTVUI from 'unplugin-quicktvui/webpack'
|
|
123
|
+
|
|
124
|
+
export default defineConfig({
|
|
125
|
+
css: {
|
|
126
|
+
loaderOptions: {
|
|
127
|
+
scss: {
|
|
128
|
+
additionalData: `@use "~/styles/quicktvui/index.scss" as *;`,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
plugins: [
|
|
133
|
+
QuickTVUI({
|
|
134
|
+
useSource: true,
|
|
135
|
+
}),
|
|
136
|
+
],
|
|
137
|
+
module: {
|
|
138
|
+
rules: [
|
|
139
|
+
{
|
|
140
|
+
test: /\.(sc|c)ss$/,
|
|
141
|
+
use: [
|
|
142
|
+
cssLoader,
|
|
143
|
+
{
|
|
144
|
+
loader: 'sass-loader',
|
|
145
|
+
options: {
|
|
146
|
+
additionalData: `@use "./src/styles/quicktvui/index.scss" as *;`,
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Migration
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migration
|
|
7
|
+
|
|
8
|
+
[This guide](https://github.com/element-plus/element-plus/discussions/5658) will help you upgrade from Element 2.x to QuickTVUI.
|
|
9
|
+
|
|
10
|
+
## Vue 3 migration build
|
|
11
|
+
|
|
12
|
+
You may encounter some issues when using QuickTVUI with Vue 3 migration build. Some of the components rely on Vue 3 internal API's. It's worth trying to adjust compatConfig mode to 3, either globally or [per component in your project](https://v3-migration.vuejs.org/migration-build.html).
|
|
13
|
+
|
|
14
|
+
## Migration Tool :hammer_and_wrench:
|
|
15
|
+
|
|
16
|
+
We have made a migration tool for you to migrate your project from [Element UI](https://element.eleme.io) to QuickTVUI.
|
|
17
|
+
You can find the [gogo code migration tool](https://github.com/thx/gogocode/tree/main/packages/gogocode-plugin-element) here.
|
|
18
|
+
|
|
19
|
+
We have tested this on [Vue Element Admin](https://github.com/PanJiaChen/vue-element-admin) (Vue 2 + Element UI). You can find the transpiled code [here](https://github.com/gogocodeio/vue-element-admin).
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
details {
|
|
23
|
+
margin-top: 8px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Custom Namespace
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Custom namespace ^(2.2.0)
|
|
7
|
+
|
|
8
|
+
:::tip
|
|
9
|
+
|
|
10
|
+
We provide a example in [element-plus-vite-starter](https://github.com/element-plus/element-plus-vite-starter).
|
|
11
|
+
Just check it.
|
|
12
|
+
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
Default namespace is `el`.
|
|
16
|
+
In special cases, we may need to customize its namespace.
|
|
17
|
+
|
|
18
|
+
Since we use sass to write styles, if you want to customize all namespaces.
|
|
19
|
+
We have to assume that you already use sass.
|
|
20
|
+
|
|
21
|
+
You must set `ElConfigProvider` and scss `$namespace` at the same time.
|
|
22
|
+
|
|
23
|
+
### Set `ElConfigProvider`
|
|
24
|
+
|
|
25
|
+
Use `ElConfigProvider` wrap your root component.
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<!-- App.vue -->
|
|
29
|
+
<template>
|
|
30
|
+
<el-config-provider namespace="ep">
|
|
31
|
+
<!-- ... -->
|
|
32
|
+
</el-config-provider>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Set Scss & Css Vars
|
|
37
|
+
|
|
38
|
+
Create `styles/element/index.scss`:
|
|
39
|
+
|
|
40
|
+
```scss
|
|
41
|
+
// styles/element/index.scss
|
|
42
|
+
// we can add this to custom namespace, default is 'el'
|
|
43
|
+
@forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
|
|
44
|
+
$namespace: 'ep'
|
|
45
|
+
);
|
|
46
|
+
// ...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Import `styles/element/index.scss` in `vite.config.ts`:
|
|
50
|
+
|
|
51
|
+
> The same is true for webpack, which needs to be set in `preprocessorOptions`.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { defineConfig } from 'vite'
|
|
55
|
+
// https://vitejs.dev/config/
|
|
56
|
+
export default defineConfig({
|
|
57
|
+
// ...
|
|
58
|
+
css: {
|
|
59
|
+
preprocessorOptions: {
|
|
60
|
+
scss: {
|
|
61
|
+
additionalData: `@use "~/styles/element/index.scss" as *;`,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
// ...
|
|
66
|
+
})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
That's all.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Navigation
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<style>
|
|
7
|
+
:root {
|
|
8
|
+
--categories-c-bg: #F9FAFC;
|
|
9
|
+
--categories-c-page: #E5E9F2;
|
|
10
|
+
--categories-c-overlay: white;
|
|
11
|
+
--categories-c-text: #99A9BF;
|
|
12
|
+
--categories-c-icon: #E5E9F2;
|
|
13
|
+
--categories-c-line: #E5E9F2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dark {
|
|
17
|
+
--categories-c-bg: #1D1E1F;
|
|
18
|
+
--categories-c-page: #0A0A0A;
|
|
19
|
+
--categories-c-overlay: #141414;
|
|
20
|
+
--categories-c-text: #53637A;
|
|
21
|
+
--categories-c-icon: #2F333D;
|
|
22
|
+
--categories-c-line: #242529;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
|
|
26
|
+
# Navigation
|
|
27
|
+
|
|
28
|
+
Navigation focuses on solving the users' problems of where to go and how to get
|
|
29
|
+
there. Generally it can be categorized into 'sidebar navigation' and 'top navigation'.
|
|
30
|
+
|
|
31
|
+
## Choose the right navigation
|
|
32
|
+
|
|
33
|
+
An appropriate navigation gives users a smooth experience, while an inappropriate
|
|
34
|
+
one leads to confusion. Here are the differences between sidebar navigation and
|
|
35
|
+
top navigation
|
|
36
|
+
|
|
37
|
+
## Side Navigation
|
|
38
|
+
|
|
39
|
+
Affix the navigation at the left edge, thus improves its visibility, making it
|
|
40
|
+
easier to switch between pages. In this case, the top area of the page holds
|
|
41
|
+
commonly used tools, e.g. search bar, help button, notice button, etc. Suitable
|
|
42
|
+
for background management or utility websites.
|
|
43
|
+
|
|
44
|
+
### Level 1 categories
|
|
45
|
+
|
|
46
|
+
Suitable for simply structured sites with only one level of pages. No breadcrumb is needed.
|
|
47
|
+
|
|
48
|
+
<L1Categories />
|
|
49
|
+
|
|
50
|
+
### Level 2 categories
|
|
51
|
+
|
|
52
|
+
Sidebar displays up to two levels of navigation. Breadcrumbs are recommended in
|
|
53
|
+
combination of second level navigation, making it easier for the users to locate
|
|
54
|
+
and navigate.
|
|
55
|
+
|
|
56
|
+
<L2Categories />
|
|
57
|
+
|
|
58
|
+
### Level 3 categories
|
|
59
|
+
|
|
60
|
+
Suitable for complicated utility websites. The left sidebar holds first level
|
|
61
|
+
navigation, and the middle column displays second level navigation or other utility
|
|
62
|
+
options.
|
|
63
|
+
|
|
64
|
+
<L3Categories />
|
|
65
|
+
|
|
66
|
+
## Top Navigation
|
|
67
|
+
|
|
68
|
+
Conforms to the normal browsing order from top to bottom, which makes things more
|
|
69
|
+
natural. The navigation amount and text length are limited to the width of the top.
|
|
70
|
+
|
|
71
|
+
Suitable for sites with few navigation and large chunks.
|
|
72
|
+
|
|
73
|
+
<TopNavigationExample />
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Fetch'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Axios
|
|
7
|
+
|
|
8
|
+
QuickTVUI 使用的是兼容官方`1.7.9`版本的 [`Axios`](https://axios-http.com)。
|
|
9
|
+
|
|
10
|
+
::: warning 注意:
|
|
11
|
+
|
|
12
|
+
* ***兼容官方`1.7.9`版本的 API,[`点击查看 Axios API`](https://axios-http.com/docs/api_intro)***
|
|
13
|
+
* ***不支持`XMLHttpRequest`***
|
|
14
|
+
* ***不支持使用`node`的`http` `https`库***
|
|
15
|
+
:::
|
|
16
|
+
|
|
17
|
+
## 集成
|
|
18
|
+
|
|
19
|
+
### 第一步、`package.json`添加依赖库
|
|
20
|
+
|
|
21
|
+
* `@extscreen/es3-axios`
|
|
22
|
+
|
|
23
|
+
### 第二步、引入`Axios`
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import axios, {AxiosError} from '@extscreen/es3-axios';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 示例
|
|
30
|
+
|
|
31
|
+
````ts
|
|
32
|
+
|
|
33
|
+
axios({
|
|
34
|
+
method: 'get',
|
|
35
|
+
url: 'https://quicktvui.com',
|
|
36
|
+
})
|
|
37
|
+
.then((response) => {
|
|
38
|
+
console.log(response);
|
|
39
|
+
})
|
|
40
|
+
.catch((error) => {
|
|
41
|
+
// handle error
|
|
42
|
+
console.log(error);
|
|
43
|
+
}).finally(() => {
|
|
44
|
+
// always executed
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
````
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Fetch'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fetch
|
|
7
|
+
|
|
8
|
+
提供了跟 W3C 标准基本一致的 [fetch](https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API)
|
|
9
|
+
方法,可以直接参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API)。
|
|
10
|
+
|
|
11
|
+
::: warning 注意:
|
|
12
|
+
* ***fetch 目前仅支持 JSON 对象的传输,别的格式暂时无法支持。***
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
## 发起请求
|
|
16
|
+
|
|
17
|
+
如果需要请求远程地址,只需要在 fetch 函数参数值传入地址即可,如下:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
fetch('//mywebsite.com/mydata.json');
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
fetch 函数也支持 HTTP 请求的配置。
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
fetch('//mywebsite.com/endpoint/', {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
headers: {
|
|
29
|
+
Accept: 'application/json',
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
},
|
|
32
|
+
body: JSON.stringify({
|
|
33
|
+
firstParam: 'yourValue',
|
|
34
|
+
secondParam: 'yourOtherValue',
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
完整的 fetch 请求属性列表可以[点击此处查看](https://developer.mozilla.org/zh-CN/docs/Web/API/Request)。
|
|
40
|
+
|
|
41
|
+
## 处理返回值
|
|
42
|
+
|
|
43
|
+
返回数据将以 [Promise](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise) 的形式返回,示例如下:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
function getMoviesFromApi() {
|
|
47
|
+
return fetch('//mywebsite.com/demo.json')
|
|
48
|
+
.then(rsp => rsp.json())
|
|
49
|
+
.then(json => json.movies)
|
|
50
|
+
.catch(error => console.error(error));
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
可以使用 [async/await](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/async_function) 处理 fetch
|
|
55
|
+
返回的数据。
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
async function getMoviesFromApi() {
|
|
59
|
+
try {
|
|
60
|
+
const rsp = await fetch('//mywebsite.com/demo.json');
|
|
61
|
+
const json = await rsp.json();
|
|
62
|
+
return responseJson.movies;
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error(error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
::: warning 注意:在使用 fetch 发起网络请求的时候,需要记得捕获错误,否则错误会被静默丢弃。
|
|
70
|
+
:::
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'WebSocket'
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WebSocket
|
|
7
|
+
|
|
8
|
+
`WebSocket` 协议可以在单个TCP连接上提供全双工的通信信道,是一种长连接的网络通道。
|
|
9
|
+
|
|
10
|
+
## 方法
|
|
11
|
+
|
|
12
|
+
### constructor
|
|
13
|
+
|
|
14
|
+
`(url: string, protocals: array, extrasHeaders: object)`
|
|
15
|
+
创建一个 WebSocket 对象,并开始向指定的 url 建立 Websocket 连接
|
|
16
|
+
|
|
17
|
+
* `url`: string - WebSocket 的连接地址,以 ws:// 或 wss:// 开头的 url;
|
|
18
|
+
* `protocals`: array - 可选字段,指定WebSocket希望采用的交流协议,array 内部的单个元素为必须为字符串类型,按优先级排序,该字段会最终组装到 WebSocket 的
|
|
19
|
+
Sec-WebSocket-Protocol 请求头中;
|
|
20
|
+
* `extrasHeaders`: object - 可选字段,指定建立 WebSocket 时的一些额外请求头;
|
|
21
|
+
|
|
22
|
+
### close
|
|
23
|
+
|
|
24
|
+
`(code: number, reason: string)`
|
|
25
|
+
主动关闭一条WebSocket,并向对端返回指定的code和reason
|
|
26
|
+
|
|
27
|
+
* `code`: number - 可选字段,WebSocket关闭时,返回给对端的状态码;
|
|
28
|
+
* `reason`: string - 可选字段,WebSocket关闭时,返回给对端的原因描述字符串;
|
|
29
|
+
|
|
30
|
+
### send
|
|
31
|
+
|
|
32
|
+
`(data: string)`
|
|
33
|
+
向对端发送一段数据,现阶段仅支持发送文本数据,注意,请在明确收到 onopen 事件后才能真正发送数据,在连接尚未建立或已关闭的情况下发送数据会导致错误;
|
|
34
|
+
|
|
35
|
+
* `data`: string - 向WebSocket对端发送的字符串数据;
|
|
36
|
+
|
|
37
|
+
## 属性
|
|
38
|
+
|
|
39
|
+
### readyState
|
|
40
|
+
|
|
41
|
+
`number,只读属性`
|
|
42
|
+
当前WebSocket的状态,取值为以下4种:
|
|
43
|
+
|
|
44
|
+
* `0` - WebSocket正在连接中(Connecting);
|
|
45
|
+
* `1` - WebSocket连接建立成功,当前可以收发数据(Open);
|
|
46
|
+
* `2` - WebSocket连接正在关闭(Closing);
|
|
47
|
+
* `3` - WebSocket连接已关闭(Closed);
|
|
48
|
+
|
|
49
|
+
### url
|
|
50
|
+
|
|
51
|
+
`string,只读属性`
|
|
52
|
+
当前 WebSocket 使用的 url
|
|
53
|
+
|
|
54
|
+
### onopen
|
|
55
|
+
|
|
56
|
+
`function,只写属性`
|
|
57
|
+
设置当前 WebSocket 在连接建立成功后的回调函数
|
|
58
|
+
|
|
59
|
+
### onclose
|
|
60
|
+
|
|
61
|
+
`function,只写属性`
|
|
62
|
+
设置当前WebSocket在连接关闭时的回调函数,回调函数带有一个参数(Object类型),参数属性说明如下:
|
|
63
|
+
|
|
64
|
+
* `code` - number,连接关闭的状态码;
|
|
65
|
+
* `reason` - string,连接关闭的原因描述;
|
|
66
|
+
|
|
67
|
+
### onmessage
|
|
68
|
+
|
|
69
|
+
`function,只写属性`
|
|
70
|
+
设置当前 WebSocket 在收到数据时的回调函数,回调函数带有一个参数(Object类型),参数属性说明如下:
|
|
71
|
+
|
|
72
|
+
* `data` - string,实际收到的数据,由于当前WebSocket仅支持字符串数据的收发,这里一定为string类型;
|
|
73
|
+
* `type` - string,收到的数据的类型,当前恒定为‘text’;
|
|
74
|
+
|
|
75
|
+
### onerror
|
|
76
|
+
|
|
77
|
+
`function,只写属性`
|
|
78
|
+
设置当前 WebSocket 在连接出现错误时的回调函数,回调函数带有一个参数(Object类型),参数属性说明如下:
|
|
79
|
+
|
|
80
|
+
* `reason` - string,连接出现错误的的原因描述;
|
|
81
|
+
|
|
82
|
+
## 示例
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
this.ws = new WebSocket("ws://websocket.test.qq.com/websocket");
|
|
86
|
+
this.ws.onopen = () => {
|
|
87
|
+
console.log("WebSocket onOpen");
|
|
88
|
+
this.ws.send("Hello WebSocket")
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
this.ws.onclose = (param) => {
|
|
92
|
+
console.log(`WebSocket onClose: code = ${ param.code }, reason = ${ param.reason}`);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
this.ws.onerror = (param) => {
|
|
96
|
+
console.log(`WebSocket onError: reason = ${ param.reason}`);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
this.ws.onmessage = (message) => {
|
|
100
|
+
console.log(`WebSocket onMessage: data type = ${ message.type}`);
|
|
101
|
+
|
|
102
|
+
// text 类型的回包数据
|
|
103
|
+
if (message.type == 'text') {
|
|
104
|
+
console.log(`WebSocket onMessage: data type = ${ message.data}`);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
```
|