Commit 21be4138 authored by 张俊's avatar 张俊

更改编辑yaml

parent 7074f5f1
...@@ -17,7 +17,7 @@ import ace from "ace-builds"; ...@@ -17,7 +17,7 @@ import ace from "ace-builds";
import "ace-builds/webpack-resolver"; // 在 webpack 环境中使用必须要导入 import "ace-builds/webpack-resolver"; // 在 webpack 环境中使用必须要导入
import "ace-builds/src-noconflict/mode-json"; // 默认设置的语言模式 import "ace-builds/src-noconflict/mode-json"; // 默认设置的语言模式
export default { export default {
props: ["url","datas"], props: ["url","datas",'readOnly'],
data() { data() {
return { return {
aceEditor: null, aceEditor: null,
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
mode: this.acemodePath, mode: this.acemodePath,
wrap: this.wrap, wrap: this.wrap,
tabSize: 4, tabSize: 4,
highlightActiveLine: false highlightActiveLine: false,
readOnly:this.readOnly?this.readOnly:false
}); });
if (this.url) { if (this.url) {
this.getValue(); this.getValue();
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
<div class="tips"> <div class="tips">
<i class="el-icon-warning-outline"></i><span>此操作相当于:kubectl apply -f {{'<'+'spec.yaml'+'>'}}</span> <i class="el-icon-warning-outline"></i><span>此操作相当于:kubectl apply -f {{'<'+'spec.yaml'+'>'}}</span>
</div> </div>
<v-apaas-code :datas="code_arr" v-show="now_yaml==1"></v-apaas-code> <v-apaas-code :datas="code_arr" :readOnly='true' v-show="now_yaml==1"></v-apaas-code>
<v-apaas-code :datas="yaml_arr" v-show="now_yaml==0"></v-apaas-code> <v-apaas-code :datas="yaml_arr" :readOnly='true' v-show="now_yaml==0"></v-apaas-code>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment