selectPopup.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <!-- 参会方式弹出层 -->
  3. <view class="select-box" catchtap="preventPropagation">
  4. <u-popup v-model="popupShow" mode="bottom" @close="closeSelectHandle">
  5. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  6. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 1)">预约外呼</view>
  7. <view v-if="selectYdong" style="color: #2c83ff" @click="signupIsAddOfCancel('', 4)">自主入会</view>
  8. <view v-else style="color: #2c83ff" @click="signupIsAddOfCancel('', 2)">自主拨入</view>
  9. <view style="color: #a9afb8" @click="closeSelectHandle">取消</view>
  10. </u-popup>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: "",
  16. components: {},
  17. props: {
  18. selectShow: {
  19. type: Boolean,
  20. default: false,
  21. required: true,
  22. },
  23. selectYdong: {
  24. type: Boolean,
  25. default: false,
  26. required: true,
  27. },
  28. },
  29. data() {
  30. return {
  31. popupShow: false,
  32. };
  33. },
  34. watch: {
  35. selectShow: {
  36. handler(newVal) {
  37. this.popupShow = newVal;
  38. },
  39. },
  40. },
  41. methods: {
  42. // 关闭弹框事件
  43. closeSelectHandle() {
  44. this.popupShow = false;
  45. this.$emit("update:selectShow", false);
  46. },
  47. // 点击后的事件
  48. signupIsAddOfCancel(val, type) {
  49. this.$emit("signupIsAddOfCancel", val, type);
  50. },
  51. preventPropagation() {},
  52. },
  53. };
  54. </script>
  55. <style scoped lang="scss">
  56. .select-box {
  57. width: 100%;
  58. view {
  59. height: 95prx;
  60. line-height: 95rpx;
  61. text-align: center;
  62. font-size: 32rpx;
  63. border-bottom: 1rpx solid #ebebeb;
  64. }
  65. }
  66. </style>