平安校园
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.
 
 
 
 
 
 

58 lines
1.0 KiB

  1. <template>
  2. <u-cell :title="title" isLink :border="false" @click="click" :titleStyle="{fontSize:'28rpx',color:hasValue?'#333':'#666',textAlign:align}">
  3. <view v-if="multiple&&cellValue.length" slot="title" class="u-slot-title selectedBox">
  4. <view v-for="(item,index) in cellValue" :key="index">
  5. {{item}}
  6. </view>
  7. </view>
  8. </u-cell>
  9. </template>
  10. <script>
  11. export default {
  12. name: "myCell",
  13. props: {
  14. title: {
  15. default: "",
  16. },
  17. multiple: {
  18. default: false,
  19. },
  20. hasValue: {
  21. default: false,
  22. },
  23. cellValue: {
  24. default: () => [],
  25. },
  26. align: {
  27. default: "left",
  28. },
  29. },
  30. methods: {
  31. click() {
  32. this.$emit("click")
  33. }
  34. }
  35. }
  36. </script>
  37. <style scoped lang="scss">
  38. .u-cell {
  39. background: #fff;
  40. border-radius: 20rpx;
  41. height: 90rpx;
  42. }
  43. .selectedBox{
  44. display: flex;
  45. flex-wrap: wrap;
  46. >view{
  47. display: inline-block;
  48. background-color: #F2F8FF;
  49. border-radius: 8rpx;
  50. padding: 12rpx 18rpx;
  51. margin: 6rpx;
  52. font-size: 26rpx;
  53. color: #000;
  54. }
  55. }
  56. </style>