| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template lang="html">
- <div class="loading" :class="{'mobile': isMobile}" v-show="loading" id="loading">
- <!--<img src="/images/all/loading.gif" alt="">-->
- <div class="wrap">
- <div class="outer"></div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data: () => ({
- loading: false
- }),
- methods: {
- start () {
- this.loading = true
- },
- finish () {
- this.loading = false
- }
- }
- }
- </script>
- <style scoped lang="scss">
- @keyframes spin {
- 0% { transform: rotate(360deg); }
- 100% { transform: rotate(0deg); }
- }
- .wrap { width: 64px; height: 64px; position: absolute;left: 50%;top:50%;margin-left:-32px;margin-top: -32px; }
- .outer {
- background-repeat: no-repeat;
- background-size:100%; position: absolute; width: 100%; height: 100%; background-image: url('/images/mobile/loading.png'); animation: spin 800ms infinite linear; }
- .loading {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- width: 100%;
- height: 100%;
- z-index: 1000;
- text-align: center;
- &.mobile {
- z-index: 100000 !important;
- }
- }
- .loading img {
- position: relative;
- top: 40%;
- }
- .loading.in {
- display: block !important;
- }
- </style>
|