添加图标和页面
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</block>
|
||||
<block wx:else>
|
||||
<!-- <loading_plugin wx:if="{{loading}}" /> -->
|
||||
<view style="padding: 0 16px;height: 90vh;justify-content: center;display: flex;flex-direction: column;">
|
||||
<view style="padding: 0 16px;height: 100vh;justify-content: center;display: flex;flex-direction: column;">
|
||||
<view style="display: flex;justify-content: center;">
|
||||
<view style="width: 80px;height: 80px;overflow: hidden;border-radius: 80px;">
|
||||
<image style="width: 100%;height: 100%;object-fit: cover;" src="{{avatarUrl}}" mode="cover"></image>
|
||||
|
||||
6
miniprogram/pages/components/popup-plugin/index.json
Normal file
6
miniprogram/pages/components/popup-plugin/index.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-popup": "tdesign-miniprogram/popup/popup"
|
||||
}
|
||||
}
|
||||
31
miniprogram/pages/components/popup-plugin/index.ts
Normal file
31
miniprogram/pages/components/popup-plugin/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
// pages/components/popup-plugin/index.ts
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
visible: null,
|
||||
placement: null,
|
||||
title: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
onVisibleChange(e: any) {
|
||||
console.log(e.detail.visible);
|
||||
this.setData({
|
||||
open: e.detail.visible,
|
||||
});
|
||||
if (!e.detail.visible) {
|
||||
this.triggerEvent("close");
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
8
miniprogram/pages/components/popup-plugin/index.wxml
Normal file
8
miniprogram/pages/components/popup-plugin/index.wxml
Normal file
@@ -0,0 +1,8 @@
|
||||
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{placement || 'bottom'}}" close-btn>
|
||||
<view style="border-bottom: 1px solid #ddd;">
|
||||
<view style="padding: 12px 12px;">{{title}}</view>
|
||||
</view>
|
||||
<view style="max-height: 70vh;overflow: auto;">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</t-popup>
|
||||
1
miniprogram/pages/components/popup-plugin/index.wxss
Normal file
1
miniprogram/pages/components/popup-plugin/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user