-
npm i semantic-ui-css -s
-
main.js
中引入import "semantic-ui-css/semantic.min.css";
-
App.vue
中使用<template> <div id="app"> <button class="ui button">Follow</button> </div> </template>
<template>
<div id="cardlist" :style="{columnCount:columnCount }">
<card-item class="carditem" v-for="item in mocks" v-bind:key="item.id" :item="item"></card-item>
</div>
</template>
<style scoped>
#cardlist {
column-gap: 0.5vw;
padding-top: 0.5vw;
}
.carditem {
position: relative;
width: 24vm;
margin-bottom: 1vm;
break-inside: avoid;
}
</style>
npm install
npm run serve
npm run build