mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(workflowengine): use adapted mixin again in FileMimeType
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
2619904080
commit
9e5e50d16e
2 changed files with 7 additions and 32 deletions
|
|
@ -51,6 +51,7 @@ export default {
|
|||
NcSelect,
|
||||
},
|
||||
mixins: [
|
||||
valueMixin
|
||||
],
|
||||
|
||||
emits: ['update:model-value'],
|
||||
|
|
@ -79,7 +80,6 @@ export default {
|
|||
id: 'application/pdf',
|
||||
},
|
||||
],
|
||||
newValue: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -88,9 +88,6 @@ export default {
|
|||
default: '',
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.updateInternalValue()
|
||||
},
|
||||
computed: {
|
||||
options() {
|
||||
return [...this.predefinedTypes, this.customValue]
|
||||
|
|
@ -121,12 +118,7 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
modelValue() {
|
||||
console.error("DEBUG: watch modelValue fileSystemTag")
|
||||
this.updateInternalValue()
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
validateRegex(string) {
|
||||
const regexRegex = /^\/(.*)\/([gui]{0,3})$/
|
||||
|
|
@ -143,10 +135,6 @@ export default {
|
|||
this.newValue = event.target.value || event.detail[0]
|
||||
this.$emit('update:model-value', this.newValue)
|
||||
},
|
||||
updateInternalValue() {
|
||||
console.error("DEBUG: updateInternalValue filemimetype " + this.modelValue)
|
||||
this.newValue = this.modelValue
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -4,32 +4,19 @@
|
|||
*/
|
||||
|
||||
const valueMixin = {
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
check: {
|
||||
type: Object,
|
||||
default: () => { return {} },
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
newValue: '',
|
||||
newValue: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
this.updateInternalValue(value)
|
||||
},
|
||||
modelValue() {
|
||||
this.updateInternalValue()
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateInternalValue(value) {
|
||||
this.newValue = value
|
||||
updateInternalValue() {
|
||||
this.newValue = this.modelValue
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue