12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <view>
- <view class="uni-textarea">
- <textarea :maxlength="maxnumber" @input="bindTextAreaBlur" :placeholder="tips"/>
- <view style="color:#909399;text-align:right;">{{numberList}}/100</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- tips:{
- default:'填写催单内容',
- type: String
- },
- maxnumber:{
- default: 100,
- type: Number
- }
- },
- data() {
- return {
- numberList: 0,
- focus: false
- }
- },
- methods: {
- bindTextAreaBlur(e) {
- this.numberList = e.detail.value.length;
- this.$emit('submitValue', e)
- }
- }
- }
- </script>
- <style>
- .uni-textarea textarea {
- padding: 30upx 2% 18upx 2%;
- }
- </style>
|