2025-06-09 12:50:58 +08:00

57 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--index.wxml-->
<view class="block">
<t-navbar
t-class-placeholder="t-navbar-placeholder"
t-class-content="t-navbar-content"
title="主页"
t-class-title="nav-title"
/>
</view>
<scroll-view class="scrollarea" scroll-y type="list">
<view class="container">
<view class="userinfo">
<t-button theme="primary">按钮</t-button>
<block wx:if="{{canIUseNicknameComp && !hasUserInfo}}">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
<image class="avatar" src="{{userInfo.avatarUrl}}"></image>
</button>
<view class="nickname-wrapper">
<text class="nickname-label">昵称</text>
<input type="nickname" class="nickname-input" placeholder="请输入昵称" bind:change="onInputChange" />
</view>
</block>
<block wx:elif="{{!hasUserInfo}}">
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
<view wx:else> 请使用2.10.4及以上版本基础库 </view>
</block>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view>
</scroll-view>
<!-- 文本 + 图标 + 徽标 -->
<view class="wrapper">
<t-tab-bar t-class="t-tab-bar" defaultValue="label1" split="{{false}}">
<t-tab-bar-item badge-props="{{ {count: 16} }}" ariaLabel="首页有16条消息" value="label1" icon="home">
首页
</t-tab-bar-item>
<t-tab-bar-item badge-props="{{ { dot: true } }}" ariaLabel="应用,有新的消息" value="label2" icon="app">
应用
</t-tab-bar-item>
<t-tab-bar-item badge-props="{{ {count: 'New'} }}" ariaLabel="聊天New" value="label3" icon="chat">
聊天
</t-tab-bar-item>
<t-tab-bar-item badge-props="{{ {count: '···'} }}" ariaLabel="我的,有很多消息" value="label4" icon="user">
我的
</t-tab-bar-item>
</t-tab-bar>
</view>