- 请创建两个页面,通过按钮来相互切换,并附上代码及运行结果截图;
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 二、实验步骤与结果(给出对应的代码或运行结果截图) |---|---------------------------------------------------------------------------------------------------|---|---------------------------------------------------------------------------------------------------| | | | | | | | | | | |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 三、问题总结与体会 | | demo-1.wxml <!--pages/demo-1/demo-1.wxml--> <view class="box1">页面二</view> <view class="box2"><navigator url="../index/index">返回上一页 </navigator></view> demo-1.wxss /* pages/demo-1/demo-1.wxss */ .box1{ margin-top: 100rpx; text-align: center; } .box2{ background-color: #eee; height: 100rpx; width: 350rpx; text-align: center; line-height: 100rpx; font-size: 42rpx; font-weight: bolder; margin: 0 auto; position: relative; top: 600rpx; } index.wxml <!--index.wxml--> <view class="box1">页面一</view> <view class="box2"><navigator url="../demo-1/demo-1"> 下一页</navigator></view> index.wxss .box1{ margin-top: 100rpx; text-align: center; } .box2{ background-color: #eee; height: 100rpx; width: 350rpx; text-align: center; line-height: 100rpx; font-size: 42rpx; font-weight: bolder; margin: 0 auto; position: relative; top: 600rpx; } app.json { "pages": [ "pages/index/index", "pages/logs/logs", "pages/demo-1/demo-1" ], "window": { "navigationBarTextStyle": "black", "navigationBarTitleText": "Weixin", "navigationBarBackgroundColor": "#ffffff" }, "style": "v2", "componentFramework": "glass-easel", "lazyCodeLoading": "requiredComponents" } | |