Добавлена анимация слеша на страницу
This commit is contained in:
@@ -15,7 +15,10 @@
|
|||||||
<span class="text-yellow">{{ percentage }}%</span>
|
<span class="text-yellow">{{ percentage }}%</span>
|
||||||
</q-circular-progress>
|
</q-circular-progress>
|
||||||
|
|
||||||
<p class="text-yellow">{{ text }}</p>
|
<div>
|
||||||
|
<span class="text-yellow">{{ text }}</span>
|
||||||
|
<q-icon :style="iconStyle" color="yellow" name="la la-slash" size="20px"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -24,6 +27,7 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Component from 'vue-class-component';
|
import Component from 'vue-class-component';
|
||||||
|
import * as utils from '../../../share/utils';
|
||||||
|
|
||||||
const ruMessage = {
|
const ruMessage = {
|
||||||
'start': ' ',
|
'start': ' ',
|
||||||
@@ -46,12 +50,15 @@ class ProgressPage extends Vue {
|
|||||||
step = 1;
|
step = 1;
|
||||||
progress = 0;
|
progress = 0;
|
||||||
visible = false;
|
visible = false;
|
||||||
|
iconStyle = '';
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
this.text = '';
|
this.text = '';
|
||||||
this.totalSteps = 1;
|
this.totalSteps = 1;
|
||||||
this.step = 1;
|
this.step = 1;
|
||||||
this.progress = 0;
|
this.progress = 0;
|
||||||
|
this.iconAngle = 0;
|
||||||
|
this.ani = false;
|
||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
}
|
}
|
||||||
@@ -59,6 +66,7 @@ class ProgressPage extends Vue {
|
|||||||
hide() {
|
hide() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.text = '';
|
this.text = '';
|
||||||
|
this.iconAngle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(state) {
|
setState(state) {
|
||||||
@@ -72,6 +80,16 @@ class ProgressPage extends Vue {
|
|||||||
this.step = (state.step ? state.step : this.step);
|
this.step = (state.step ? state.step : this.step);
|
||||||
this.totalSteps = (state.totalSteps > this.totalSteps ? state.totalSteps : this.totalSteps);
|
this.totalSteps = (state.totalSteps > this.totalSteps ? state.totalSteps : this.totalSteps);
|
||||||
this.progress = state.progress || 0;
|
this.progress = state.progress || 0;
|
||||||
|
|
||||||
|
if (!this.ani) {
|
||||||
|
(async() => {
|
||||||
|
this.ani = true;
|
||||||
|
this.iconAngle += 30;
|
||||||
|
this.iconStyle = `transform: rotate(${this.iconAngle}deg); transition: 150ms linear`;
|
||||||
|
await utils.sleep(150);
|
||||||
|
this.ani = false;
|
||||||
|
})();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get percentage() {
|
get percentage() {
|
||||||
|
|||||||
Reference in New Issue
Block a user