uniapp

uni-app 跨平台应用开发框架。适用于使用 Vue 语法开发 App、H5、各端小程序时的能力与用法。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "uniapp" with this command: npx skills add hairyf/skills/hairyf-skills-uniapp

uni-app

本 skill 基于 uni-app 文档生成,生成日期 2026-01-29。

uni-app 是基于 Vue 的跨平台应用开发框架,一套代码可编译到 App、H5、微信/支付宝/百度等小程序。适用于需要为 Agent 提供「如何用 uni-app 配置项目、写页面与组件、使用路由与 API、注意跨端差异」等能力说明的场景。

核心参考

主题说明参考
入口 main.js/uts入口文件、代码时序、插件与路由core-main
App.vue应用生命周期、globalData、全局样式core-app
pages.json页面路由、globalStyle、tabBar、easycomcore-pages
页面生命周期onLoad、onShow、onReady、onHide、onUnloadcore-lifecycle
manifest.json应用配置、版本、超时、各端配置core-manifest
条件编译#ifdef/#ifndef、平台标识、多端差异化core-conditional-compilation
样式与布局rpx/px 单位、预处理器、nvue 差异core-syntax-css
分包配置subPackages、preloadRule、主包与分包core-subpackages

能力参考

主题说明参考
API 概述uni API、Promise 化、各端特色 API、canIUsefeatures-api-overview
路由与跳转navigateTo/redirectTo/reLaunch/switchTab、传参、EventChannel、窗口动画features-router
组件概述基础组件分类、公共属性、easycom、扩展组件features-component-overview
自定义组件slot、ref、父子通信、defineExposefeatures-vue-components
Vue 基础单文件结构、数据绑定、事件、列表与条件渲染features-vue-basics
页面栈与通讯getCurrentPages、uni.$emit/$on/$offfeatures-window-communication
下拉与触底onPullDownRefresh、onReachBottom、start/stopPullDownRefreshfeatures-pulldown
定时器setTimeout、setInterval、clearTimeout、clearInterval、销毁时清理features-timer
网络请求uni.request、上传下载、超时与中断features-request
网络状态getNetworkType、onNetworkStatusChange、offNetworkStatusChangefeatures-network
上传与下载uploadFile、downloadFile、formData、多文件features-upload-download
WebSocketconnectSocket、SocketTask、onOpen/onMessage/send/closefeatures-websocket
数据缓存setStorage/getStorage、本地持久化features-storage
剪贴板setClipboardData、getClipboardDatafeatures-clipboard
键盘hideKeyboard、onKeyboardHeightChange、offKeyboardHeightChangefeatures-keyboard
启动参数getLaunchOptionsSync、getEnterOptionsSync、path/query/scenefeatures-launch-options
授权与设置authorize、getSetting、openSetting、scope 列表features-authorize
交互反馈showToast、showLoading、showModal、showActionSheetfeatures-ui-prompt
拦截器addInterceptor、removeInterceptor、回调与返回值改写features-interceptor
节点信息createSelectorQuery、boundingClientRect、scrollOffset、in(component)features-nodes-info
节点相交createIntersectionObserver、relativeTo、observe、disconnectfeatures-intersection-observer
表单form 组件、report-submit、@submit、@reset、form-typefeatures-form
图片chooseImage、previewImage、getImageInfo、saveImageToPhotosAlbumfeatures-media-image
视频与音频chooseVideo、createVideoContext、getRecorderManager、createInnerAudioContext、getBackgroundAudioManagerfeatures-media-video-audio
文件saveFile、getSavedFileList、openDocument、getFileSystemManagerfeatures-file
位置与地图getLocation、chooseLocation、openLocation、位置更新、createMapContextfeatures-location
画布createCanvasContext、CanvasContext、canvasToTempFilePathfeatures-canvas
导航栏与 TabBarsetNavigationBarTitle、setTabBarItem、hideTabBar、setTabBarBadgefeatures-navigation-tabbar
媒体查询与胶囊按钮createMediaQueryObserver、getMenuButtonBoundingClientRect、setBackgroundColorfeatures-ui-extras
动画createAnimation、animation.export、组件 animation 属性、pageScrollTofeatures-ui-animation
字体与单位loadFontFace、rpx2px、upx2pxfeatures-font
语言与主题getLocale、setLocale、onLocaleChange、onThemeChangefeatures-locale-theme
系统信息getSystemInfo、getDeviceInfo、getWindowInfo、getAppBaseInfofeatures-system-info
设备能力振动、scanCode、makePhoneCall、getBatteryInfo、onMemoryWarningfeatures-system-device
应用级事件onPageNotFound、onError、onAppShow、onAppHidefeatures-application-events
页面预加载preloadPage、unPreloadPage(App-nvue、H5)features-preload-page
登录/支付/分享/推送login、getUserInfo、requestPayment、share、getProvider、push 概述features-plugins-overview
其它 APIgetAccountInfoSync、getEnvInfoSync、getUpdateManager、navigateToMiniProgram、exit、nextTick、base64features-other-apis
H5 宽屏适配topWindow、leftWindow、rightWindow、getTopWindowStyle、setTopWindowStylefeatures-h5-adapt

进阶参考

主题说明参考
nvue原生渲染、与 vue 差异、requireNativePluginadvanced-nvue
renderjs视图层 JS、App 端操作 DOM、echarts 等advanced-renderjs
subNVuesApp 原生子窗体、getSubNVueById、getCurrentSubNVueadvanced-subnvue
Worker多线程、各端实现差异advanced-worker

最佳实践

主题说明参考
跨端注意标签与样式、JS/API 差异、工程与配置、常见异常best-practices-cross-platform

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

tailwindcss

No summary provided by upstream source.

Repository SourceNeeds Review
754-hairyf
General

hairy-utils

No summary provided by upstream source.

Repository SourceNeeds Review
689-hairyf
General

react-use

No summary provided by upstream source.

Repository SourceNeeds Review
503-hairyf
General

motion

No summary provided by upstream source.

Repository SourceNeeds Review
488-hairyf