upgrade.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <u-modal v-model="show" :show-cancel-button="true" confirm-text="升级"
  3. title="发现新版本" @cancel="cancel" @confirm="confirm"
  4. >
  5. <view class="u-update-content">
  6. <rich-text :nodes="content"></rich-text>
  7. </view>
  8. </u-modal>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. show: true,
  15. // 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
  16. content: `
  17. 1. 修复badge组件的size参数无效问题<br>
  18. 2. 新增Modal模态框组件<br>
  19. 3. 新增压窗屏组件,可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
  20. 4. 修复键盘组件在微信小程序上遮罩无效的问题
  21. `,
  22. }
  23. },
  24. onReady() {
  25. this.show = true;
  26. },
  27. methods: {
  28. cancel() {
  29. this.closeModal();
  30. },
  31. confirm() {
  32. this.closeModal();
  33. },
  34. closeModal() {
  35. uni.navigateBack();
  36. }
  37. }
  38. }
  39. </script>
  40. <style scoped lang="scss">
  41. .u-full-content {
  42. background-color: #00C777;
  43. }
  44. .u-update-content {
  45. font-size: 26rpx;
  46. color: $u-content-color;
  47. line-height: 1.7;
  48. padding: 30rpx;
  49. }
  50. </style>