酒店桌布为微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.1 KiB

6 months ago
  1. <template>
  2. <uv-popup ref="addPopup" :round="30">
  3. <addLeaseForm ref="addLeaseForm"/>
  4. <view class="btn" @click="submit">
  5. <button class="a">添加</button>
  6. </view>
  7. </uv-popup>
  8. </template>
  9. <script>
  10. import addLeaseForm from './addLeaseForm.vue'
  11. export default {
  12. components : {
  13. addLeaseForm,
  14. },
  15. data() {
  16. return {
  17. }
  18. },
  19. methods: {
  20. submit() {
  21. this.$refs.addLeaseForm.submit(form => {
  22. this.$api('tablecloth', form, res => {
  23. this.fileList = []
  24. if (res.code == 200) {
  25. this.$emit('submit')
  26. this.$refs.addPopup.close()
  27. }
  28. })
  29. })
  30. },
  31. open() {
  32. console.log(this.$refs);
  33. this.$refs.addLeaseForm.closeForm()
  34. this.$refs.addPopup.open('bottom')
  35. },
  36. }
  37. }
  38. </script>
  39. <style scoped lang="scss">
  40. .btn {
  41. display: flex;
  42. justify-content: center;
  43. width: 100%;
  44. .a {
  45. display: flex;
  46. justify-content: center;
  47. align-items: center;
  48. width: 90%;
  49. height: 100rpx;
  50. color: #FFF;
  51. background-color: $uni-color;
  52. border: 1px solid red;
  53. border-radius: 100rpx;
  54. font-size: 30rpx;
  55. }
  56. }
  57. </style>