[Improvement] eslint: use vue-libs (#1237)

This commit is contained in:
neverland
2018-06-07 11:59:02 +08:00
committed by GitHub
parent 5b7542b8f0
commit a1c5c6fef4
27 changed files with 222 additions and 344 deletions

View File

@@ -49,23 +49,23 @@ export default {
methods: {
showToast() {
Toast(this.$t('text1'));
this.$toast(this.$t('text1'));
},
showLoadingToast() {
Toast.loading({ mask: true, message: this.$t('loading') + '...' });
this.$toast.loading({ mask: true, message: this.$t('loading') + '...' });
},
showSuccessToast() {
Toast.success(this.$t('text2'));
this.$toast.success(this.$t('text2'));
},
showFailToast() {
Toast.fail(this.$t('text3'));
this.$toast.fail(this.$t('text3'));
},
showCustomizedToast(duration) {
const toast = Toast.loading({
const toast = this.$toast.loading({
duration: 0,
forbidClick: true,
loadingType: 'spinner',
@@ -79,7 +79,7 @@ export default {
toast.message = this.$t('text4', second);
} else {
clearInterval(timer);
Toast.clear();
this.$toast.clear();
}
}, 1000);
}