Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
23e24be7
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6060
Star
93
Fork
166
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
23e24be7
编写于
1月 20, 2024
作者:
DCloud-yinjiacheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新API示例
上级
20fdb4dc
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
281 addition
and
310 deletion
+281
-310
pages/API/get-app-authorize-setting/get-app-authorize-setting.uvue
.../get-app-authorize-setting/get-app-authorize-setting.uvue
+40
-42
pages/API/get-app-base-info/get-app-base-info.uvue
pages/API/get-app-base-info/get-app-base-info.uvue
+18
-20
pages/API/get-current-pages/get-current-pages.uvue
pages/API/get-current-pages/get-current-pages.uvue
+8
-10
pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue
...t-element-by-id/get-element-by-id-multiple-root-node.uvue
+2
-2
pages/API/get-element-by-id/get-element-by-id.uvue
pages/API/get-element-by-id/get-element-by-id.uvue
+16
-18
pages/API/get-launch-options-sync/get-launch-options-sync.uvue
.../API/get-launch-options-sync/get-launch-options-sync.uvue
+6
-8
pages/API/get-location/get-location.uvue
pages/API/get-location/get-location.uvue
+33
-35
pages/API/get-network-type/get-network-type.uvue
pages/API/get-network-type/get-network-type.uvue
+13
-15
pages/API/get-system-setting/get-system-setting.uvue
pages/API/get-system-setting/get-system-setting.uvue
+33
-35
pages/API/get-window-info/get-window-info.uvue
pages/API/get-window-info/get-window-info.uvue
+13
-15
pages/API/interceptor/interceptor.uvue
pages/API/interceptor/interceptor.uvue
+1
-1
pages/API/interceptor/page1.uvue
pages/API/interceptor/page1.uvue
+2
-2
pages/API/interceptor/page2.uvue
pages/API/interceptor/page2.uvue
+2
-2
pages/API/load-font-face/load-font-face-child.uvue
pages/API/load-font-face/load-font-face-child.uvue
+22
-24
pages/API/load-font-face/load-font-face.uvue
pages/API/load-font-face/load-font-face.uvue
+21
-23
pages/API/navigator/new-page/new-page-1.uvue
pages/API/navigator/new-page/new-page-1.uvue
+1
-1
pages/API/navigator/new-page/new-page-3.uvue
pages/API/navigator/new-page/new-page-3.uvue
+1
-1
pages/API/nodes-info/nodes-info.uvue
pages/API/nodes-info/nodes-info.uvue
+2
-1
pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue
...PI/set-navigation-bar-color/set-navigation-bar-color.uvue
+11
-13
pages/API/set-navigation-bar-title/set-navigation-bar-title.uvue
...PI/set-navigation-bar-title/set-navigation-bar-title.uvue
+8
-10
pages/API/websocket-global/websocket-global.uvue
pages/API/websocket-global/websocket-global.uvue
+14
-16
pages/API/websocket-socketTask/websocket-socketTask.uvue
pages/API/websocket-socketTask/websocket-socketTask.uvue
+14
-16
未找到文件。
pages/API/get-app-authorize-setting/get-app-authorize-setting.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view class="uni-common-mt">
<view class="uni-list">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">是否授权使用摄像头</view>
<view class="uni-label" style="width:180px;">是否授权使用摄像头</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="cameraAuthorized" />
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-pd">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="cameraAuthorized" />
<view class="uni-label" style="width:180px;">是否授权使用定位</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationAuthorized" />
</view>
</view>
</view>
<view class="uni-list-cell"
>
</view
>
<view class="uni-pd
">
<view class="uni-list-cell
">
<view class="uni-label" style="width:180px;">定位准确度</view
>
<view class="uni-pd"
>
</view>
<
view class="uni-label" style="width:180px;">是否授权使用定位<
/view>
<view class="uni-list-cell-db"
>
</view
>
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationAccuracy" /
>
<view class="uni-list-cell-db"
>
<
/view
>
<
input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationAuthorized" /
>
</view>
</view>
<view class="uni-list-cell">
</view>
<view class="uni-pd">
<view class="uni-list-cell">
<view class="uni-label" style="width:180px;">是否授权使用麦克风</view>
<view class="uni-pd">
</view>
<view class="uni-label" style="width:180px;">定位准确度</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="microphoneAuthorized" />
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-pd">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationAccuracy" />
<view class="uni-label" style="width:180px;">是否授权通知</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="notificationAuthorized" />
</view>
</view>
</view>
</view>
</view>
<view class="uni-
padding-wrap
">
<view class="uni-
list-cell
">
<view class="uni-
btn-v
">
<view class="uni-
pd
">
<
button type="primary" @tap="getAppAuthorizeSetting">获取App授权设置</button
>
<
view class="uni-label" style="width:180px;">是否授权使用麦克风</view
>
</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="microphoneAuthorized" />
</view>
</view>
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">是否授权通知</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="notificationAuthorized" />
</view>
</view>
</view>
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<button type="primary" @tap="getAppAuthorizeSetting">获取App授权设置</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-app-base-info/get-app-base-info.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view class="uni-common-mt">
<view class="uni-list">
<view class="uni-list">
<view class="uni-list-cell" v-for="(item,_) in items" style="align-items: center;">
<view class="uni-list-cell" v-for="(item,_) in items" style="align-items: center;">
<view class="uni-pd">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">{{item.label}}</view>
<view class="uni-label" style="width:180px;">{{item.label}}</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<textarea :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value" />
<textarea :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value" />
</view>
</view>
</view>
</view>
</view>
</view>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<view class="uni-btn-v">
<button type="primary" @tap="getAppBaseInfo">获取App基础信息</button>
<button type="primary" @tap="getAppBaseInfo">获取App基础信息</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
<script>
<script>
type Item = {
type Item = {
...
...
pages/API/get-current-pages/get-current-pages.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="getCurrentPages"></page-head>
<page-head title="getCurrentPages"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<button @click="_getCurrentPages">getCurrentPages</button>
<button @click="_getCurrentPages">getCurrentPages</button>
<view v-if="pages.length" style="padding: 15px 0px">
<view v-if="pages.length" style="padding: 15px 0px">
<text>当前页面栈中 {{ pages.length }} 个页面,列表如下:</text>
<text>当前页面栈中 {{ pages.length }} 个页面,列表如下:</text>
<template v-for="(page, index) in pages" :key="page.route">
<template v-for="(page, index) in pages" :key="page.route">
<text style="margin-top: 5px">index: {{ index }}, route: {{ page.route }}</text>
<text style="margin-top: 5px">index: {{ index }}, route: {{ page.route }}</text>
</template>
</template>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue
浏览文件 @
23e24be7
<template>
<template>
<page-head id="page-head" title="getElementById-multiple-root-node"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<page-head id="page-head" title="getElementById-multiple-root-node"></page-head>
<text id="text">this is text</text>
<text id="text">this is text</text>
<view id="view" class="uni-common-mt" style="border: 1px solid red">this is view</view>
<view id="view" class="uni-common-mt" style="border: 1px solid red">this is view</view>
<button class="uni-btn" @click="changePageHeadBackgroundColor">
<button class="uni-btn" @click="changePageHeadBackgroundColor">
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<button class="uni-btn" @click="changeTextColor">修改 text 字体颜色</button>
<button class="uni-btn" @click="changeTextColor">修改 text 字体颜色</button>
<button class="uni-btn" @click="changeViewStyle">
<button class="uni-btn" @click="changeViewStyle">
修改 view 宽高及背景色
修改 view 宽高及背景色
</button>
</button>
</view>
</view>
</template>
</template>
...
...
pages/API/get-element-by-id/get-element-by-id.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head id="page-head" title="getElementById"></page-head>
<page-head id="page-head" title="getElementById"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<text id="text">this is text</text>
<text id="text">this is text</text>
<view id="view" class="uni-common-mt" style="border: 1px solid red">this is view</view>
<view id="view" class="uni-common-mt" style="border: 1px solid red">this is view</view>
<button class="uni-btn" @click="changePageHeadBackgroundColor">
<button class="uni-btn" @click="changePageHeadBackgroundColor">
修改 page-head 背景色
修改 page-head 背景色
</button>
</button>
<button class="uni-btn" @click="changeTextColor">
<button class="uni-btn" @click="changeTextColor">
修改 text 字体颜色
修改 text 字体颜色
</button>
</button>
<button class="uni-btn" @click="changeViewStyle">
<button class="uni-btn" @click="changeViewStyle">
修改 view 宽高及背景色
修改 view 宽高及背景色
</button>
</button>
<button class="uni-btn" @click="goMultipleRootNode">
<button class="uni-btn" @click="goMultipleRootNode">
跳转多根节点示例
跳转多根节点示例
</button>
</button>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/get-launch-options-sync/get-launch-options-sync.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="getLaunchOptionsSync"></page-head>
<page-head title="getLaunchOptionsSync"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<button @click="getLaunchOptionsSync">getLaunchOptionsSync</button>
<button @click="getLaunchOptionsSync">getLaunchOptionsSync</button>
<view v-if="launchOptionsPath.length > 0" class="uni-common-mt">
<view v-if="launchOptionsPath.length > 0" class="uni-common-mt">
<text>应用启动路径:</text>
<text>应用启动路径:</text>
<text style="margin-top: 5px">{{ launchOptionsPath }}</text>
<text style="margin-top: 5px">{{ launchOptionsPath }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/get-location/get-location.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view style="padding: 4px;">
<view style="padding: 4px;">
<text class="hello-text">
<text class="hello-text">
真机运行标准基座仅包含系统定位,即system。\n
真机运行标准基座仅包含系统定位,即system。\n
部分手机因gms兼容不好可能导致无法定位。\n
部分手机因gms兼容不好可能导致无法定位。\n
gcj国标、逆地理信息等功能需三方sdk定位。如果需要类似能力可以下载腾讯定位插件,打包自定义基座。参考示例:</text>
gcj国标、逆地理信息等功能需三方sdk定位。如果需要类似能力可以下载腾讯定位插件,打包自定义基座。参考示例:</text>
<u-link :href="'https://ext.dcloud.net.cn/plugin?id=14569'" :text="'https://ext.dcloud.net.cn/plugin?id=14569'" :inWhiteList="true"></u-link>
<u-link :href="'https://ext.dcloud.net.cn/plugin?id=14569'" :text="'https://ext.dcloud.net.cn/plugin?id=14569'" :inWhiteList="true"></u-link>
</view>
</view>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-list">
<view class="uni-list">
<radio-group @change="radioChange">
<radio-group @change="radioChange">
<radio class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value"
<radio class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value"
:class="index < items.length - 1 ? 'uni-list-cell-line': ''" :value="item.value"
:class="index < items.length - 1 ? 'uni-list-cell-line': ''" :value="item.value"
:checked="index === current">
:checked="index === current">
{{item.name}}
{{item.name}}
</radio>
</radio>
</radio-group>
</radio-group>
</view>
</view>
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell-db">高度信息</view>
<view class="uni-list-cell-db">高度信息</view>
<switch :checked="altitudeSelect" @change="altitudeChange" />
<switch :checked="altitudeSelect" @change="altitudeChange" />
</view>
</view>
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell-db">开启高精度定位</view>
<view class="uni-list-cell-db">开启高精度定位</view>
<switch :checked="isHighAccuracySelect" @change="highAccuracySelectChange" />
<switch :checked="isHighAccuracySelect" @change="highAccuracySelectChange" />
</view>
</view>
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell uni-list-cell-pd">
<view class="uni-list-cell-db">是否解析地址信息</view>
<view class="uni-list-cell-db">是否解析地址信息</view>
<switch :checked="geocodeSelect" @change="geocodeChange" />
<switch :checked="geocodeSelect" @change="geocodeChange" />
</view>
</view>
<text>{{exeRet}}</text>
<text>{{exeRet}}</text>
<view class="uni-btn-v">
<view class="uni-btn-v">
<button class="uni-btn" type="default" @tap="getLocationTap">获取定位</button>
<button class="uni-btn" type="default" @tap="getLocationTap">获取定位</button>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/get-network-type/get-network-type.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-padding-wrap uni-common-mt">
<view style="background:#FFFFFF; padding:20px;">
<view style="background:#FFFFFF; padding:20px;">
<view class="uni-center">网络状态</view>
<view class="uni-center">网络状态</view>
<view v-if="hasNetworkType == false">
<view v-if="hasNetworkType == false">
<view class="uni-center uni-common-mt">未获取</view>
<view class="uni-center uni-common-mt">未获取</view>
<view class="uni-center uni-common-mt">请点击下面按钮获取网络状态</view>
<view class="uni-center uni-common-mt">请点击下面按钮获取网络状态</view>
</view>
<view v-if="hasNetworkType == true">
<view class="uni-center uni-common-mt">{{networkType}}</view>
</view>
</view>
</view>
<view class="uni-btn-v uni-common-mt">
<view v-if="hasNetworkType == true">
<button type="primary" @tap="getNetworkType">获取设备网络状态</button>
<view class="uni-center uni-common-mt">{{networkType}}</view>
<button class="uni-common-mt" @tap="clear">清空</button>
</view>
</view>
</view>
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @tap="getNetworkType">获取设备网络状态</button>
<button class="uni-common-mt" @tap="clear">清空</button>
</view>
</view>
</view>
</template>
</template>
<script>
<script>
...
...
pages/API/get-system-setting/get-system-setting.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view class="uni-common-mt">
<view class="uni-list">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">蓝牙的系统开关</view>
<view class="uni-label" style="width:180px;">蓝牙的系统开关</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="bluetoothEnabled" />
</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-pd">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="bluetoothEnabled" />
<view class="uni-label" style="width:180px;">地理位置的系统开关</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationEnabled" />
</view>
</view>
</view>
<view class="uni-list-cell">
</view>
<view class="uni-pd">
<view class="uni-list-cell">
<view class="uni-label" style="width:180px;">Wi-Fi 的系统开关</view>
<view class="uni-pd">
</view>
<view class="uni-label" style="width:180px;">地理位置的系统开关</view>
<view class="uni-list-cell-db">
</view>
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="wifiEnabled" />
<view class="uni-list-cell-db">
</view>
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="locationEnabled" />
</view>
</view>
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">Wi-Fi 的系统开关</view>
</view>
</view>
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-pd">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="wifiEnabled" />
<view class="uni-label" style="width:180px;">设备方向</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="deviceOrientation" />
</view>
</view>
</view>
</view>
</view>
<view class="uni-
padding-wrap
">
<view class="uni-
list-cell
">
<view class="uni-
btn-v
">
<view class="uni-
pd
">
<
button type="primary" @tap="getSystemSetting">获取系统设置</button
>
<
view class="uni-label" style="width:180px;">设备方向</view
>
</view>
</view>
<view class="uni-list-cell-db">
<input class="uni-input" type="text" :disabled="true" placeholder="未获取" :value="deviceOrientation" />
</view>
</view>
</view>
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<button type="primary" @tap="getSystemSetting">获取系统设置</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/API/get-window-info/get-window-info.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head :title="title"></page-head>
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view class="uni-common-mt">
<view class="uni-list">
<view class="uni-list">
<view class="uni-list-cell" v-for="(item, _) in items" style="align-items: center">
<view class="uni-list-cell" v-for="(item, _) in items" style="align-items: center">
<view class="uni-pd">
<view class="uni-pd">
<view class="uni-label" style="width: 180px">{{ item.label }}</view>
<view class="uni-label" style="width: 180px">{{ item.label }}</view>
</view>
<view class="uni-list-cell-db">
<textarea :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value" />
</view>
</view>
</view>
</view>
<view class="uni-list-cell-db">
<view class="uni-padding-wrap">
<textarea :auto-height="true" :disabled="true" placeholder="未获取" :value="item.value" />
<view class="uni-btn-v">
<button type="primary" @tap="getWindowInfo">获取窗口信息</button>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<button type="primary" @tap="getWindowInfo">获取窗口信息</button>
</view>
</view>
</view>
</view>
</template>
</template>
<script>
<script>
...
...
pages/API/interceptor/interceptor.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<view
style="flex: 1;"
>
<button @click="addInterceptor">添加路由拦截器</button>
<button @click="addInterceptor">添加路由拦截器</button>
<button @click="removeInterceptor">移除路由拦截器</button>
<button @click="removeInterceptor">移除路由拦截器</button>
<text>点击下方按钮{{msg}}</text>
<text>点击下方按钮{{msg}}</text>
...
...
pages/API/interceptor/page1.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<view
style="flex: 1;"
>
<text style="text-align: center;">测试页面 1</text>
<text style="text-align: center;">测试页面 1</text>
</view>
</view>
</template>
</template>
...
@@ -19,4 +19,4 @@
...
@@ -19,4 +19,4 @@
<style>
<style>
</style>
</style>
\ No newline at end of file
pages/API/interceptor/page2.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<view
style="flex: 1;"
>
<text style="text-align: center;">测试页面 2</text>
<text style="text-align: center;">测试页面 2</text>
</view>
</view>
</template>
</template>
...
@@ -19,4 +19,4 @@
...
@@ -19,4 +19,4 @@
<style>
<style>
</style>
</style>
\ No newline at end of file
pages/API/load-font-face/load-font-face-child.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="loadFontFace-child"></page-head>
<page-head title="loadFontFace-child"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<text class="font-size-20">上一页全局加载字体:</text>
<text class="font-size-20">上一页全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<view style="flex-direction: row;">
<view style="flex-direction: row;">
<text style="font-family: UniFontFamily;font-size:20px;">{{
<text style="font-family: UniFontFamily;font-size:20px;">{{
uniIcon1
uniIcon1
}}</text>
}}</text>
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text style="font-family: UniFontFamily;font-size:20px;">{{
<text style="font-family: UniFontFamily;font-size:20px;">{{
uniIcon2
uniIcon2
}}</text>
}}</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
</view>
<text class="uni-common-mt font-size-20">上一页非全局加载字体(不生效为正常):</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF">font-family: 阿里妈妈刀隶体-otf</text>
<!-- <text class="item" style="font-family: AlimamaDaoLiTiWOFF"
>font-family: 阿里妈妈刀隶体-woff</text
>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF2"
>font-family: 阿里妈妈刀隶体-woff2</text
> -->
</view>
</view>
<text class="uni-common-mt font-size-20">上一页非全局加载字体(不生效为正常):</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF">font-family: 阿里妈妈刀隶体-otf</text>
<!-- <text class="item" style="font-family: AlimamaDaoLiTiWOFF"
>font-family: 阿里妈妈刀隶体-woff</text
>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF2"
>font-family: 阿里妈妈刀隶体-woff2</text
> -->
</view>
</view>
</template>
</template>
...
...
pages/API/load-font-face/load-font-face.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="loadFontFace"></page-head>
<page-head title="loadFontFace"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<text class="font-size-20">全局加载字体:</text>
<text class="font-size-20">全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<view style="flex-direction: row;">
<view style="flex-direction: row;">
<text class="font-size-20" style="font-family: UniFontFamily;">{{
<text class="font-size-20" style="font-family: UniFontFamily;">{{
uniIcon1
uniIcon1
}}</text>
}}</text>
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text class="font-size-20" style="font-family: UniFontFamily;">{{
<text class="font-size-20" style="font-family: UniFontFamily;">{{
uniIcon2
uniIcon2
}}</text>
}}</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
</view>
<text class="uni-common-mt font-size-20">非全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf
(网络字体下载后生效)</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF">font-family:
阿里妈妈刀隶体-otf</text>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF">font-family: 阿里妈妈刀隶体-woff</text>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF2">font-family: 阿里妈妈刀隶体-woff2</text>
<button class="uni-btn" @click="navigateToChild">跳转子页面测试字体生效范围</button>
</view>
</view>
<text class="uni-common-mt font-size-20">非全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf
(网络字体下载后生效)</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF">font-family:
阿里妈妈刀隶体-otf</text>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF">font-family: 阿里妈妈刀隶体-woff</text>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF2">font-family: 阿里妈妈刀隶体-woff2</text>
<button class="uni-btn" @click="navigateToChild">跳转子页面测试字体生效范围</button>
</view>
</view>
</template>
</template>
<script>
<script>
...
...
pages/API/navigator/new-page/new-page-1.uvue
浏览文件 @
23e24be7
<template>
<template>
<page-head title="new-page-1" />
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<page-head title="new-page-1" />
<text>onLoad 接收到参数</text>
<text>onLoad 接收到参数</text>
<text>data: {{ data }}</text>
<text>data: {{ data }}</text>
<button @tap="navigateBackWithDelta2" class="uni-btn">
<button @tap="navigateBackWithDelta2" class="uni-btn">
...
...
pages/API/navigator/new-page/new-page-3.uvue
浏览文件 @
23e24be7
<template>
<template>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap"
style="flex: 1;"
>
<page-head title="new-page-3" />
<page-head title="new-page-3" />
</view>
</view>
</template>
</template>
pages/API/nodes-info/nodes-info.uvue
浏览文件 @
23e24be7
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
<style>
<style>
.page {
.page {
padding: 15px;
padding: 15px;
flex: 1;
}
}
.btn {
.btn {
...
@@ -141,4 +142,4 @@
...
@@ -141,4 +142,4 @@
font-weight: bold;
font-weight: bold;
line-height: 2;
line-height: 2;
}
}
</style>
</style>
\ No newline at end of file
pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="setNavigationBarColor"></page-head>
<page-head title="setNavigationBarColor"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-padding-wrap uni-common-mt">
<button @tap="setNavigationBarColor1" class="uni-btn">
<button @tap="setNavigationBarColor1" class="uni-btn">
设置导航条背景绿色,标题白色
设置导航条背景绿色,标题白色
</button>
</button>
<button @tap="setNavigationBarColor2" class="uni-btn">
<button @tap="setNavigationBarColor2" class="uni-btn">
设置导航条背景红色,标题黑色
设置导航条背景红色,标题黑色
</button>
</button>
<button @tap="goCustomNavigation" class="uni-btn">
<button @tap="goCustomNavigation" class="uni-btn">
跳转自定义导航栏页面
跳转自定义导航栏页面
</button>
</button>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/set-navigation-bar-title/set-navigation-bar-title.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="setNavigationBarTitle"></page-head>
<page-head title="setNavigationBarTitle"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-padding-wrap uni-common-mt">
<button @tap="setNavigationBarNewTitle" class="uni-btn">
<button @tap="setNavigationBarNewTitle" class="uni-btn">
设置当前页面标题为: {{ newTitle }}
设置当前页面标题为: {{ newTitle }}
</button>
</button>
<button @tap="setNavigationBarLongTitle" class="uni-btn">
<button @tap="setNavigationBarLongTitle" class="uni-btn">
设置超长标题
设置超长标题
</button>
</button>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/websocket-global/websocket-global.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="websocket通讯示例"></page-head>
<page-head title="websocket通讯示例"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<view class="uni-btn-v">
<text class="websocket-msg">{{ showMsg }}</text>
<text class="websocket-msg">{{ showMsg }}</text>
<button class="uni-btn-v" type="primary" @click="connect">
<button class="uni-btn-v" type="primary" @click="connect">
连接websocket服务
连接websocket服务
</button>
</button>
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">
发送一条消息
发送一条消息
</button>
</button>
<button class="uni-btn-v" type="primary" @click="close">
<button class="uni-btn-v" type="primary" @click="close">
断开websocket服务
断开websocket服务
</button>
</button>
<text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text>
<text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
pages/API/websocket-socketTask/websocket-socketTask.uvue
浏览文件 @
23e24be7
<template>
<template>
<view>
<page-head title="websocket通讯示例"></page-head>
<page-head title="websocket通讯示例"></page-head>
<view class="uni-padding-wrap">
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<view class="uni-btn-v">
<text class="websocket-msg">{{ showMsg }}</text>
<text class="websocket-msg">{{ showMsg }}</text>
<button class="uni-btn-v" type="primary" @click="connect">
<button class="uni-btn-v" type="primary" @click="connect">
连接websocket服务
连接websocket服务
</button>
</button>
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">
发送一条消息
发送一条消息
</button>
</button>
<button class="uni-btn-v" type="primary" @click="close">
<button class="uni-btn-v" type="primary" @click="close">
断开websocket服务
断开websocket服务
</button>
</button>
<text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text>
<text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录