jobsys-explore 4.7.0 → 4.7.2

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.
@@ -1,10 +1,11 @@
1
1
  import { cloneDeep, find, isArray, isBoolean, isFunction, isUndefined } from "lodash-es"
2
2
  import { Button, Icon, Popup, Search } from "vant"
3
- import { computed, defineComponent, nextTick, onMounted, reactive, ref, watch } from "vue"
3
+ import { computed, defineComponent, inject, nextTick, onMounted, reactive, ref, watch } from "vue"
4
4
  import ExGrid from "../grid/ExGrid.jsx"
5
5
  import { createExpand, createField, createQuick } from "./components"
6
6
  import "./index.less"
7
- import { useSm3, useCache } from "../../hooks"
7
+ import { useSm3, useCache, useFormFormat } from "../../hooks"
8
+ import { EX_FORM } from "../provider/ExProvider.jsx"
8
9
 
9
10
  /**
10
11
  * ExSearch 搜索组件
@@ -98,6 +99,8 @@ export default defineComponent({
98
99
  setup(props, { expose, emit }) {
99
100
  const componentValue = ref(props.modelValue)
100
101
 
102
+ const formProvider = inject(EX_FORM, () => ({}))
103
+
101
104
  watch(
102
105
  () => props.modelValue,
103
106
  () => {
@@ -209,12 +212,14 @@ export default defineComponent({
209
212
 
210
213
  const onSearch = () => {
211
214
  nextTick(() => {
212
- debugger
213
215
  let form = cloneDeep(getQueryForm())
214
216
  if (props.persistence) {
215
217
  useCache(genPersistenceKey()).set(form)
216
218
  }
217
219
 
220
+ //使用 FormProvider 的 format
221
+ form = useFormFormat(form, formProvider.format || {})
222
+
218
223
  if (props.adapter === "newbie") {
219
224
  const data = {}
220
225