vuepress-theme-uniapp-official 1.6.7 → 1.6.8

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.
@@ -40,7 +40,7 @@
40
40
  </div>
41
41
  <div class="footer-toolbar_right">
42
42
  <span v-if="inputError" class="error-tips">
43
- 输入内容不少于 {{ MAX_AI_ANSWER_LENGTH }} 个字符
43
+ 不少于 {{ MAX_AI_ANSWER_LENGTH }} 个字符且包含中文
44
44
  </span>
45
45
  <span class="tips">
46
46
  ↵ 发送 / shift + ↵ 换行
@@ -91,7 +91,8 @@ const footer = ref(null)
91
91
 
92
92
  const hasMessage = computed(() => messages.value.length > 0)
93
93
  const inputError = computed(() => {
94
- return inputText.value.length > 0 && inputText.value.trim().length < MAX_AI_ANSWER_LENGTH;
94
+ const inputTextTrimmed = inputText.value.trim();
95
+ return inputTextTrimmed.length > 0 && inputTextTrimmed.length < MAX_AI_ANSWER_LENGTH && !/[\u4e00-\u9fa5]/.test(inputTextTrimmed);
95
96
  })
96
97
 
97
98
  const notSupportBackdrop = ref(false);
@@ -1,2 +1,2 @@
1
1
  export const DEFAULT_ENABLE_AI = true; // 默认启用 AI 助手
2
- export const MAX_AI_ANSWER_LENGTH = 6; // AI 消息最大长度
2
+ export const MAX_AI_ANSWER_LENGTH = 6; // AI 消息最小长度
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuepress-theme-uniapp-official",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "description": "uni-app official website theme for vuepress",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -45,9 +45,9 @@
45
45
  "vuepress-plugin-mermaidjs": "1.9.1",
46
46
  "vuepress-plugin-named-chunks": "^1.1.4",
47
47
  "vuepress-plugin-zooming": "^1.1.8",
48
- "vuepress-plugin-expandable-row": "^1.0.10",
49
48
  "vuepress-plugin-check-md2": "^1.0.5",
50
- "vuepress-plugin-noscript-code": "^1.0.2"
49
+ "vuepress-plugin-noscript-code": "^1.0.2",
50
+ "vuepress-plugin-expandable-row": "^1.0.10"
51
51
  },
52
52
  "resolutions": {
53
53
  "terser-webpack-plugin": "1.4.6",