vueJson.json 12.2 KB
Newer Older
1
{"application":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| createApp() | x | x | x | x | x | x |\n| createSSRApp() | x | x | x | x | x | x |\n| app.mount() | x | x | x | x | x | x |\n| app.unmount() | x | x | x | x | x | x |\n| app.component() | x | x | x | x | x | x |\n| app.directive() | x | x | x | x | x | x |\n| app.use() | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| app.mixin() | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| app.provide() | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| app.runWithContext() | x | x | x | x | x | x |\n| app.version | x | x | x | x | x | x |\n| app.config | x | x | x | x | x | x |\n| app.config.errorHandler | x | x | x | x | x | x |\n| app.config.warnHandler | x | x | x | x | x | x |\n| app.config.performance | x | x | x | x | x | x |\n| app.config.compilerOptions | x | x | x | x | x | x |\n| app.config.globalProperties | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| app.config.optionMergeStrategies | x | x | x | x | x | x |","example":""},"general":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| version | x | x | x | x | x | x |\n| nextTick() | x | x | x | x | x | x |\n| defineComponent() | x | x | x | x | x | x |\n| defineAsyncComponent() | x | x | x | x | x | x |\n| defineCustomElement() | x | x | x | x | x | x |","example":""},"reactivity_core":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| ref() | 5.0 | √ | √ | 10.0 | √ | x |\n| computed() | 5.0 | √ | x | 10.0 | √ | x |\n| reactive() | 5.0 | √ | √ | 10.0 | √ | x |\n| readonly() | x | x | x | x | x | x |\n| watchEffect() | 5.0 | √ | x | 10.0 | √ | x |\n| watch() | 5.0 | √ | x | 10.0 | √ | x |\n| watchPostEffect() | x | x | x | x | x | x |\n| watchSyncEffect() | x | x | x | x | x | x |","example":""},"reactivity_utilities":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| isRef() | 5.0 | √ | x | 10.0 | √ | x |\n| unref() | 5.0 | √ | x | 10.0 | √ | x |\n| isReactive() | 5.0 | √ | x | 10.0 | √ | x |\n| isReadonly() | 5.0 | √ | x | 10.0 | √ | x |\n| toRef() | x | x | x | x | x | x |\n| toValue() | x | x | x | x | x | x |\n| toRefs() | x | x | x | x | x | x |\n| isProxy() | x | x | x | x | x | x |","example":""},"reactivity_advanced":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| shallowReactive() | 5.0 | √ | x | 10.0 | √ | x |\n| shallowRef() | 5.0 | √ | x | 10.0 | √ | x |\n| toRaw() | 5.0 | √ | x | 10.0 | √ | x |\n| triggerRef() | x | x | x | x | x | x |\n| customRef() | x | x | x | x | x | x |\n| shallowReadonly() | x | x | x | x | x | x |\n| markRaw() | x | x | x | x | x | x |\n| effectScope() | x | x | x | x | x | x |\n| getCurrentScope() | x | x | x | x | x | x |\n| onScopeDispose() | x | x | x | x | x | x |","example":""},"options_state":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| data | 5.0 | √ | √ | 10.0 | √ | x |\n| props | 5.0 | √ | √ | 10.0 | √ | x |\n| computed | 5.0 | √ | √ | 10.0 | √ | x |\n| methods | 5.0 | √ | √ | 10.0 | √ | x |\n| watch | 5.0 | √ | √ | 10.0 | √ | x |\n| emits | x | x | x | x | x | x |\n| expose | x | x | x | x | x | x |","example":"#### 状态选项 示例\n- [选项式 API 示例](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/state)"},"options_rendering":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| template | x | x | x | x | x | x |\n| render | x | x | x | x | x | x |\n| compilerOptions | x | x | x | x | x | x |\n| slots | x | x | x | x | x | x |","example":"#### 渲染选项 示例\n- [指令示例](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/rendering)"},"options_lifecycle":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| beforeCreate | 5.0 | √ | √ | 10.0 | √ | x |\n| created | 5.0 | √ | √ | 10.0 | √ | x |\n| beforeMount | 5.0 | √ | √ | 10.0 | √ | x |\n| mounted | 5.0 | √ | √ | 10.0 | √ | x |\n| beforeUpdate | 5.0 | √ | √ | 10.0 | √ | x |\n| updated | 5.0 | √ | √ | 10.0 | √ | x |\n| beforeUnmount | 5.0 | √ | √ | 10.0 | √ | x |\n| unmounted | 5.0 | √ | √ | 10.0 | √ | x |\n| errorCaptured | x | x | x | x | x | x |\n| renderTracked | x | x | x | x | x | x |\n| renderTriggered | x | x | x | x | x | x |\n| activated | x | x | x | x | x | x |\n| deactivated | x | x | x | x | x | x |\n| serverPrefetch | x | x | x | x | x | x |","example":"#### 页面生命周期示例 示例 \n> [hello uvue](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/lifecycle/page/page.uvue) \n ```html\n<template>\n  <!-- #ifdef APP -->\n  <scroll-view style=\"flex: 1\">\n    <!-- #endif -->\n    <view class=\"uni-padding-wrap container\">\n      <text>page lifecycle</text>\n      <button @click=\"scrollToBottom\">scrollToBottom</button>\n    </view>\n    <!-- #ifdef APP -->\n  </scroll-view>\n  <!-- #endif -->\n</template>\n\n<script lang=\"uts\">\nimport { State, state, setLifeCycleNum } from '@/store/index.uts'\n\nexport default {\n  data() {\n    return {\n      isScrolled: false,\n    }\n  },\n  onLoad(_ : OnLoadOptions) {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum + 100)\n  },\n  onShow() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum + 10)\n  },\n  onReady() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum + 10)\n  },\n  onPullDownRefresh() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum + 10)\n  },\n  onPageScroll(_) {\n    // 自动化测试\n    this.isScrolled = true\n  },\n  onReachBottom() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum + 10)\n  },\n  onBackPress(_ : OnBackPressOptions) : boolean | null {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum - 10)\n    return null\n  },\n  onHide() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum - 10)\n  },\n  onUnload() {\n    // 自动化测试\n    setLifeCycleNum(state.lifeCycleNum - 100)\n  },\n  methods: {\n    // 自动化测试\n    getLifeCycleNum() : number {\n      return state.lifeCycleNum\n    },\n    // 自动化测试\n    setLifeCycleNum(num : number) {\n      setLifeCycleNum(num)\n    },\n    pullDownRefresh() {\n      uni.startPullDownRefresh({\n        success() {\n          setTimeout(() => {\n            uni.stopPullDownRefresh()\n          }, 1000)\n        },\n      })\n    },\n    scrollToBottom() {\n      uni.pageScrollTo({\n        scrollTop: 2000,\n      })\n    },\n  },\n}\n</script>\n\n<style>\n.container {\n  height: 1200px;\n}\n</style>\n\n```\n#### 组件生命周期示例 示例 \n> [hello uvue](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/lifecycle/component/component.uvue) \n ```html\n<template>\n  <view class=\"page\">\n    <text>component lifecycle</text>\n    <component-lifecycle class=\"component-lifecycle\" />\n  </view>\n</template>\n\n<script>\nimport ComponentLifecycle from '@/components/Lifecycle.uvue'\nimport { State, state } from '@/store/index.uts'\nexport default {\n  components: { ComponentLifecycle },\n  data(){\n    return {\n      _state: state as State\n    }\n  },\n  methods: {\n    // 自动化测试\n    getLifeCycleNum(): number {\n      return state.lifeCycleNum\n    },\n  },\n}\n</script>\n\n```"},"options_composition":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| provide | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| inject | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| mixins | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| extends | x | x | x | x | x | x |","example":""},"options_misc":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| name | 5.0 | √ | √ | 10.0 | √ | x |\n| inheritAttrs | x | x | x | x | x | x |\n| components | 5.0 | √ | √ | 10.0 | √ | x |\n| directives | x | x | x | x | x | x |","example":""},"component_instance":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| $data | 5.0 | √ | √ | 10.0 | √ | x |\n| $props | 5.0 | √ | √ | 10.0 | √ | x |\n| $el | 5.0 | x | √ | 10.0 | x | x |\n| $options | x | x | x | x | x | x |\n| $parent | x | x | x | x | x | x |\n| $root | x | x | x | x | x | x |\n| $slots | 5.0 | √ | √ | 10.0 | √ | x |\n| $refs | 5.0 | √ | √ | 10.0 | √ | x |\n| $attrs | 5.0 | √ | √ | 10.0 | √ | x |\n| $watch() | 5.0 | √ | √ | 10.0 | √ | x |\n| $emit | 5.0 | √ | √ | 10.0 | √ | x |\n| $forceUpdate | 5.0 | √ | √ | 10.0 | √ | x |\n| $nextTick | 5.0 | √ | √ | 10.0 | √ | x |\n| $callMethod | 5.0 | x | √ | 10.0 | x | x |","example":"#### 组件实例 示例\n- [组件实例示例](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/component-instance)"},"directives":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| v-text | 5.0 | √ | √ | 10.0 | √ | x |\n| v-html | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| v-show | 5.0 | √ | √ | 10.0 | √ | x |\n| v-if | 5.0 | √ | √ | 10.0 | √ | x |\n| v-else | 5.0 | √ | √ | 10.0 | √ | x |\n| v-else-if | 5.0 | √ | √ | 10.0 | √ | x |\n| v-for | 5.0 | √ | √ | 10.0 | √ | x |\n| v-on | 5.0 | √ | √ | 10.0 | √ | x |\n| v-bind | 5.0 | √ | √ | 10.0 | √ | x |\n| v-model | 5.0 | √ | √ | 10.0 | √ | x |\n| v-slot | 5.0 | √ | √ | 10.0 | √ | x |\n| v-pre | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| v-once | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| v-memo | 5.0 | x | 3.99 | 10.0 | x | x |\n| v-cloak | 5.0 | x | x | 10.0 | x | x |","example":"#### 指令 示例\n- [指令示例](https:/gitcode.net/dcloud/hello-uvue/-/tree/master/pages/directive)"},"components":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| \\<Transition> | 5.0 | x | x | 10.0 | x | x |\n| \\<TransitionGroup> | 5.0 | x | x | 10.0 | x | x |\n| \\<KeepAlive> | 5.0 | x | x | 10.0 | x | x |\n| \\<Teleport> | 5.0 | x | x | 10.0 | x | x |\n| \\<Suspense> | x | x | x | x | x | x |","example":""},"special_elements":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| \\<component> | 5.0 | √ | 3.99 | 10.0 | √ | x |\n| \\<slot> | 5.0 | √ | √ | 10.0 | √ | x |\n| \\<template> | 5.0 | √ | √ | 10.0 | √ | x |","example":""},"special_attributes":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| key | 5.0 | √ | √ | 10.0 | √ | x |\n| ref | 5.0 | √ | √ | 10.0 | √ | x |\n| is | 5.0 | √ | 3.99 | 10.0 | √ | x |","example":""},"render_function":{"compatibility":"|  | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| h() | x | x | x | x | x | x |\n| mergeProps() | x | x | x | x | x | x |\n| cloneVNode() | x | x | x | x | x | x |\n| isVNode() | x | x | x | x | x | x |\n| resolveComponent() | x | x | x | x | x | x |\n| resolveDirective() | x | x | x | x | x | x |\n| withDirectives() | 5.0 | x | √ | 10.0 | x | x |\n| withModifiers() | x | x | x | x | x | x |","example":""}}