Authored by 陈峰

commit

... ... @@ -3,6 +3,7 @@
</template>
<script>
import {round} from 'lodash';
import {mapState} from 'vuex';
export default {
... ... @@ -18,8 +19,8 @@ export default {
const {width, height} = this.itemSize;
return {
width: `${width}rem`,
height: `${height}rem`
width: `${round(width, 2)}rem`,
height: `${round(height, 2)}rem`
};
},
itemSize() {
... ...
... ... @@ -20,7 +20,7 @@
</template>
<script>
import {first} from 'lodash';
import {first, round} from 'lodash';
import {Slide} from 'cube-ui';
import ArticleItemSlideImage from './article-item-slide-image';
import {mapState, createNamespacedHelpers} from 'vuex';
... ... @@ -57,8 +57,8 @@ export default {
if (width && height) {
return {
width: `${width}rem`,
height: `${height}rem`,
width: `${round(width, 2)}rem`,
height: `${round(height, 2)}rem`,
};
}
},
... ...