|
@@ -14,7 +14,7 @@
|
|
|
<ul class="list">
|
|
|
<li class="item" v-for="item in listState.list" :key="item.id" @click="goDetail(item)">
|
|
|
<div class="item-img">
|
|
|
- <img :src="item.img" alt="">
|
|
|
+ <j-image :src="item.img" />
|
|
|
</div>
|
|
|
<div class="item-cont">
|
|
|
<p class="ellipsis-2 title">{{item.title}}</p>
|
|
@@ -41,12 +41,14 @@ import { Component, Vue } from 'vue-property-decorator'
|
|
|
import { mapState, mapMutations, mapActions } from 'vuex'
|
|
|
import { PullRefresh, List, Toast } from 'vant'
|
|
|
import Empty from '@/components/common/Empty.vue'
|
|
|
+import JImage from '@/components/common/Image.vue'
|
|
|
@Component({
|
|
|
name: 'home',
|
|
|
components: {
|
|
|
[PullRefresh.name]: PullRefresh,
|
|
|
[List.name]: List,
|
|
|
- Empty
|
|
|
+ Empty,
|
|
|
+ JImage
|
|
|
},
|
|
|
methods: {
|
|
|
...mapState('home', {
|
|
@@ -192,13 +194,8 @@ export default class Home extends Vue {
|
|
|
.item-img{
|
|
|
width: 80px;
|
|
|
height: 80px;
|
|
|
- border-radius: 4px;
|
|
|
margin-right: 16px;
|
|
|
overflow: hidden;
|
|
|
- img{
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
}
|
|
|
.item-cont{
|
|
|
flex: 1;
|