question-set.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="">
  3. <view class="order-pay-z" v-if="show_change_moshi" @tap="hide_change_moshi"></view>
  4. <view class="tika" v-if="show_change_moshi" :style="{height: (show_empty ? '110px' : '60px')}">
  5. <view class="tika-content">
  6. <view class="uni-list">
  7. <view class="uni-list-cell uni-list-cell-pd" v-if="show_empty">
  8. <view class="uni-list-cell-db">清除答题记录</view>
  9. <view class="qkbutton" @tap="emptyLog">清空</view>
  10. </view>
  11. <view class="uni-list-cell uni-list-cell-pd">
  12. <view class="uni-list-cell-db">夜间模式</view>
  13. <switch color="#3c7bfc" :checked="if_theme_dark" @change="set_if_theme_dark" />
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props: {
  23. show_change_moshi: {
  24. type: Boolean,
  25. default: false
  26. },
  27. if_theme_dark: {
  28. type: Boolean,
  29. default: false
  30. },
  31. show_empty: {
  32. type: Boolean,
  33. default: false
  34. }
  35. },
  36. data() {
  37. return {
  38. }
  39. },
  40. methods: {
  41. // 设置是否黑夜模式
  42. set_if_theme_dark(e) {
  43. // if_theme_dark
  44. let if_theme_dark = e.target.value
  45. this.$emit('set_if_theme_dark', if_theme_dark)
  46. },
  47. hide_change_moshi() {
  48. this.$emit('hide_change_moshi')
  49. },
  50. emptyLog() {
  51. this.$emit('emptyLog')
  52. },
  53. }
  54. }
  55. </script>
  56. <style>
  57. </style>