Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
18126b9d
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5953
Star
89
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
18126b9d
编写于
8月 14, 2023
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style: uniform indent
上级
ba131b3e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
416 addition
and
416 deletion
+416
-416
pages/API/get-app/get-app.uvue
pages/API/get-app/get-app.uvue
+6
-6
pages/API/load-font-face/load-font-face.uvue
pages/API/load-font-face/load-font-face.uvue
+96
-96
pages/API/navigator/navigator.uvue
pages/API/navigator/navigator.uvue
+2
-2
pages/API/navigator/new-page/new-page-2.uvue
pages/API/navigator/new-page/new-page-2.uvue
+67
-67
pages/CSS/text/font-family.uvue
pages/CSS/text/font-family.uvue
+3
-3
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+182
-182
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+60
-60
未找到文件。
pages/API/get-app/get-app.uvue
浏览文件 @
18126b9d
...
...
@@ -16,15 +16,15 @@
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
data() {
return {
_state: state as State,
_state: state as State,
lifeCycleNum: 0,
}
},
onReady() {
this.lifeCycleNum = state.lifeCycleNum
},
},
onReady() {
this.lifeCycleNum = state.lifeCycleNum
},
methods: {
_increasetLifeCycleNum: function () {
const app = getApp()
...
...
pages/API/load-font-face/load-font-face.uvue
浏览文件 @
18126b9d
<template>
<view>
<page-head title="loadFontFace"></page-head>
<view class="uni-padding-wrap">
<text class="font-size-20">全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<view style="flex-direction: row;">
<text class="font-size-20" style="font-family: UniFontFamily;">{{
<view>
<page-head title="loadFontFace"></page-head>
<view class="uni-padding-wrap">
<text class="font-size-20">全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
<view style="flex-direction: row;">
<text class="font-size-20" style="font-family: UniFontFamily;">{{
uniIcon1
}}</text>
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text class="font-size-20" style="font-family: UniFontFamily;">{{
<text style="margin-left:5px;margin-right: 20px;line-height:22px;">\ue100</text>
<text class="font-size-20" style="font-family: UniFontFamily;">{{
uniIcon2
}}</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 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>
</template>
<script>
export default {
data() {
return {
uniIcon1: '\ue100',
uniIcon2: '\ue101',
}
},
onLoad() {
uni.loadFontFace({
global: true,
family: 'UniFontFamily',
source: '/static/font/uni.ttf',
success() {
console.log('global loadFontFace uni.ttf success')
},
fail(error) {
console.warn('global loadFontFace uni.ttf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiTTF',
source:
'https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf',
success() {
console.log('loadFontFace Remote AlimamaDaoLiTi.ttf success')
},
fail(error) {
console.warn('loadFontFace Remote AlimamaDaoLiTi.ttf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiOTF',
source: '/static/font/AlimamaDaoLiTi.otf',
success() {
console.log('loadFontFace AlimamaDaoLiTi.otf success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.otf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiWOFF',
source: '/static/font/AlimamaDaoLiTi.woff',
success() {
console.log('loadFontFace AlimamaDaoLiTi.woff success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.woff fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiWOFF2',
source: '/static/font/AlimamaDaoLiTi.woff2',
success() {
console.log('loadFontFace AlimamaDaoLiTi.woff2 success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.woff2 fail', error.errMsg)
},
})
},
methods: {
navigateToChild() {
uni.navigateTo({
url: '/pages/API/load-font-face/load-font-face-child',
})
},
},
}
export default {
data() {
return {
uniIcon1: '\ue100',
uniIcon2: '\ue101',
}
},
onLoad() {
uni.loadFontFace({
global: true,
family: 'UniFontFamily',
source: '/static/font/uni.ttf',
success() {
console.log('global loadFontFace uni.ttf success')
},
fail(error) {
console.warn('global loadFontFace uni.ttf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiTTF',
source:
'https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf',
success() {
console.log('loadFontFace Remote AlimamaDaoLiTi.ttf success')
},
fail(error) {
console.warn('loadFontFace Remote AlimamaDaoLiTi.ttf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiOTF',
source: '/static/font/AlimamaDaoLiTi.otf',
success() {
console.log('loadFontFace AlimamaDaoLiTi.otf success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.otf fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiWOFF',
source: '/static/font/AlimamaDaoLiTi.woff',
success() {
console.log('loadFontFace AlimamaDaoLiTi.woff success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.woff fail', error.errMsg)
},
})
uni.loadFontFace({
family: 'AlimamaDaoLiTiWOFF2',
source: '/static/font/AlimamaDaoLiTi.woff2',
success() {
console.log('loadFontFace AlimamaDaoLiTi.woff2 success')
},
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.woff2 fail', error.errMsg)
},
})
},
methods: {
navigateToChild() {
uni.navigateTo({
url: '/pages/API/load-font-face/load-font-face-child',
})
},
},
}
</script>
<style>
.font-size-20 {
font-size: 20px;
}
.font-size-20 {
font-size: 20px;
}
.line-height-40 {
line-height: 40px;
}
.line-height-40 {
line-height: 40px;
}
</style>
\ No newline at end of file
pages/API/navigator/navigator.uvue
浏览文件 @
18126b9d
...
...
@@ -57,9 +57,9 @@
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
data() {
return {
_state: state as State,
_state: state as State,
onLoadTime: 0,
onShowTime: 0,
onReadyTime: 0,
...
...
pages/API/navigator/new-page/new-page-2.uvue
浏览文件 @
18126b9d
...
...
@@ -15,73 +15,73 @@
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
_state: state as State,
isScrolled: false,
}
},
onLoad(_ : OnLoadOptions) {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 100)
},
onShow() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onReady() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onPullDownRefresh() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onPageScroll(_) {
// 自动化测试
this.isScrolled = true
},
onReachBottom() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onBackPress(_ : OnBackPressOptions) : boolean | null {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 10)
return null
},
onHide() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 10)
},
onUnload() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 100)
},
methods: {
// 自动化测试
getLifeCycleNum() : number {
return state.lifeCycleNum
},
// 自动化测试
setLifeCycleNum(num : number) {
setLifeCycleNum(num)
},
pullDownRefresh() {
uni.startPullDownRefresh({
success() {
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000)
},
})
},
scrollToBottom() {
uni.pageScrollTo({
scrollTop: 2000,
})
},
},
data() {
return {
_state: state as State,
isScrolled: false,
}
},
onLoad(_ : OnLoadOptions) {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 100)
},
onShow() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onReady() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onPullDownRefresh() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onPageScroll(_) {
// 自动化测试
this.isScrolled = true
},
onReachBottom() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 10)
},
onBackPress(_ : OnBackPressOptions) : boolean | null {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 10)
return null
},
onHide() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 10)
},
onUnload() {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 100)
},
methods: {
// 自动化测试
getLifeCycleNum() : number {
return state.lifeCycleNum
},
// 自动化测试
setLifeCycleNum(num : number) {
setLifeCycleNum(num)
},
pullDownRefresh() {
uni.startPullDownRefresh({
success() {
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000)
},
})
},
scrollToBottom() {
uni.pageScrollTo({
scrollTop: 2000,
})
},
},
}
</script>
...
...
pages/CSS/text/font-family.uvue
浏览文件 @
18126b9d
...
...
@@ -9,13 +9,13 @@
<text class="common" style="font-family: AlimamaDaoLiTiTTF"
>font-family: 阿里妈妈刀隶体-ttf(网络字体下载后生效)</text
>
<!--
<text class="common" style="font-family: AlimamaDaoLiTiOTF"
<!--
<text class="common" style="font-family: AlimamaDaoLiTiOTF"
>font-family: 阿里妈妈刀隶体-otf</text
>
<text class="common" style="font-family: AlimamaDaoLiTiWOFF"
<text class="common" style="font-family: AlimamaDaoLiTiWOFF"
>font-family: 阿里妈妈刀隶体-woff</text
>
<text class="common" style="font-family: AlimamaDaoLiTiWOFF2"
<text class="common" style="font-family: AlimamaDaoLiTiWOFF2"
>font-family: 阿里妈妈刀隶体-woff2</text
> -->
</view>
...
...
pages/tabBar/API.uvue
浏览文件 @
18126b9d
...
...
@@ -144,20 +144,20 @@ export default {
open: false,
pages: [
/* {
name: "创建动画",
url: "animation",
enable: false
},
{
name: "创建绘画",
url: "canvas",
enable: false
},
{
name: "节点布局交互状态",
url: "intersection-observer",
enable: false
}, */
name: "创建动画",
url: "animation",
enable: false
},
{
name: "创建绘画",
url: "canvas",
enable: false
},
{
name: "节点布局交互状态",
url: "intersection-observer",
enable: false
}, */
{
name: '节点信息',
url: 'nodes-info',
...
...
@@ -222,57 +222,57 @@ export default {
url: 'get-battery-info',
},
/* {
name: "打电话",
url: "make-phone-call",
},
{
name: "震动",
url: "vibrate",
},
{
name: "添加手机联系人",
url: "add-phone-contact",
},
{
name: "扫码",
url: "scan-code",
},
{
name: "剪贴板",
url: "clipboard",
},
{
name: "屏幕亮度",
url: "brightness",
},
{
name: "蓝牙",
url: "bluetooth",
},
{
name: "生物认证",
url: "soter",
},
{
name: "iBeacon",
url: "ibeacon",
},
{
name: "监听加速度传感器",
url: "on-accelerometer-change",
},
{
name: "监听罗盘数据",
url: "on-compass-change",
},
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
}, */
name: "打电话",
url: "make-phone-call",
},
{
name: "震动",
url: "vibrate",
},
{
name: "添加手机联系人",
url: "add-phone-contact",
},
{
name: "扫码",
url: "scan-code",
},
{
name: "剪贴板",
url: "clipboard",
},
{
name: "屏幕亮度",
url: "brightness",
},
{
name: "蓝牙",
url: "bluetooth",
},
{
name: "生物认证",
url: "soter",
},
{
name: "iBeacon",
url: "ibeacon",
},
{
name: "监听加速度传感器",
url: "on-accelerometer-change",
},
{
name: "监听罗盘数据",
url: "on-compass-change",
},
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
}, */
] as Page[],
},
{
...
...
@@ -319,34 +319,34 @@ export default {
url: 'preview-image',
},
/* {
name: "图片选择和拍照",
url: "image",
enable: false
},{
name: "音频",
url: "inner-audio",
},
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
{
name: "视频选择和拍照",
url: "video",
enable: false
},
{
name: "文件",
url: "file",
},
{
name: "保存媒体到本地",
url: "save-media",
}, */
name: "图片选择和拍照",
url: "image",
enable: false
},{
name: "音频",
url: "inner-audio",
},
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
{
name: "视频选择和拍照",
url: "video",
enable: false
},
{
name: "文件",
url: "file",
},
{
name: "保存媒体到本地",
url: "save-media",
}, */
] as Page[],
},
{
...
...
@@ -359,21 +359,21 @@ export default {
url: 'get-location',
},
/* {
name: "使用地图查看位置",
url: "open-location",
},
{
name: "使用地图选择位置",
url: "choose-location",
},
{
name: "地图控制",
url: "map",
},
{
name: "地图搜索",
url: "map-search",
}, */
name: "使用地图查看位置",
url: "open-location",
},
{
name: "使用地图选择位置",
url: "choose-location",
},
{
name: "地图控制",
url: "map",
},
{
name: "地图搜索",
url: "map-search",
}, */
] as Page[],
},
{
...
...
@@ -388,80 +388,80 @@ export default {
] as Page[],
},
/* {
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
name: "全屏视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "login",
name: "登录",
open: false,
pages: [
{
name: "登录",
url: "login",
},
{
name: "获取用户信息",
url: "get-user-info",
},
] as Page[],
},
{
id: "share",
name: "分享",
open: false,
pages: [
{
name: "分享",
url: "share",
},
] as Page[],
},
{
id: "payment",
name: "支付",
open: false,
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
{
id: "speech",
name: "语音",
open: false,
pages: [
{
name: "语音识别",
url: "/platforms/app-plus/speech/speech",
},
] as Page[],
},
{
id: "push",
name: "推送",
open: false,
pages: [
{
name: "推送",
url: "/platforms/app-plus/push/push",
},
] as Page[],
}, */
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
name: "全屏视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "login",
name: "登录",
open: false,
pages: [
{
name: "登录",
url: "login",
},
{
name: "获取用户信息",
url: "get-user-info",
},
] as Page[],
},
{
id: "share",
name: "分享",
open: false,
pages: [
{
name: "分享",
url: "share",
},
] as Page[],
},
{
id: "payment",
name: "支付",
open: false,
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
{
id: "speech",
name: "语音",
open: false,
pages: [
{
name: "语音识别",
url: "/platforms/app-plus/speech/speech",
},
] as Page[],
},
{
id: "push",
name: "推送",
open: false,
pages: [
{
name: "推送",
url: "/platforms/app-plus/push/push",
},
] as Page[],
}, */
{
id: 'exit',
name: '退出',
...
...
pages/tabBar/component.uvue
浏览文件 @
18126b9d
...
...
@@ -96,15 +96,15 @@ export default {
name: 'swiper',
},
/*
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
*/
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
*/
{
name: 'list(新闻)',
url: '/pages/component/list/list',
...
...
@@ -144,17 +144,17 @@ export default {
name: 'checkbox',
},
/* {
name: 'form',
enable: false
}, */
name: 'form',
enable: false
}, */
{
name: 'input',
/* }, {
name: 'label',
enable: false
}, {
name: 'picker',
enable: false */
name: 'label',
enable: false
}, {
name: 'picker',
enable: false */
},
{
name: 'picker-view',
...
...
@@ -175,20 +175,20 @@ export default {
name: 'textarea',
},
/*
{
name: 'editor',
enable: false
},
*/
{
name: 'editor',
enable: false
},
*/
] as Page[],
/* }, {
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[] */
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[] */
},
{
id: 'media',
...
...
@@ -210,28 +210,28 @@ export default {
] as Page[],
},
/*
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
*/
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
*/
{
id: 'web-view',
name: '网页',
...
...
@@ -250,15 +250,15 @@ export default {
] as Page[],
},
/*
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
*/
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
*/
{
id: 'general-attr-event',
name: '通用属性和事件',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录