vue2-client 1.8.114 → 1.8.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/package.json +1 -1
- package/src/components/CodeMirror/inedx.vue +15 -10
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-model="item"
|
|
4
4
|
:options="cmOption"
|
|
5
5
|
class="code-mirror"
|
|
6
|
-
:style="
|
|
6
|
+
:style="styleObj"
|
|
7
7
|
@ready="onCmReady"
|
|
8
8
|
@focus="onCmFocus"
|
|
9
9
|
@input="onCmCodeChange"
|
|
@@ -32,9 +32,11 @@ export default {
|
|
|
32
32
|
type: String,
|
|
33
33
|
default: 'sql' // 目前只有 sql/go 如果需要配置其他语言,需要在 setting.js 中配置 更多看官方文档
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
default:
|
|
35
|
+
styleObj: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => {
|
|
38
|
+
return { fontSize: '16px' }
|
|
39
|
+
}
|
|
38
40
|
},
|
|
39
41
|
theme: {
|
|
40
42
|
type: String,
|
|
@@ -68,7 +70,6 @@ export default {
|
|
|
68
70
|
},
|
|
69
71
|
methods: {
|
|
70
72
|
onCmReady () {
|
|
71
|
-
this.$refs.myCmGenerate.codemirror.setSize('400px', '400px')
|
|
72
73
|
},
|
|
73
74
|
onCmFocus (instance, event) {
|
|
74
75
|
// console.log(instance)
|
|
@@ -96,18 +97,22 @@ export default {
|
|
|
96
97
|
|
|
97
98
|
@font-face {
|
|
98
99
|
font-family: 'JetBrains Mono';
|
|
99
|
-
src: url('@vue2-client/assets/ttf/JetBrainsMono-Light.woff2') format('woff2'), /* 字体文件路径和格式 */
|
|
100
|
-
|
|
100
|
+
src: url('@vue2-client/assets/ttf/JetBrainsMono-Light.woff2') format('woff2'), /* 字体文件路径和格式 */ url('@vue2-client/assets/ttf/JetBrainsMono-Light.woff2') format('woff');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:deep(.CodeMirror) {
|
|
104
|
+
height: 100%;
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
.code-mirror {
|
|
108
|
+
height: 100%;
|
|
104
109
|
line-height: 150%;
|
|
105
110
|
text-align: left;
|
|
106
|
-
font-family: "JetBrains Mono",serif !important;
|
|
111
|
+
font-family: "JetBrains Mono", serif !important;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
:deep(.CodeMirror-line)
|
|
110
|
-
font-family: "JetBrains Mono",serif !important;
|
|
114
|
+
:deep(.CodeMirror-line), :deep(.CodeMirror-line-like) {
|
|
115
|
+
font-family: "JetBrains Mono", serif !important;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
</style>
|