鍍金池/ 問答/Android  網(wǎng)絡(luò)安全  HTML/ 解決 iview spin元件在android手持裝置上靜止不動(dòng)

解決 iview spin元件在android手持裝置上靜止不動(dòng)

我有使用iview裡的spin元件來(lái)當(dāng)過場(chǎng)動(dòng)畫
在chrome debug時(shí)都能正常的轉(zhuǎn)圈圈
但是當(dāng)我將APP載進(jìn)Android裡執(zhí)行時(shí)
spin只會(huì)在畫面靜止不動(dòng)

請(qǐng)問我程式碼哪裡有遺漏什麼?還是本身是裝置的問題?

<template>
<div>
    <spin class="loading_bar">
    <Icon  type="load-a"  size=180 class="demo-spin-icon-load"></Icon>
    </spin>
</div>
</template>

<script>
export default {
name: 'bars',
props: [],
data () {
return { }
    }
}

</script>
<style scoped>
.loading_bar{
  position: fixed; /*全屏模式下,position是fixed */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color:rgb(255, 255, 255,0.5);
  /* opacity: 0.5; */
}
 .demo-spin-icon-load{
    animation: ani-demo-spin 1s linear infinite;
    position: absolute; /*全屏模式下,position是fixed */
    top: 35%;
    left: 35%;
    }
</style>

這是我要使用的頁(yè)面

<template>
            <bars v-if="bars"></bars>
</template>

<script>
import bars from './spincircle'

export default {
  name: 'IMPS03002',
  components: {
    bars

  },
  data () {
    return {
      bars:   false,
    
      header: {
        
      },
      lines: []
    }
  },
  computed: {

  },
  methods: {

     getHeaderLines: function () {

      this.bars=true
      this.status = ''
      var vm = this
      fetch(this.domain + '/WIPF/IMPS_API.do?reqCode=imps03002GetHeaderLines', {
        method: 'POST',
        body: JSON.stringify(this.$data)
      })
        .then(response => response.json())
        .then(data => {
          this.bars=false
          console.log(data)
          if (data.result === 'Y') {
            vm.status = ""
            this.header = data.header
            this.lines = data.lines
            // this.$Message.success('搜尋完畢');
          } else {
            // vm.status = data.errMsg
            this.lines = ""
            // this.$Message.error('無(wú)效的ASN號(hào)碼!!!請(qǐng)檢查')
            this.$Message.error(data.errMsg);
          }
        })
        .catch(e => {
              this.bars=false
          console.log(e)
          this.$Message.error(e);
          // vm.status = e
        })
    },

}
回答
編輯回答
乖乖噠

可以嘗試:

.demo-spin-icon-load{
  -webkit-animation:ani-demo-spin 1s linear infinite;
  animation:ani-demo-spin 1s linear infinite;
}

或者由于你的 Webview 版本太低不支持相關(guān)動(dòng)畫

2018年9月10日 13:24