项目初始化
This commit is contained in:
9
miniprogram/pages/user/user.json
Normal file
9
miniprogram/pages/user/user.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-grid": "tdesign-miniprogram/grid/grid",
|
||||
"t-grid-item": "tdesign-miniprogram/grid-item/grid-item",
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"t-avatar-group": "tdesign-miniprogram/avatar-group/avatar-group"
|
||||
}
|
||||
}
|
||||
13
miniprogram/pages/user/user.ts
Normal file
13
miniprogram/pages/user/user.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
Component({
|
||||
data: {
|
||||
img1: 'https://tdesign.gtimg.com/mobile/demos/example1.png',
|
||||
img2: 'https://tdesign.gtimg.com/mobile/demos/example2.png',
|
||||
img3: 'https://tdesign.gtimg.com/mobile/demos/example3.png',
|
||||
image: 'https://tdesign.gtimg.com/mobile/demos/avatar1.png',
|
||||
},
|
||||
methods: {
|
||||
userlogin(){
|
||||
wx.navigateTo({url:'/pages/user-login/user-login'})
|
||||
}
|
||||
},
|
||||
})
|
||||
13
miniprogram/pages/user/user.wxml
Normal file
13
miniprogram/pages/user/user.wxml
Normal file
@@ -0,0 +1,13 @@
|
||||
<view class="user-contain">
|
||||
<view class="user-avatar">
|
||||
<t-avatar class="avatar-example" image="{{image}}" size="large" />
|
||||
<a class="avatar-font" bind:tap="userlogin">点击登录/注册</a>
|
||||
</view>
|
||||
<view class="block" class="server1">
|
||||
<t-grid column="{{4}}" theme="card" >
|
||||
<t-grid-item t-class-image="image" text="标题文字" image="{{img1}}" />
|
||||
<t-grid-item t-class-image="image" text="标题文字" image="{{img2}}" />
|
||||
<t-grid-item t-class-image="image" text="标题文字" image="{{img3}}" />
|
||||
</t-grid>
|
||||
</view>
|
||||
</view>
|
||||
20
miniprogram/pages/user/user.wxss
Normal file
20
miniprogram/pages/user/user.wxss
Normal file
@@ -0,0 +1,20 @@
|
||||
.user-avatar{
|
||||
margin-left: 40rpx;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
.avatar-font{
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.user-contain {
|
||||
background-color: #f5f7fa; /* 浅灰色背景 */
|
||||
height: 100vh;
|
||||
}
|
||||
.server1{
|
||||
margin-top: 3vh;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user