{"template":{"name":"#### template","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| lang | Any | - | [lang](#template-lang-values) |\n\n##### lang @template-lang-values \n\n| 值名称 | 描述 |\n| :- | :- |\n| html | html |\n| pug | pug |\n\n","event":"","example":"","compatibility":"\n##### template 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | √ | x | 4.0 |\n","children":"","reference":""},"slot":{"name":"#### slot","description":"> 组件类型:string \n\n \\<slot> 元素作为组件模板之中的内容分发插槽。\\<slot> 元素自身将被替换。","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| name | string | - | 用于命名插槽。 |","event":"","example":"","compatibility":"\n##### slot 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | √ | x | 4.0 |\n","children":"","reference":"\n##### 参见\n- [Reference](https://v3.cn.vuejs.org/api/built-in-components.html#slot)\n"},"script":{"name":"#### script","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| setup | Any | - | - |\n| lang | Any | - | [lang](#script-lang-values) |\n\n##### lang @script-lang-values \n\n| 值名称 | 描述 |\n| :- | :- |\n| uts | uts |\n\n\n###### lang 兼容性\n| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| uts | 5.0 | 4.0 | x | 4.0 |\n","event":"","example":"","compatibility":"##### script 属性兼容性\n| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| setup | 5.0 | 4.0 | x | 4.0 |\n\n##### script 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | √ | x | 4.0 |\n","children":"","reference":""},"style":{"name":"#### style","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| lang | Any | - | [lang](#style-lang-values) |\n| scoped | Any | - | - |\n| module | Any | - | - |\n\n##### lang @style-lang-values \n\n| 值名称 | 描述 |\n| :- | :- |\n| scss | - |\n| less | - |\n| stylus | - |\n\n","event":"","example":"","compatibility":"\n##### style 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | √ | x | 4.0 |\n","children":"","reference":""},"keep-alive":{"name":"#### keep-alive","description":"> 组件类型:string \n\n \\<keep-alive> 包裹动态组件时,会缓存不活动的组件实例,而不是销毁它们。和 \\<transition> 相似,\\<keep-alive> 是一个抽象组件:它自身不会渲染一个 DOM 元素,也不会出现在父组件链中。","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| include | string | - | 字符串或正则表达式。只有名称匹配的组件会被缓存。 |\n| exclude | string | - | 字符串或正则表达式。任何名称匹配的组件都不会被缓存。 |\n| max | string | - | 最多可以缓存多少组件实例。 |","event":"","example":"","compatibility":"\n##### keep-alive 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | 4.0 | x | 4.0 |\n","children":"","reference":"\n##### 参见\n- [Reference](https://v3.cn.vuejs.org/api/built-in-components.html#keep-alive)\n"},"component":{"name":"#### component","description":"> 组件类型:string \n\n 渲染一个“元组件”为动态组件。依 is 的值,来决定哪个组件被渲染。","attrubute":"##### 属性 \n| 名称 | 类型 | 默认值 | 描述 |\n| :- | :- | :- | :- |\n| is | Any | - | - |\n| inline-template | Any | - | - |","event":"","example":"","compatibility":"\n##### component 兼容性\n| Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- |\n| 5.0 | 3.99 | x | 4.0 |\n","children":"","reference":"\n##### 参见\n- [Reference](https://v3.cn.vuejs.org/api/built-in-components.html#component)\n"},"application":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| createApp() | 5.0 | √ | x | 4.0 |\n| createSSRApp() | 5.0 | √ | x | 4.0 |\n| app.mount() | 5.0 | √ | x | 4.0 |\n| app.unmount() | 5.0 | √ | x | 4.0 |\n| app.component() | 5.0 | √ | x | 4.0 |\n| app.directive() | - | - | - | - | - |\n| app.use() | 5.0 | 3.99 | x | 4.0 |\n| app.mixin() | 5.0 | 3.99 | x | 4.0 |\n| app.provide() | 5.0 | 3.99 | x | 4.0 |\n| app.runWithContext() | - | - | - | - | - |\n| app.version | 5.0 | √ | x | 4.0 |\n| app.config | - | - | - | - | - |\n| app.config.errorHandler | - | - | - | - | - |\n| app.config.warnHandler | - | - | - | - | - |\n| app.config.performance | - | - | - | - | - |\n| app.config.compilerOptions | - | - | - | - | - |\n| app.config.globalProperties | 5.0 | 3.99 | x | 4.0 |\n| app.config.optionMergeStrategies | - | - | - | - | - |","example":""},"general":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| version | 5.0 | √ | x | 4.0 |\n| nextTick() | - | - | - | - | - |\n| defineComponent() | 5.0 | x | x | 4.0 |\n| defineAsyncComponent() | - | - | - | - | - |\n| defineCustomElement() | - | - | - | - | - |","example":""},"reactivity_core":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| ref() | 5.0 | √ | x | 4.0 |\n| computed() | 5.0 | √ | x | 4.0 |\n| reactive() | 5.0 | √ | x | 4.0 |\n| readonly() | 5.0 | 4.0 | x | 4.0 |\n| watchEffect() | 5.0 | 4.0 | x | 4.0 |\n| watchPostEffect() | 5.0 | 4.0 | x | 4.0 |\n| watchSyncEffect() | 5.0 | 4.0 | x | 4.0 |\n| watch() | 5.0 | 4.0 | x | 4.0 |","example":""},"reactivity_utilities":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| isRef() | 5.0 | 4.0 | x | 4.0 |\n| unref() | 5.0 | 4.0 | x | 4.0 |\n| isReactive() | 5.0 | 4.0 | x | 4.0 |\n| isReadonly() | 5.0 | 4.0 | x | 4.0 |\n| toRef() | 5.0 | 4.0 | x | 4.0 |\n| toValue() | 5.0 | 4.0 | x | x |\n| toRefs() | 5.0 | 4.0 | x | 4.0 |\n| isProxy() | 5.0 | 4.0 | x | 4.0 |","example":""},"reactivity_advanced":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| shallowReactive() | 5.0 | 4.0 | x | 4.0 |\n| shallowRef() | 5.0 | 4.0 | x | 4.0 |\n| toRaw() | 5.0 | 4.0 | x | 4.0 |\n| triggerRef() | 5.0 | 4.0 | x | 4.0 |\n| customRef() | 5.0 | 4.0 | x | 4.0 |\n| shallowReadonly() | 5.0 | 4.0 | x | 4.0 |\n| markRaw() | - | - | - | - | - |\n| effectScope() | 5.0 | 4.0 | x | 4.0 |\n| getCurrentScope() | 5.0 | 4.0 | x | 4.0 |\n| onScopeDispose() | 5.0 | 4.0 | x | 4.0 |","example":""},"composition_lifecycle":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| onMounted() | 5.0 | 4.0 | x | 4.0 |\n| onUpdated() | 5.0 | 4.0 | x | 4.0 |\n| onUnmounted() | 5.0 | 4.0 | x | 4.0 |\n| onBeforeMount() | 5.0 | 4.0 | x | 4.0 |\n| onBeforeUpdate() | 5.0 | 4.0 | x | 4.0 |\n| onBeforeUnmount() | 5.0 | 4.0 | x | 4.0 |\n| onErrorCaptured() | - | - | - | - | - |\n| onRenderTracked() | - | - | - | - | - |\n| onRenderTriggered() | - | - | - | - | - |\n| onActivated() | 5.0 | x | x | 4.0 |\n| onDeactivated() | 5.0 | x | x | 4.0 |\n| onServerPrefetch() | - | - | - | - | - |","example":""},"composition_injection":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| provide() | 5.0 | 4.0 | x | 4.0 |\n| inject() | 5.0 | 4.0 | x | 4.0 |\n| hasInjectionContext() | 5.0 | 4.0 | x | 4.0 |","example":""},"options_state":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| data | 5.0 | √ | x | 4.0 |\n| props | 5.0 | √ | x | 4.0 |\n| computed | 5.0 | √ | x | 4.0 |\n| methods | 5.0 | √ | x | 4.0 |\n| watch | 5.0 | √ | x | 4.0 |\n| emits | - | - | - | - | - |\n| expose | - | - | - | - | - |","example":"#### 状态选项 示例\n- [选项式 API 示例](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/state)"},"options_rendering":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| template | - | - | - | - | - |\n| render | - | - | - | - | - |\n| compilerOptions | - | - | - | - | - |\n| slots | - | - | - | - | - |","example":"#### 渲染选项 示例\n- [指令示例](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/rendering)"},"options_lifecycle":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| beforeCreate | 5.0 | √ | x | 4.0 |\n| created | 5.0 | √ | x | 4.0 |\n| beforeMount | 5.0 | √ | x | 4.0 |\n| mounted | 5.0 | √ | x | 4.0 |\n| beforeUpdate | 5.0 | √ | x | 4.0 |\n| updated | 5.0 | √ | x | 4.0 |\n| beforeUnmount | 5.0 | √ | x | 4.0 |\n| unmounted | 5.0 | √ | x | 4.0 |\n| errorCaptured | - | - | - | - | - |\n| renderTracked | - | - | - | - | - |\n| renderTriggered | - | - | - | - | - |\n| activated | 5.0 | 4.0 | x | 4.0 |\n| deactivated | 5.0 | 4.0 | x | 4.0 |\n| serverPrefetch | - | - | - | - | - |","example":"#### 页面生命周期示例 示例 \n> [hello uvue](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/lifecycle/page/page.uvue) \n ```html\n<template>\r\n <!-- #ifdef APP -->\r\n <scroll-view style=\"flex: 1\">\r\n <!-- #endif -->\r\n <view class=\"page container\">\r\n <text>page lifecycle</text>\r\n <button class=\"uni-common-mt\" @click=\"scrollToBottom\">scrollToBottom</button>\r\n </view>\r\n <!-- #ifdef APP -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script lang=\"uts\">\r\nimport { state, setLifeCycleNum } from '@/store/index.uts'\r\n\r\nexport default {\r\n data() {\r\n return {\r\n isScrolled: false,\r\n }\r\n },\r\n onLoad(_ : OnLoadOptions) {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 100)\r\n },\r\n onShow() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 10)\r\n },\r\n onReady() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 10)\r\n },\r\n onPullDownRefresh() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 10)\r\n },\r\n onPageScroll(_) {\r\n // 自动化测试\r\n this.isScrolled = true\r\n },\r\n onReachBottom() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 10)\r\n },\r\n onBackPress(_ : OnBackPressOptions) : boolean | null {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum - 10)\r\n return null\r\n },\r\n onHide() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum - 10)\r\n },\r\n onUnload() {\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum - 100)\r\n },\r\n onResize(_){\r\n // 自动化测试\r\n setLifeCycleNum(state.lifeCycleNum + 10)\r\n },\r\n methods: {\r\n // 自动化测试\r\n getLifeCycleNum() : number {\r\n return state.lifeCycleNum\r\n },\r\n // 自动化测试\r\n setLifeCycleNum(num : number) {\r\n setLifeCycleNum(num)\r\n },\r\n // 自动化测试\r\n pullDownRefresh() {\r\n uni.startPullDownRefresh({\r\n success() {\r\n setTimeout(() => {\r\n uni.stopPullDownRefresh()\r\n }, 1000)\r\n },\r\n })\r\n },\r\n scrollToBottom() {\r\n uni.pageScrollTo({\r\n scrollTop: 2000,\r\n })\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style>\r\n.container {\r\n height: 1200px;\r\n}\r\n</style>\r\n\n```\n#### 组件生命周期示例 示例 \n> [hello uvue](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/lifecycle/component/component.uvue) \n ```html\n<template>\r\n <view class=\"page\">\r\n <text class=\"uni-common-mb\">component lifecycle</text>\r\n <component-lifecycle class=\"component-lifecycle\" />\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport ComponentLifecycle from '@/components/OptionsAPILifecycle.uvue'\r\nimport { state } from '@/store/index.uts'\r\nexport default {\r\n components: { ComponentLifecycle },\r\n methods: {\r\n // 自动化测试\r\n getLifeCycleNum(): number {\r\n return state.lifeCycleNum\r\n },\r\n },\r\n}\r\n</script>\r\n\n```"},"options_composition":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| provide | 5.0 | 3.99 | x | 4.0 |\n| inject | 5.0 | 3.99 | x | 4.0 |\n| mixins | 5.0 | 3.99 | x | 4.0 |\n| extends | - | - | - | - | - |","example":""},"options_misc":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| name | 5.0 | √ | x | 4.0 |\n| inheritAttrs | 5.0 | √ | x | 4.0 |\n| components | 5.0 | √ | x | 4.0 |\n| directives | - | - | - | - | - |","example":""},"component_instance":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| $data | 5.0 | √ | x | 4.0 |\n| $props | 5.0 | √ | x | 4.0 |\n| $el | 5.0 | √ | x | 4.0 |\n| $options | - | - | - | - | - |\n| $parent | - | - | - | - | - |\n| $root | - | - | - | - | - |\n| $slots | 5.0 | √ | x | 4.0 |\n| $refs | 5.0 | √ | x | 4.0 |\n| $attrs | 5.0 | √ | x | 4.0 |\n| $watch() | 5.0 | √ | x | 4.0 |\n| $emit | 5.0 | √ | x | 4.0 |\n| $forceUpdate | 5.0 | √ | x | 4.0 |\n| $nextTick | 5.0 | √ | x | 4.0 |\n| $callMethod | 5.0 | √ | x | 4.0 |","example":"#### 组件实例 示例\n- [组件实例示例](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/component-instance)"},"directives":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| v-text | 5.0 | √ | x | 4.0 |\n| v-html | 5.0 | 3.99 | x | 4.0 |\n| v-show | 5.0 | √ | x | 4.0 |\n| v-if | 5.0 | √ | x | 4.0 |\n| v-else | 5.0 | √ | x | 4.0 |\n| v-else-if | 5.0 | √ | x | 4.0 |\n| v-for | 5.0 | √ | x | 4.0 |\n| v-on | 5.0 | √ | x | 4.0 |\n| v-bind | 5.0 | √ | x | 4.0 |\n| v-model | 5.0 | √ | x | 4.0 |\n| v-slot | 5.0 | √ | x | 4.0 |\n| v-pre | 5.0 | 3.99 | x | 4.0 |\n| v-once | 5.0 | 3.99 | x | 4.0 |\n| v-memo | 5.0 | 3.99 | x | 4.0 |\n| v-cloak | 5.0 | x | x | 4.0 |","example":"#### 指令 示例\n- [指令示例](https://gitcode.net/dcloud/hello-uvue/-/tree/master//pages/directive)"},"special_attributes":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| key | 5.0 | √ | x | 4.0 |\n| ref | 5.0 | √ | x | 4.0 |\n| is | 5.0 | 3.99 | x | 4.0 |","example":""},"render_function":{"compatibility":"| | Android 系统版本 | Android | iOS | web |\n| :- | :- | :- | :- | :- |\n| h() | 5.0 | 3.99 | x | 4.0 |\n| mergeProps() | - | - | - | - | - |\n| cloneVNode() | - | - | - | - | - |\n| isVNode() | 5.0 | √ | x | 4.0 |\n| resolveComponent() | 5.0 | √ | x | 4.0 |\n| resolveDirective() | - | - | - | - | - |\n| withDirectives() | 5.0 | √ | x | 4.0 |\n| withModifiers() | - | - | - | - | - |","example":""}}