1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view class="list">
- <uni-card padding="0" spacing="0" type="line">
- <template v-slot:title>
- <uni-list>
- <uni-list-item :title="name"/>
- </uni-list>
- </template>
- <uni-list>
- <uni-list-item v-for="(item, index) in data" :key="index" :title="item.title" showArrow
- @click="onClick"
- :thumb="`${baseurl}${item.thumbnail}`"
- thumb-size="lg" rightText="详情" />
- </uni-list>
- </uni-card>
- </view>
- </template>
- <script>
- export default {
- props: {
- // 数据内容
- data: { type: Array, default: () => [] },
- name: { type: String, default: '默认title' },
- },
- computed: {},
- data() {
- return {
- baseurl: 'http://192.168.0.45:9002',
- };
- },
- async mounted() {},
- methods: {
- async onClick(e) {
- console.log(e);
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .cover-image {
- width: 100%;
- height: 150px;
- }
- .cover-content {
- position: absolute;
- top: 35%;
- width: 100%;
- background: #000;
- opacity: 0.5;
- }
- .uni-subtitle {
- line-height: 30px;
- margin-left: 10px;
- }
- .list {
- margin-top: 15px;
- }
- </style>
|