Watching the parent seems to work better
parent
27ad3cbea2
commit
97b28323c5
|
@ -42,12 +42,10 @@
|
||||||
computed: computedFromDefaults(defaults), // Getters & setters for the delegated data
|
computed: computedFromDefaults(defaults), // Getters & setters for the delegated data
|
||||||
watch: {
|
watch: {
|
||||||
// If the Reverse proxy is enabled, PHP will be forced off
|
// If the Reverse proxy is enabled, PHP will be forced off
|
||||||
'$parent.$props.data.reverseProxy.reverseProxy.computed'() { this.checkPhpEnabled(); },
|
'$parent.$props.data': {
|
||||||
php() { this.checkPhpEnabled(); },
|
handler(data) {
|
||||||
},
|
// This might cause recursion, but seems not to
|
||||||
methods: {
|
const state = data.reverseProxy.reverseProxy.computed;
|
||||||
checkPhpEnabled() {
|
|
||||||
const state = this.$parent.$props.data.reverseProxy.reverseProxy.computed;
|
|
||||||
if (state) {
|
if (state) {
|
||||||
this.$props.data.php.enabled = false;
|
this.$props.data.php.enabled = false;
|
||||||
this.$props.data.php.computed = false;
|
this.$props.data.php.computed = false;
|
||||||
|
@ -56,6 +54,8 @@
|
||||||
this.$props.data.php.computed = this.$props.data.php.value;
|
this.$props.data.php.computed = this.$props.data.php.value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue