Работа над LibsPage
This commit is contained in:
@@ -52,7 +52,6 @@ import _ from 'lodash';
|
|||||||
|
|
||||||
import Window from '../share/Window.vue';
|
import Window from '../share/Window.vue';
|
||||||
import * as utils from '../../share/utils';
|
import * as utils from '../../share/utils';
|
||||||
//import rstore from '../../store/modules/reader';
|
|
||||||
|
|
||||||
export default @Component({
|
export default @Component({
|
||||||
components: {
|
components: {
|
||||||
@@ -141,7 +140,7 @@ class ExternalLibs extends Vue {
|
|||||||
this.libs = _.cloneDeep(d.data);
|
this.libs = _.cloneDeep(d.data);
|
||||||
this.goToStartLink();
|
this.goToStartLink();
|
||||||
} else if (d.type == 'notify') {
|
} else if (d.type == 'notify') {
|
||||||
this.$root.notify.success(d.data);
|
this.$root.notify.success(d.data, '', {position: 'bottom-right'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div></div>
|
<div class="hidden"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -19,11 +19,12 @@ class Notify extends Vue {
|
|||||||
iconColor = 'white',
|
iconColor = 'white',
|
||||||
message = '',
|
message = '',
|
||||||
messageColor = 'black',
|
messageColor = 'black',
|
||||||
|
position = 'top-right',
|
||||||
} = opts;
|
} = opts;
|
||||||
|
|
||||||
caption = (caption ? `<div style="font-size: 120%; color: ${captionColor}"><b>${caption}</b></div><br>` : '');
|
caption = (caption ? `<div style="font-size: 120%; color: ${captionColor}"><b>${caption}</b></div><br>` : '');
|
||||||
return this.$q.notify({
|
return this.$q.notify({
|
||||||
position: 'top-right',
|
position,
|
||||||
color,
|
color,
|
||||||
textColor: iconColor,
|
textColor: iconColor,
|
||||||
icon,
|
icon,
|
||||||
@@ -38,20 +39,20 @@ class Notify extends Vue {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
success(message, caption) {
|
success(message, caption, options) {
|
||||||
this.notify({color: 'positive', icon: 'la la-check-circle', message, caption});
|
this.notify(Object.assign({color: 'positive', icon: 'la la-check-circle', message, caption}, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
warning(message, caption) {
|
warning(message, caption, options) {
|
||||||
this.notify({color: 'warning', icon: 'la la-exclamation-circle', message, caption});
|
this.notify(Object.assign({color: 'warning', icon: 'la la-exclamation-circle', message, caption}, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
error(message, caption) {
|
error(message, caption, options) {
|
||||||
this.notify({color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', captionColor: 'white', message, caption});
|
this.notify(Object.assign({color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', captionColor: 'white', message, caption}, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
info(message, caption) {
|
info(message, caption, options) {
|
||||||
this.notify({color: 'info', icon: 'la la-bell', message, caption});
|
this.notify(Object.assign({color: 'info', icon: 'la la-bell', message, caption}, options));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user