├── .gitignore
├── README.md
├── docs
├── .vuepress
│ ├── .gitignore
│ ├── components
│ │ └── md
│ │ │ ├── banner.vue
│ │ │ └── virtual.vue
│ ├── config.js
│ ├── config
│ │ ├── copy.js
│ │ ├── footer.js
│ │ ├── i18n
│ │ │ └── index.js
│ │ ├── navbar.js
│ │ ├── redirectRouter.js
│ │ ├── searchPage.js
│ │ ├── siderbar
│ │ │ ├── index.js
│ │ │ ├── uni-ad.js
│ │ │ ├── uni-app.js
│ │ │ └── uniCloud.js
│ │ └── toc.js
│ ├── markdown
│ │ ├── createMarkdownArray.js
│ │ ├── createSidebar.js
│ │ ├── createSiteMap.js
│ │ ├── header.js
│ │ ├── img-add-attrs.js
│ │ ├── inject-json-to-md.js
│ │ ├── normallizeLink.js
│ │ └── translate.js
│ ├── public
│ │ ├── h5
│ │ │ ├── hybrid
│ │ │ │ └── html
│ │ │ │ │ └── local.html
│ │ │ ├── index.html
│ │ │ ├── pcguide.html
│ │ │ └── touch-emulator.js
│ │ ├── js
│ │ │ ├── miku.js
│ │ │ └── redirect.js
│ │ ├── miku-delivery-1.2.1.js
│ │ ├── miku-delivery-sw-1.2.1.js
│ │ ├── pc.html
│ │ ├── static
│ │ │ ├── web-view-forum.html
│ │ │ └── web-view.html
│ │ └── svg
│ │ │ └── uni-open-bridge.svg
│ └── utils
│ │ ├── index.js
│ │ ├── uniappApiJson.json
│ │ └── uniappComJson.json
├── 404.md
├── README.md
├── _sidebar.md
├── api
│ ├── README.md
│ ├── _sidebar.md
│ ├── a-d
│ │ ├── content-page.md
│ │ ├── full-screen-video.md
│ │ ├── interactive.md
│ │ ├── interstitial.md
│ │ └── rewarded-video.md
│ ├── application.md
│ ├── arrayBufferToBase64.md
│ ├── base64ToArrayBuffer.md
│ ├── caniuse.md
│ ├── canvas
│ │ ├── CanvasContext.md
│ │ ├── CanvasGradient.md
│ │ ├── canvasGetImageData.md
│ │ ├── canvasPutImageData.md
│ │ ├── canvasToTempFilePath.md
│ │ ├── createCanvasContext.md
│ │ └── createOffscreenCanvas.md
│ ├── create-webview-context.md
│ ├── exit.md
│ ├── extapi.md
│ ├── file
│ │ ├── file.md
│ │ └── getFileSystemManager.md
│ ├── getEnterOptionsSync.md
│ ├── getLaunchOptionsSync.md
│ ├── global.md
│ ├── interceptor.md
│ ├── key.md
│ ├── lifecycle.md
│ ├── location
│ │ ├── location-change.md
│ │ ├── location.md
│ │ ├── map.md
│ │ └── open-location.md
│ ├── log.md
│ ├── media
│ │ ├── audio-context.md
│ │ ├── background-audio-manager.md
│ │ ├── camera-context.md
│ │ ├── editor-context.md
│ │ ├── file.md
│ │ ├── image.md
│ │ ├── live-player-context.md
│ │ ├── live-pusher-context.md
│ │ ├── media-container.md
│ │ ├── record-manager.md
│ │ ├── video-context.md
│ │ └── video.md
│ ├── other
│ │ ├── advertisement.md
│ │ ├── authorize.md
│ │ ├── card.md
│ │ ├── choose-address.md
│ │ ├── get-extconfig.md
│ │ ├── getAccountInfoSync.md
│ │ ├── getEnvInfoSync.md
│ │ ├── invoice-title.md
│ │ ├── open-miniprogram.md
│ │ ├── report.md
│ │ ├── reportAnalytics.md
│ │ ├── reportMonitor.md
│ │ ├── requestSubscribeMessage.md
│ │ ├── set-enable-debug.md
│ │ ├── setting.md
│ │ ├── sport.md
│ │ ├── template.md
│ │ └── update.md
│ ├── plugins
│ │ ├── facialRecognitionVerify.md
│ │ ├── login.md
│ │ ├── payment.md
│ │ ├── provider.md
│ │ ├── push.md
│ │ ├── share.md
│ │ ├── universal-links.md
│ │ ├── virtualPayment.md
│ │ └── voice.md
│ ├── preload-page.md
│ ├── request
│ │ ├── UDP.md
│ │ ├── mDNS.md
│ │ ├── network-file.md
│ │ ├── request.md
│ │ ├── socket-task.md
│ │ └── websocket.md
│ ├── router.md
│ ├── storage
│ │ └── storage.md
│ ├── system
│ │ ├── accelerometer.md
│ │ ├── authentication.md
│ │ ├── barcode.md
│ │ ├── batteryInfo.md
│ │ ├── ble.md
│ │ ├── bluetooth.md
│ │ ├── brightness.md
│ │ ├── capture-screen.md
│ │ ├── clipboard.md
│ │ ├── compass.md
│ │ ├── contact.md
│ │ ├── create-request-permission-listener.md
│ │ ├── deviceMotion.md
│ │ ├── getAppBaseInfo.md
│ │ ├── getDeviceInfo.md
│ │ ├── getWindowInfo.md
│ │ ├── getappauthorizesetting.md
│ │ ├── getsystemsetting.md
│ │ ├── gyroscope.md
│ │ ├── ibeacon.md
│ │ ├── info.md
│ │ ├── memory.md
│ │ ├── network.md
│ │ ├── nfc.md
│ │ ├── openappauthorizesetting.md
│ │ ├── phone.md
│ │ ├── theme.md
│ │ ├── vibrate.md
│ │ └── wifi.md
│ ├── timer.md
│ ├── ui
│ │ ├── adapt.md
│ │ ├── animation.md
│ │ ├── bgcolor.md
│ │ ├── font.md
│ │ ├── intersection-observer.md
│ │ ├── locale.md
│ │ ├── media-query-observer.md
│ │ ├── menuButton.md
│ │ ├── navigationbar.md
│ │ ├── nextTick.md
│ │ ├── nodes-info.md
│ │ ├── prompt.md
│ │ ├── pulldown.md
│ │ ├── scroll.md
│ │ ├── tabbar.md
│ │ └── window.md
│ ├── uniCloud.md
│ ├── window
│ │ ├── communication.md
│ │ ├── subNVues.md
│ │ └── window.md
│ └── worker.md
├── app
│ ├── android-store.md
│ ├── geolocation.md
│ ├── ios
│ │ ├── .keep
│ │ └── dsym.md
│ └── oauth
│ │ ├── oauth-facebook.md
│ │ └── oauth-google.md
├── case.md
├── casecode.md
├── cloud.md
├── collocation
│ ├── App.md
│ ├── _sidebar.md
│ ├── frame
│ │ └── subNVues.md
│ ├── main.md
│ ├── manifest-app.md
│ ├── manifest.md
│ ├── package.md
│ ├── pages.md
│ ├── uni-scss.md
│ ├── vite-config.md
│ └── vue-config.md
├── component
│ ├── README.md
│ ├── _sidebar.md
│ ├── ad-content-page.md
│ ├── ad-draw.md
│ ├── ad-error-code.md
│ ├── ad-fullscreen-video.md
│ ├── ad-grid.md
│ ├── ad-interactive.md
│ ├── ad-interstitial.md
│ ├── ad-rewarded-video.md
│ ├── ad-video.md
│ ├── ad-weixin.md
│ ├── ad.md
│ ├── animation-view.md
│ ├── audio.md
│ ├── barcode.md
│ ├── button.md
│ ├── camera.md
│ ├── canvas.md
│ ├── cell.md
│ ├── checkbox.md
│ ├── component-selection.md
│ ├── cover-image.md
│ ├── cover-view.md
│ ├── custom-tab-bar.md
│ ├── datacom.md
│ ├── editor.md
│ ├── form.md
│ ├── icon.md
│ ├── image.md
│ ├── input.md
│ ├── label.md
│ ├── list.md
│ ├── live-player.md
│ ├── live-pusher.md
│ ├── map.md
│ ├── match-media.md
│ ├── movable-area.md
│ ├── movable-view.md
│ ├── native-component.md
│ ├── navigation-bar.md
│ ├── navigator.md
│ ├── official-account.md
│ ├── open-data.md
│ ├── page-meta.md
│ ├── picker-view.md
│ ├── picker.md
│ ├── progress.md
│ ├── radio.md
│ ├── recycle-list.md
│ ├── refresh.md
│ ├── rich-text.md
│ ├── scroll-view.md
│ ├── slider.md
│ ├── swiper.md
│ ├── switch.md
│ ├── text.md
│ ├── textarea.md
│ ├── uni-ad-unimp.md
│ ├── uniui
│ │ ├── changelog.md
│ │ ├── color.md
│ │ ├── quickstart.md
│ │ ├── resource.md
│ │ ├── uni-badge.md
│ │ ├── uni-breadcrumb.md
│ │ ├── uni-calendar.md
│ │ ├── uni-card.md
│ │ ├── uni-collapse.md
│ │ ├── uni-combox.md
│ │ ├── uni-countdown.md
│ │ ├── uni-data-checkbox.md
│ │ ├── uni-data-picker.md
│ │ ├── uni-data-select.md
│ │ ├── uni-dateformat.md
│ │ ├── uni-datetime-picker.md
│ │ ├── uni-drawer.md
│ │ ├── uni-easyinput.md
│ │ ├── uni-fab.md
│ │ ├── uni-fav.md
│ │ ├── uni-file-picker.md
│ │ ├── uni-forms.md
│ │ ├── uni-goods-nav.md
│ │ ├── uni-grid.md
│ │ ├── uni-group.md
│ │ ├── uni-icons.md
│ │ ├── uni-indexed-list.md
│ │ ├── uni-link.md
│ │ ├── uni-list.md
│ │ ├── uni-load-more.md
│ │ ├── uni-nav-bar.md
│ │ ├── uni-notice-bar.md
│ │ ├── uni-number-box.md
│ │ ├── uni-pagination.md
│ │ ├── uni-popup.md
│ │ ├── uni-rate.md
│ │ ├── uni-row.md
│ │ ├── uni-sass.md
│ │ ├── uni-search-bar.md
│ │ ├── uni-section.md
│ │ ├── uni-segmented-control.md
│ │ ├── uni-steps.md
│ │ ├── uni-swipe-action.md
│ │ ├── uni-swiper-dot.md
│ │ ├── uni-table.md
│ │ ├── uni-tag.md
│ │ ├── uni-title.md
│ │ ├── uni-tooltip.md
│ │ ├── uni-transition.md
│ │ └── uni-ui.md
│ ├── video.md
│ ├── view.md
│ ├── vue-component.md
│ ├── waterfall.md
│ └── web-view.md
├── ecosystem.md
├── faq.md
├── harmony
│ └── dev.md
├── history.md
├── hybrid.md
├── license.md
├── m3w.md
├── matter.md
├── plugin
│ ├── README.md
│ ├── _sidebar.md
│ ├── androidInnerLib.md
│ ├── components-config.md
│ ├── language.md
│ ├── native-plugin.md
│ ├── oath.md
│ ├── open.md
│ ├── plugin-author.md
│ ├── plugin-ext-introduction.md
│ ├── plugin-xss.md
│ ├── publish.md
│ ├── sell.md
│ └── uni_modules.md
├── quickstart-cli.md
├── quickstart-hx.md
├── quickstart.md
├── release-archive.md
├── release-note-alpha-archive.md
├── release-note-alpha.md
├── release.md
├── resource.md
├── select.md
├── template.md
├── translate.md
├── tutorial
│ ├── CORS.md
│ ├── README.md
│ ├── _sidebar.md
│ ├── adapt.md
│ ├── android-gp.md
│ ├── android-store-examination.md
│ ├── android-store-faq.md
│ ├── android-store.md
│ ├── app-android-abifilters.md
│ ├── app-android-antiresigne.md
│ ├── app-android-minsdkversion.md
│ ├── app-android-schemes.md
│ ├── app-android-targetsdkversion.md
│ ├── app-android-x5.md
│ ├── app-base.md
│ ├── app-blureffect.md
│ ├── app-disagreemode.md
│ ├── app-env.md
│ ├── app-facialRecognitionVerify.md
│ ├── app-geolocation.md
│ ├── app-icons.md
│ ├── app-ios-capabilities.md
│ ├── app-ios-dsym.md
│ ├── app-ios-idfa.md
│ ├── app-ios-privacyinfo.md
│ ├── app-ios-schemes.md
│ ├── app-ios-schemewhitelist.md
│ ├── app-ios-uibackgroundmodes.md
│ ├── app-ios-uiwebview.md
│ ├── app-manifest.md
│ ├── app-maps.md
│ ├── app-modules.md
│ ├── app-nativeresource-android.md
│ ├── app-nativeresource-ios.md
│ ├── app-oauth-apple.md
│ ├── app-oauth-facebook-open.md
│ ├── app-oauth-facebook.md
│ ├── app-oauth-google-open.md
│ ├── app-oauth-google.md
│ ├── app-oauth-huawei.md
│ ├── app-oauth-qq.md
│ ├── app-oauth-weibo.md
│ ├── app-oauth-weixin.md
│ ├── app-oauth.md
│ ├── app-pack.md
│ ├── app-payment-aip.md
│ ├── app-payment-alipay.md
│ ├── app-payment-google.md
│ ├── app-payment-paypal-open.md
│ ├── app-payment-paypal.md
│ ├── app-payment-stripe-open.md
│ ├── app-payment-stripe.md
│ ├── app-payment-weixin.md
│ ├── app-payment.md
│ ├── app-permission-android.md
│ ├── app-privacy-android.md
│ ├── app-privacy-detect.md
│ ├── app-push-fcm.md
│ ├── app-push-unipush.md
│ ├── app-push.md
│ ├── app-sec-android.md
│ ├── app-sec-api.md
│ ├── app-sec-confusion.md
│ ├── app-security.md
│ ├── app-share-qq.md
│ ├── app-share-weibo.md
│ ├── app-share-weixin.md
│ ├── app-share.md
│ ├── app-speech.md
│ ├── app-splashscreen.md
│ ├── app-statistic-google.md
│ ├── app-statistic-umeng.md
│ ├── app-statistic.md
│ ├── app-useragent.md
│ ├── app-webview-error.md
│ ├── beian.md
│ ├── build
│ │ ├── AndroidChannel.md
│ │ ├── SafePack.md
│ │ ├── iosSafePack.md
│ │ └── publish-mp-weixin-cli.md
│ ├── compiler-cautions.md
│ ├── compiler-config.md
│ ├── compiler.md
│ ├── darkmode.md
│ ├── debug
│ │ ├── debug-app.md
│ │ ├── debug-mp.md
│ │ ├── debug-web-via-chrome.md
│ │ ├── debug-web-via-hx.md
│ │ ├── uni-uts-debug-harmony.md
│ │ ├── uni-uts-debug-ios.md
│ │ ├── uni-uts-debug.md
│ │ ├── uni-vue-devtools.md
│ │ └── use-chrome-to-debug-android-apps.md
│ ├── djbh.md
│ ├── env.md
│ ├── err-spec.md
│ ├── harmony
│ │ ├── built-in-module.md
│ │ ├── dev-old.md
│ │ ├── dev-v1.md
│ │ ├── dev-v2.md
│ │ ├── dev.md
│ │ ├── history.md
│ │ ├── intro.md
│ │ ├── mp-sdk.md
│ │ ├── native-api.md
│ │ ├── native-component.md
│ │ └── runbuild.md
│ ├── hosting.md
│ ├── i18n.md
│ ├── internationalization.md
│ ├── ios-app-store.md
│ ├── migration-to-vue3.md
│ ├── miniprogram-subject.md
│ ├── mp-harmony
│ │ └── intro.md
│ ├── mp-weixin-plugin-dev.md
│ ├── mp-weixin-plugin.md
│ ├── mp-weixin-user-privacy.md
│ ├── native-js.md
│ ├── nvue-api.md
│ ├── nvue-css.md
│ ├── nvue-event.md
│ ├── nvue-outline.md
│ ├── page-component.md
│ ├── page-json.md
│ ├── page-path.md
│ ├── page-script.md
│ ├── page-static-assets.md
│ ├── page-style.md
│ ├── page.md
│ ├── performance.md
│ ├── platform.md
│ ├── project-concept.md
│ ├── project.md
│ ├── renderjs.md
│ ├── run-and-debug.md
│ ├── run
│ │ ├── OOM.md
│ │ ├── apple-signature-ipa.md
│ │ ├── installSimulator.md
│ │ ├── ios-apple-certificate-signature.md
│ │ ├── mp-log.md
│ │ ├── run-app-android-wifi.md
│ │ ├── run-app-faq.md
│ │ ├── run-app-harmony-moved.md
│ │ ├── run-app-harmony.md
│ │ ├── run-app.md
│ │ ├── run-custom-base-ios-simulator.md
│ │ ├── uts-development-android.md
│ │ └── uts-development-ios.md
│ ├── safe.md
│ ├── snippet.md
│ ├── ssr.md
│ ├── store.md
│ ├── syntax-css.md
│ ├── syntax-js.md
│ ├── syntax-jsx.md
│ ├── typescript-subject.md
│ ├── use-html5plus.md
│ ├── version.md
│ ├── vue-api.md
│ ├── vue-basics.md
│ ├── vue-components.md
│ ├── vue-composition-api.md
│ ├── vue-vuex.md
│ ├── vue3-api.md
│ ├── vue3-basics.md
│ ├── vue3-components.md
│ ├── vue3-composition-api.md
│ ├── vue3-pinia.md
│ ├── vue3-vuex.md
│ └── web-security.md
├── uni-ad
│ ├── README.md
│ ├── _sidebar.md
│ ├── ad-alipay-native.md
│ ├── ad-alipay.md
│ ├── ad-card.md
│ ├── ad-component.md
│ ├── ad-content-page.md
│ ├── ad-draw.md
│ ├── ad-error-code.md
│ ├── ad-fullscreen-video.md
│ ├── ad-grid.md
│ ├── ad-interactive.md
│ ├── ad-interstitial.md
│ ├── ad-rewarded-video.md
│ ├── ad-splash.md
│ ├── ad-video.md
│ ├── ad-weixin-agency.md
│ ├── ad-weixin-dcloud.md
│ ├── ad-weixin-native.md
│ ├── ad-weixin.md
│ ├── release.md
│ ├── uni-ad.md
│ └── unimp.md
├── uni-app-x
│ └── readme.md
├── uni-stat-uniappx.md
├── uni-stat-v1.md
├── uni-stat-v2.md
├── uni-stat.md
├── uniCloud
│ └── README.md
├── unipush-custom-icon.md
├── unipush-v1.md
├── unipush-v2.md
├── unipush.md
├── unipush_vendor_config.md
├── univerify.md
├── use.md
├── user-frv-auth.md
├── vernacular.md
├── vue2-cli-alpha-release.md
├── vue2-cli-release.md
├── vue2-ts-cli-alpha-release.md
├── vue2-ts-cli-release.md
├── vue3-cli-alpha-release.md
├── vue3-cli-release.md
├── vue3-ts-cli-alpha-release.md
├── vue3-ts-cli-release.md
└── worktile
│ ├── CI.md
│ ├── CLI.md
│ ├── README.md
│ ├── _sidebar.md
│ ├── auto
│ ├── api.md
│ ├── hbuilderx-extension
│ │ └── index.md
│ ├── quick-start.md
│ └── uniapp-cli-project.md
│ ├── git-svn.md
│ └── running-env.md
├── package.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | docs/.vuepress/dist
3 | .DS_Store
4 | **/sitemap.xml
5 | docs-lite
6 | dist
7 | docs/.vuepress/.cache
8 | docs/.vuepress/.temp
--------------------------------------------------------------------------------
/docs/.vuepress/.gitignore:
--------------------------------------------------------------------------------
1 | dist
--------------------------------------------------------------------------------
/docs/.vuepress/components/md/virtual.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
50 |
--------------------------------------------------------------------------------
/docs/.vuepress/config/copy.js:
--------------------------------------------------------------------------------
1 | // 此处需要使用 commonjs
2 |
3 | module.exports = {
4 | copyText: '复制代码',
5 | tip: { content: "复制成功", title: "" },
6 | visibleTip: true,
7 | }
--------------------------------------------------------------------------------
/docs/.vuepress/config/i18n/index.js:
--------------------------------------------------------------------------------
1 | export const LOCALE_ZH_HANS = 'zh-CN'
2 | export const LOCALE_EN = 'en-US'
--------------------------------------------------------------------------------
/docs/.vuepress/config/searchPage.js:
--------------------------------------------------------------------------------
1 | export default {
2 | category: [
3 | {
4 | text: 'uni-app',
5 | type: 'algolia',
6 | },
7 | {
8 | text: 'uni-app x',
9 | type: 'algolia',
10 | },
11 | /* {
12 | text: 'uniCloud',
13 | type: 'algolia',
14 | }, */
15 | {
16 | text: '问答社区',
17 | tag: 'ask',
18 | type: 'link',
19 | link: 'https://ask.dcloud.net.cn/search/q-',
20 | },
21 | {
22 | text: '插件市场',
23 | tag: 'ext',
24 | type: 'link',
25 | link: 'https://ext.dcloud.net.cn/search?q=',
26 | },
27 | {
28 | text: '原生开发文档',
29 | type: 'link',
30 | link: 'https://nativesupport.dcloud.net.cn/?s=',
31 | },
32 | {
33 | text: 'HBuilderX 文档',
34 | type: 'link',
35 | link: 'https://hx.dcloud.net.cn/?s=',
36 | },
37 | ],
38 | translations: {
39 | searchBox: {
40 | buttonText: '取消',
41 | placeholder: '搜索内容',
42 | searchBy: '搜索提供者',
43 | },
44 | resultsScreen: {
45 | resultsText: '${resultHits}个相关结果',
46 | noResultsText: '没有找到${categoryText}相关内容',
47 | askNoResultsText: '以下为${categoryText}相关内容',
48 | },
49 | },
50 | extraFacetFilters: ['category:uni-ad广告', 'tag:UTS', 'tag:插件'],
51 | }
52 |
--------------------------------------------------------------------------------
/docs/.vuepress/config/siderbar/index.js:
--------------------------------------------------------------------------------
1 | import uniapp from './uni-app';
2 | import uniCloud from './uniCloud';
3 | import uniAd from './uni-ad';
4 |
5 | export default {
6 | "/": uniapp,
7 | "/uni-ad/": uniAd,
8 | // "/uni-app-x/": uniapp,
9 | // '/uniCloud/': uniCloud,
10 | weChatOfficialAccountImg: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/weixin.jpg'
11 | }
12 |
--------------------------------------------------------------------------------
/docs/.vuepress/config/siderbar/uni-ad.js:
--------------------------------------------------------------------------------
1 | export default {
2 | contacts: [
3 | {
4 | type: 'links',
5 | name: 'uni-ad的uni-im交流群',
6 | imageUrl:
7 | 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/chat-icon-r.png',
8 | items: [
9 | {
10 | name: '点击加入',
11 | url: 'https://im.dcloud.net.cn/#/?joinGroup=65d85fc09847e92db03ff81a',
12 | }
13 | ],
14 | }
15 | ]
16 | };
17 |
--------------------------------------------------------------------------------
/docs/.vuepress/config/siderbar/uniCloud.js:
--------------------------------------------------------------------------------
1 | export default {
2 | contacts: [
3 | {
4 | type: 'link',
5 | items: [
6 | {
7 | name: 'uniCloud Web控制台',
8 | url: 'https://unicloud.dcloud.net.cn',
9 | imageUrl: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/cloud@2x.jpg',
10 | },
11 | {
12 | name: '插件市场',
13 | url: 'https://ext.dcloud.net.cn/',
14 | imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/dev/img/ext/favicon.png',
15 | },
16 | {
17 | name: 'ask问答社区',
18 | url: 'https://ask.dcloud.net.cn/explore/',
19 | imageUrl: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/d@2x.png',
20 | },
21 | {
22 | name: 'uni-ad',
23 | url: 'https://uniad.dcloud.net.cn',
24 | imageUrl:
25 | 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uniad-520.png',
26 | },
27 | {
28 | name: 'uni统计',
29 | url: 'https://tongji.dcloud.net.cn/',
30 | imageUrl:
31 | 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni-tongji-icon.png',
32 | },
33 | ]
34 | }
35 | ],
36 | qq_group: [
37 | {
38 | number: '1012245137',
39 | state: 1,
40 | attendance: 2000,
41 | prefix: '群1',
42 | },
43 | {
44 | number: '749911289',
45 | state: 1,
46 | attendance: 1000,
47 | prefix: '群2',
48 | },
49 | {
50 | number: '599819864',
51 | state: 1,
52 | attendance: 1000,
53 | prefix: '群3',
54 | },
55 | {
56 | number: '641753405',
57 | state: 1,
58 | attendance: 1000,
59 | prefix: '群4',
60 | },
61 | {
62 | number: '806429316',
63 | state: 1,
64 | attendance: 2000,
65 | prefix: '群5',
66 | },
67 | {
68 | number: '741357947',
69 | state: 0,
70 | prefix: '群6',
71 | joinQQGroupHref:
72 | 'https://qm.qq.com/cgi-bin/qm/qr?k=GmOeLLMnc5WcgNllzKEsq7UG0Oq-8DHp&jump_from=webapi&authKey=LL8+4dkOgBwUqJ8aapXJD2/tOSi/PFO5ZAuhr7eD7obfLtXEvGsFvhGjC8pj2PfM',
73 | },
74 | ],
75 | };
76 |
--------------------------------------------------------------------------------
/docs/.vuepress/config/toc.js:
--------------------------------------------------------------------------------
1 | export default {
2 | onThisPage: '本页导读',
3 | collapseText: '展示全部',
4 | expandText: '收起目录'
5 | }
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/createMarkdownArray.js:
--------------------------------------------------------------------------------
1 |
2 | function createMarkdownArray(contents = [], childrenName = 'children') {
3 | const markdownArray = []
4 | let itemCatch = {}
5 | for (let index = 0; index < contents.length; index++) {
6 | const item = contents[index];
7 |
8 | if (itemCatch.parent) {
9 | if (item.level === itemCatch.level) {
10 | const child = {
11 | ...item,
12 | parent: itemCatch.parent
13 | };
14 | itemCatch.parent[childrenName].push(child)
15 | delete itemCatch.parent
16 | itemCatch = child
17 | continue
18 | } else if (item.level > itemCatch.level) {
19 | const child = {
20 | ...item,
21 | parent: itemCatch
22 | };
23 | (itemCatch[childrenName] || (itemCatch[childrenName] = [])).push(child)
24 | itemCatch = child
25 | } else {
26 | const parent = itemCatch.parent
27 | delete itemCatch.parent
28 | itemCatch = parent
29 | index--
30 | continue
31 | }
32 | } else {
33 | if (typeof itemCatch.level === 'undefined' || item.level === itemCatch.level) {
34 | itemCatch = item
35 | markdownArray.push(itemCatch)
36 | } else {
37 | const child = {
38 | ...item,
39 | parent: itemCatch
40 | };
41 | (itemCatch[childrenName] || (itemCatch[childrenName] = [])).push(child)
42 | itemCatch = child
43 | continue
44 | }
45 | }
46 | }
47 |
48 | // 移除最后一项 parent 节点,防止循环引用报错
49 | (function removeParent(childs = []) {
50 | childs.forEach(child => {
51 | if (child.parent) delete child.parent
52 | if (child[childrenName]) removeParent(child[childrenName])
53 | })
54 | })(markdownArray[markdownArray.length - 1][childrenName])
55 |
56 | return markdownArray
57 | }
58 |
59 | module.exports = createMarkdownArray
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/createSiteMap.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const path = require('path')
3 |
4 | const domain = 'https://zh.uniapp.dcloud.io'
5 | const xmlBefore = `
6 |
7 | `
8 | const xmlAfter = `\n`
9 |
10 | module.exports = (links, callback = () => { }) => {
11 | const xmlItems = links.map(url => {
12 | if (!url.endsWith('/') && !url.endsWith('html')) url += '.html'
13 | return `
14 | ${domain + url}
15 | `
16 | }).join('\n')
17 |
18 | const rootPath = path.resolve(__dirname, '../public')
19 | const staticExists = fs.existsSync(rootPath)
20 | if (!staticExists) fs.mkdirSync(rootPath)
21 |
22 | fs.writeFile(
23 | path.resolve(rootPath, 'sitemap.xml'),
24 | xmlBefore + xmlItems + xmlAfter,
25 | { encoding: 'utf-8' },
26 | callback
27 | )
28 | }
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/header.js:
--------------------------------------------------------------------------------
1 | function parseHeader(tokens) {
2 | tokens.forEach((t, i) => {
3 | if (t.type === 'heading_open' && /h\d/.test(t.tag)) {
4 | const token = tokens[i + 1]
5 | const title = token.content
6 | const res = title.match(/\s*(.+?)@(.+?)\s*$/)
7 | if (res) {
8 | token.content = res[1]
9 | for (let i = 0, array = token.children, l = array.length; i < l; i++) {
10 | const token = array[l - 1 - i]
11 | if (token.type === 'text') {
12 | const title = token.content
13 | const res = title.match(/(.*)@.+/)
14 | if (res) {
15 | token.content = res[1]
16 | break
17 | }
18 | }
19 | }
20 | }
21 | }
22 | })
23 | return tokens
24 | }
25 |
26 | module.exports = md => {
27 | md.parse = (function (mdParse) {
28 | return function (src, ...array) {
29 | return parseHeader(mdParse.bind(this)(src, ...array))
30 | }
31 | })(md.parse)
32 | }
33 |
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/inject-json-to-md.js:
--------------------------------------------------------------------------------
1 | let utsApiJson = {}
2 | let utsComJson = {}
3 | try {
4 | utsApiJson = require('../utils/uniappApiJson.json')
5 | } catch (error) {}
6 | try {
7 | utsComJson = require('../utils/uniappComJson.json')
8 | } catch (error) {}
9 |
10 | function getRegExp(key, text) {
11 | return new RegExp(``)
12 | }
13 |
14 | /**
15 | *
16 | * @param {string} text
17 | * @returns {{match: RegExpMatchArray | null, json: {}, regExp: RegExp | null}
18 | */
19 | const getJSON = text => {
20 | const APIJSONRegExp = getRegExp('UNIAPPAPIJSON')
21 | match = text.match(APIJSONRegExp)
22 | APIJSONRegExp.lastIndex = 0
23 | if (match) {
24 | return {
25 | match,
26 | json: utsApiJson,
27 | regExp: APIJSONRegExp,
28 | }
29 | }
30 |
31 | const COMJSONRegExp = getRegExp('UNIAPPCOMJSON')
32 | match = text.match(COMJSONRegExp)
33 | COMJSONRegExp.lastIndex = 0
34 | if (match) {
35 | return {
36 | match,
37 | json: utsComJson,
38 | regExp: COMJSONRegExp,
39 | }
40 | }
41 |
42 | return {
43 | match: null,
44 | json: {},
45 | regExp: null,
46 | }
47 | }
48 |
49 | const NEWLINE_CHARACTER = /\r?\n/
50 |
51 | module.exports = md => {
52 | md.parse = (function (MD_PARSE) {
53 | return function (src, ...args) {
54 | if (src && getJSON(src).match) {
55 | const lines = src.split(NEWLINE_CHARACTER)
56 | for (let index = 0; index < lines.length; index++) {
57 | const line = lines[index]
58 |
59 | const { match, json, regExp } = getJSON(line)
60 | if (match && regExp) {
61 | const jsonPath = match[1]
62 | const path = jsonPath.split('.')
63 | let temp = json
64 | path.forEach(key => {
65 | if (!temp) return false
66 | temp = temp[key]
67 | })
68 | if (typeof temp === 'undefined') continue
69 | lines[index] = lines[index].replace(regExp, temp)
70 | }
71 | }
72 |
73 | return MD_PARSE.bind(this)(lines.join('\n'), ...args)
74 | }
75 | return MD_PARSE.bind(this)(src, ...args)
76 | }
77 | })(md.parse)
78 | }
79 |
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/normallizeLink.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const folderNames = []
3 | fs.readdirSync('docs').forEach(item => {
4 | fs.lstatSync(`docs/${item}`).isDirectory() && folderNames.push(item)
5 | })
6 |
7 | function isExternal(path) {
8 | return /^[a-z]+:/i.test(path)
9 | }
10 |
11 | function normalizeLink(url) {
12 | if (!url.startsWith('/') && folderNames.some(item => url.split('/')[0] === item)) {
13 | return '/' + url
14 | }
15 | return url
16 | }
17 |
18 | module.exports = function (md) {
19 | md.normalizeLink = (function (oldNormalizeLink) {
20 | return function (url) {
21 | url = isExternal(url)
22 | ? url
23 | : normalizeLink(url)
24 | .replace(/(\bREADME\.md\b)|(\bREADME(?!\.))/i, 'index.html') // README.md | README | readme.md | readme -> index.html
25 | .replace(/(\bindex\.md\b)|(index(?!\.))/, 'index.html') // /index -> /index.html
26 | .replace(/\.md\b/, '.html') // *.md -> *.html
27 | .replace(/\?id=/, '#') // ?id= -> #
28 | .replace(/\\/g, '/') // \ -> /
29 | return oldNormalizeLink.bind(this)(url)
30 | }
31 | })(md.normalizeLink)
32 | }
--------------------------------------------------------------------------------
/docs/.vuepress/markdown/translate.js:
--------------------------------------------------------------------------------
1 | module.exports = md => {
2 | md.parse = (function (mdParse) {
3 | return function (src, ...array) {
4 | return mdParse.bind(this)(src, ...array)
5 | }
6 | })(md.parse)
7 | md.render = (function (mdRender) {
8 | return function (src, ...array) {
9 | return mdRender.bind(this)(src, ...array)
10 | }
11 | })(md.render)
12 | }
13 |
--------------------------------------------------------------------------------
/docs/.vuepress/public/h5/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/.vuepress/public/js/miku.js:
--------------------------------------------------------------------------------
1 | mikuDelivery.initProxy('/miku-delivery-sw-1.2.1.js', {
2 | /** appID 和 appSalt 由七牛配置提供*/
3 | app: {
4 | appID: 'r5v5l8yhuips0xwv',
5 | appSalt: 'ejhqsncr0hrwcadkfrsh07n3p6wxt9q3'
6 | },
7 | /** 需要被代理的域名列表,域名需要提前在七牛创建完成,由七牛配置 ecdn 功能 */
8 | domains: ['qiniu-web-assets.dcloud.net.cn'],
9 | // debug: true
10 | })
--------------------------------------------------------------------------------
/docs/.vuepress/public/js/redirect.js:
--------------------------------------------------------------------------------
1 | var { host, pathname, search, hash } = location
2 | var LOCAL_ZH = 'zh'
3 | var LOCAL_EN = 'en'
4 | var website_ZH_host = 'uniapp.dcloud.net.cn'
5 | var website_EN_host = 'en.uniapp.dcloud.io'
6 | var website_ZH = 'https://' + website_ZH_host;
7 | var website_EN = 'https://' + website_EN_host;
8 | var _hmt = _hmt || [];
9 |
10 | // window.__UNI_DOCS_ZH_KEY__ = 'unidocs-zh-language'
11 |
12 | if (host === 'uniapp.dcloud.io') {
13 | var unidocsLanguage = localStorage.getItem('__UNIDOCS_LANGUAGE')
14 | var website_finally =
15 | navigator.language.indexOf('zh') !== -1
16 | ? website_ZH
17 | : website_EN;
18 | if (unidocsLanguage) {
19 | website_finally = unidocsLanguage === LOCAL_ZH ? website_ZH : website_EN
20 | }
21 | window.location.href = website_finally + pathname + hash + search;
22 | } else {
23 | // overwrite referrer
24 | if (
25 | search.indexOf('hmsr=vueen') !== -1 &&
26 | document.referrer === 'https://uniapp.dcloud.io/'
27 | ) {
28 | Object.defineProperty(
29 | document,
30 | 'referrer',
31 | { value: 'https://vuejs.org/', configurable: true }
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/docs/.vuepress/utils/index.js:
--------------------------------------------------------------------------------
1 | function isExternal(path) {
2 | return /^[a-z]+:/i.test(path)
3 | }
4 |
5 | function simplifySlugText(text) {
6 | // 移除方法后面的括号及里面的内容
7 | if (text.match(/^uni/) && text.match(/\)$/)) {
8 | text = text.replace(/^uni/, '').replace(/\(.*\)$/, '');
9 | }
10 | // 处理部分非uni开头方法的括号内容,主要是会出现多参数的情况。
11 | if (text.match(/\([\w+\s+\[\],]+\)$/)) {
12 | text = text.replace(/\([\w+\s+\[\],]+\)$/, '');
13 | }
14 | return text;
15 | }
16 |
17 | // 顺序有要求,会影响 for 循环匹配侧边栏
18 | const tabs = [
19 | '/uni-ad/', '/plugin/', '/worktile/', '/tutorial/', '/collocation/', '/component/', '/api/', '/',
20 | ]
21 |
22 | module.exports = {
23 | isExternal,
24 | simplifySlugText,
25 | tabs: process.env.DOCS_LITE ? [] : tabs
26 | }
--------------------------------------------------------------------------------
/docs/404.md:
--------------------------------------------------------------------------------
1 | 页面迷路了
2 | 1. 请确认访问地址是否有误
2. 请检查网络环境是否通畅
3. 关闭广告屏蔽插件后重试
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | * [什么是 uni-app](README.md)
2 | * 快速上手
3 | * [1. 通过 HBuilderX 可视化界面](quickstart-hx.md)
4 | * [2. 通过vue-cli命令行](quickstart-cli.md)
5 | * [uni-app的由来](history.md)
6 | * [如何学习](resource.md)
7 | * [选型指南](select.md)
8 | * [跨端注意](matter.md)
9 | * [常见问题](faq.md)
10 | * [其他项目转uni-app](translate.md)
11 | * [老项目引入uni-app](hybrid.md)
12 | * 运营服务
13 | * [统一发行页面](https://doc.dcloud.net.cn/uniCloud/uni-portal.html)
14 | * [前端网页托管](https://doc.dcloud.net.cn/uniCloud/hosting.html)
15 | * [App升级中心](https://doc.dcloud.net.cn/uniCloud/upgrade-center.html)
16 | * [uni一键登录](univerify.md)
17 | * [uni实人认证](https://doc.dcloud.net.cn/uniCloud/frv/intro.html)
18 | * [uni-push统一推送](unipush.md)
19 | * [uni-push1.0](unipush-v1.md)
20 | * [uni-push2.0](unipush-v2.md)
21 | * [业务文档](unipush-v2.md)
22 | * 开发文档
23 | * [uni-app客户端api](https://uniapp.dcloud.net.cn/api/plugins/push.html)
24 | * [uni-app x客户端api](https://doc.dcloud.net.cn/uni-app-x/api/push.html)
25 | * [服务端api](https://doc.dcloud.net.cn/uniCloud/uni-cloud-push/api.html)
26 | * [uni-push2.0、uni-id、uni统计的组合](https://doc.dcloud.net.cn/uniCloud/uni-cloud-push/mate.html)
27 | * [uni统计](uni-stat.md)
28 | * [uni统计2.0](uni-stat-v2.md)
29 | * [uni统计1.0](uni-stat-v1.md)
30 | * [uni-app x下的uni统计使用教程](uni-stat-uniappx.md)
31 | * [uni加固](/tutorial/app-security.md)
32 | * [uni隐私合规检测](/tutorial/app-privacy-detect.md)
33 | * [地图商业授权](/tutorial/app-geolocation.md?id=lic)
34 | * [案例](case.md)
35 | * 更新日志
36 | * [正式版](release.md)
37 | * [正式版 Vue2 CLI 配置](vue2-cli-release.md)
38 | * [正式版 Vue3 CLI 配置](vue3-cli-release.md)
39 | * [正式版 Vue2 Ts CLI 配置](vue2-ts-cli-release.md)
40 | * [正式版 Vue3 Ts CLI 配置](vue3-ts-cli-release.md)
41 | * [Alpha版](release-note-alpha.md)
42 | * [Alpha版 Vue2 CLI 配置](vue2-cli-alpha-release.md)
43 | * [Alpha版 Vue3 CLI 配置](vue3-cli-alpha-release.md)
44 | * [Alpha版 Vue2 Ts CLI 配置](vue2-ts-cli-alpha-release.md)
45 | * [Alpha版 Vue3 Ts CLI 配置](vue3-ts-cli-alpha-release.md)
46 |
--------------------------------------------------------------------------------
/docs/api/a-d/content-page.md:
--------------------------------------------------------------------------------
1 | ### 短视频内容联盟广告
2 |
3 | 简介
4 |
5 | ⼀个视频内容频道,支持上下滑动切换视频内容
6 |
7 | 
8 |
9 |
10 | 内容联盟广告是一个原生全屏组件,大小不可控制
11 |
12 | 如果需要嵌入到页面控制大小请使用 [短视频内容联盟组件](https://uniapp.dcloud.net.cn/component/ad-content-page)
13 |
14 | **平台差异说明**
15 |
16 | |App|HarmonyOS Next|Web|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|QQ小程序|快手小程序|京东小程序|
17 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
18 | |√(3.1.5+)|x|x|x|x|x|x|x|x|x|
19 |
20 |
21 | **开通配置广告**
22 |
23 | [开通广告步骤详情](https://uniapp.dcloud.net.cn/uni-ad.html#start)
24 |
25 |
26 | 文档已迁移至 [短视频内容联盟广告](https://uniapp.dcloud.net.cn/uni-ad/ad-content-page.html)
27 |
--------------------------------------------------------------------------------
/docs/api/a-d/full-screen-video.md:
--------------------------------------------------------------------------------
1 | ### 全屏视频广告
2 |
3 | [全屏视频广告介绍](https://uniapp.dcloud.net.cn/component/ad-fullscreen-video.html)
4 |
5 | **平台差异说明**
6 |
7 | |App|HarmonyOS Next|Web|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|QQ小程序|快手小程序|京东小程序|小红书小程序|元服务|
8 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
9 | |√(2.9.5+)|x|x|x|x|x|x|x|x|x|x|x|
10 |
11 |
12 | **开通配置广告**
13 |
14 | [开通广告步骤详情](https://uniapp.dcloud.net.cn/uni-ad.html#start)
15 |
16 | 文档已迁移至 [全屏视频](https://uniapp.dcloud.net.cn/uni-ad/ad-fullscreen-video.html)
17 |
--------------------------------------------------------------------------------
/docs/api/a-d/interstitial.md:
--------------------------------------------------------------------------------
1 | ### 插屏广告
2 |
3 | [插屏广告介绍](https://uniapp.dcloud.net.cn/component/ad-interstitial.html)
4 |
5 | **平台差异说明**
6 |
7 | |App|HarmonyOS Next|Web|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|QQ小程序|快手小程序|京东小程序|小红书小程序|
8 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
9 | |App 3.1.10+|x|x|√|x|x|x|√|x|x|x|
10 |
11 | **开通配置广告**
12 |
13 | [开通广告步骤详情](https://uniapp.dcloud.net.cn/uni-ad.html#start)
14 |
15 |
16 | 文档已迁移至 [插屏视频](https://uniapp.dcloud.net.cn/uni-ad/ad-interstitial.html)
17 |
--------------------------------------------------------------------------------
/docs/api/arrayBufferToBase64.md:
--------------------------------------------------------------------------------
1 | ## uni.arrayBufferToBase64(arrayBuffer)
2 |
3 | 将 ArrayBuffer 对象转成 Base64 字符串
4 |
5 | **平台差异说明**
6 |
7 | |App|H5|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|快手小程序|京东小程序|元服务|小红书小程序|
8 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
9 | |√|√|√|x|x|x|√|√|x|√|
10 |
11 |
12 |
13 | **参数说明**
14 |
15 | |参数|类型|必填|说明|
16 | |:-|:-|:-|:-|
17 | |arrayBuffer|ArrayBuffer|是|要转换成 Base64 字符串的 ArrayBuffer 对象|
18 |
19 | **示例**
20 |
21 | ```javascript
22 | const arrayBuffer = new Uint8Array([55, 55, 55])
23 | const base64 = uni.arrayBufferToBase64(arrayBuffer)
24 | ```
25 |
26 |
27 |
--------------------------------------------------------------------------------
/docs/api/base64ToArrayBuffer.md:
--------------------------------------------------------------------------------
1 | ## uni.base64ToArrayBuffer(base64)
2 |
3 | 将 Base64 字符串转成 ArrayBuffer 对象
4 |
5 | **平台差异说明**
6 |
7 | |App|H5|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|快手小程序|京东小程序|元服务|小红书小程序|
8 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
9 | |√|√|√|x|x|√|√|√|x|√|
10 |
11 |
12 |
13 | **参数说明**
14 |
15 | |参数|类型|必填|说明|
16 | |:-|:-|:-|:-|
17 | |base64|String|是|要转化成 ArrayBuffer 对象的 Base64 字符串|
18 |
19 | **示例**
20 |
21 | ```javascript
22 | const base64 = 'test'
23 | const arrayBuffer = uni.base64ToArrayBuffer(base64)
24 | ```
25 |
26 |
27 |
--------------------------------------------------------------------------------
/docs/api/caniuse.md:
--------------------------------------------------------------------------------
1 | ## uni.canIUse(String)
2 | 判断应用的 API,回调,参数,组件等是否在当前版本可用。
3 |
4 | 平台差异说明
5 |
6 | |App|HarmonyOS Next|Web|微信小程序|支付宝小程序|百度小程序|抖音小程序、飞书小程序|QQ程序|元服务|小红书小程序|
7 | |:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
8 | |√|HBuilder 4.23|√ (uni-app 3.4.13+)|√|√|√|√|√|√|√|
9 |
10 | **String 参数说明**
11 |
12 | 使用 ``${API}.${method}.${param}.${options}`` 或者 ``${component}.${attribute}.${option}`` 方式来调用,例如:
13 |
14 | - ``${API}`` 代表 API 名字
15 | - ``${method}`` 代表调用方式,有效值为return, success, object, callback
16 | - ``${param}`` 代表参数或者返回值
17 | - ``${options}`` 代表参数的可选值
18 | - ``${component}`` 代表组件名字
19 | - ``${attribute}`` 代表组件属性
20 | - ``${option}`` 代表组件属性的可选值
21 |
22 | **示例**
23 |
24 | ```javascript
25 | uni.canIUse('getSystemInfoSync.return.screenWidth');
26 | uni.canIUse('getSystemInfo.success.screenWidth');
27 | uni.canIUse('showToast.object.image');
28 | uni.canIUse('request.object.method.GET');
29 |
30 | uni.canIUse('live-player');
31 | uni.canIUse('text.selectable');
32 | uni.canIUse('button.open-type.contact');
33 | ```
34 |
35 | **Tips**
36 | - App、web 端暂不支持 ``${API}.${method}.${param}.${options}`` 方式调用,只支持 ``${API}``
37 | - App、Web 端部分 API 实际未实现,具体结果以 API 页面实现表格为准
--------------------------------------------------------------------------------
/docs/api/canvas/CanvasGradient.md:
--------------------------------------------------------------------------------
1 | ## CanvasGradient.addColorStop(stop,color)
2 |
3 | 创建一个颜色的渐变点。
4 | - 小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染。
5 |
6 | - 需要使用 ```addColorStop()``` 来指定渐变点,至少要两个。
7 |
8 | ### 参数
9 |
10 | |参数|类型 |定义 |
11 | |---|---|--- |
12 | |stop |Number(0-1)|表示渐变点在起点和终点中的位置 |
13 | |color |Color |渐变点的颜色|
14 |
15 | **示例代码**
16 |
17 | ```javascript
18 | const ctx = uni.createCanvasContext('myCanvas')
19 |
20 | // Create circular gradient
21 | const grd = ctx.createLinearGradient(30, 10, 120, 10)
22 | grd.addColorStop(0, 'red')
23 | grd.addColorStop(0.16, 'orange')
24 | grd.addColorStop(0.33, 'yellow')
25 | grd.addColorStop(0.5, 'green')
26 | grd.addColorStop(0.66, 'cyan')
27 | grd.addColorStop(0.83, 'blue')
28 | grd.addColorStop(1, 'purple')
29 |
30 | // Fill with gradient
31 | ctx.setFillStyle(grd)
32 | ctx.fillRect(10, 10, 150, 80)
33 | ctx.draw()
34 | ```
35 |
36 | 
37 |
--------------------------------------------------------------------------------
/docs/api/canvas/canvasGetImageData.md:
--------------------------------------------------------------------------------
1 | ## uni.canvasGetImageData(OBJECT, componentInstance)
2 |
3 | 返回一个数组,用来描述 canvas 区域隐含的像素数据,在自定义组件下,第二个参数传入自定义组件实例 this,以操作组件内 `