Compare commits

..

No commits in common. 'b2728bcea5657f0faaed8b7485c24768f0ca5106' and '704b79ec531b47bb264f74ee8cdbf79772db6786' have entirely different histories.

  1. 44
      sub/invite/enterpriseIntroduce.vue

44
sub/invite/enterpriseIntroduce.vue

@ -1,19 +1,15 @@
<template> <template>
<view class="view"> <view class="view">
<view <view
class="input-wrapper" class=""
style=" style="
background-color: #f9f9f9; background-color: #f9f9f9;
border: 1px solid #f1f1f4; border: 1px solid #f1f1f4;
border-radius: 24rpx; border-radius: 24rpx;
padding: 16rpx; padding: 16rpx;
height: 400rpx;
position: relative;
" "
@tap="focusInput"
> >
<uni-easyinput <uni-easyinput
ref="easyInput"
type="textarea" type="textarea"
v-model="introduce" v-model="introduce"
placeholder="请输入..." placeholder="请输入..."
@ -23,15 +19,12 @@
:adjust-position="true" :adjust-position="true"
:autoHeight="true" :autoHeight="true"
cursorSpacing="32" cursorSpacing="32"
@blur="textAreaFocus = false"
:focus="textAreaFocus"
:styles="{ :styles="{
backgroundColor: 'transparent', backgroundColor: 'transparent',
borderColor: 'none', borderColor: 'none'
height: '360rpx'
}" }"
></uni-easyinput> ></uni-easyinput>
<view class="word-count"> <view style="color: #78829d; text-align: right">
{{ introduce.length }}/500 {{ introduce.length }}/500
</view> </view>
</view> </view>
@ -47,26 +40,13 @@
export default { export default {
data() { data() {
return { return {
introduce: '', introduce: ''
textAreaFocus: false
} }
}, },
onLoad(res) { onLoad(res) {
this.introduce = res.introduce this.introduce = res.introduce
}, },
methods: { methods: {
//
focusInput() {
console.log(this.$refs)
if (this.$refs.easyInput) {
this.textAreaFocus = false //
this.$nextTick(() => {
this.textAreaFocus = true //
})
} else {
console.warn('输入框组件未注册')
}
},
submit() { submit() {
if (!this.introduce) { if (!this.introduce) {
uni.showToast({ uni.showToast({
@ -99,11 +79,6 @@ export default {
background-color: #f9f9f9 !important; background-color: #f9f9f9 !important;
} }
} }
.input-wrapper {
min-height: 400rpx;
height: auto !important;
transition: height 0.3s ease;
}
.operation { .operation {
padding: 12px; padding: 12px;
@ -124,15 +99,4 @@ export default {
color: #fff; color: #fff;
} }
} }
.word-count {
position: absolute;
bottom: 0;
right: 16rpx;
color: #78829d;
font-size: 24rpx;
background-color: #f9f9f9;
padding: 4rpx 8rpx;
transform: translateY(100%);
margin-bottom: 40rpx;
}
</style> </style>

Loading…
Cancel
Save