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

61 regels
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. ::v-deep .u-cell__body {
  43. height: 100%;
  44. }
  45. }
  46. .selectedBox{
  47. display: flex;
  48. flex-wrap: wrap;
  49. >view{
  50. display: inline-block;
  51. background-color: #F2F8FF;
  52. border-radius: 8rpx;
  53. padding: 12rpx 18rpx;
  54. margin: 6rpx;
  55. font-size: 26rpx;
  56. color: #000;
  57. }
  58. }
  59. </style>