| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <view class="en-box">
- <input type="number" class="en-input sys-size-32 " placeholder="请输入手机号" maxlength="11" placeholder-class="sys-size-28 " v-model="loginData.phone"></input>
- </view>
- </template>
- <script>
- export default {
- name:'en-input',
- props: {
- type: {
- type: String,
- default: 'text'
- },
- placeholder: {
- type: String,
- default: '请输入'
- },
- disabled: {
- default: false
- },
- name: {
- type: String,
- default: 'text'
- },
- value: {
- default: ''
- },
- maxlength:{
- default:140
- }
- },
- data() {
- return {
- inputValue: '',
- };
- },
- watch: {
- 'value': function () {
- if (this.inputValue !== this.value) {
- this.inputValue = this.value
- }
- },
- 'inputValue': function () {
- this.$emit('input', this.inputValue)
- }
- },
- mounted() {
- this.inputValue = this.value
- },
- methods: {
- }
- }
- </script>
- <style lang="scss">
- .en-input{
- .en-input{
- width: 100%;
- }
- .en-input-placeholder{
- color: #999999;
- font-size: 28rpx;
- }
- }
- </style>
|