mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-08 17:38:35 +08:00
Watching the parent seems to work better
This commit is contained in:
@@ -42,12 +42,10 @@
|
||||
computed: computedFromDefaults(defaults), // Getters & setters for the delegated data
|
||||
watch: {
|
||||
// If the Reverse proxy is enabled, PHP will be forced off
|
||||
'$parent.$props.data.reverseProxy.reverseProxy.computed'() { this.checkPhpEnabled(); },
|
||||
php() { this.checkPhpEnabled(); },
|
||||
},
|
||||
methods: {
|
||||
checkPhpEnabled() {
|
||||
const state = this.$parent.$props.data.reverseProxy.reverseProxy.computed;
|
||||
'$parent.$props.data': {
|
||||
handler(data) {
|
||||
// This might cause recursion, but seems not to
|
||||
const state = data.reverseProxy.reverseProxy.computed;
|
||||
if (state) {
|
||||
this.$props.data.php.enabled = false;
|
||||
this.$props.data.php.computed = false;
|
||||
@@ -56,6 +54,8 @@
|
||||
this.$props.data.php.computed = this.$props.data.php.value;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user