时空网前端
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.

70 lines
1.3 KiB

4 years ago
  1. <template>
  2. <!-- 弹窗 -->
  3. <view class="cu-modal" :class="modalShow?'show':''">
  4. <view class="cu-dialog">
  5. <view class="cu-bar bg-white justify-end">
  6. <view class="content">{{title}}</view>
  7. <view class="action" @tap="hideModal">
  8. <text class="cuIcon-close text-red"></text>
  9. </view>
  10. </view>
  11. <view class="padding-xl text-gray">
  12. {{content}}
  13. </view>
  14. <view class="cu-bar bg-white justify-end">
  15. <view class="action">
  16. <button class="cu-btn line-gray text-orange" @tap="hideModal" v-if="isSancel">取消</button>
  17. <button class="cu-btn bg-gradual-red margin-left text-white" @tap="BtnClick">{{btnText}}</button>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. title: {
  27. type: String,
  28. default: '温馨提示',
  29. },
  30. content: {
  31. type: String,
  32. default: '',
  33. },
  34. btnText: {
  35. type: String,
  36. default: '确定',
  37. },
  38. modalShow: {
  39. type: Boolean,
  40. default: false
  41. },
  42. //是否显示取消按钮
  43. isSancel: {
  44. type: Boolean,
  45. default: true
  46. }
  47. },
  48. data() {
  49. return {
  50. }
  51. },
  52. methods: {
  53. //确认
  54. BtnClick() {
  55. this.$emit('determine')
  56. },
  57. //隐藏弹窗
  58. hideModal() {
  59. this.$emit('hideModal')
  60. },
  61. }
  62. }
  63. </script>
  64. <style scoped>
  65. </style>