vue NoData
程序员文章站
2022-06-19 08:01:20
...
NoData组件
<template>
<div class="panel-noData" v-if="shown">
<i class="iconfont icon-zanmeishuju" :style="istyle"></i>
<span>暂无数据</span>
</div>
</template>
<script>
export default {
name: "nodata",
data() {
return {
shown: true
};
},
props: {
iconSize: {
type: [Number, String],
default: 40
}
},
watch: {},
computed: {
istyle() {
return {
"font-size": this.iconSize + "px"
};
}
},
mounted() {},
methods: {}
};
</script>
<style lang="scss">
.panel-noData {
height: 100%;
min-height: 200px;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
i.iconfont {
margin-bottom: 10px;
}
span {
font-size: 18px;
color: #99a4b8;
}
}
</style>