addAddress.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="switch-roles">
  3. <nav-bar title="岗位描述" color="#000"></nav-bar>
  4. <view class="roles-content">
  5. <view class="content">
  6. <view class="title">添加地址</view>
  7. <view class="form-item">
  8. <view class="item-label"> 工作地址 </view>
  9. <u-input
  10. placeholder="请输入办公大楼名称,例:碧桂园凤凰智谷"
  11. v-model="address"
  12. clearable
  13. class="custom-input"
  14. :customStyle="{ padding: '8rpx 24rpx ' }"
  15. >
  16. <template #prefix>
  17. <u-icon name="phone" size="36rpx" color="#999" marginRight="20rpx"></u-icon>
  18. </template>
  19. </u-input>
  20. </view>
  21. <view class="form-item">
  22. <view class="item-label"> 楼层/单元室 </view>
  23. <u-input
  24. placeholder="楼层/单元室/门牌号,例:3层302室"
  25. v-model="addressDetail"
  26. clearable
  27. class="custom-input"
  28. :customStyle="{ padding: '8rpx 24rpx ' }"
  29. >
  30. <template #prefix>
  31. <u-icon name="phone" size="36rpx" color="#999" marginRight="20rpx"></u-icon>
  32. </template>
  33. </u-input>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="submit-btn" @click="goBack">确定</view>
  38. </view>
  39. </template>
  40. <script>
  41. import navBar from "@/components/nav-bar/index.vue";
  42. export default {
  43. data() {
  44. return {
  45. address: "",
  46. addressDetail: '',
  47. };
  48. },
  49. components: {
  50. navBar,
  51. },
  52. onLoad(options) {
  53. if (options.text) {
  54. this.text = options.text;
  55. }
  56. },
  57. methods: {
  58. onInput(e) {
  59. // console.log(e);
  60. // 如果需要额外的输入控制
  61. // this.text = e.detail.value;
  62. },
  63. goBack() {
  64. uni.navigateBack();
  65. },
  66. },
  67. };
  68. </script>
  69. <style lang="scss" scoped>
  70. .switch-roles {
  71. background-color: #fff;
  72. position: absolute;
  73. left: 0;
  74. right: 0;
  75. top: 0;
  76. bottom: 0;
  77. display: flex;
  78. flex-direction: column;
  79. .roles-content {
  80. width: 100%;
  81. flex: 1;
  82. overflow: hidden;
  83. overflow-y: auto;
  84. .content {
  85. padding: 40rpx;
  86. box-sizing: border-box;
  87. display: flex;
  88. flex-direction: column;
  89. align-items: center;
  90. justify-content: center;
  91. .title {
  92. color: #333;
  93. width: 100%;
  94. font-family: DM Sans;
  95. font-size: 40rpx;
  96. font-weight: 600;
  97. }
  98. }
  99. }
  100. .submit-btn {
  101. flex-shrink: 0;
  102. border-radius: 999px;
  103. box-shadow: 0px 2px 4px 0px rgba(9, 196, 116, 0.3);
  104. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  105. color: rgba(255, 255, 255, 1);
  106. font-family: DM Sans;
  107. font-size: 32rpx;
  108. font-weight: 400;
  109. line-height: 48rpx;
  110. display: flex;
  111. justify-content: center;
  112. align-items: center;
  113. padding: 16rpx 32rpx;
  114. box-sizing: border-box;
  115. margin: 60rpx 20rpx;
  116. }
  117. }
  118. .form-item {
  119. margin-bottom: 32rpx;
  120. width: 100%;
  121. }
  122. .item-label {
  123. color: rgba(18, 26, 44, 1);
  124. font-family: Roboto;
  125. font-size: 32rpx;
  126. font-weight: 400;
  127. line-height: 51.2rpx;
  128. letter-spacing: 0px;
  129. text-align: left;
  130. padding-bottom: 6rpx;
  131. padding: 10rpx 0;
  132. box-sizing: border-box;
  133. }
  134. .custom-input {
  135. box-sizing: border-box;
  136. border: 2rpx solid rgba(158, 161, 168, 1);
  137. border-radius: 100rpx;
  138. background: rgba(255, 255, 255, 1);
  139. padding: 8rpx 24rpx !important;
  140. }
  141. ::v-deep .u-input {
  142. text-align: left !important;
  143. }
  144. </style>