File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/views/FormEditor/FormCode Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2424 {{drawer.show?'隐藏':'显示'}}代码
2525 </span >
2626 </el-button >
27+ <el-button v-if =" drawer.control.key==='github'" size =" mini" >
28+ <a href =" https://github.com/Liugq5713/vue-element-form-editor" target =" _blank" >
29+ <img :src =" github" width =" 13px" alt srcset >
30+ </a >
31+ </el-button >
2732 </template >
2833 <code class =" code" >
2934 <div style =" overflow :auto " >
4853/* eslint-disable no-useless-escape */
4954import { genVueFileWrapper } from " ./vueSnippet.js" ;
5055import Drawer from " @/components/Drawer" ;
56+ import github from " ./github.svg" ;
5157
5258export default {
5359 components: {
@@ -66,6 +72,7 @@ export default {
6672 },
6773 data () {
6874 return {
75+ github,
6976 srcCode: " " ,
7077 fromItemsCode: " " ,
7178 refCode: " " ,
@@ -84,6 +91,11 @@ export default {
8491 key: " look" ,
8592 show: " 查看" ,
8693 hidden: " 隐藏"
94+ },
95+ {
96+ key: " github" ,
97+ show: " 查看" ,
98+ hidden: " 隐藏"
8799 }
88100 ]
89101 };
@@ -125,7 +137,7 @@ export default {
125137 openDrawer (target ) {
126138 let shouldOpen = true ;
127139 while (! target .matches (" .controls" )) {
128- if (target .matches (" .control-0" )) {
140+ if (target .matches (" .control-0" ) || target . matches ( " .control-2 " ) ) {
129141 shouldOpen = false ;
130142 break ;
131143 } else {
@@ -165,5 +177,6 @@ export default {
165177.code-container >>> .control {
166178 padding : 0 ;
167179 border : 0 ;
180+ background-color : #fff0 ;
168181}
169182 </style >
You can’t perform that action at this time.
0 commit comments