提交 b62b6a3a 编写于 作者: D DCloud_LXH

feat: uni-app x 改为一级导航

上级 175e8739
...@@ -37,16 +37,6 @@ export const navbar = [ ...@@ -37,16 +37,6 @@ export const navbar = [
type: 'link', type: 'link',
link: '/api/' link: '/api/'
}, },
{
text: 'UTS',
type: 'link',
link: '/uts/'
},
{
text: 'uni-app x',
type: 'link',
link: '/uni-app-x/'
},
{ {
text: '插件', text: '插件',
type: 'link', type: 'link',
...@@ -137,6 +127,62 @@ export const navbar = [ ...@@ -137,6 +127,62 @@ export const navbar = [
} }
] ]
}, },
{
text: 'uni-app x',
link: '/uni-app-x/',
items: [
{
text: '介绍',
type: 'link',
link: '/uni-app-x/'
},
{
text: '编译器',
type: 'link',
link: '/uni-app-x/compiler/'
},
{
text: 'UTS',
type: 'link',
link: '/uni-app-x/uts/'
},
{
text: '全局文件',
type: 'link',
link: '/uni-app-x/collocation/pagesjson'
},
{
text: '组件',
type: 'link',
link: '/uni-app-x/component/'
},
{
text: 'API',
type: 'link',
link: '/uni-app-x/api/'
},
{
text: 'CSS',
type: 'link',
link: '/uni-app-x/css/'
},
{
text: 'DOM',
type: 'link',
link: '/uni-app-x/dom/'
},
{
text: '插件',
type: 'link',
link: '/uni-app-x/plugin/'
},
{
text: '工程化',
type: 'link',
link: '/uni-app-x/worktile/'
}
]
},
{ {
text: 'uniCloud', text: 'uniCloud',
type: 'link', type: 'link',
......
...@@ -91,12 +91,13 @@ const routerMap = { ...@@ -91,12 +91,13 @@ const routerMap = {
'/nvue-event': '/tutorial/nvue-event.html', '/nvue-event': '/tutorial/nvue-event.html',
'/use-html5plus': '/tutorial/use-html5plus.html', '/use-html5plus': '/tutorial/use-html5plus.html',
'/m3w': '/uniCloud/uni-portal.html', '/m3w': '/uniCloud/uni-portal.html',
'/tutorial/syntax-uts': '/uts/', '/tutorial/syntax-uts': '/uni-app-x/uts/',
'/uniCloud/uni-id-summary': '/uniCloud/uni-id/summary.html', '/uniCloud/uni-id-summary': '/uniCloud/uni-id/summary.html',
'/uniCloud/uni-id-pages': '/uniCloud/uni-id/redirect.html', '/uniCloud/uni-id-pages': '/uniCloud/uni-id/redirect.html',
'/uniCloud/uni-id-common': '/uniCloud/uni-id/cloud-common.html', '/uniCloud/uni-id-common': '/uniCloud/uni-id/cloud-common.html',
'/uniCloud/uni-id': '/uniCloud/uni-id/old.html', '/uniCloud/uni-id': '/uniCloud/uni-id/old.html',
'/uts/': '/uni-app-x/uts/'
} }
export default ({ fullPath, path, hash }) => { export default ({ fullPath, path, hash }) => {
...@@ -125,4 +126,17 @@ export default ({ fullPath, path, hash }) => { ...@@ -125,4 +126,17 @@ export default ({ fullPath, path, hash }) => {
replace: true replace: true
} }
} }
const routerMapKeys = Object.keys(routerMap)
let returnPathConfig = null
routerMapKeys.forEach(key => {
if (path.indexOf(key) === 0) {
return returnPathConfig = {
path: path.replace(key, routerMap[key]),
hash,
replace: true
}
}
})
if (returnPathConfig) return returnPathConfig
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ import uniCloud from './uniCloud'; ...@@ -3,6 +3,7 @@ import uniCloud from './uniCloud';
export default { export default {
"/": uniapp, "/": uniapp,
"/uni-app-x/": uniapp,
'/uniCloud/': uniCloud, '/uniCloud/': uniCloud,
weChatOfficialAccountImg: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/weixin.jpg' weChatOfficialAccountImg: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/weixin.jpg'
} }
...@@ -14,7 +14,12 @@ function simplifySlugText(text) { ...@@ -14,7 +14,12 @@ function simplifySlugText(text) {
return text; return text;
} }
const tabs = ['/uniCloud/', '/plugin/', '/worktile/', '/tutorial/', '/collocation/', '/component/', '/api/', '/uts/', '/uni-app-x/', '/'] // 顺序有要求,会影响 for 循环匹配侧边栏
const tabs = [
'/uni-app-x/compiler/', '/uni-app-x/dom/', '/uni-app-x/uts/', '/uni-app-x/collocation/', '/uni-app-x/plugin/', '/uni-app-x/worktile/', '/uni-app-x/component/', '/uni-app-x/api/', '/uni-app-x/css/', '/uni-app-x/',
'/uniCloud/',
'/plugin/', '/worktile/', '/tutorial/', '/collocation/', '/component/', '/api/', '/',
]
module.exports = { module.exports = {
isExternal, isExternal,
......
...@@ -7,210 +7,11 @@ ...@@ -7,210 +7,11 @@
* [复杂列表开发指南](tutorial/stickynestlist.md) * [复杂列表开发指南](tutorial/stickynestlist.md)
* [全局变量与状态管理](tutorial/store.md) * [全局变量与状态管理](tutorial/store.md)
* [几种组件标记的概念澄清](tutorial/idref.md) * [几种组件标记的概念澄清](tutorial/idref.md)
* 编译器 * [自动化测试](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html)
* [概述](compiler/README.md) * vue 框架
* [条件编译](https://uniapp.dcloud.net.cn/tutorial/platform.html)
* [编译运行环境](https://uniapp.dcloud.net.cn/worktile/running-env.html)
* 全局文件
* [pages.json](pagesjson.md)
* [main.uts](https://uniapp.dcloud.net.cn/collocation/main.html)
* [app.uvue](https://uniapp.dcloud.net.cn/collocation/App.html)
* [manifest.json](manifest.md)
* [AndroidManifest.xml](https://uniapp.dcloud.net.cn/tutorial/app-nativeresource-android.html)
* [uni.scss](https://uniapp.dcloud.net.cn/collocation/uni-scss.html)
* vue框架
* [概述](vue/README.md) * [概述](vue/README.md)
<!-- * [基础](https://uniapp.dcloud.net.cn/tutorial/vue3-basics.html)
* [组件](https://uniapp.dcloud.net.cn/tutorial/vue3-components.html)
* [API](vue/api.md) -->
* 组件
* [概述](component/README.md)
* [公共属性和事件](component/common.md)
* [view](component/view.md)
* [scroll-view](component/scroll-view.md)
* [list-view](component/list-view.md)
* [sticky](component/sticky.md)
* [swiper](component/swiper.md)
* [navigator](component/navigator.md)
* [text](component/text.md)
* [rich-text](component/rich-text.md)
* [image](component/image.md)
* [input](component/input.md)
* [textarea](component/textarea.md)
* [button](component/button.md)
* [checkbox](component/checkbox-group.md)
* [radio](component/radio-group.md)
* [picker-view](component/picker-view.md)
* [progress](component/progress.md)
* [slider](component/slider.md)
* [switch](component/switch.md)
* [form](component/form.md)
* [video](component/video.md)
* [web-view](component/web-view.md)
* [animation-view](component/animation-view.md)
* [unicloud-db](component/unicloud-db.md)
* API
* [概述](api/README.md)
* 全局
* [getApp](api/get-app.md)
* [getCurrentPages](api/get-current-pages.md)
* 基础
* [事件总线event-bus](api/event-bus.md)
* [拦截器](api/interceptor.md)
* [获取启动参数](api/get-launch-options-sync.md)
* [退出应用](api/exit.md)
* 页面
* [页面跳转](api/navigator.md)
* [设置导航条颜色](api/set-navigation-bar-color.md)
* [设置导航条标题](api/set-navigation-bar-title.md)
* [设置tabbar](api/set-tabbar.md)
* [页面下拉刷新](api/pull-down-refresh.md)
* [将页面滚动到指定位置](api/page-scroll-to.md)
* 元素节点
* [获取element](api/get-element.md)
* [获取node](api/nodes-info.md)
* 界面
* [交互反馈](api/prompt.md)
* [动态加载字体](api/load-font-face.md)
* [截屏事件](api/capturescreen.md)
* 网络
* [发起请求request](api/request.md)
* [上传文件](api/upload-file.md)
* [下载文件](api/download-file.md)
* [获取设备网络状态](api/get-network-type.md)
* [websocket](api/websocket-global.md)
* 设备
* [获取系统信息](api/get-system-info.md)
* [获取设备信息](api/get-device-info.md)
* [获取窗口信息](api/get-window-info.md)
* [获取app基础信息](api/get-app-base-info.md)
* [获取app授权设置](api/get-app-authorize-setting.md)
* [获取系统设置](api/get-system-setting.md)
* [获取电量信息](api/get-battery-info.md)
* [安装 APK](api/install-apk.md)
* [wifi](api/wifi.md)
* [内存](api/memory.md)
* [截屏事件](api/capturescreen.md)
* 媒体
* [拍照和相册选择](api/choose-image.md)
* [图片预览](api/preview-image.md)
* [保存图片到相册](api/save-image-to-photos-album.md)
* 位置
* [获取当前位置](api/get-location.md)
* 推送
* [推送](api/push.md)
* 数据存储
* [storage(key-value存储)](api/storage.md)
* 登录和验证
* [实人认证](api/facial-recognition-verify.md)
* 组件上下文对象
* [web-view组件上下文对象](api/create-webview-context.md)
* [video组件上下文对象](api/create-video-context.md)
* uniCloud客户端API
* [概述](unicloud/README.md)
* [云函数](unicloud/function.md)
* [云对象](unicloud/object.md)
* [数据库](unicloud/database.md)
* [云存储](unicloud/storage.md)
* [其他API](unicloud/utils.md)
* [其他EXT API](ext.md)
* CSS
* [CSS概述](css/README.md)
* [align-content](css/align-content.md)
* [align-items](css/align-items.md)
* [background](css/background.md)
* [background-clip](css/background-clip.md)
* [background-color](css/background-color.md)
* [background-image](css/background-image.md)
* [border](css/border.md)
* [border-bottom-color](css/border-bottom-color.md)
* [border-bottom-left-radius](css/border-bottom-left-radius.md)
* [border-bottom-right-radius](css/border-bottom-right-radius.md)
* [border-bottom-style](css/border-bottom-style.md)
* [border-bottom-width](css/border-bottom-width.md)
* [border-color](css/border-color.md)
* [border-left-color](css/border-left-color.md)
* [border-left-style](css/border-left-style.md)
* [border-left-width](css/border-left-width.md)
* [border-radius](css/border-radius.md)
* [border-right-color](css/border-right-color.md)
* [border-right-style](css/border-right-style.md)
* [border-right-width](css/border-right-width.md)
* [border-style](css/border-style.md)
* [border-top-color](css/border-top-color.md)
* [border-top-left-radius](css/border-top-left-radius.md)
* [border-top-right-radius](css/border-top-right-radius.md)
* [border-top-style](css/border-top-style.md)
* [border-top-width](css/border-top-width.md)
* [border-width](css/border-width.md)
* [bottom](css/bottom.md)
* [box-shadow](css/box-shadow.md)
* [box-sizing](css/box-sizing.md)
* [color](css/color.md)
* [display](css/display.md)
* [flex](css/flex.md)
* [flex-basis](css/flex-basis.md)
* [flex-direction](css/flex-direction.md)
* [flex-flow](css/flex-flow.md)
* [flex-grow](css/flex-grow.md)
* [flex-shrink](css/flex-shrink.md)
* [flex-wrap](css/flex-wrap.md)
* [font-family](css/font-family.md)
* [font-size](css/font-size.md)
* [font-style](css/font-style.md)
* [font-weight](css/font-weight.md)
* [height](css/height.md)
* [justify-content](css/justify-content.md)
* [left](css/left.md)
* [line-height](css/line-height.md)
* [margin](css/margin.md)
* [margin-bottom](css/margin-bottom.md)
* [margin-left](css/margin-left.md)
* [margin-right](css/margin-right.md)
* [margin-top](css/margin-top.md)
* [max-height](css/max-height.md)
* [max-width](css/max-width.md)
* [min-height](css/min-height.md)
* [min-width](css/min-width.md)
* [opacity](css/opacity.md)
* [overflow](css/overflow.md)
* [padding](css/padding.md)
* [padding-bottom](css/padding-bottom.md)
* [padding-left](css/padding-left.md)
* [padding-right](css/padding-right.md)
* [padding-top](css/padding-top.md)
* [position](css/position.md)
* [right](css/right.md)
* [text-align](css/text-align.md)
* [text-decoration](css/text-decoration.md)
* [text-decoration-color](css/text-decoration-color.md)
* [text-decoration-line](css/text-decoration-line.md)
* [text-decoration-style](css/text-decoration-style.md)
* [text-overflow](css/text-overflow.md)
* [text-decoration-thickness](css/text-decoration-thickness.md)
* [top](css/top.md)
* [transform](css/transform.md)
* [transform-origin](css/transform-origin.md)
* [transition](css/transition.md)
* [transition-delay](css/transition-delay.md)
* [transition-duration](css/transition-duration.md)
* [transition-property](css/transition-property.md)
* [transition-timing-function](css/transition-timing-function.md)
* [width](css/width.md)
* [z-index](css/z-index.md)
* [visibility](css/visibility.md)
* [lines](css/lines.md)
* [align-self](css/align-self.md)
* [pointer-events](css/pointer-events.md)
* UVUE DOM
* [DOM概述](dom/)
* [Element](dom/element.md)
* [DOMRect](dom/domrect.md)
* [CSSStyleDeclaration](dom/cssstyledeclaration.md)
* [DrawableContext](dom/drawablecontext.md)
* 运行和调试 * 运行和调试
* [真机运行](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html) * [真机运行](https://uniapp.dcloud.net.cn/tutorial/run/run-app.html)
* [Android审查元素](debug/android-inspector.md) * [Android审查元素](debug/android-inspector.md)
* [性能优化](performance.md) * [性能优化](performance.md)
* [uni错误规范](https://uniapp.dcloud.net.cn/tutorial/err-spec.html) * [uni错误规范](https://uniapp.dcloud.net.cn/tutorial/err-spec.html)
* [自动化测试](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html)
* [概述](README.md)
* 全局
* [getApp](get-app.md)
* [getCurrentPages](get-current-pages.md)
* 基础
* [事件总线event-bus](event-bus.md)
* [拦截器](interceptor.md)
* [获取启动参数](get-launch-options-sync.md)
* [退出应用](exit.md)
* 页面
* [页面跳转](navigator.md)
* [设置导航条颜色](set-navigation-bar-color.md)
* [设置导航条标题](set-navigation-bar-title.md)
* [设置tabbar](set-tabbar.md)
* [页面下拉刷新](pull-down-refresh.md)
* [将页面滚动到指定位置](page-scroll-to.md)
* 元素节点
* [获取element](get-element.md)
* [获取node](nodes-info.md)
* 界面
* [交互反馈](prompt.md)
* [动态加载字体](load-font-face.md)
* [截屏事件](capturescreen.md)
* 网络
* [发起请求request](request.md)
* [上传文件](upload-file.md)
* [下载文件](download-file.md)
* [获取设备网络状态](get-network-type.md)
* [websocket](websocket-global.md)
* 设备
* [获取系统信息](get-system-info.md)
* [获取设备信息](get-device-info.md)
* [获取窗口信息](get-window-info.md)
* [获取app基础信息](get-app-base-info.md)
* [获取app授权设置](get-app-authorize-setting.md)
* [获取系统设置](get-system-setting.md)
* [获取电量信息](get-battery-info.md)
* [安装 APK](install-apk.md)
* [wifi](wifi.md)
* [内存](memory.md)
* [截屏事件](capturescreen.md)
* 媒体
* [拍照和相册选择](choose-image.md)
* [图片预览](preview-image.md)
* [保存图片到相册](save-image-to-photos-album.md)
* 位置
* [获取当前位置](get-location.md)
* 推送
* [推送](push.md)
* 数据存储
* [storage(key-value存储)](storage.md)
* 登录和验证
* [实人认证](facial-recognition-verify.md)
* 组件上下文对象
* [web-view组件上下文对象](create-webview-context.md)
* [video组件上下文对象](create-video-context.md)
* uniCloud客户端API
* [概述](../unicloud/README.md)
* [云函数](../unicloud/function.md)
* [云对象](../unicloud/object.md)
* [数据库](../unicloud/database.md)
* [云存储](../unicloud/storage.md)
* [其他API](../unicloud/utils.md)
* [其他EXT API](ext.md)
\ No newline at end of file
# 其它api
插件市场和hello示例中还有一批可替代uni内置api的插件或示例代码,比如:
- [剪切板](https://ext.dcloud.net.cn/search?q=%E5%89%AA%E5%88%87%E6%9D%BF&orderBy=Relevance&cat1=8&cat2=81):uni.setClipboardData、uni.getClipboardData
- [拨打电话](https://ext.dcloud.net.cn/plugin?id=15235):uni.makePhoneCall
- [打开三方应用](https://gitcode.net/dcloud/hello-uni-app-x/-/blob/dev/pages/template/schema/schema.uvue):打开浏览器、应用商店、地图并传参。
- [分享](https://gitcode.net/dcloud/hello-uni-app-x/-/blob/dev/pages/template/share/share.uvue):uni.shareWithSystem
- 打开文件:uni.openDocument。[hello uts示例](](https://gitcode.net/dcloud/hello-uts/-/blob/dev/uni_modules/uts-nativepage/utssdk/app-android/index.uts))、[插件市场](https://ext.dcloud.net.cn/plugin?id=12731)
- [扫码](https://ext.dcloud.net.cn/search?q=%E6%89%AB%E7%A0%81&cat1=8&type=UpdatedDate)
- [蓝牙](https://ext.dcloud.net.cn/search?q=%E8%93%9D%E7%89%99&orderBy=Relevance&cat1=8&cat2=81)
- [nfc](https://ext.dcloud.net.cn/search?q=nfc&orderBy=Relevance&cat1=8&cat2=81)
- [文件选择](https://ext.dcloud.net.cn/search?q=%E6%96%87%E4%BB%B6%E9%80%89%E6%8B%A9&cat1=8&cat2=81)
* [pages.json](pagesjson.md)
* [main.uts](https://uniapp.dcloud.net.cn/collocation/main.html)
* [app.uvue](https://uniapp.dcloud.net.cn/collocation/App.html)
* [manifest.json](manifest.md)
* [AndroidManifest.xml](https://uniapp.dcloud.net.cn/tutorial/app-nativeresource-android.html)
* [uni.scss](https://uniapp.dcloud.net.cn/collocation/uni-scss.html)
\ No newline at end of file
* [概述](README.md)
* [条件编译](https://uniapp.dcloud.net.cn/tutorial/platform.html)
* [编译运行环境](https://uniapp.dcloud.net.cn/worktile/running-env.html)
\ No newline at end of file
* [概述](README.md)
* [公共属性和事件](common.md)
* 内置组件
* [view](view.md)
* [scroll-view](scroll-view.md)
* [list-view](list-view.md)
* [sticky](sticky.md)
* [swiper](swiper.md)
* [navigator](navigator.md)
* [text](text.md)
* [rich-text](rich-text.md)
* [image](image.md)
* [input](input.md)
* [textarea](textarea.md)
* [button](button.md)
* [checkbox](checkbox-group.md)
* [radio](radio-group.md)
* [picker-view](picker-view.md)
* [progress](progress.md)
* [slider](slider.md)
* [switch](switch.md)
* [form](form.md)
* [video](video.md)
* [web-view](web-view.md)
* [animation-view](animation-view.md)
* [unicloud-db](unicloud-db.md)
\ No newline at end of file
* [CSS概述](README.md)
* [align-content](align-content.md)
* [align-items](align-items.md)
* [background](background.md)
* [background-clip](background-clip.md)
* [background-color](background-color.md)
* [background-image](background-image.md)
* [border](border.md)
* [border-bottom-color](border-bottom-color.md)
* [border-bottom-left-radius](border-bottom-left-radius.md)
* [border-bottom-right-radius](border-bottom-right-radius.md)
* [border-bottom-style](border-bottom-style.md)
* [border-bottom-width](border-bottom-width.md)
* [border-color](border-color.md)
* [border-left-color](border-left-color.md)
* [border-left-style](border-left-style.md)
* [border-left-width](border-left-width.md)
* [border-radius](border-radius.md)
* [border-right-color](border-right-color.md)
* [border-right-style](border-right-style.md)
* [border-right-width](border-right-width.md)
* [border-style](border-style.md)
* [border-top-color](border-top-color.md)
* [border-top-left-radius](border-top-left-radius.md)
* [border-top-right-radius](border-top-right-radius.md)
* [border-top-style](border-top-style.md)
* [border-top-width](border-top-width.md)
* [border-width](border-width.md)
* [bottom](bottom.md)
* [box-shadow](box-shadow.md)
* [box-sizing](box-sizing.md)
* [color](color.md)
* [display](display.md)
* [flex](flex.md)
* [flex-basis](flex-basis.md)
* [flex-direction](flex-direction.md)
* [flex-flow](flex-flow.md)
* [flex-grow](flex-grow.md)
* [flex-shrink](flex-shrink.md)
* [flex-wrap](flex-wrap.md)
* [font-family](font-family.md)
* [font-size](font-size.md)
* [font-style](font-style.md)
* [font-weight](font-weight.md)
* [height](height.md)
* [justify-content](justify-content.md)
* [left](left.md)
* [line-height](line-height.md)
* [margin](margin.md)
* [margin-bottom](margin-bottom.md)
* [margin-left](margin-left.md)
* [margin-right](margin-right.md)
* [margin-top](margin-top.md)
* [max-height](max-height.md)
* [max-width](max-width.md)
* [min-height](min-height.md)
* [min-width](min-width.md)
* [opacity](opacity.md)
* [overflow](overflow.md)
* [padding](padding.md)
* [padding-bottom](padding-bottom.md)
* [padding-left](padding-left.md)
* [padding-right](padding-right.md)
* [padding-top](padding-top.md)
* [position](position.md)
* [right](right.md)
* [text-align](text-align.md)
* [text-decoration](text-decoration.md)
* [text-decoration-color](text-decoration-color.md)
* [text-decoration-line](text-decoration-line.md)
* [text-decoration-style](text-decoration-style.md)
* [text-overflow](text-overflow.md)
* [text-decoration-thickness](text-decoration-thickness.md)
* [top](top.md)
* [transform](transform.md)
* [transform-origin](transform-origin.md)
* [transition](transition.md)
* [transition-delay](transition-delay.md)
* [transition-duration](transition-duration.md)
* [transition-property](transition-property.md)
* [transition-timing-function](transition-timing-function.md)
* [width](width.md)
* [z-index](z-index.md)
* [visibility](visibility.md)
* [lines](lines.md)
* [align-self](align-self.md)
* [pointer-events](pointer-events.md)
\ No newline at end of file
* [DOM概述](README.md)
* [Element](element.md)
* [DOMRect](domrect.md)
* [CSSStyleDeclaration](cssstyledeclaration.md)
* [DrawableContext](drawablecontext.md)
\ No newline at end of file
`uni-app`积极拥抱社区,创建了开放、兼容的插件系统。
- uni-app插件市场,[https://ext.dcloud.net.cn](https://ext.dcloud.net.cn),是uni-app官方插件生态集中地。有数千款插件,支持前端组件、js sdk、页面模板、项目模板、原生插件等多种类型。在生态建设上远远领先于竞品。请注意尽量在官方市场寻找插件,npm等三方市场没有uni-app兼容性描述,很容易下载到无法跨平台的、仅适配web的插件。
- 兼容 微信小程序 JS SDK
小程序生态内容可直接引入```uni-app```,并且在App侧通用。以前的跨平台开发框架普遍缺少三方SDK,由于大量SDK厂商均原厂维护小程序SDK,使得```uni-app```成为跨平台开发框架里生态最丰富的平台[参考](https://ask.dcloud.net.cn/article/35070)
- 兼容 微信小程序自定义组件
小程序自定义组件是一种ui组件,uni-app里可以在App、H5、微信小程序、QQ小程序同时兼容微信小程序自定义组件,[参考](https://uniapp.dcloud.io/frame?id=小程序组件支持)
- 兼容 NPM 包管理系统
uni-app支持npm包,但注意npm下载的插件很可能不是全端的,大多npm插件仅适配了web。需要全端插件还是要去uni-app插件市场[https://ext.dcloud.net.cn](https://ext.dcloud.net.cn)去找。
- 兼容 weex 插件生态
uni-app内置了`weex``weex`的原生插件或ui库均可使用。注意`weex`的生态不如`uni-app`丰富,一般情况建议使用`uni-app`的插件市场。
- 兼容 普通 web 库
`uni-app`的H5端支持所有浏览器API。但众所周知,由于小程序的js不运行在浏览器里,所以小程序里不支持 HTML 和 DOM 的 API。
`uni-app`的App端虽然和小程序是相同的架构,逻辑层也运行在独立`jscore`而不是浏览器里,但App端和小程序还是有区别的:
* 一方面可通过web-view组件加载本地HTML,引入web相关库;
* 另一方面可通过[renderjs](/tutorial/renderjs.html)实现在渲染层执行js,此时完整`echart``threejs`等web库均可使用。
(但为了全端使用,仍然建议减少对dom库的依赖,在`uni-app`的插件市场可寻找全端兼容的库来替代)
- App端支持各种调用原生能力的方式
1. 支持 原生[混合开发](hybrid)
2. 支持 比小程序能力更多的[plus JSAPI](http://www.html5plus.org/doc/h5p.html)
3. 支持 [Native.js](https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/88) 直接调用原生api
4. 支持 [uts插件](uts-plugin.md)
5. 支持 [原生语言插件](native-plugin.md)
- App端支持双渲染引擎
`uni-app`逻辑层在独立jscore,而渲染层可选webview渲染和weex引擎渲染。
1. 使用webview渲染则整个架构与小程序相同,此时页面后缀为vue文件。
2. 使用weex引擎(经过改造)原生渲染,则整个架构与快应用相同,此时页面后缀为nvue文件。使用webview渲染时,还可以指定由系统webview渲染还是由x5引擎渲染。
* [插件全景描述](/uni-app-x/plugin/)
* [插件市场介绍](https://uniapp.dcloud.net.cn/plugin/plugin-ext-introduction.html)
* [uni_modules](https://uniapp.dcloud.net.cn/plugin/uni_modules.html)
* uts插件
* [uts插件开发入门](/plugin/uts-plugin.md)
* [uts页面组件开发入门](/plugin/uts-component.md)
* [uts中使用uni api](/plugin/uts-uni-api.md)
* [Android平台uts开发指南](/plugin/uts-for-android.md)
* [iOS平台uts开发指南](/plugin/uts-for-ios.md)
* [使用CocoaPods依赖](/plugin/uts-ios-cocoapods.md)
* [插件作者专区](https://uniapp.dcloud.net.cn/plugin/publish.html)
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* [类class](class.md) * [类class](class.md)
* [接口interface](interface.md) * [接口interface](interface.md)
* [类型兼容性](type-compatibility.md) * [类型兼容性](type-compatibility.md)
* [泛型](./generics.md) * [泛型](generics.md)
* [模块module](module.md) * [模块module](module.md)
* 内置对象和 API * 内置对象和 API
* [Number](buildin-object-api/number.md) * [Number](buildin-object-api/number.md)
...@@ -33,10 +33,3 @@ ...@@ -33,10 +33,3 @@
* [UTSiOSHookProxy](utsioshookproxy.md) * [UTSiOSHookProxy](utsioshookproxy.md)
* [关键词](keywords.md) * [关键词](keywords.md)
<!-- * [学习资料](learning.md) --> <!-- * [学习资料](learning.md) -->
* uts插件
* [uts插件开发入门](/plugin/uts-plugin.md)
* [uts页面组件开发入门](/plugin/uts-component.md)
* [uts中使用uni api](/plugin/uts-uni-api.md)
* [Android平台uts开发指南](/plugin/uts-for-android.md)
* [iOS平台uts开发指南](/plugin/uts-for-ios.md)
* [使用CocoaPods依赖](/plugin/uts-ios-cocoapods.md)
...@@ -1517,7 +1517,7 @@ console.log(JSON.stringify(t)) //输出: {"a+b":"value 1","a-b":"value 2","class ...@@ -1517,7 +1517,7 @@ console.log(JSON.stringify(t)) //输出: {"a+b":"value 1","a-b":"value 2","class
HBuilderX 3.9起内置了一个json转type工具,在`json编辑器`中选择一段内容点右键,选择`json转type`,即可根据json数据内容自动推导生成type定义,如果json内容涉及转义,工具也会自动转义。 HBuilderX 3.9起内置了一个json转type工具,在`json编辑器`中选择一段内容点右键,选择`json转type`,即可根据json数据内容自动推导生成type定义,如果json内容涉及转义,工具也会自动转义。
![](../uni-app-x/static/json2type.png) ![](../static/json2type.png)
把右侧生成的type复制到代码里即可,那个IRootType的名字自己按需修改。 把右侧生成的type复制到代码里即可,那个IRootType的名字自己按需修改。
......
### 工程化
uni-app x 支持的工程化支持,主要包括:
- 版本管理控制:如git/svn
- 运行环境管理
- 自动化测试
* [概述](/uni-app-x/worktile/)
* [Git/SVN](https://uniapp.dcloud.net.cn/worktile/git-svn.html)
* [编译运行环境](https://uniapp.dcloud.net.cn/worktile/running-env.html)
* [自动化测试](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册