scantex.vue 961 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view class="u-m-t-32 tex">
  3. <textarea placeholder-style="color: #B3B3B3; magin-top: 10rpx;" placeholder="请输入描述内容" v-model="text_value" />
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. props: {
  9. //拍照选项项目巡检id
  10. scan_id: {
  11. type: Number
  12. },
  13. defaultValue: {
  14. type: String
  15. }
  16. },
  17. data() {
  18. return {
  19. text_value: ''
  20. }
  21. },
  22. created() {
  23. this.defaultValue != null && (this.text_value = this.defaultValue)
  24. },
  25. methods: {
  26. //处理巡检提交数据
  27. submit() {
  28. let item = {
  29. id: this.scan_id,
  30. value: this.text_value
  31. } //提交数据
  32. this.$store.state.user.items.push(item)
  33. },
  34. //重置表单
  35. reset() {
  36. this.text_value = ''
  37. }
  38. }
  39. }
  40. </script>
  41. <style>
  42. input {
  43. width: 100%;
  44. height: 100%;
  45. /* text-indent: 20rpx; */
  46. }
  47. .tex {
  48. width: 690rpx;
  49. height: 210rpx;
  50. border: 1rpx solid #BFBFBF;
  51. border-radius: 6rpx;
  52. }
  53. </style>