百富门答题小程序
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.

90 lines
1.5 KiB

8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
3 months ago
8 months ago
  1. <template>
  2. <view class="configPopup">
  3. <uv-popup ref="popup" :round="30" :closeOnClickOverlay="!required">
  4. <view class="content">
  5. <scroll-view
  6. id="scrollView"
  7. scroll-y="true"
  8. :scroll-top="scrollTop"
  9. style="height: 100%;">
  10. <uv-parse :content="configList[keys[index]]"></uv-parse>
  11. <view class="uni-color-btn" @click="success">
  12. 下一步
  13. </view>
  14. </scroll-view>
  15. </view>
  16. <view class="content" v-else>
  17. <uv-parse :content="text || content"></uv-parse>
  18. </view>
  19. </uv-popup>
  20. </view>
  21. </template>
  22. <script>
  23. import {
  24. mapState
  25. } from 'vuex'
  26. export default {
  27. name: 'configPoup',
  28. props: {
  29. text: {
  30. default: ''
  31. },
  32. keys: {
  33. default: [],
  34. },
  35. required: {
  36. default: false,
  37. },
  38. },
  39. data() {
  40. return {
  41. content: '',
  42. index: 0,
  43. scrollTop : 0,
  44. }
  45. },
  46. onShow() {},
  47. methods: {
  48. //打开配置信息菜单
  49. open(key) {
  50. this.content = this.configList[key]
  51. this.$refs.popup.open('bottom');
  52. },
  53. openkeys() {
  54. this.index = 0
  55. this.$refs.popup.open('bottom');
  56. },
  57. success() {
  58. if (this.index == this.keys.length - 1) {
  59. this.$emit('success')
  60. this.$refs.popup.close();
  61. return
  62. }
  63. this.index++
  64. this.scrollTop = 100
  65. this.$nextTick(res => {
  66. this.scrollTop = 0
  67. })
  68. },
  69. },
  70. computed: {
  71. ...mapState(['configList'])
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .configPopup {
  77. .content {
  78. padding: 30rpx 20rpx;
  79. overflow: scroll;
  80. height: 50vh;
  81. box-sizing: border-box;
  82. }
  83. }
  84. </style>