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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.8.114 -2024-3-14 @张振宇**
4
+ **1.8.114 - 1.8.116 -2024-3-14 @张振宇**
5
5
  - 增加ql展示组件
6
6
 
7
7
  **1.8.103-1.8.106 -2024-3-14 @张振宇**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.114",
3
+ "version": "1.8.116",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -3,7 +3,7 @@
3
3
  v-model="item"
4
4
  :options="cmOption"
5
5
  class="code-mirror"
6
- :style="{fontSize}"
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
- fontSize: {
36
- type: String,
37
- default: '16px'
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
- url('@vue2-client/assets/ttf/JetBrainsMono-Light.woff2') format('woff');
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),:deep(.CodeMirror-line-like) {
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>