|
|
@ -1,20 +1,35 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="cell-container" @keydown.stop.enter> |
|
|
|
<v-dialog :is="expand ? 'v-dialog' : 'div'" :value="true" class="cell-container" @keydown.stop.enter> |
|
|
|
<div v-if="!isForm" class="d-flex ma-1"> |
|
|
|
<div class="d-flex pa-1 " :class="{backgroundColor:expand}"> |
|
|
|
<v-spacer /> |
|
|
|
<v-spacer /> |
|
|
|
|
|
|
|
<v-icon small class="mr-2" @click="expand = !expand"> |
|
|
|
|
|
|
|
{{ expand ? 'mdi-arrow-collapse' : 'mdi-arrow-expand' }} |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
<template v-if="!isForm"> |
|
|
|
<v-btn outlined x-small class="mr-1" @click="$emit('cancel')"> |
|
|
|
<v-btn outlined x-small class="mr-1" @click="$emit('cancel')"> |
|
|
|
Cancel |
|
|
|
Cancel |
|
|
|
</v-btn> |
|
|
|
</v-btn> |
|
|
|
<v-btn x-small color="primary" @click="save"> |
|
|
|
<v-btn x-small color="primary" @click="save"> |
|
|
|
Save |
|
|
|
Save |
|
|
|
</v-btn> |
|
|
|
</v-btn> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<v-btn v-else-if="expand" x-small @click="expand=false"> |
|
|
|
|
|
|
|
Close |
|
|
|
|
|
|
|
</v-btn> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<monaco-json-object-editor |
|
|
|
<monaco-json-object-editor |
|
|
|
|
|
|
|
v-if="expand" |
|
|
|
v-model="localState" |
|
|
|
v-model="localState" |
|
|
|
class="text-left caption" |
|
|
|
class="text-left caption" |
|
|
|
style="width: 300px;min-height: 200px;min-width:100%" |
|
|
|
style="width: 300px;min-height:500px;min-width:100%" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<monaco-json-object-editor |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
v-model="localState" |
|
|
|
|
|
|
|
class="text-left caption" |
|
|
|
|
|
|
|
style="width: 300px;min-height:200px;min-width:100%" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-dialog> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
@ -28,7 +43,8 @@ export default { |
|
|
|
isForm: Boolean |
|
|
|
isForm: Boolean |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: () => ({ |
|
|
|
data: () => ({ |
|
|
|
localState: '' |
|
|
|
localState: '', |
|
|
|
|
|
|
|
expand: false |
|
|
|
}), |
|
|
|
}), |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
|
|
|
|
|
|
|
@ -70,6 +86,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
save() { |
|
|
|
save() { |
|
|
|
|
|
|
|
this.expand = false |
|
|
|
this.$emit('input', JSON.stringify(this.localState)) |
|
|
|
this.$emit('input', JSON.stringify(this.localState)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|