小说小程序前端代码仓库(小程序)
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.

87 lines
1.6 KiB

  1. <template>
  2. <view class="newWork">
  3. <!-- 新建作品组件 -->
  4. <view class="new-work-item" @click="handleClick">
  5. <view class="plus-icon">+</view>
  6. <text class="text">新建作品</text>
  7. </view>
  8. <!-- 读者成就设置按钮 -->
  9. <view class="reader-settings" @click="handleSettingClick">
  10. <text class="settings-text">读者成就设置</text>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. },
  18. methods: {
  19. handleClick() {
  20. uni.navigateTo({
  21. url: '/pages_order/novel/createNovel'
  22. })
  23. },
  24. handleSettingClick() {
  25. this.$emit('settings');
  26. }
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .newWork{
  32. display: flex;
  33. justify-content: space-between;
  34. width: 650rpx;
  35. align-items: center;
  36. }
  37. .new-work-item {
  38. width: 170rpx;
  39. height: 170rpx;
  40. background-color: #f8f8f8;
  41. border-radius: 6rpx;
  42. display: flex;
  43. flex-direction: column;
  44. align-items: center;
  45. justify-content: center;
  46. .plus-icon {
  47. font-size: 50rpx;
  48. color: #999;
  49. margin-bottom: 10rpx;
  50. line-height: 1;
  51. }
  52. .text {
  53. font-size: 24rpx;
  54. color: #999;
  55. }
  56. &:active {
  57. background-color: #f0f0f0;
  58. }
  59. }
  60. .reader-settings {
  61. background-color: #f8f8f8;
  62. border-radius: 10rpx;
  63. display: flex;
  64. align-items: center;
  65. justify-content: center;
  66. margin-top: 30rpx;
  67. border: 2rpx solid $uni-color;
  68. border-radius: 30rpx;
  69. padding: 10rpx 20rpx;
  70. height: 40rpx;
  71. .settings-text {
  72. font-size: 30rpx;
  73. color: #4a4a4a;
  74. }
  75. &:active {
  76. background-color: #f0f0f0;
  77. }
  78. }
  79. </style>