提交 5027b56c 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

wip: 通过 pages.json 文件生成 tabBar 目录

上级 994a8f77
......@@ -27,18 +27,18 @@
<text>---------------</text>
<uni-collapse>
<template v-for="menuItem in menu" :key="menuItem.id">
<uni-collapse-item :title="menuItem.name" class="item">
<view v-for="page in menuItem.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
<uni-collapse-item v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem!.name"
class="item">
<view v-for="page in menuItem!.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text">{{
page.style["navigationBarTitleText"]
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu.id">
<uni-collapse-item :title="childMenu.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
<uni-collapse style="width: 100%" v-for="childMenu in menuItem!.children" :key="childMenu!.id">
<uni-collapse-item :title="childMenu!.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu!.pages"
:key="childPage.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
......@@ -48,7 +48,6 @@
</uni-collapse-item>
</uni-collapse>
</uni-collapse-item>
</template>
</uni-collapse>
</view>
<!-- #ifdef APP -->
......@@ -62,68 +61,9 @@
</template>
<script lang="uts">
import { pages } from '@/target-pages.json'
type PagesJsonPageGroup = {
id : string,
name : string
}
type PagesJsonPage = {
path : string,
style : UTSJSONObject,
group ?: PagesJsonPageGroup[] | null
}
type MenuItem = {
id : string,
name : string,
children : MenuItem[],
pages : PagesJsonPage[]
}
const menu : MenuItem[] = []
const menuKeyMap = new Map<string, number>()
// #ifdef APP-ANDROID
const apiPages = JSON.parse<PagesJsonPage[]>(JSON.stringify(pages))!.filter((page : PagesJsonPage) : boolean => page.path.startsWith('pages/API') && page.group !== null)
// #endif
// #ifdef WEB || APP-IOS
const apiPages = (pages as unknown as PagesJsonPage[]).filter(page => page.path.startsWith('pages/API') && page.group)
// #endif
apiPages.forEach(page => {
let currentArr : MenuItem[] = menu
let currentMenu : MenuItem | null = null
if (page.group !== null) {
page.group!.forEach((item, index) => {
const { id, name } = item
const ids = id.split('.')
const _id = ids[ids.length - 1]
if (!menuKeyMap.has(id)) {
menuKeyMap.set(id, currentArr.length)
currentArr.push({
id: _id,
name,
children: [] as MenuItem[],
pages: [] as PagesJsonPage[]
} as MenuItem)
if (_id == 'page' && name == '页面和路由') {
currentArr[currentArr.length - 1].pages.push({
path: 'set-tab-bar',
style: {
navigationBarTitleText: '设置 TabBar'
}
} as PagesJsonPage)
}
}
currentMenu = currentArr[menuKeyMap.get(id)!]
if (index < page.group!.length - 1) {
currentArr = currentArr[menuKeyMap.get(id)!].children as MenuItem[]
}
})
}
if (currentMenu !== null) {
(currentMenu as MenuItem).pages.push(page)
}
})
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/API')
type Page = {
name : string
url : string
......@@ -140,7 +80,7 @@
export default {
data() {
return {
menu: menu as MenuItem[],
menu: menu as (MenuItem | null)[],
list: [
{
id: 'global',
......
......@@ -26,18 +26,18 @@
<text>---------------</text>
<uni-collapse>
<template v-for="menuItem in menu" :key="menuItem.id">
<uni-collapse-item :title="menuItem.name" class="item">
<view v-for="page in menuItem.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
<uni-collapse-item v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem!.name"
class="item">
<view v-for="page in menuItem!.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text">{{
page.style["navigationBarTitleText"]
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu.id">
<uni-collapse-item :title="childMenu.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
<uni-collapse style="width: 100%" v-for="childMenu in menuItem!.children" :key="childMenu!.id">
<uni-collapse-item :title="childMenu!.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu!.pages"
:key="childPage.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
......@@ -47,7 +47,6 @@
</uni-collapse-item>
</uni-collapse>
</uni-collapse-item>
</template>
</uni-collapse>
</view>
<!-- #ifdef APP -->
......@@ -56,60 +55,9 @@
</template>
<script lang="uts">
import { pages } from '@/target-pages.json'
type PagesJsonPageGroup = {
id : string,
name : string
}
type PagesJsonPage = {
path : string,
style : UTSJSONObject,
group ?: PagesJsonPageGroup[] | null
}
type MenuItem = {
id : string,
name : string,
children : MenuItem[],
pages : PagesJsonPage[]
}
const menu : MenuItem[] = []
const menuKeyMap = new Map<string, number>()
// #ifdef APP-ANDROID
const cssPages = JSON.parse<PagesJsonPage[]>(JSON.stringify(pages))!.filter((page : PagesJsonPage) : boolean => page.path.startsWith('pages/CSS') && page.group !== null)
// #endif
// #ifdef WEB || APP-IOS
const cssPages = (pages as unknown as PagesJsonPage[]).filter(page => page.path.startsWith('pages/CSS') && page.group)
// #endif
cssPages.forEach(page => {
let currentArr : MenuItem[] = menu
let currentMenu : MenuItem | null = null
if (page.group !== null) {
page.group!.forEach((item, index) => {
const { id, name } = item
const ids = id.split('.')
const _id = ids[ids.length - 1]
if (!menuKeyMap.has(id)) {
menuKeyMap.set(id, currentArr.length)
currentArr.push({
id: _id,
name,
children: [] as MenuItem[],
pages: [] as PagesJsonPage[]
} as MenuItem)
}
currentMenu = currentArr[menuKeyMap.get(id)!]
if (index < page.group!.length - 1) {
currentArr = currentArr[menuKeyMap.get(id)!].children as MenuItem[]
}
})
}
if (currentMenu !== null) {
(currentMenu as MenuItem).pages.push(page)
}
})
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/CSS')
type Page = {
name : string
enable ?: boolean
......@@ -125,7 +73,7 @@
export default {
data() {
return {
menu: menu as MenuItem[],
menu: menu as (MenuItem | null)[],
list: [
{
id: 'background',
......
......@@ -26,18 +26,18 @@
<text>---------------</text>
<uni-collapse>
<template v-for="menuItem in menu" :key="menuItem.id">
<uni-collapse-item :title="menuItem.name" class="item">
<view v-for="page in menuItem.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
<uni-collapse-item v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem!.name"
class="item">
<view v-for="page in menuItem!.pages" :key="page.path" class="uni-navigate-item" hover-class="is--active"
@click="goPage(`/${page.path}`)">
<text class="uni-navigate-text">{{
page.style["navigationBarTitleText"]
}}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</view>
<uni-collapse style="width: 100%" v-for="childMenu in menuItem.children" :key="childMenu.id">
<uni-collapse-item :title="childMenu.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu.pages"
<uni-collapse style="width: 100%" v-for="childMenu in menuItem!.children" :key="childMenu!.id">
<uni-collapse-item :title="childMenu!.name" class="item" style="margin-bottom: 0">
<view class="uni-navigate-item" hover-class="is--active" v-for="childPage in childMenu!.pages"
:key="childPage.path" @click="goPage(`/${childPage.path}`)">
<text class="uni-navigate-text">{{
childPage.style["navigationBarTitleText"]
......@@ -47,7 +47,6 @@
</uni-collapse-item>
</uni-collapse>
</uni-collapse-item>
</template>
</uni-collapse>
<!-- #ifdef UNI-APP-X && APP -->
......@@ -60,60 +59,9 @@
</template>
<script lang="uts">
import { pages } from '@/target-pages.json'
type PagesJsonPageGroup = {
id : string,
name : string
}
type PagesJsonPage = {
path : string,
style : UTSJSONObject,
group ?: PagesJsonPageGroup[] | null
}
type MenuItem = {
id : string,
name : string,
children : MenuItem[],
pages : PagesJsonPage[]
}
const menu : MenuItem[] = []
const menuKeyMap = new Map<string, number>()
// #ifdef APP-ANDROID
const componentPages = JSON.parse<PagesJsonPage[]>(JSON.stringify(pages))!.filter((page : PagesJsonPage) : boolean => page.path.startsWith('pages/component') && page.group !== null)
// #endif
// #ifdef WEB || APP-IOS
const componentPages = (pages as unknown as PagesJsonPage[]).filter(page => page.path.startsWith('pages/component') && page.group)
// #endif
componentPages.forEach(page => {
let currentArr : MenuItem[] = menu
let currentMenu : MenuItem | null = null
if (page.group !== null) {
page.group!.forEach((item, index) => {
const { id, name } = item
const ids = id.split('.')
const _id = ids[ids.length - 1]
if (!menuKeyMap.has(id)) {
menuKeyMap.set(id, currentArr.length)
currentArr.push({
id: _id,
name,
children: [] as MenuItem[],
pages: [] as PagesJsonPage[]
} as MenuItem)
}
currentMenu = currentArr[menuKeyMap.get(id)!]
if (index < page.group!.length - 1) {
currentArr = currentArr[menuKeyMap.get(id)!].children as MenuItem[]
}
})
}
if (currentMenu !== null) {
(currentMenu as MenuItem).pages.push(page)
}
})
import { generateMenu } from './generateMenu.uts'
import { MenuItem } from './generateMenu.uts'
const menu = generateMenu('pages/component')
// #ifdef UNI-APP-X && APP
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
......@@ -133,7 +81,7 @@
export default {
data() {
return {
menu: menu as MenuItem[],
menu: menu as (MenuItem | null)[],
list: [
{
id: 'view',
......
import { pages } from '@/target-pages.json'
type PageGroup = {
id: string,
name: string,
index: number | null
}
type Page = {
path: string,
style: UTSJSONObject,
group?: PageGroup[] | null
}
export type MenuItem = {
id: string,
name: string,
index: number,
children: (MenuItem | null)[],
pages: Page[]
}
export function generateMenu(tabBarType: string): (MenuItem | null)[] {
const res: (MenuItem | null)[] = []
const tabBarPages = JSON.parse<Page[]>(JSON.stringify(pages))!.filter((page: Page): boolean => page.path.startsWith(tabBarType) && hasPageGroup(page.group))
tabBarPages.forEach(page => {
let menuItemArr: (MenuItem | null)[] = res
let currentMenu: MenuItem | null = null
const groupLength = page.group!.length
page.group!.forEach((group, groupIndex) => {
const { index, id, name } = group
const validIndex = isNumber(index) ? index! : menuItemArr.length
fillArrayWithNull(menuItemArr, validIndex)
if (menuItemArr[validIndex] == null) {
menuItemArr[validIndex] = {
id: id.split('.').slice(-1)[0],
name,
index: validIndex,
children: [] as (MenuItem | null)[],
pages: [] as Page[]
} as MenuItem
}
currentMenu = menuItemArr[validIndex]
if (groupIndex < groupLength - 1) {
menuItemArr = menuItemArr[validIndex]!.children as (MenuItem | null)[]
}
})
currentMenu!.pages.push(page)
})
return removeNullItem(res)
}
function hasPageGroup(value: PageGroup[] | null): boolean {
// #ifdef APP-ANDROID
return value !== null
// #endif
// #ifndef APP-ANDROID
return !!value
// #endif
}
function isNumber(value: number | null): boolean {
// #ifdef APP-ANDROID
return value !== null
// #endif
// #ifndef APP-ANDROID
return typeof value === 'number'
// #endif
}
function fillArrayWithNull(arr: (MenuItem | null)[], index: number): void {
const len = arr.length
for (let i = 0;i <= index - (len - 1);i++) {
arr.push(null)
}
}
function removeNullItem(arr: (MenuItem | null)[]): (MenuItem | null)[] {
const res = arr.filter((item: MenuItem | null): boolean => item !== null)
res.forEach(menuItem => {
addSetTabBarPage(menuItem!)
// #ifdef APP-ANDROID
menuItem!.children = removeNullItem(menuItem.children)
// #endif
// #ifndef APP-ANDROID
menuItem!.children = removeNullItem(menuItem!.children)
// #endif
})
return res
}
function addSetTabBarPage(menuItem: MenuItem) {
const { id, name } = menuItem
if (id == 'page' && name == '页面和路由') {
menuItem.pages.push({
path: 'set-tab-bar',
style: {
navigationBarTitleText: '设置 TabBar'
}
} as Page)
}
}
......@@ -12,7 +12,8 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
......@@ -24,7 +25,8 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
......@@ -60,7 +62,8 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
......@@ -72,7 +75,8 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
......@@ -116,11 +120,13 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
},
{
"id": "component.view-container.sticky",
"name": "sticky"
"name": "sticky",
"index": 9
}
],
"style": {
......@@ -132,11 +138,13 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
},
{
"id": "component.view-container.sticky",
"name": "sticky"
"name": "sticky",
"index": 9
}
],
"style": {
......@@ -149,7 +157,8 @@
"group": [
{
"id": "component.basic-content",
"name": "基础内容"
"name": "基础内容",
"index": 2
}
],
"style": {
......@@ -167,7 +176,8 @@
"group": [
{
"id": "component.basic-content",
"name": "基础内容"
"name": "基础内容",
"index": 2
}
],
"style": {
......@@ -191,7 +201,8 @@
"group": [
{
"id": "component.basic-content",
"name": "基础内容"
"name": "基础内容",
"index": 2
}
],
"style": {
......@@ -203,7 +214,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -215,7 +227,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -233,7 +246,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -245,7 +259,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -257,7 +272,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -269,7 +285,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -281,7 +298,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -299,7 +317,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -311,7 +330,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -323,7 +343,8 @@
"group": [
{
"id": "component.media",
"name": "媒体组件"
"name": "媒体组件",
"index": 5
}
],
"style": {
......@@ -359,7 +380,8 @@
"group": [
{
"id": "component.media",
"name": "媒体组件"
"name": "媒体组件",
"index": 5
}
],
"style": {
......@@ -377,7 +399,8 @@
"group": [
{
"id": "component.navigation",
"name": "navigation"
"name": "navigation",
"index": 4
}
],
"style": {
......@@ -401,7 +424,8 @@
"group": [
{
"id": "component.web-view",
"name": "网页"
"name": "网页",
"index": 8
}
],
"style": {
......@@ -413,7 +437,8 @@
"group": [
{
"id": "component.web-view",
"name": "网页"
"name": "网页",
"index": 8
}
],
"style": {
......@@ -425,7 +450,8 @@
"group": [
{
"id": "component.unicloud",
"name": "unicloud"
"name": "unicloud",
"index": 9
}
],
"style": {
......@@ -456,7 +482,8 @@
"group": [
{
"id": "component.unicloud",
"name": "unicloud"
"name": "unicloud",
"index": 9
}
],
"style": {
......@@ -468,11 +495,12 @@
"group": [
{
"id": "component.public-properties-events",
"name": "公共属性和事件"
"name": "公共属性和事件",
"index": 0
}
],
"style": {
"navigationBarTitleText": "public-properties"
"navigationBarTitleText": "公共属性"
}
},
{
......@@ -480,11 +508,12 @@
"group": [
{
"id": "component.public-properties-events",
"name": "公共属性和事件"
"name": "公共属性和事件",
"index": 0
}
],
"style": {
"navigationBarTitleText": "public-events"
"navigationBarTitleText": "公共事件"
}
},
{
......@@ -492,11 +521,12 @@
"group": [
{
"id": "component.public-properties-events",
"name": "公共属性和事件"
"name": "公共属性和事件",
"index": 0
}
],
"style": {
"navigationBarTitleText": "transitionend事件"
"navigationBarTitleText": "Transition Events"
}
},
{
......@@ -504,11 +534,12 @@
"group": [
{
"id": "component.public-properties-events",
"name": "公共属性和事件"
"name": "公共属性和事件",
"index": 0
}
],
"style": {
"navigationBarTitleText": "touch-events"
"navigationBarTitleText": "Touch Events"
}
},
// #ifndef WEB
......@@ -517,11 +548,13 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
},
{
"id": "component.view-container.nested-scroll",
"name": "nested-scroll"
"name": "nested-scroll",
"index": 10
}
],
"style": {
......@@ -535,11 +568,13 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
},
{
"id": "component.view-container.nested-scroll",
"name": "nested-scroll"
"name": "nested-scroll",
"index": 10
}
],
"style": {
......@@ -560,11 +595,12 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
"navigationBarTitleText": "movable-view"
"navigationBarTitleText": "movable-area"
}
},
// #endif
......@@ -574,7 +610,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -588,7 +625,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -602,11 +640,12 @@
"group": [
{
"id": "component.map",
"name": "地图"
"name": "地图",
"index": 6
}
],
"style": {
"navigationBarTitleText": "map"
"navigationBarTitleText": "map | 地图"
}
},
// #endif
......@@ -616,7 +655,8 @@
"group": [
{
"id": "component.view-container",
"name": "视图容器"
"name": "视图容器",
"index": 1
}
],
"style": {
......@@ -630,7 +670,8 @@
"group": [
{
"id": "component.form-component",
"name": "表单组件"
"name": "表单组件",
"index": 3
}
],
"style": {
......@@ -644,11 +685,12 @@
"group": [
{
"id": "api.location",
"name": "位置"
"name": "位置",
"index": 8
}
],
"style": {
"navigationBarTitleText": "open-location"
"navigationBarTitleText": "openLocation | 使用地图查看位置"
}
},
// #endif
......@@ -658,11 +700,12 @@
"group": [
{
"id": "api.location",
"name": "位置"
"name": "位置",
"index": 8
}
],
"style": {
"navigationBarTitleText": "choose-location"
"navigationBarTitleText": "chooseLocation | 使用地图选择位置"
}
},
// #endif
......@@ -679,11 +722,12 @@
"group": [
{
"id": "component.canvas",
"name": "画布"
"name": "画布",
"index": 7
}
],
"style": {
"navigationBarTitleText": "canvas"
"navigationBarTitleText": "canvas | 画布"
}
},
// #endif
......@@ -693,7 +737,8 @@
"group": [
{
"id": "component.canvas",
"name": "画布"
"name": "画布",
"index": 7
}
],
"style": {
......@@ -713,11 +758,12 @@
"group": [
{
"id": "api.global",
"name": "全局"
"name": "全局",
"index": 0
}
],
"style": {
"navigationBarTitleText": "getApp"
"navigationBarTitleText": "getApp | 获取当前应用实例"
}
},
// #ifndef APP-IOS || WEB
......@@ -726,11 +772,12 @@
"group": [
{
"id": "api.base",
"name": "基础"
"name": "基础",
"index": 1
}
],
"style": {
"navigationBarTitleText": "exit"
"navigationBarTitleText": "exit | 退出应用"
}
},
// #endif
......@@ -740,11 +787,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "install-apk",
"navigationBarTitleText": "installApk | 安装 APK",
"enablePullDownRefresh": false
}
},
......@@ -754,11 +802,12 @@
"group": [
{
"id": "api.global",
"name": "全局"
"name": "全局",
"index": 0
}
],
"style": {
"navigationBarTitleText": "getCurrentPages",
"navigationBarTitleText": "getCurrentPages | 获取当前页面栈",
"enablePullDownRefresh": true
}
},
......@@ -774,11 +823,12 @@
"group": [
{
"id": "api.base",
"name": "基础"
"name": "基础",
"index": 1
}
],
"style": {
"navigationBarTitleText": "getLaunchOptionsSync"
"navigationBarTitleText": "获取启动参数"
}
},
{
......@@ -786,7 +836,8 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
......@@ -798,7 +849,8 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
......@@ -810,7 +862,8 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
......@@ -822,7 +875,8 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
......@@ -852,11 +906,12 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
"navigationBarTitleText": "页面下拉刷新",
"navigationBarTitleText": "页面下拉刷新",
"enablePullDownRefresh": true
}
},
......@@ -865,11 +920,12 @@
"group": [
{
"id": "api.storage",
"name": "数据存储"
"name": "数据存储",
"index": 9
}
],
"style": {
"navigationBarTitleText": "数据存储"
"navigationBarTitleText": "storage | key-value本地数据存储"
}
},
// #ifndef WEB
......@@ -878,11 +934,12 @@
"group": [
{
"id": "api.file",
"name": "文件"
"name": "文件",
"index": 10
}
],
"style": {
"navigationBarTitleText": "文件管理"
"navigationBarTitleText": "getFileSystemManager | 获取文件管理器"
}
},
// #endif
......@@ -892,11 +949,12 @@
"group": [
{
"id": "api.base",
"name": "基础"
"name": "基础",
"index": 1
}
],
"style": {
"navigationBarTitleText": "env"
"navigationBarTitleText": "uni.env | 环境变量"
}
},
// #endif
......@@ -905,11 +963,12 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
"navigationBarTitleText": "操作菜单"
"navigationBarTitleText": "showActionSheet"
}
},
{
......@@ -917,11 +976,12 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
"navigationBarTitleText": "模态弹窗"
"navigationBarTitleText": "showModal"
}
},
{
......@@ -929,11 +989,12 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
"navigationBarTitleText": "加载提示框"
"navigationBarTitleText": "showLoading"
}
},
{
......@@ -941,11 +1002,12 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
"navigationBarTitleText": "消息提示框"
"navigationBarTitleText": "showToast"
}
},
{
......@@ -953,7 +1015,8 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
......@@ -971,11 +1034,12 @@
"group": [
{
"id": "api.location",
"name": "位置"
"name": "位置",
"index": 8
}
],
"style": {
"navigationBarTitleText": "获取定位"
"navigationBarTitleText": "getLocation | 获取当前位置"
}
},
{
......@@ -983,7 +1047,8 @@
"group": [
{
"id": "api.base",
"name": "基础"
"name": "基础",
"index": 1
}
],
"style": {
......@@ -1007,11 +1072,12 @@
"group": [
{
"id": "api.network",
"name": "网络"
"name": "网络",
"index": 5
}
],
"style": {
"navigationBarTitleText": "request"
"navigationBarTitleText": "request | 发起网络请求"
}
},
{
......@@ -1019,11 +1085,12 @@
"group": [
{
"id": "api.network",
"name": "网络"
"name": "网络",
"index": 5
}
],
"style": {
"navigationBarTitleText": "upload-file"
"navigationBarTitleText": "uploadFile | 上传文件"
}
},
{
......@@ -1031,11 +1098,12 @@
"group": [
{
"id": "api.network",
"name": "网络"
"name": "网络",
"index": 5
}
],
"style": {
"navigationBarTitleText": "download-file"
"navigationBarTitleText": "downloadFile | 下载文件"
}
},
{
......@@ -1049,7 +1117,8 @@
"group": [
{
"id": "api.network",
"name": "网络"
"name": "网络",
"index": 5
}
],
"style": {
......@@ -1061,7 +1130,8 @@
"group": [
{
"id": "api.unicloud",
"name": "uniCloud客户端API"
"name": "uniCloud客户端API",
"index": 17
}
],
"style": {
......@@ -1073,7 +1143,8 @@
"group": [
{
"id": "api.unicloud",
"name": "uniCloud客户端API"
"name": "uniCloud客户端API",
"index": 17
}
],
"style": {
......@@ -1085,11 +1156,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-system-info"
"navigationBarTitleText": "getSystemInfo"
}
},
{
......@@ -1097,11 +1169,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-device-info"
"navigationBarTitleText": "获取设备信息"
}
},
{
......@@ -1109,11 +1182,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-app-base-info"
"navigationBarTitleText": "获取APP基础信息"
}
},
// #ifndef WEB
......@@ -1122,11 +1196,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-system-setting"
"navigationBarTitleText": "获取系统设置"
}
},
// #endif
......@@ -1136,7 +1211,8 @@
"group": [
{
"id": "api.elementInstance",
"name": "Element 实例"
"name": "Element 实例",
"index": 30
}
],
"style": {
......@@ -1151,11 +1227,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-app-authorize-setting"
"navigationBarTitleText": "获取APP授权设置"
}
},
// #endif
......@@ -1164,11 +1241,12 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
"navigationBarTitleText": "图片预览"
"navigationBarTitleText": "previewImage"
}
},
{
......@@ -1176,11 +1254,12 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
"navigationBarTitleText": "拍摄图片或从相册中选择图片"
"navigationBarTitleText": "拍照和相册选择"
}
},
{
......@@ -1188,7 +1267,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1200,7 +1280,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1212,7 +1293,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1225,7 +1307,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1239,7 +1322,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1252,7 +1336,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1264,7 +1349,8 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
......@@ -1276,11 +1362,12 @@
"group": [
{
"id": "api.network",
"name": "网络"
"name": "网络",
"index": 5
}
],
"style": {
"navigationBarTitleText": "get-network-type"
"navigationBarTitleText": "获取设备网络状态"
}
},
{
......@@ -1288,11 +1375,12 @@
"group": [
{
"id": "api.page",
"name": "页面和路由"
"name": "页面和路由",
"index": 2
}
],
"style": {
"navigationBarTitleText": "pageScrollTo"
"navigationBarTitleText": "将页面滚动到指定位置"
}
},
{
......@@ -1300,11 +1388,12 @@
"group": [
{
"id": "api.base",
"name": "基础"
"name": "基础",
"index": 1
}
],
"style": {
"navigationBarTitleText": "event-bus"
"navigationBarTitleText": "事件总线eventBus"
}
},
{
......@@ -1312,7 +1401,8 @@
"group": [
{
"id": "api.unicloud",
"name": "uniCloud客户端API"
"name": "uniCloud客户端API",
"index": 17
}
],
"style": {
......@@ -1324,7 +1414,8 @@
"group": [
{
"id": "api.unicloud",
"name": "uniCloud客户端API"
"name": "uniCloud客户端API",
"index": 17
}
],
"style": {
......@@ -1336,11 +1427,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "电量"
"navigationBarTitleText": "getBatteryInfo"
}
},
{
......@@ -1348,11 +1440,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "get-window-info"
"navigationBarTitleText": "获取窗口信息"
}
},
// #ifndef WEB
......@@ -1361,7 +1454,8 @@
"group": [
{
"id": "api.elementInstance",
"name": "Element 实例"
"name": "Element 实例",
"index": 30
}
],
"style": {
......@@ -1376,11 +1470,12 @@
"group": [
{
"id": "api.loginVerify",
"name": "登录和验证"
"name": "登录和验证",
"index": 11
}
],
"style": {
"navigationBarTitleText": "实人认证",
"navigationBarTitleText": "金融级实人认证",
"enablePullDownRefresh": false
}
},
......@@ -1391,11 +1486,12 @@
"group": [
{
"id": "api.loginVerify",
"name": "登录和验证"
"name": "登录和验证",
"index": 11
}
],
"style": {
"navigationBarTitleText": "uni-verify",
"navigationBarTitleText": "getUniverifyManager | App一键登录",
"enablePullDownRefresh": false
}
},
......@@ -1405,7 +1501,8 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
......@@ -1419,11 +1516,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "权限申请监听",
"navigationBarTitleText": "监听权限申请",
"enablePullDownRefresh": false
}
},
......@@ -1434,11 +1532,12 @@
"group": [
{
"id": "api.payment",
"name": "支付"
"name": "支付",
"index": 14
}
],
"style": {
"navigationBarTitleText": "支付",
"navigationBarTitleText": "发起支付",
"enablePullDownRefresh": false
}
},
......@@ -1449,7 +1548,8 @@
"group": [
{
"id": "api.ad",
"name": "广告"
"name": "广告",
"index": 12
}
],
"style": {
......@@ -1464,7 +1564,8 @@
"group": [
{
"id": "api.payment",
"name": "支付"
"name": "支付",
"index": 14
}
],
"style": {
......@@ -1488,11 +1589,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "make-phone-call"
"navigationBarTitleText": "打电话"
}
},
// #endif
......@@ -1502,11 +1604,12 @@
"group": [
{
"id": "api.media",
"name": "媒体"
"name": "媒体",
"index": 7
}
],
"style": {
"navigationBarTitleText": "inner-audio"
"navigationBarTitleText": "音频"
}
},
// #endif
......@@ -1528,11 +1631,12 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
}
],
"style": {
"navigationBarTitleText": "clipboard"
"navigationBarTitleText": "clipboard | 剪切板"
}
},
// #endif
......@@ -1542,11 +1646,17 @@
"group": [
{
"id": "api.device",
"name": "设备"
"name": "设备",
"index": 6
},
{
"id": "api.device.compass",
"name": "Compass",
"index": 11
}
],
"style": {
"navigationBarTitleText": "on-compass-change"
"navigationBarTitleText": "onCompassChange | 监听罗盘数据"
}
},
// #endif
......@@ -1556,11 +1666,12 @@
"group": [
{
"id": "api.ui",
"name": "界面"
"name": "界面",
"index": 4
}
],
"style": {
"navigationBarTitleText": "主题切换",
"navigationBarTitleText": "主题",
"enablePullDownRefresh": false
}
},
......@@ -1570,11 +1681,12 @@
"group": [
{
"id": "api.dom",
"name": "Dom 节点"
"name": "Dom 节点",
"index": 3
}
],
"style": {
"navigationBarTitleText": "getElementById"
"navigationBarTitleText": "通过 id 获取 element"
}
},
{
......@@ -1588,11 +1700,12 @@
"group": [
{
"id": "api.dom",
"name": "Dom 节点"
"name": "Dom 节点",
"index": 3
}
],
"style": {
"navigationBarTitleText": "createSelectorQuery"
"navigationBarTitleText": "创建 SelectorQuery 实例"
}
},
{
......@@ -1600,7 +1713,8 @@
"group": [
{
"id": "api.elementInstance",
"name": "Element 实例"
"name": "Element 实例",
"index": 30
}
],
"style": {
......@@ -1619,7 +1733,8 @@
"group": [
{
"id": "css.properties.background",
"name": "background"
"name": "background",
"index": 8
}
],
"style": {
......@@ -1631,7 +1746,8 @@
"group": [
{
"id": "css.properties.background",
"name": "background"
"name": "background",
"index": 8
}
],
"style": {
......@@ -1643,7 +1759,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1655,7 +1772,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1667,7 +1785,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1679,7 +1798,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1691,7 +1811,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1703,7 +1824,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1715,7 +1837,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1727,7 +1850,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1739,7 +1863,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1751,7 +1876,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1763,7 +1889,8 @@
"group": [
{
"id": "css.properties.border",
"name": "border"
"name": "border",
"index": 13
}
],
"style": {
......@@ -1775,7 +1902,8 @@
"group": [
{
"id": "box-shadow",
"name": "box-shadow"
"name": "box-shadow",
"index": 15
}
],
"style": {
......@@ -1787,7 +1915,8 @@
"group": [
{
"id": "display",
"name": "display"
"name": "display",
"index": 5
}
],
"style": {
......@@ -1799,7 +1928,8 @@
"group": [
{
"id": "display",
"name": "display"
"name": "display",
"index": 5
}
],
"style": {
......@@ -1811,7 +1941,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1823,7 +1954,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1835,7 +1967,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1847,7 +1980,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1859,7 +1993,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1871,7 +2006,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1883,7 +2019,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1895,7 +2032,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1907,7 +2045,8 @@
"group": [
{
"id": "css.properties.flex",
"name": "flex"
"name": "flex",
"index": 7
}
],
"style": {
......@@ -1919,7 +2058,8 @@
"group": [
{
"id": "css.properties.height",
"name": "height"
"name": "height",
"index": 1
}
],
"style": {
......@@ -1931,7 +2071,8 @@
"group": [
{
"id": "css.properties.height",
"name": "height"
"name": "height",
"index": 1
}
],
"style": {
......@@ -1943,7 +2084,8 @@
"group": [
{
"id": "css.properties.width",
"name": "width"
"name": "width",
"index": 0
}
],
"style": {
......@@ -1955,7 +2097,8 @@
"group": [
{
"id": "css.properties.height",
"name": "height"
"name": "height",
"index": 1
}
],
"style": {
......@@ -1967,7 +2110,8 @@
"group": [
{
"id": "css.properties.width",
"name": "width"
"name": "width",
"index": 0
}
],
"style": {
......@@ -1979,7 +2123,8 @@
"group": [
{
"id": "css.properties.position",
"name": "position"
"name": "position",
"index": 9
}
],
"style": {
......@@ -1991,7 +2136,8 @@
"group": [
{
"id": "css.properties.width",
"name": "width"
"name": "width",
"index": 0
}
],
"style": {
......@@ -2003,7 +2149,8 @@
"group": [
{
"id": "z-index",
"name": "z-index"
"name": "z-index",
"index": 10
}
],
"style": {
......@@ -2015,7 +2162,8 @@
"group": [
{
"id": "visibility",
"name": "visibility"
"name": "visibility",
"index": 6
}
],
"style": {
......@@ -2027,7 +2175,8 @@
"group": [
{
"id": "css.properties.margin",
"name": "margin"
"name": "margin",
"index": 2
}
],
"style": {
......@@ -2039,7 +2188,8 @@
"group": [
{
"id": "css.properties.margin",
"name": "margin"
"name": "margin",
"index": 2
}
],
"style": {
......@@ -2051,7 +2201,8 @@
"group": [
{
"id": "css.properties.margin",
"name": "margin"
"name": "margin",
"index": 2
}
],
"style": {
......@@ -2063,7 +2214,8 @@
"group": [
{
"id": "css.properties.margin",
"name": "margin"
"name": "margin",
"index": 2
}
],
"style": {
......@@ -2075,7 +2227,8 @@
"group": [
{
"id": "css.properties.margin",
"name": "margin"
"name": "margin",
"index": 2
}
],
"style": {
......@@ -2087,7 +2240,8 @@
"group": [
{
"id": "overflow",
"name": "overflow"
"name": "overflow",
"index": 11
}
],
"style": {
......@@ -2099,7 +2253,8 @@
"group": [
{
"id": "css.properties.padding",
"name": "padding"
"name": "padding",
"index": 3
}
],
"style": {
......@@ -2111,7 +2266,8 @@
"group": [
{
"id": "css.properties.padding",
"name": "padding"
"name": "padding",
"index": 3
}
],
"style": {
......@@ -2123,7 +2279,8 @@
"group": [
{
"id": "css.properties.padding",
"name": "padding"
"name": "padding",
"index": 3
}
],
"style": {
......@@ -2135,7 +2292,8 @@
"group": [
{
"id": "css.properties.padding",
"name": "padding"
"name": "padding",
"index": 3
}
],
"style": {
......@@ -2147,7 +2305,8 @@
"group": [
{
"id": "css.properties.padding",
"name": "padding"
"name": "padding",
"index": 3
}
],
"style": {
......@@ -2159,7 +2318,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2171,7 +2331,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2183,7 +2344,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2195,7 +2357,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2207,7 +2370,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2219,7 +2383,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2231,7 +2396,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2243,7 +2409,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2255,7 +2422,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2267,7 +2435,8 @@
"group": [
{
"id": "css.properties.text",
"name": "text"
"name": "text",
"index": 14
}
],
"style": {
......@@ -2279,7 +2448,8 @@
"group": [
{
"id": "css.properties.transition",
"name": "transition"
"name": "transition",
"index": 16
}
],
"style": {
......@@ -2291,7 +2461,8 @@
"group": [
{
"id": "pointer-events",
"name": "pointer-events"
"name": "pointer-events",
"index": 18
}
],
"style": {
......@@ -2303,7 +2474,8 @@
"group": [
{
"id": "css.properties.transform",
"name": "transform"
"name": "transform",
"index": 17
}
],
"style": {
......@@ -2315,7 +2487,8 @@
"group": [
{
"id": "css.properties.transform",
"name": "transform"
"name": "transform",
"index": 17
}
],
"style": {
......@@ -2327,7 +2500,8 @@
"group": [
{
"id": "css.properties.transform",
"name": "transform"
"name": "transform",
"index": 17
}
],
"style": {
......@@ -2339,7 +2513,8 @@
"group": [
{
"id": "variable",
"name": "variable"
"name": "variable",
"index": 30
}
],
"style": {
......@@ -2351,7 +2526,8 @@
"group": [
{
"id": "overflow",
"name": "overflow"
"name": "overflow",
"index": 11
}
],
"style": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册