mirror of https://github.com/rancher/dashboard.git
move text-area options to codeMirror component
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
parent
f86e303246
commit
b326ee6369
|
|
@ -21,6 +21,10 @@ export default {
|
|||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
asTextArea: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -58,6 +62,16 @@ export default {
|
|||
|
||||
Object.assign(out, this.options);
|
||||
|
||||
if (this.asTextArea) {
|
||||
Object.assign(out, {
|
||||
lineNumbers: false,
|
||||
tabSize: 0,
|
||||
lineWrapping: true,
|
||||
showMarkdownLineBreaks: true,
|
||||
styleSelectedText: true,
|
||||
});
|
||||
}
|
||||
|
||||
return out;
|
||||
},
|
||||
markdownLineBreaks() {
|
||||
|
|
|
|||
|
|
@ -253,14 +253,7 @@ export default {
|
|||
|
||||
return {
|
||||
rows,
|
||||
codeMirrorFocus: {},
|
||||
codeMirrorOptions: {
|
||||
lineNumbers: false,
|
||||
tabSize: 0,
|
||||
lineWrapping: true,
|
||||
showMarkdownLineBreaks: true,
|
||||
styleSelectedText: true,
|
||||
},
|
||||
codeMirrorFocus: {},
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -663,7 +656,7 @@ export default {
|
|||
ref="cm"
|
||||
:class="{['focus']: codeMirrorFocus[i]}"
|
||||
:value="row[valueName]"
|
||||
:options="codeMirrorOptions"
|
||||
:as-text-area="true"
|
||||
:mode="mode"
|
||||
@onInput="onInputMarkdownMultiline(i, $event)"
|
||||
@onFocus="onFocusMarkdownMultiline(i, $event)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue