easybill-ui 1.2.0 → 1.2.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.
- package/components/CurdForm/src/CurdForm.vue +1 -1
- package/components/CurdForm/src/FormCompose.vue +9 -11
- package/components/CurdForm/src/components/schema-form-input-number.vue +1 -1
- package/components/CurdForm/src/components/schema-form-input.vue +1 -2
- package/index.ts +2 -2
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form ref="schemaFormRef" :model="formModel" :rules="rules" v-bind="{ ...$attrs, ...getFormProps }" class="curd-form" :style="getFormStyle()" @submit.prevent>
|
|
3
3
|
<template v-for="formItem in schemaItems" :key="formItem.prop">
|
|
4
|
-
<el-form-item v-if="!$slots[formItem.prop + 'Item']" :required="rules[formItem.prop]?.find((a) => a.hasOwnProperty('required'))?.required" :label="formItem.label" :prop="formItem.prop" :label-width="formItem.labelWidth" :class="getFormItemStyle(formItem)" v-bind="getFormItemProps(formItem)">
|
|
4
|
+
<el-form-item v-if="!$slots[formItem.prop + 'Item']" :required="rules && rules[formItem.prop]?.find((a) => a.hasOwnProperty('required'))?.required" :label="formItem.label" :prop="formItem.prop" :label-width="formItem.labelWidth" :class="getFormItemStyle(formItem)" v-bind="getFormItemProps(formItem)">
|
|
5
5
|
<slot :name="formItem.prop" :form-item="formItem" :form-model="formModel"></slot>
|
|
6
6
|
<FormItem v-if="!(formItem.prop && $slots[formItem.prop])" :form-item="formItem" :form-model="formModel" @change="onChange">
|
|
7
7
|
<template #prefix>
|
|
@@ -19,16 +19,14 @@ const comp = computed(() => getComponent(props.formItem.type) || (formContext.co
|
|
|
19
19
|
// console.log(props, "==========props")
|
|
20
20
|
</script>
|
|
21
21
|
<template>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
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
|
+
:placeholder="t('el.form.pleaseInput', [formItem.label || ''])"
|
|
28
|
+
v-bind="props.props"
|
|
29
|
+
v-on="eventObject"
|
|
30
|
+
/>
|
|
33
31
|
</template>
|
|
34
32
|
<style scoped lang="scss"></style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component style="width: 100%" v-model="model" :is="h(ElInputNumber, {
|
|
2
|
+
<component style="width: 100%" v-model="model" :is="h(ElInputNumber, { ...props.props, ref: changeRef }, props.formItem?.slots)" :placeholder="t('el.form.pleaseInput', [formItem.label || ''])" v-on="eventObject"></component>
|
|
3
3
|
</template>
|
|
4
4
|
<script lang="ts" setup>
|
|
5
5
|
import { useLocale } from "easybill-ui/utils/hooks/useLocal.ts"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component v-model="model" :is="withDirectives(h(ElInput, {
|
|
2
|
+
<component v-model="model" :is="withDirectives(h(ElInput, { ...props.props, ref: changeRef }, props.formItem?.slots), [[trim, true]])" :placeholder="t('el.form.pleaseInput', [formItem.label || ''])" v-on="eventObject"></component>
|
|
3
3
|
</template>
|
|
4
4
|
<script lang="ts" setup>
|
|
5
5
|
import { useLocale } from "easybill-ui/utils/hooks/useLocal.ts"
|
|
@@ -11,7 +11,6 @@ const props = defineProps(FormItemProps)
|
|
|
11
11
|
const { trim } = directives
|
|
12
12
|
const model = defineModel()
|
|
13
13
|
const { t } = useLocale()
|
|
14
|
-
|
|
15
14
|
const vm = getCurrentInstance()
|
|
16
15
|
function changeRef(el: ElInput) {
|
|
17
16
|
vm.exposed = el || {}
|
package/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import FormDialog from "./components/FormDialog"
|
|
|
8
8
|
import TableFilter from "./components/TableFilter"
|
|
9
9
|
import { makeInstaller } from "./utils/vue/make-installer"
|
|
10
10
|
|
|
11
|
-
const Components = [ConstantStatus,
|
|
11
|
+
const Components = [ConstantStatus, CurdForm, TableFilter, DetailInfo, CurdFormItem, CurdTable, FormDialog] as Plugin[]
|
|
12
12
|
export * from "./components/ConstantStatus/src/types"
|
|
13
13
|
export * from "./components/CurdForm"
|
|
14
14
|
export * from "./components/CurdTable/src/types"
|
|
@@ -16,6 +16,6 @@ export * from "./components/DetailInfo/src/types"
|
|
|
16
16
|
export * from "./components/FormDialog/src/types"
|
|
17
17
|
export * from "./components/TableFilter/types"
|
|
18
18
|
export * from "./utils/hooks/useGlobalConfig"
|
|
19
|
-
export { ConstantStatus, CurdForm, CurdFormItem,
|
|
19
|
+
export { ConstantStatus, CurdForm, CurdFormItem, DetailInfo, TableFilter, CurdTable, FormDialog}
|
|
20
20
|
|
|
21
21
|
export default makeInstaller([...Components])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easybill-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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": "
|
|
17
|
+
"gitHead": "69a304abf0094c80e1efdb5bc5e185f8624b1e09"
|
|
18
18
|
}
|