Grey out read only properties in webapp
This commit is contained in:
parent
3329d8f672
commit
bec422bb85
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
v-model="internalValue"
|
v-model="internalValue"
|
||||||
class="uk-form-small numeric-setting-line-input"
|
class="uk-form-small numeric-setting-line-input"
|
||||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||||
|
:disabled="isDisabled"
|
||||||
type="number"
|
type="number"
|
||||||
@input="grabFocus"
|
@input="grabFocus"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
<input
|
<input
|
||||||
ref="checkbox"
|
ref="checkbox"
|
||||||
v-model="internalValue"
|
v-model="internalValue"
|
||||||
|
:disabled="isDisabled"
|
||||||
class="uk-checkbox"
|
class="uk-checkbox"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@change="sendValue"
|
@change="sendValue"
|
||||||
|
|
@ -39,6 +41,7 @@
|
||||||
v-model="internalValue[i - 1]"
|
v-model="internalValue[i - 1]"
|
||||||
class="uk-form-small numeric-setting-line-input"
|
class="uk-form-small numeric-setting-line-input"
|
||||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||||
|
:disabled="isDisabled"
|
||||||
type="number"
|
type="number"
|
||||||
@input="grabFocus"
|
@input="grabFocus"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
|
|
@ -57,6 +60,7 @@
|
||||||
v-model="internalValue[key]"
|
v-model="internalValue[key]"
|
||||||
class="uk-form-small numeric-setting-line-input"
|
class="uk-form-small numeric-setting-line-input"
|
||||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||||
|
:disabled="isDisabled"
|
||||||
type="number"
|
type="number"
|
||||||
@input="grabFocus"
|
@input="grabFocus"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
|
|
@ -74,6 +78,7 @@
|
||||||
v-model="internalValue"
|
v-model="internalValue"
|
||||||
class="uk-form-small numeric-setting-line-input"
|
class="uk-form-small numeric-setting-line-input"
|
||||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||||
|
:disabled="isDisabled"
|
||||||
type="text"
|
type="text"
|
||||||
@focusout="focusOut"
|
@focusout="focusOut"
|
||||||
@keydown="keyDown"
|
@keydown="keyDown"
|
||||||
|
|
@ -166,6 +171,11 @@ export default {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isDisabled() {
|
||||||
|
return !this.dataSchema?.forms?.some(form =>
|
||||||
|
form.op?.includes('writeproperty')
|
||||||
|
);
|
||||||
|
},
|
||||||
dataType: function () {
|
dataType: function () {
|
||||||
let prop = this.dataSchema;
|
let prop = this.dataSchema;
|
||||||
if (prop == undefined) {
|
if (prop == undefined) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue