resolver-egretimp-plus 0.1.48 → 0.1.51
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
|
@@ -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,14 @@ 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
|
+
}, {
|
|
200
|
+
immediate: true
|
|
201
|
+
})
|
|
192
202
|
</script>
|
|
193
203
|
<style lang="scss" scoped>
|
|
194
204
|
.custom-component-plain {
|