feat: 英文字母描红开发
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"navigationBarBackgroundColor": "#F8F0E0",
|
||||
"backgroundColor": "#FEF6E7",
|
||||
"usingComponents": {
|
||||
"van-icon": "@vant/weapp/icon/index"
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"nav-bar": "../../components3.0/nav-bar/nav-bar"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,51 +12,6 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fav-nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
flex-shrink: 0;
|
||||
background: fade(@bg-header, 82%);
|
||||
backdrop-filter: blur(40rpx);
|
||||
-webkit-backdrop-filter: blur(40rpx);
|
||||
box-shadow: 0 2rpx 12rpx rgba(50, 46, 37, 0.05);
|
||||
}
|
||||
|
||||
.fav-nav__inner {
|
||||
height: @nav-inner-height;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 @page-padding-x;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fav-nav__title {
|
||||
font-size: @fs-nav-title;
|
||||
font-weight: @fw-nav-title;
|
||||
color: @color-nav-title;
|
||||
letter-spacing: @ls-nav-title;
|
||||
}
|
||||
|
||||
.fav-nav__actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-width: 120rpx;
|
||||
}
|
||||
|
||||
.fav-nav__icon-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.fav-nav__clear {
|
||||
font-size: 26rpx;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { NAV_INNER_PX } from '../../utils/navMetrics';
|
||||
|
||||
const { statusBarHeight } = wx.getWindowInfo();
|
||||
const NAV_BLOCK_HEIGHT = statusBarHeight + NAV_INNER_PX;
|
||||
|
||||
type FavoritesTab = 'favorites' | 'downloads';
|
||||
|
||||
type FavoriteItem =
|
||||
@@ -114,9 +117,6 @@ const MOCK_DOWNLOADS: DownloadSection[] = [
|
||||
|
||||
Page({
|
||||
data: {
|
||||
statusBarHeight: 0,
|
||||
navBlockHeight: 0,
|
||||
/** 纵向 scroll-view 可视高度(窗口高 − 顶栏占位,避免内容滚入导航下) */
|
||||
favScrollHeight: 0,
|
||||
activeTab: 'favorites' as FavoritesTab,
|
||||
favoriteList: MOCK_FAVORITES as FavoriteItem[],
|
||||
@@ -125,11 +125,8 @@ Page({
|
||||
|
||||
onLoad() {
|
||||
const win = wx.getWindowInfo();
|
||||
const navBlockHeight = win.statusBarHeight + NAV_INNER_PX;
|
||||
this.setData({
|
||||
statusBarHeight: win.statusBarHeight,
|
||||
navBlockHeight,
|
||||
favScrollHeight: win.windowHeight - navBlockHeight,
|
||||
favScrollHeight: win.windowHeight - NAV_BLOCK_HEIGHT,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<view class="fav-page">
|
||||
<view class="fav-nav" style="padding-top: {{statusBarHeight}}px;">
|
||||
<view class="fav-nav__inner">
|
||||
<text class="fav-nav__title">我的收藏</text>
|
||||
</view>
|
||||
</view>
|
||||
<nav-bar title="我的收藏" />
|
||||
|
||||
<scroll-view
|
||||
class="fav-scroll"
|
||||
style="height: {{favScrollHeight}}px; margin-top: {{navBlockHeight}}px;"
|
||||
style="height: {{favScrollHeight}}px;"
|
||||
scroll-y
|
||||
enhanced
|
||||
show-scrollbar="{{false}}">
|
||||
|
||||
Reference in New Issue
Block a user