|
|
@ -10,11 +10,10 @@ |
|
|
|
></codemirror> |
|
|
|
></codemirror> |
|
|
|
<div v-if="isSubmit" class="code-mask"></div> |
|
|
|
<div v-if="isSubmit" class="code-mask"></div> |
|
|
|
<div class="btns"> |
|
|
|
<div class="btns"> |
|
|
|
<el-button |
|
|
|
<span |
|
|
|
class="btn" |
|
|
|
class="el-icon-delete del" |
|
|
|
type="info" |
|
|
|
|
|
|
|
@click="clearCode" |
|
|
|
@click="clearCode" |
|
|
|
>清屏</el-button> |
|
|
|
></span> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
v-if="modelIsShow" |
|
|
|
v-if="modelIsShow" |
|
|
|
class="btn" |
|
|
|
class="btn" |
|
|
@ -222,6 +221,7 @@ export default { |
|
|
|
const promises = [] |
|
|
|
const promises = [] |
|
|
|
const addType = list => { |
|
|
|
const addType = list => { |
|
|
|
list.map(e => { |
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.disabled = true |
|
|
|
// 用promise储存以添加完后更新数据 |
|
|
|
// 用promise储存以添加完后更新数据 |
|
|
|
promises.push(new Promise((resolve,reject) => { |
|
|
|
promises.push(new Promise((resolve,reject) => { |
|
|
|
this.$post(this.api.referenceDemoList, { |
|
|
|
this.$post(this.api.referenceDemoList, { |
|
|
@ -262,7 +262,7 @@ export default { |
|
|
|
const id = this.$refs.tree.getCheckedKeys() |
|
|
|
const id = this.$refs.tree.getCheckedKeys() |
|
|
|
if (!id.length) return this.$message.error('请选择模型!') |
|
|
|
if (!id.length) return this.$message.error('请选择模型!') |
|
|
|
this.$post(`${this.api.referenceFindById}?id=${id[0]}`).then(res => { |
|
|
|
this.$post(`${this.api.referenceFindById}?id=${id[0]}`).then(res => { |
|
|
|
// this.codeVal = '' |
|
|
|
this.codeVal += '\n' + res.data.modelDemo |
|
|
|
this.modelVisible = false |
|
|
|
this.modelVisible = false |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -534,6 +534,19 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.del { |
|
|
|
|
|
|
|
width: 40px; |
|
|
|
|
|
|
|
margin-right: 10px; |
|
|
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
|
|
color: #fff; |
|
|
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
|
|
background-color: #f00; |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
|
|
|
opacity: .9; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
/deep/.CodeMirror-wrap pre.CodeMirror-line, |
|
|
|
/deep/.CodeMirror-wrap pre.CodeMirror-line, |
|
|
|
.CodeMirror-wrap pre.CodeMirror-line-like { |
|
|
|
.CodeMirror-wrap pre.CodeMirror-line-like { |
|
|
|
height: 30px; |
|
|
|
height: 30px; |
|
|
|