Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
a0d2083e
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6006
Star
91
Fork
164
代码
文件
提交
分支
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看板
提交
a0d2083e
编写于
7月 23, 2023
作者:
W
wanganxp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善字体和图片测试
上级
f5cac7bd
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
181 addition
and
128 deletion
+181
-128
pages/API/load-font-face/load-font-face-child.uvue
pages/API/load-font-face/load-font-face-child.uvue
+1
-1
pages/API/load-font-face/load-font-face.uvue
pages/API/load-font-face/load-font-face.uvue
+98
-105
pages/component/image/image-format.uvue
pages/component/image/image-format.uvue
+39
-12
pages/component/image/image-path.uvue
pages/component/image/image-path.uvue
+42
-9
pages/component/image/image.uvue
pages/component/image/image.uvue
+1
-1
pages/component/image/logo.png
pages/component/image/logo.png
+0
-0
static/test-image/logo.avif
static/test-image/logo.avif
+0
-0
static/test-image/logo.bmp
static/test-image/logo.bmp
+0
-0
static/test-image/logo.gif
static/test-image/logo.gif
+0
-0
static/test-image/logo.heic
static/test-image/logo.heic
+0
-0
static/test-image/logo.ico
static/test-image/logo.ico
+0
-0
static/test-image/logo.jpg
static/test-image/logo.jpg
+0
-0
static/test-image/logo.png
static/test-image/logo.png
+0
-0
static/test-image/logo.tif
static/test-image/logo.tif
+0
-0
static/test-image/logo.webp
static/test-image/logo.webp
+0
-0
未找到文件。
pages/API/load-font-face/load-font-face-child.uvue
浏览文件 @
a0d2083e
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
}}</text>
}}</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
<text style="margin-left:5px;line-height:22px;">\ue101</text>
</view>
</view>
<text class="uni-common-mt font-size-20">上一页非全局加载字体:</text>
<text class="uni-common-mt font-size-20">上一页非全局加载字体
(不生效为正常)
:</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF"
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF"
>font-family: 阿里妈妈刀隶体-ttf</text
>font-family: 阿里妈妈刀隶体-ttf</text
>
>
...
...
pages/API/load-font-face/load-font-face.uvue
浏览文件 @
a0d2083e
<template>
<template>
<view>
<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"
<text class="font-size-20 line-height-40" style="font-family: UniFontFamily">font-family: uni.ttf</text>
>font-family: uni.ttf</text
<view style="flex-direction: row;">
>
<text class="font-size-20" style="font-family: UniFontFamily;">{{
<view style="flex-direction: row;">
<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>
</view>
<text class="uni-common-mt font-size-20">非全局加载字体:</text>
<text class="uni-common-mt font-size-20">非全局加载字体:</text>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF"
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf
>font-family: 阿里妈妈刀隶体-ttf (网络字体下载后生效)</text
(网络字体下载后生效)</text>
>
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF">font-family:
<text class="font-size-20 line-height-40" style="font-family: AlimamaDaoLiTiOTF"
阿里妈妈刀隶体-otf</text>
>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>
<!-- <text class="item" style="font-family: AlimamaDaoLiTiWOFF"
<button class="uni-btn" @click="navigateToChild">跳转子页面测试字体生效范围</button>
>font-family: 阿里妈妈刀隶体-woff</text
</view>
>
</view>
<text class="item" style="font-family: AlimamaDaoLiTiWOFF2"
>font-family: 阿里妈妈刀隶体-woff2</text
> -->
<button class="uni-btn" @click="navigateToChild">跳转子页面</button>
</view>
</view>
</template>
</template>
<script>
<script>
export default {
export default {
data() {
data() {
return {
return {
uniIcon1: '\ue100',
uniIcon1: '\ue100',
uniIcon2: '\ue101',
uniIcon2: '\ue101',
}
}
},
},
onLoad() {
onLoad() {
uni.loadFontFace({
uni.loadFontFace({
global: true,
global: true,
family: 'UniFontFamily',
family: 'UniFontFamily',
source: '/static/font/uni.ttf',
source: '/static/font/uni.ttf',
success() {
success() {
console.log('global loadFontFace uni.ttf success')
console.log('global loadFontFace uni.ttf success')
},
},
fail(error) {
fail(error) {
console.warn('global loadFontFace uni.ttf fail', error.errMsg)
console.warn('global loadFontFace uni.ttf fail', error.errMsg)
},
},
})
})
uni.loadFontFace({
uni.loadFontFace({
family: 'AlimamaDaoLiTiTTF',
family: 'AlimamaDaoLiTiTTF',
source:
source:
'https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf',
'https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf',
success() {
success() {
console.log('loadFontFac
e AlimamaDaoLiTi.ttf success')
console.log('loadFontFace Remot
e AlimamaDaoLiTi.ttf success')
},
},
fail(error) {
fail(error) {
console.warn('loadFontFac
e AlimamaDaoLiTi.ttf fail', error.errMsg)
console.warn('loadFontFace Remot
e AlimamaDaoLiTi.ttf fail', error.errMsg)
},
},
})
})
uni.loadFontFace({
uni.loadFontFace({
family: 'AlimamaDaoLiTiOTF',
family: 'AlimamaDaoLiTiOTF',
source: '/static/font/AlimamaDaoLiTi.otf',
source: '/static/font/AlimamaDaoLiTi.otf',
success() {
success() {
console.log('loadFontFace AlimamaDaoLiTi.otf success')
console.log('loadFontFace AlimamaDaoLiTi.otf success')
},
},
fail(error) {
fail(error) {
console.warn('loadFontFace AlimamaDaoLiTi.otf fail', error.errMsg)
console.warn('loadFontFace AlimamaDaoLiTi.otf fail', error.errMsg)
},
},
})
})
//
uni.loadFontFace({
uni.loadFontFace({
//
family: 'AlimamaDaoLiTiWOFF',
family: 'AlimamaDaoLiTiWOFF',
//
source: '/static/font/AlimamaDaoLiTi.woff',
source: '/static/font/AlimamaDaoLiTi.woff',
//
success() {
success() {
//
console.log('loadFontFace AlimamaDaoLiTi.woff success')
console.log('loadFontFace AlimamaDaoLiTi.woff success')
//
},
},
//
fail(error) {
fail(error) {
//
console.warn('loadFontFace AlimamaDaoLiTi.woff fail', error.errMsg)
console.warn('loadFontFace AlimamaDaoLiTi.woff fail', error.errMsg)
//
},
},
//
})
})
//
uni.loadFontFace({
uni.loadFontFace({
//
family: 'AlimamaDaoLiTiWOFF2',
family: 'AlimamaDaoLiTiWOFF2',
//
source: '/static/font/AlimamaDaoLiTi.woff2',
source: '/static/font/AlimamaDaoLiTi.woff2',
//
success() {
success() {
//
console.log('loadFontFace AlimamaDaoLiTi.woff2 success')
console.log('loadFontFace AlimamaDaoLiTi.woff2 success')
//
},
},
//
fail(error) {
fail(error) {
//
console.warn('loadFontFace AlimamaDaoLiTi.woff2 fail', error.errMsg)
console.warn('loadFontFace AlimamaDaoLiTi.woff2 fail', error.errMsg)
//
},
},
//
})
})
},
},
methods: {
methods: {
navigateToChild() {
navigateToChild() {
uni.navigateTo({
uni.navigateTo({
url: '/pages/API/load-font-face/load-font-face-child',
url: '/pages/API/load-font-face/load-font-face-child',
})
})
},
},
},
},
}
}
</script>
</script>
<style>
<style>
.font-size-20 {
.font-size-20 {
font-size: 20px;
font-size: 20px;
}
}
.line-height-40 {
line-height: 40px;
.line-height-40 {
}
line-height: 40px;
</style>
}
</style>
\ No newline at end of file
pages/component/image/image-format.uvue
浏览文件 @
a0d2083e
...
@@ -11,6 +11,15 @@
...
@@ -11,6 +11,15 @@
<image class="image" mode="widthFix" :src="item.src"></image>
<image class="image" mode="widthFix" :src="item.src"></image>
</view>
</view>
</view>
</view>
<view class="uni-title">
<text class="uni-title-text">暂不支持的格式</text>
</view>
<view>
<text class="uni-subtitle-text">tif</text>
<view class="uni-center" style="background:#FFFFFF;">
<image src="/static/test-image/logo.tif" @error="imageErrorEvent"></image>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -20,29 +29,47 @@
...
@@ -20,29 +29,47 @@
data() {
data() {
return {
return {
title: 'image-format',
title: 'image-format',
data: [{
data: [
format: 'png',
{
src: '/static/logo.png'
format: 'avif',
src: '/static/test-image/logo.avif' //TODO
},
},
{
{
format: '
jpg
',
format: '
bmp
',
src: '/static/
logo.jpg
'
src: '/static/
test-image/logo.bmp
'
},
},
{
{
format: '
webp
',
format: '
gif
',
src: '/static/
logo.webp
'
src: '/static/
test-image/logo.gif
'
},
},
{
{
format: '
bmp
',
format: '
heic
',
src: '/static/
logo.bmp
'
src: '/static/
test-image/logo.heic
'
},
},
{
{
format: 'gif',
format: 'ico',
src: '/static/logo.gif'
src: '/static/test-image/logo.ico'
},
{
format: 'jpg',
src: '/static/test-image/logo.jpg'
},
{
format: 'png',
src: '/static/test-image/logo.png'
},
{
format: 'webp',
src: '/static/test-image/logo.webp'
}
}
] as Array < ImageFormat >
] as Array < ImageFormat >
}
}
}
},
methods: {
imageErrorEvent(e:ImageErrorEvent) {
console.log("图片加载错误",e.detail); //TODO tif打不出正确的错误日志
}
},
}
}
class ImageFormat {
class ImageFormat {
...
...
pages/component/image/image-path.uvue
浏览文件 @
a0d2083e
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<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 class="uni-title">
<view class="uni-title">
<text class="uni-title-text">
支持的
图片路径示例</text>
<text class="uni-title-text">图片路径示例</text>
</view>
</view>
<view v-for="(item,index) in data" :key="index">
<view v-for="(item,index) in data" :key="index">
<text class="uni-subtitle-text">{{item.description}}</text>
<text class="uni-subtitle-text">{{item.description}}</text>
<view class="uni-center" style="background:#FFFFFF;">
<view class="uni-center" style="background:#FFFFFF;">
<image class="image" mode="widthFix" :src="item.src"></image>
<image class="image" mode="widthFix" :src="item.src"
@error="imageErrorEvent"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -20,25 +20,58 @@
...
@@ -20,25 +20,58 @@
data() {
data() {
return {
return {
title: 'image-path',
title: 'image-path',
data: [{
data: [
src: 'https://web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png',
{
description: '网络路径'
src: '/static/test-image/logo.png',
description: '本地根路径'
},
},
{
{
src: '
/static/logo.png',
src: '
../../../static/test-image/logo.png', //TODO
description: '本地相对路径'
description: '本地相对路径'
},
},
{
{
src: 'file:///storage/emulated/0/Android/data/io.dcloud.uniappx/apps/__UNI__4517034/www/static/logo.png',
src: 'logo.png', //TODO
description: '本地当前路径'
},
{
src: 'file:///storage/emulated/0/Android/data/io.dcloud.uniappx/apps/__UNI__4517034/www/static/test-image/logo.png',
description: '本地绝对路径'
description: '本地绝对路径'
},
},
{
src: 'testerror.jpg',
description: '错误的本地路径'
},
{
{
src: 'data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNS8xMi8yM3CzGsQAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAQGUlEQVR4nO3df5ScVX3H8ffMLpsfBDCkQrQQQiAhHq5EIog+IAKCpwqHcFQKTbQg2AultLUiUDg5gNZfh2CFWjl45UBpg5IaUYugRUsSoDdIUBO9QhAhIYQ0AUlIQn4nO/3jPgPDZmd3Zp4f95mZ7+ucPezOPj8+WZ7v3DvPj3tLlUoFkR5lojJwCDAROAw4PP4aDxwMjAP2B0YBfUAJ2AnsADYD64F18dfzwIqa/6522m7L71/T+UpSAK1RJtoPmAAcARwJTIp/Phj4E2A/YDSwD9ALlJvcRQXYDewCtgFbgFeAl4BVwErgD/HXSqft+kT/oC4lBdAAZaIe4CjgOOA9wLH4g/6gkLlqbACeA34L/BJYAjin7ZagqdqAFEAdykRHAe8HTsMf+JPDJmraGnwxPAwsBJY5bXcFTVRAUgAxZaIRQAR8BDgdmIbvn3eKZ4EFwAPAQqfthsB5CqGrC0CZqBf/Ln8u8Gf4D6vd4I/4YpgP/LfTdmPgPMF0ZQEoEyngfODj+L59N1sL/Bi422m7MGiSALqmAJSJRgFnAxcBZ9BZ3Zu0LAX+DbjHabsucJZcdHwBKBP9KfAp/IHfLV2cpNYD3wWM0/Y3ocNkqWMLQJloCnAZcCFwQNg0basfuBe4xWn7aOgwWei4AogP/M/iD/wRYdN0lPuBOU7bRaGDpKljCkCZaAJwFfBp5MDP0o+ALzltl4QOkoa2L4D4loQrgM8gXZ083QF80Wm7InSQJNq6AJSJZgFfwN+HI/K3CZgD3OS03R46TCvasgCUiaYBNwIfCp1FAP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Dp1FJHYTcKXTNnSOvRS2AACUiRR+mtbjQ2cRLVmLf4D9v0IHqadQXaCBnLYO/3kg8fgvInc/BI4r8sEPBW8BaikTfRD4BvCO0FnEkF4FrnbatsWV/kK3ALWctv8DHIfvT7ZH1Xafe4Hp7XLwQxu1ALWUiU7AF0LLowKLVK0A/tFp23ZT6bZlAVQpE10CXIdcPAtlB3Az/qruxtBhWtHWBQCgTDQOuBr4W2Bk4Djd5HvA5522vwsdJIm2L4AqZaIpwLXAJ2mjzzZt6OfAl5y2C8PGSEfHFECVMtG78LMFzkQKIU0LgDlO25+EDpKmjiuAKmWiafhhGmciV5OTeAC4xWn7YOggWejYAqhSJjoCP4vNBciH5UZtwffxb3PaFmI20Kx0fAFUKRPtD5wLfAq527Se5fiHVOY6bZ8PHSYPXVMAteLrCLOAc4BDA8cJbQPwE/yB/6DTdk/gPLnqygKoUibaFzgN3zKcDrwtbKLcvAYsAuYDD4R4GL0ouroAaikT7Qd8ADgLOBWYEjZR6tYADwP3Aw/FI3h3PSmAQSgT9QDH4B/OOQWYDhwSMFIr1uPH2nkUfwpzidN2S9hIxSMF0ABlotHA0fib8Y4HpgGTgKLMzr0Vfz+OA57ATyX0G6ftK0FTtQEpgBbFt2BMBCbHX4fjP1AfBBwIjMHfmtEbf7WiH9iFn2jkNfytxi8Dq4GVwDPA74EVTtv/a3EfXU0KIGXx6dZDgSOBCfjPEhPw1yDGA+OAUXVW34k/K7MO32dfjT/AV+EP9hfyHjqw0/0/VOBpKm24LQkAAAAASUVORK5CYII=',
description: 'Base64'
description: 'Base64'
}
},
{
src: 'https://request.dcloud.net.cn/api/http/contentType/image/png',
description: '正确网络路径'
},{
src: 'https://request.dcloud.net.cn/api/http/contentType/wrongImage/gif',
description: '错误网络格式,假gif实为jpeg'
},{
src: 'https://request.dcloud.net.cn/api/http/contentType/wrongImage/jpeg',
description: '错误网络格式,假jpg实为png'
},{
src: 'https://request.dcloud.net.cn/api/http/contentType/wrongImage/png',
description: '错误网络格式,假png实为gif'
},{
src: 'https://request.dcloud.net.cn/api/http/contentType/404',
description: '错误网络地址404接口'
},{
src: 'https://request.dcloud.net.cn/api/http/contentType/404.png',
description: '错误网络地址,不存在的图片'
},
] as Array < ImagePath >
] as Array < ImagePath >
}
}
}
},
methods: {
imageErrorEvent(e:ImageErrorEvent) {
console.log("图片加载错误",e.detail); //TODO
}
},
}
}
class ImagePath {
class ImagePath {
...
...
pages/component/image/image.uvue
浏览文件 @
a0d2083e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<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 class="uni-center" style="background:#FFFFFF;">
<view class="uni-center" style="background:#FFFFFF;">
<image class="image" :fade-show="true" mode="widthFix" src="/static/logo.png" @error="error"
<image class="image" :fade-show="true" mode="widthFix" src="/static/
test-image/
logo.png" @error="error"
@load="load"></image>
@load="load"></image>
</view>
</view>
<view class="uni-btn-v">
<view class="uni-btn-v">
...
...
static
/logo.png
→
pages/component/image
/logo.png
浏览文件 @
a0d2083e
文件已移动
static/test-image/logo.avif
0 → 100644
浏览文件 @
a0d2083e
文件已添加
static/logo.bmp
→
static/
test-image/
logo.bmp
浏览文件 @
a0d2083e
文件已移动
static/logo.gif
→
static/
test-image/
logo.gif
浏览文件 @
a0d2083e
文件已移动
static/test-image/logo.heic
0 → 100644
浏览文件 @
a0d2083e
文件已添加
static/logo.ico
→
static/
test-image/
logo.ico
浏览文件 @
a0d2083e
文件已移动
static/logo.jpg
→
static/
test-image/
logo.jpg
浏览文件 @
a0d2083e
文件已移动
static/test-image/logo.png
0 → 100644
浏览文件 @
a0d2083e
4.2 KB
static/logo.tif
→
static/
test-image/
logo.tif
浏览文件 @
a0d2083e
文件已移动
static/logo.webp
→
static/
test-image/
logo.webp
浏览文件 @
a0d2083e
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录