dp-number-modal.vue 722 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view>
  3. <u-modal :title="tilte" :show="show" showCancelButton closeOnClickOverlay @confirm="confirm"
  4. @cancel="cancel" @close="close">
  5. <u--input
  6. placeholder="请输入数量"
  7. border="surround"
  8. v-model="value"
  9. type="number"
  10. inputAlign="center"
  11. fontSize="30px"
  12. ></u--input>
  13. </u-modal>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "dp-number-modal",
  19. data() {
  20. return {
  21. value:'',
  22. show:false,
  23. tilte:'请输入数量'
  24. };
  25. },
  26. methods: {
  27. confirm() {
  28. this.$emit('confirm');
  29. },
  30. cancel() {
  31. this.value=0
  32. this.show = false
  33. },
  34. close() {
  35. this.value=0
  36. this.show = false
  37. }
  38. }
  39. }
  40. </script>
  41. <style>
  42. </style>