Skip to content

Commit 5129faf

Browse files
committed
进入app-bar演示页面再展示
1 parent 6d5f719 commit 5129faf

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

miniprogram/app-bar/index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ Component({
3737
musicCover: 'https://res.wx.qq.com/op_res/Nu9XXzXcXnD1j5EgWQ2ElxNcl1yMvnKypRo4MTbjOv7FC3saigGoOBTZibyESC7EXaClnPYhB6pvfb-IRmso6g'
3838
},
3939

40-
pageLifetimes: {
41-
show: function() {
42-
// 页面被展示
43-
console.log('xxx', this.router)
44-
},
45-
},
46-
4740
lifetimes: {
4841
attached() {
4942
const progress = shared(0)
@@ -53,10 +46,12 @@ Component({
5346
const safeAreaInsetBottom = screenHeight - safeArea.bottom
5447
const isIOS = systemInfo.system.indexOf('iOS') >= 0
5548
this.setData({ statusBarHeight, maxCoverSize })
49+
console.log('attached: ', statusBarHeight, maxCoverSize)
5650

5751
this.applyAnimatedStyle('.cover', () => {
5852
'worklet'
5953
const height = initCoverSize + (maxCoverSize - initCoverSize) * progress.value
54+
console.log('height: ', maxCoverSize, initCoverSize, progress.value)
6055
return {
6156
width: `${height}px`,
6257
height:`${height}px`,
@@ -65,6 +60,7 @@ Component({
6560

6661
this.applyAnimatedStyle('.expand-container', () => {
6762
'worklet'
63+
console.log('expand-container: ', maxCoverSize, initCoverSize, progress.value)
6864
const t = progress.value
6965
const maxRadius = 30
7066
const radius = isIOS ? maxRadius * t : 0
@@ -77,6 +73,7 @@ Component({
7773

7874
this.applyAnimatedStyle('.title-wrap', () => {
7975
'worklet'
76+
console.log('title-wrap: ', maxCoverSize, initCoverSize, progress.value)
8077
return {
8178
opacity: 1 - progress.value
8279
}
@@ -85,6 +82,7 @@ Component({
8582
const navBarHeight = statusBarHeight + (isIOS ? 40 : 44)
8683
this.applyAnimatedStyle('.nav-bar', () => {
8784
'worklet'
85+
console.log('nav-bar: ', maxCoverSize, initCoverSize, progress.value)
8886
const t = progress.value
8987
const threshold = 0.8
9088
const opacity = t < threshold ? 0 : (t - threshold) / (1 - threshold)

miniprogram/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,5 +474,6 @@
474474
}
475475
},
476476
"renderer": "skyline",
477-
"componentFramework": "glass-easel"
477+
"componentFramework": "glass-easel",
478+
"appBar": {}
478479
}

miniprogram/packageAPI/pages/media/image/image.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<import src="../../../common/head.wxml" />
2-
<import src="../../../common/foot.wxml" />
1+
<import src="../../../../common/head.wxml" />
2+
<import src="../../../../common/foot.wxml" />
33

44
<view class="container page" data-weui-theme="{{theme}}">
55
<template is="head" data="{{title: 'choose/previewImage'}}"/>

project.config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"useStaticServer": true,
4545
"localPlugins": false,
4646
"condition": false,
47-
"skylineRenderEnable": true
47+
"skylineRenderEnable": true,
48+
"compileWorklet": true
4849
},
4950
"compileType": "miniprogram",
5051
"simulatorType": "wechat",

0 commit comments

Comments
 (0)