提交 4f347962 编写于 作者: W wanganxp

- 添加了loadFontFace测试例

- 补充了一些模板的需求导航
- 去掉了css里字体图标的需求
- 改了滚动搜索条的返回写法
上级 3c3c6f23
<template>
<view style="flex-grow: 1;">
<view>
<text>不支持背景图片,仅支持linear-gradient方法</text>
<text>background-image: linear-gradient(to right, red, yellow)</text>
<view class="common" style="background-image: linear-gradient(to right, red, yellow);"></view>
</view>
......
......@@ -3,7 +3,7 @@
<view style="height: 500rpx;background-color: gray;justify-content: center;align-items: center;">
<text class="common" style="font-family: monospace;">font-family: monospace</text>
<text class="common" style="font-family: cursive;">font-family: cursive</text>
<text class="common" style="font-family: AlimamaDaoLiTi;">font-family: 阿里妈妈刀隶体</text>
<text class="common" style="font-family: AlimamaDaoLiTi;">font-family: 阿里妈妈刀隶体(网络字体下载后生效)</text>
</view>
</view>
</template>
......
......@@ -301,6 +301,11 @@
name: "保存媒体到本地",
url: "save-media",
}, */
{
name: "动态加载字体",
url: "load-font-face",
enable:false
},
] as Page[],
},
{
......
......@@ -267,17 +267,6 @@
url: 'pages/CSS/transform/transform'
}
] as Page[]
}, {
id: 'iconfont',
name: '字体图标',
open: false,
pages: [
{
name: '字体图标',
enable: false,
url: 'pages/CSS/iconfont/iconfont'
},
] as Page[]
}
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
......
......@@ -11,12 +11,14 @@
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon" class="uni-icon">
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon">
</image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text" :class="page.enable == false ? 'text-disabled' : ''">{{page.name}}</text>
<text class="uni-navigate-text"
:class="page.enable == false ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
......@@ -44,30 +46,39 @@
return {
list: [
{
id: "custom-navigationbar",
url: "custom-navigationbar",
name: "自定义导航栏",
id: "scroll-fold-nav",
url: "scroll-fold-nav",
name: "随滚动折叠的导航栏",
open: false,
pages: [] as Page[]
}, {
id: "swiper-list",
url: "swiper-list",
name: "swiper-list",
open: false,
enable: false,
pages: [] as Page[]
},{
id: "drop-card",
url: "drop-card",
name: "划走式卡片",
}, {
id: "custom-pull-page",
url: "custom-pull-page",
name: "自定义上拉下拉效果",
open: false,
pages: [] as Page[]
},{
id: "scroll-fold-nav",
url: "scroll-fold-nav",
name: "随滚动折叠的导航栏",
},
{
id: "pull-zoom-image",
url: "pull-zoom-image",
name: "下拉缩放顶部封面图",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "custom-pull-page",
url: "custom-pull-page",
name: "自定义上拉下拉效果",
id: "show-search-with-scroll",
url: "show-search-with-scroll",
name: "滚动后自动显隐的搜索框",
open: false,
enable: false,
pages: [] as Page[]
},
{
......@@ -86,11 +97,10 @@
pages: [] as Page[]
},
{
id: "swiper-list",
url: "swiper-list",
name: "swiper-list",
id: "drop-card",
url: "drop-card",
name: "划走式卡片",
open: false,
enable: false,
pages: [] as Page[]
}
] as ListItem[],
......
......@@ -5,7 +5,7 @@
<view style="height: 110px;">
<!-- 垫高专用 -->
</view>
<view v-for="(item,index) in 100" :key="index" style="height: 100px;background-color: #FFF;">
<view v-for="(item,index) in 20" :key="index" style="height: 100px;background-color: #FFF;">
content-{{item}}
</view>
</view>
......@@ -49,13 +49,24 @@
this.scrollTop = e.detail.scrollTop
},
back(){
// 暂不支持通过navigateBack api 返回
// uni.navigateBack()
uni.switchTab({
url:'/pages/tabBar/template'
// uni.navigateBack() // 这么写用不了
// 这么写可以用
uni.navigateBack({
success(result) {
console.log('navigateBack success', result.errMsg)
},
fail(error) {
console.log('navigateBack fail', error.errMsg)
},
complete(result) {
console.log('navigateBack complete', result.errMsg)
},
})
// uni.switchTab({
// url:'/pages/tabBar/template'
// })
},
toSearchPage(){
uni.showToast({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册