perfect.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="center">
  3. <u-form>
  4. <view class="modular">
  5. <u-form-item label="公司名称" label-width="30%" class="title Regular">
  6. <u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入公司名称" />
  7. </u-form-item>
  8. </view>
  9. <view class="modular">
  10. <view class="title Regular">企业概况</view>
  11. <textarea value="" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300个字" class="areaText Regular" v-model="deptList.a"/>
  12. <view class="title Regular">添加标签(标签应突出企业特色,最多6个)</view>
  13. <view class="flex">
  14. <view class="forLists" v-for="(item,index) in label" :Key="index">
  15. <u-tag :text="item" mode="dark" class="forList Medium" shape="circle" :show="show" :closeable="closeable" color="#22C572" @close="closeForList(index)"/>
  16. </view>
  17. <u-tag text="+" mode="plain" shape="circle" :show="show1" color="#2E2E2D" bg-color="#FFFFFF" border-color="#F9F9FA" class="add" @click="add"></u-tag>
  18. </view>
  19. <view class="addinput flex" v-if="inputShow">
  20. <u-input v-model="value" type="type" border focus v-if="inputShow" style="border-radius: 50rpx;line-height: 70rpx;font-size: 10px;" placeholder="请输入标签内容,不超过6个字" />
  21. <u-button :type="types" class="inputOk" shape="circle" @click="addinput">确定</u-button>
  22. </view>
  23. </view>
  24. </u-form>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. deptList: {},
  32. label:["世界一流"],
  33. closeable:true,
  34. show:true,
  35. show1:true,
  36. types:"",
  37. inputShow:false,
  38. value:"",
  39. }
  40. },
  41. methods:{
  42. add(){
  43. if(this.label.length >= 6){
  44. this.inputShow = false
  45. }else{
  46. this.inputShow = true
  47. }
  48. },
  49. addinput(){
  50. this.label.push(this.value)
  51. this.value = ""
  52. this.inputShow = false
  53. },
  54. closeForList(index){
  55. this.label.splice(index,1)
  56. // this.show = false;
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .center {
  63. padding: 10rpx 20rpx;
  64. }
  65. .title {
  66. margin-left: 20rpx;
  67. color: #71747C;
  68. line-height: 70rpx;
  69. }
  70. .write {
  71. margin-right: 20px;
  72. color: #71747C;
  73. }
  74. .modular {
  75. background-color: #FFFFFF;
  76. border-radius: 20px;
  77. margin-top: 20px;
  78. }
  79. .areaText {
  80. width: 90%;
  81. padding: 30rpx;
  82. border: 2rpx solid #F9F9FA;
  83. background-color: #F9F9FA;
  84. margin: 10rpx auto 20rpx;
  85. border-radius: 20rpx;
  86. color: #AFB3BF;
  87. font-size: 28rpx;
  88. }
  89. .add{
  90. padding: 15rpx 30rpx;
  91. width: 120rpx;
  92. height: 65rpx;
  93. text-align: center;
  94. margin-left: 24rpx;
  95. font-size: 30rpx;
  96. font-weight: 600;
  97. }
  98. .forLists{
  99. margin-bottom: 10rpx;
  100. }
  101. .forList{
  102. background-color: #F4FAF8;
  103. padding: 20rpx 30rpx;
  104. color: #22C572;
  105. margin-left: 24rpx;
  106. text-align:center ;
  107. }
  108. .addinput{
  109. width: 70%;
  110. margin: 20rpx auto;
  111. border-radius:50rpx;
  112. }
  113. .inputOk{
  114. width: 100rpx;
  115. border-radius: 40rpx;
  116. background-color: #E9EAE9;
  117. color: #FFFFFF;
  118. border: none;
  119. }
  120. </style>