easybill-ui 1.2.8 → 1.2.9

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,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { useForm } from "./hooks"
3
- import { getComponent } from "./components"
4
2
  import { useLocale } from "easybill-ui"
5
3
  import { type Component, computed, getCurrentInstance, h } from "vue"
4
+ import { getComponent } from "./components"
5
+ import { useForm } from "./hooks"
6
6
  import { FormItemProps } from "./types"
7
7
  const props = defineProps(FormItemProps)
8
8
  const model = defineModel()
@@ -14,17 +14,11 @@ function changeRef(el: Component) {
14
14
  vm.exposedProxy = el || {}
15
15
  }
16
16
  const { formContext } = useForm()
17
- const comp = computed(() => getComponent(props.formItem.type) || (formContext.components && formContext.components[props.formItem.type]))
17
+ const comp = computed(() => (formContext.components && formContext.components[props.formItem.type]) || getComponent(props.formItem.type))
18
18
 
19
19
  // console.log(props, "==========props")
20
20
  </script>
21
21
  <template>
22
- <component
23
- style="width: 100%"
24
- :ref="changeRef"
25
- :is="typeof comp === 'string' ? comp : h(comp, { ...$attrs, ...props, ref: changeRef, modelValue: model }, props.formItem?.slots)"
26
- v-model="model"
27
- v-bind="props.props"
28
- />
22
+ <component style="width: 100%" :ref="changeRef" :is="typeof comp === 'string' ? comp : h(comp, { ...$attrs, ...props, ref: changeRef, modelValue: model }, props.formItem?.slots)" v-model="model" v-bind="props.props" />
29
23
  </template>
30
24
  <style scoped lang="scss"></style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easybill-ui",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "A component library for easybill",
5
5
  "author": "tuchongyang <779311998@qq.com>",
6
6
  "private": false,
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "a1583d2480c55bba364ed471b7e466d444f6fdb6"
17
+ "gitHead": "4b64ea1c8da7f78a0fdf4d49e73607cc4895f2c5"
18
18
  }