vue2-client 1.20.21 → 1.20.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.20.21",
3
+ "version": "1.20.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -486,6 +486,8 @@ export default {
486
486
  }
487
487
  // 更新 allFormData
488
488
  this.$set(this.allFormData, groupName, formData)
489
+ // 抛出表单组数据
490
+ this.$emit('x-form-group-data-change', groupName, formData)
489
491
  // 触发其他表单的刷新
490
492
  this.$nextTick(() => {
491
493
  this.groups.forEach((item, index) => {
@@ -160,6 +160,25 @@ export default {
160
160
  this.internalMarkdown = text
161
161
  return text
162
162
  },
163
+ /**
164
+ * 接收字符串格式的 markdown 内容进行渲染。
165
+ *
166
+ * 用法示例:
167
+ * - this.$refs.viewer.receiveMarkdownString('# Hello\n\n这是 markdown 内容')
168
+ *
169
+ * @param {string} markdownText - markdown 字符串内容
170
+ * @returns {string} 返回传入的字符串
171
+ */
172
+ receiveMarkdownString (markdownText) {
173
+ if (typeof markdownText !== 'string') {
174
+ // eslint-disable-next-line no-console
175
+ console.warn('[XMarkdownViewer] receiveMarkdownString 期望接收字符串,但收到:', markdownText)
176
+ this.internalMarkdown = ''
177
+ return ''
178
+ }
179
+ this.internalMarkdown = markdownText
180
+ return markdownText
181
+ },
163
182
  /**
164
183
  * receiveMarkdown 的别名:语义更明确
165
184
  */