Поправки багов
This commit is contained in:
@@ -108,8 +108,10 @@ export default @Component({
|
|||||||
},
|
},
|
||||||
vertShift: function(newValue) {
|
vertShift: function(newValue) {
|
||||||
const font = (this.webFontName ? this.webFontName : this.fontName);
|
const font = (this.webFontName ? this.webFontName : this.fontName);
|
||||||
this.fontShifts = Object.assign({}, this.fontShifts, {[font]: newValue});
|
if (this.fontShifts[font] != newValue) {
|
||||||
this.fontVertShift = newValue;
|
this.fontShifts = Object.assign({}, this.fontShifts, {[font]: newValue});
|
||||||
|
this.fontVertShift = newValue;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fontName: function(newValue) {
|
fontName: function(newValue) {
|
||||||
const font = (this.webFontName ? this.webFontName : newValue);
|
const font = (this.webFontName ? this.webFontName : newValue);
|
||||||
@@ -185,10 +187,18 @@ class SettingsPage extends Vue {
|
|||||||
settingsChanged() {
|
settingsChanged() {
|
||||||
if (_.isEqual(this.form, this.settings))
|
if (_.isEqual(this.form, this.settings))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.form = Object.assign({}, this.settings);
|
this.form = Object.assign({}, this.settings);
|
||||||
|
if (!this.unwatch)
|
||||||
|
this.unwatch = {};
|
||||||
|
|
||||||
for (let prop in rstore.settingDefaults) {
|
for (let prop in rstore.settingDefaults) {
|
||||||
|
if (this.unwatch && this.unwatch[prop])
|
||||||
|
this.unwatch[prop]();
|
||||||
|
|
||||||
this[prop] = this.form[prop];
|
this[prop] = this.form[prop];
|
||||||
this.$watch(prop, (newValue) => {
|
|
||||||
|
this.unwatch[prop] = this.$watch(prop, (newValue) => {
|
||||||
this.form = Object.assign({}, this.form, {[prop]: newValue});
|
this.form = Object.assign({}, this.form, {[prop]: newValue});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user