fixed cookie reactivity
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -322,18 +322,20 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
if (this.$cookies.isKey(SETTINGS_COOKIE_NAME)) {
|
if (this.$cookies.isKey(SETTINGS_COOKIE_NAME)) {
|
||||||
let cookie_val = this.$cookies.get(SETTINGS_COOKIE_NAME)
|
this.settings = Object.assign({}, this.settings, this.$cookies.get(SETTINGS_COOKIE_NAME))
|
||||||
for (let i of Object.keys(cookie_val)) {
|
// let cookie_val = this.$cookies.get(SETTINGS_COOKIE_NAME)
|
||||||
this.$set(this.settings, i, cookie_val[i])
|
|
||||||
}
|
// for (let i of Object.keys(cookie_val)) {
|
||||||
//TODO i have no idea why the above code does not suffice to update the
|
// this.$set(this.settings, i, cookie_val[i])
|
||||||
//TODO pagination UI element as $set should update all values reactively but it does not
|
// }
|
||||||
setTimeout(function () {
|
// //TODO i have no idea why the above code does not suffice to update the
|
||||||
this.$set(this.settings, 'pagination_page', 0)
|
// //TODO pagination UI element as $set should update all values reactively but it does not
|
||||||
}.bind(this), 50)
|
// setTimeout(function () {
|
||||||
setTimeout(function () {
|
// this.$set(this.settings, 'pagination_page', 0)
|
||||||
this.$set(this.settings, 'pagination_page', cookie_val['pagination_page'])
|
// }.bind(this), 50)
|
||||||
}.bind(this), 51)
|
// setTimeout(function () {
|
||||||
|
// this.$set(this.settings, 'pagination_page', cookie_val['pagination_page'])
|
||||||
|
// }.bind(this), 51)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user