|
- <template>
- <u-cell :title="title" isLink :border="false" @click="click" :titleStyle="{fontSize:'28rpx'}">
- <view v-if="multiple&&cellValue.length" slot="title" class="u-slot-title selectedBox">
- <view v-for="(item,index) in cellValue" :key="index">
- {{item}}
- </view>
- </view>
- </u-cell>
- </template>
-
- <script>
- export default {
- name: "myCell",
- props: {
- title: {
- default: "",
- },
- multiple: {
- default: false,
- },
- cellValue: {
- default: () => [],
- }
- },
- methods: {
- click() {
- this.$emit("click")
- }
- }
- }
- </script>
-
- <style scoped lang="scss">
- .u-cell {
- background: #fff;
- border-radius: 20rpx;
- height: 90rpx;
- }
- .selectedBox{
- display: flex;
- flex-wrap: wrap;
- >view{
- display: inline-block;
- background-color: #F2F8FF;
- border-radius: 8rpx;
- padding: 12rpx 18rpx;
- margin: 6rpx;
- font-size: 26rpx;
- color: #000;
- }
- }
- </style>
|