forked from opentiny/tiny-vue
30 lines
553 B
Vue
30 lines
553 B
Vue
<template>
|
|
<div>
|
|
<button @click="closeLoading">close Loading</button>
|
|
<div id="tiny-loading1" style="width: 100%; height: 120px"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="jsx">
|
|
import { Loading } from '@opentiny/vue'
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
loadingInstance: null
|
|
}
|
|
},
|
|
mounted() {
|
|
this.loadingInstance = Loading.service({
|
|
tiny_mode: 'mobile',
|
|
target: document.getElementById('tiny-loading1')
|
|
})
|
|
},
|
|
methods: {
|
|
closeLoading() {
|
|
this.loadingInstance.close()
|
|
}
|
|
}
|
|
}
|
|
</script>
|