Fork me on GitHub

vue中loding

<template>
  <div class="mf-loading-container" v-show="ifShow">
    <img src="static/img/loading01.gif">
  </div>
</template>

<script>
export default {
  name: "loading",
  props: {
    ifShow: {
      type: Boolean,
      default: false
    }
  }
};
</script>
<style lang="scss">
.mf-loading-container {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(100, 100, 100, 0.5);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  img {
    width: 40px;
    height: 40px;
    display: block;
  }
}
</style>

 

posted @ 2019-03-21 11:38  欢欢11  阅读(260)  评论(0编辑  收藏  举报