<template>
  <view class="form-text-wrap">
    <input type="text" :value="value" :placeholder="placeholder" placeholder-class="placeholder" class="form-input" @input="onInput" />
  </view>
</template>

<script>
export default {
  name: 'FormItemText',
  props: {
    value: { type: [String, Number], default: '' },
    placeholder: { type: String, default: '请输入' }
  },
  methods: {
    onInput: function(e) {
      this.$emit('input', e.target.value);
    }
  }
};
</script>

<style scoped>
.form-text-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}
.form-input {
  flex: 1;
  font-size: 28rpx;
  color: #333333;
  text-align: center;
}
.placeholder {
  font-weight: 400;
  font-size: 28rpx;
  color: #999999;
}
</style>
