分包医生

This commit is contained in:
zoujiandong
2024-01-16 14:59:06 +08:00
parent 562d4e9691
commit d5a9339ddd
1060 changed files with 3177 additions and 44707 deletions
+72
View File
@@ -0,0 +1,72 @@
// commpents/textarea-cell/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
textarea_cell_name: {
type: String,
value: '标题',
},
required: {
type: Boolean,
value: true,
},
disabled: {
type: Boolean,
value: false,
},
textarea_cell_note: {
type: String,
value: '查看示例',
},
textarea_cell_note_show:{
type: Boolean,
value: true,
},
textarea_cell_content_placeholder: {
type: String,
value: '请输入文字',
},
t_icon_name: {
type: String,
value: 'heart',
},
t_icon_size: {
type: String,
value: '32rpx',
},
textarea_val: {
type: String,
value: '',
},
has_error_content: {
type: String,
value: "",
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onshowNote: function(e){
console.log(e);
var myEventDetail = {} // detail对象,提供给事件监听函数
var myEventOption = {} // 触发事件的选项
this.triggerEvent('showNote', myEventDetail, myEventOption)
},
bindTextAreaBlur(e){
console.log("textarea val: ", e.detail.value);
this.triggerEvent('TextAreaBlur', e.detail)
}
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}
+16
View File
@@ -0,0 +1,16 @@
<view class="textarea-cell">
<view class="textarea-cell-top">
<view class="textarea-cell-name">{{ textarea_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
<view class="textarea-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{textarea_cell_note_show}}">
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
<text style="font-size: 28rpx;">{{ textarea_cell_note }}</text>
</view>
</view>
<view class="textarea-cell-content">
<textarea disabled="{{disabled}}" bindblur="bindTextAreaBlur" maxlength="1000" style="margin: 20rpx 20rpx 0 20rpx; width: 100%; height: 90%; background-color: #FAFAFA;" name="" id="" placeholder="{{ textarea_cell_content_placeholder }}" value="{{textarea_val}}"></textarea>
</view>
<view class="error_box" wx:if="{{ has_error_content != '' }}" >
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
<text class="error_msg">{{ has_error_content }}</text>
</view>
</view>
+77
View File
@@ -0,0 +1,77 @@
.required{
color: #e34d59;
}
.t-cell__note{
font-size: 25rpx !important;
letter-spacing: 2rpx;
}
.textarea-cell{
position: relative;
padding: 32rpx;
display: flex;
flex-direction: column;
}
.textarea-cell-top{
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: 400;
}
.textarea-cell-note{
color: var(--td-cell-note-color, var(--td-font-gray-3, rgba(0, 0, 0, 0.4)));
display: flex;
align-items: center;
}
.textarea-cell-content{
background-color: #FAFAFA;
width: 95%;
height: 310rpx;
display: flex;
margin: 30rpx auto 0 auto;
}
.textarea-cell::after {
position: absolute;
box-sizing: border-box;
content: ' ';
pointer-events: none;
right: 0;
left: 32rpx;
bottom: 0;
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
transform: scaleY(0.5);
left: 32rpx;
}
.textarea-cell-name{
font-size: 16px;
color: #000000E6;
}
.error_box{
position: relative;
display: flex;
background-color: #FEF1F1;
width: calc(95vw - 64rpx);
height: 100rpx;
margin: 30rpx auto 0 auto;
align-items: center;
padding-left: 32rpx;
border-radius: 10rpx;
}
.error_box::after{
border-radius: 5rpx;
position: absolute;
width: 0px;
height: 0px;
border-width: 16rpx;
border-style: solid;
border-color: transparent transparent #FEF1F1 transparent;
content: ' ';
left: 50rpx;
top: -30rpx;
}
.error_msg{
position: relative;
margin-left: 10rpx;
color: #FF0000;
letter-spacing: 3rpx;
font-weight: 600;
}