setup.vue 945 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="setup">
  3. <view class="base-bg-f p20 radius20 mb60">
  4. <view class="justify-between align-center">
  5. <view>是否允许新会员观看</view>
  6. <switch :checked="value" @change="switch1Change" />
  7. </view>
  8. </view>
  9. <view class="surebtn ">保存</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. value: false
  18. }
  19. },
  20. methods: {
  21. switch1Change(e) {
  22. this.value = e.detail.value
  23. }
  24. }
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. /* 去除switch点击时的闪烁效果 */
  29. ::v-deep {
  30. .u-switch-input {
  31. -webkit-tap-highlight-color: transparent;
  32. }
  33. }
  34. .setup {
  35. height: calc(100% - 40rpx);
  36. padding: 20rpx;
  37. margin: 0 !important;
  38. }
  39. .surebtn {
  40. width: calc(100% - 100rpx);
  41. padding: 0 50rpx;
  42. background-color: #1777ff;
  43. height: 72rpx;
  44. border-radius: 8rpx;
  45. color: #fff;
  46. text-align: center;
  47. line-height: 72rpx;
  48. margin: 0 auto;
  49. }
  50. </style>