| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view>
- <view style="width: 90%;margin-left: 5%;margin-top: 20rpx;margin-bottom: 20rpx;">
- <view v-if="showTitle" class="titleText">
- <text>{{title}}</text>
- </view>
- <scroll-view scroll-x="true" class="ScontenView">
- <view class="contentInRowL">
- <view v-for="(item,index) in itemList">
- <view class="contentColumnC" style="width: 200rpx;padding-right: 12rpx" @click="itemSelect(index)">
- <image class="itemImage" :src="item.imagStr" mode="widthFix"></image>
- <text class="itemTitle">{{item.title}}</text>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
-
- </view>
- </template>
- <script>
- export default {
- name:"scrollViewR",
- props:{
- title:'',
- itemList:'',
- showTitle:false
- },
- data() {
- return {
-
- };
- },
- methods: {
- itemSelect(index){
- this.$emit('EitemSelect',index);
- },
- },
- }
- </script>
- <style lang="scss">
- // @font-face {
- // font-family: zrht;
- // src: url('/uni_modules/font/zrht.otf');
- // }
- .titleText{
- font-size: 28rpx;
- color: #1A1A1A;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- }
- .ScontenView{
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
- .contentColumn{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .itemImage{
- width: 50rpx;
- }
- .itemTitle{
- font-size: 26rpx;
- color: #1A1A1A;
- text-align: center;
- }
- </style>
|