resolver-egretimp-plus 0.1.48 → 0.1.49

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": "resolver-egretimp-plus",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -4,10 +4,12 @@
4
4
  <script setup>
5
5
  import { findComponent } from '../../utils/common';
6
6
  import { commonPropsType, PLAIN_TYPE_OPTIONS_COLUMNS } from '../../utils/const' // 这边不能用utils/index去引用,因为这个组件在utils/render.js中被引入了,会造成循环引用
7
- import { computed, defineModel, defineProps, inject, getCurrentInstance } from 'vue'
7
+ import { computed, defineModel, defineProps, inject, getCurrentInstance, watch, nextTick } from 'vue'
8
8
  import dayjs from 'dayjs'
9
9
  import { isNaN } from '../../utils/is';
10
+ import { useFormItem } from 'element-plus'
10
11
 
12
+ const { formItem: elFormItem } = useFormItem()
11
13
  const modelValue = defineModel()
12
14
  const props = defineProps({
13
15
  ...commonPropsType,
@@ -189,6 +191,12 @@ function formatValue(value) {
189
191
  : `${formatted} ${props.symbol}`
190
192
  : formatted
191
193
  }
194
+
195
+ watch(modelValue, () => {
196
+ nextTick(() => {
197
+ elFormItem?.validate?.('blur').catch()
198
+ })
199
+ })
192
200
  </script>
193
201
  <style lang="scss" scoped>
194
202
  .custom-component-plain {