|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <u-cell :title="title" isLink :border="false" @click="click" :titleStyle="{fontSize:'28rpx',color:hasValue?'#333':'#666',textAlign:align}">
- <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,
- },
- hasValue: {
- default: false,
- },
- cellValue: {
- default: () => [],
- },
- align: {
- default: "left",
- },
- },
- 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>
|