@fangzhongya/fang-ui 0.1.19 → 0.1.21
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/dist/components/array/src/data.cjs +4 -0
- package/dist/components/array/src/data.d.ts +4 -0
- package/dist/components/array/src/data.js +4 -0
- package/dist/components/array/src/index2.cjs +22 -21
- package/dist/components/array/src/index2.js +12 -11
- package/dist/components/common/compons.cjs +4 -2
- package/dist/components/common/compons.d.ts +1 -1
- package/dist/components/common/compons.js +4 -2
- package/dist/components/forms/src/data.cjs +5 -5
- package/dist/components/forms/src/data.d.ts +1 -1
- package/dist/components/forms/src/data.js +5 -5
- package/dist/components/forms/src/index2.cjs +5 -3
- package/dist/components/forms/src/index2.js +5 -3
- package/dist/components/forms/src/setup.cjs +0 -7
- package/dist/components/forms/src/setup.js +0 -7
- package/dist/components/forms-div/src/data.cjs +1 -1
- package/dist/components/forms-div/src/data.js +1 -1
- package/dist/components/forms-div/src/index2.cjs +11 -4
- package/dist/components/forms-div/src/index2.js +10 -3
- package/dist/components/forms-item/src/data.cjs +1 -1
- package/dist/components/forms-item/src/data.js +1 -1
- package/dist/components/forms-item/src/index2.cjs +4 -2
- package/dist/components/forms-item/src/index2.js +4 -2
- package/dist/components/forms-item/src/label.cjs +3 -2
- package/dist/components/forms-item/src/label.js +3 -2
- package/dist/components/forms-items/src/data.cjs +1 -1
- package/dist/components/forms-items/src/data.js +1 -1
- package/dist/components/forms-items/src/index2.cjs +4 -2
- package/dist/components/forms-items/src/index2.js +4 -2
- package/dist/components/global-config/src/data.cjs +12 -0
- package/dist/components/global-config/src/data.d.ts +12 -0
- package/dist/components/global-config/src/data.js +12 -0
- package/dist/components/index.cjs +16 -12
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.scss +2 -0
- package/dist/components/index2.scss +2 -0
- package/dist/components/list/index.css +12 -0
- package/dist/components/list/index.scss +15 -0
- package/dist/components/list/src/data.cjs +21 -2
- package/dist/components/list/src/data.d.ts +22 -1
- package/dist/components/list/src/data.js +21 -2
- package/dist/components/list/src/index2.cjs +75 -23
- package/dist/components/list/src/index2.js +76 -24
- package/dist/components/list/style/index2.scss +1 -0
- package/dist/components/lists/index.css +2 -2
- package/dist/components/lists/index.scss +7 -2
- package/dist/components/lists/src/data.cjs +12 -1
- package/dist/components/lists/src/data.d.ts +10 -0
- package/dist/components/lists/src/data.js +12 -1
- package/dist/components/lists/src/index2.cjs +7 -5
- package/dist/components/lists/src/index2.js +7 -5
- package/dist/components/listsp/index.css +2 -2
- package/dist/components/listsp/src/data.d.ts +1 -5
- package/dist/components/listspd/index.cjs +9 -0
- package/dist/components/listspd/index.css +99 -0
- package/dist/components/listspd/index.d.ts +4 -0
- package/dist/components/listspd/index.js +9 -0
- package/dist/components/listspd/index.scss +30 -0
- package/dist/components/listspd/src/data.cjs +13 -0
- package/dist/components/listspd/src/data.d.ts +14 -0
- package/dist/components/listspd/src/data.js +13 -0
- package/dist/components/listspd/src/index.cjs +4 -0
- package/dist/components/listspd/src/index.js +4 -0
- package/dist/components/listspd/src/index2.cjs +111 -0
- package/dist/components/listspd/src/index2.js +111 -0
- package/dist/components/listspd/style/index2.scss +4 -0
- package/dist/components/page/index.css +11 -0
- package/dist/components/tables/common/config.cjs +1 -1
- package/dist/components/tables/common/config.js +1 -1
- package/dist/components/tables/common/pagin.cjs +60 -16
- package/dist/components/tables/common/pagin.d.ts +8 -0
- package/dist/components/tables/common/pagin.js +60 -16
- package/dist/components/tables/common/tooltip.cjs +101 -0
- package/dist/components/tables/common/tooltip.d.ts +6 -0
- package/dist/components/tables/common/tooltip.js +101 -0
- package/dist/components/tables/common/util.cjs +3 -3
- package/dist/components/tables/common/util.js +3 -3
- package/dist/components/tables/src/column.cjs +19 -15
- package/dist/components/tables/src/column.d.ts +3 -2
- package/dist/components/tables/src/column.js +17 -13
- package/dist/components/tables/src/columns3.cjs +16 -32
- package/dist/components/tables/src/columns3.js +15 -31
- package/dist/components/tables/src/data.cjs +3 -2
- package/dist/components/tables/src/data.d.ts +1 -0
- package/dist/components/tables/src/data.js +3 -2
- package/dist/components/tablespd/index.cjs +9 -0
- package/dist/components/tablespd/index.css +88 -0
- package/dist/components/tablespd/index.d.ts +4 -0
- package/dist/components/tablespd/index.js +9 -0
- package/dist/components/tablespd/index.scss +40 -0
- package/dist/components/tablespd/src/data.cjs +13 -0
- package/dist/components/tablespd/src/data.d.ts +18 -0
- package/dist/components/tablespd/src/data.js +13 -0
- package/dist/components/tablespd/src/index.cjs +4 -0
- package/dist/components/tablespd/src/index.js +4 -0
- package/dist/components/tablespd/src/index2.cjs +111 -0
- package/dist/components/tablespd/src/index2.js +111 -0
- package/dist/components/tablespd/style/index2.scss +4 -0
- package/dist/components/tablesv/src/column.cjs +4 -4
- package/dist/components/tablesv/src/column.js +3 -3
- package/dist/css/index.css +65 -2
- package/dist/css/list.css +12 -0
- package/dist/css/lists.css +2 -2
- package/dist/css/listsp.css +2 -2
- package/dist/css/listspd.css +99 -0
- package/dist/css/page.css +11 -0
- package/dist/css/tablespd.css +88 -0
- package/dist/directives/adjust/index.cjs +10 -6
- package/dist/directives/adjust/index.js +10 -6
- package/dist/directives/index.cjs +6 -4
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.js +4 -2
- package/dist/directives/sortable/index.cjs +45 -0
- package/dist/directives/{adjust/index copy 2.d.ts → sortable/index.d.ts} +1 -1
- package/dist/directives/sortable/index.js +45 -0
- package/dist/expand/{chunk-IEODUGVJ.cjs → chunk-2L4PC7LZ.cjs} +5 -0
- package/dist/expand/{chunk-XY53LCPN.js → chunk-RBGCE6BS.js} +5 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/cssname/index.d.ts +2 -2
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/inherit/index.cjs +0 -8
- package/dist/hooks/inherit/index.d.ts +0 -1
- package/dist/hooks/inherit/index.js +0 -8
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +38 -32
- package/dist/index.css +65 -2
- package/dist/index.js +8 -2
- package/dist/utils/vues/getAttrValue.cjs +11 -0
- package/dist/utils/vues/getAttrValue.d.ts +3 -0
- package/dist/utils/vues/getAttrValue.js +11 -0
- package/dist/utils/vues/index.cjs +2 -0
- package/dist/utils/vues/index.d.ts +1 -0
- package/dist/utils/vues/index.js +2 -0
- package/package.json +4 -2
- package/dist/directives/adjust/index copy 3.d.ts +0 -6
- package/dist/directives/adjust/index copy 4.d.ts +0 -6
- package/dist/directives/adjust/index copy 5.d.ts +0 -6
- package/dist/directives/adjust/index copy 6.d.ts +0 -6
- package/dist/directives/adjust/index copy 7.d.ts +0 -6
- package/dist/directives/adjust/index copy 8.d.ts +0 -6
- package/dist/directives/adjust/index copy 9.d.ts +0 -6
- package/dist/directives/adjust/index copy.d.ts +0 -6
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{date-picker → keep-com}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{date-picker.css → keep-com.css} +0 -0
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const data
|
|
5
|
-
const index$
|
|
4
|
+
const data = require("./data.cjs");
|
|
5
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
6
6
|
const index$3 = require("../../icon/index.cjs");
|
|
7
7
|
const clear = require("../../../icons/vue/clear.cjs");
|
|
8
|
-
|
|
9
|
-
const
|
|
8
|
+
require("../../forms/src/data.cjs");
|
|
9
|
+
const compons = require("../../common/compons.cjs");
|
|
10
|
+
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
10
11
|
const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
|
|
11
12
|
const index = require("../../../hooks/locale/index.cjs");
|
|
12
13
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
14
|
__name: "index",
|
|
14
|
-
props: index$
|
|
15
|
-
emits: data
|
|
15
|
+
props: index$2.getProps(data.dataProps),
|
|
16
|
+
emits: data.dataEmits,
|
|
16
17
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
17
18
|
const { getLocale } = index.useLocale();
|
|
18
|
-
const
|
|
19
|
-
const pcompon = vue.computed(() => {
|
|
20
|
-
if (typeof props.compon == "string") {
|
|
21
|
-
const tcom = lineToLargeHump.lineToLargeHump(props.compon);
|
|
22
|
-
return compons[tcom] || props.compon;
|
|
23
|
-
} else {
|
|
24
|
-
return props.compon;
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const cs = index$2.useCssName(data$1.name);
|
|
19
|
+
const cs = index$1.useCssName(data.name);
|
|
28
20
|
const prs = __props;
|
|
29
|
-
const props = index$
|
|
21
|
+
const props = index$2.usePropsDefault(data.name, prs, data.dataProps, {
|
|
30
22
|
rangeSeparator() {
|
|
31
23
|
return getLocale("to");
|
|
32
24
|
},
|
|
@@ -37,7 +29,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
29
|
return getLocale("end");
|
|
38
30
|
}
|
|
39
31
|
});
|
|
40
|
-
index$
|
|
32
|
+
index$2.viewProps(props, data.name);
|
|
33
|
+
const compons$1 = compons.useGetCompons(props.compons + "-compons");
|
|
34
|
+
const pcompon = vue.computed(() => {
|
|
35
|
+
if (typeof props.compon == "string") {
|
|
36
|
+
const tcom = lineToLargeHump.lineToLargeHump(props.compon);
|
|
37
|
+
return compons$1[tcom] || props.compon;
|
|
38
|
+
} else {
|
|
39
|
+
return props.compon;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
41
42
|
const emit = __emit;
|
|
42
43
|
const refInput = vue.ref();
|
|
43
44
|
const isfocus = vue.ref(false);
|
|
@@ -201,7 +202,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
201
202
|
}
|
|
202
203
|
});
|
|
203
204
|
__expose({
|
|
204
|
-
...data
|
|
205
|
+
...data.dataExpose
|
|
205
206
|
});
|
|
206
207
|
return (_ctx, _cache) => {
|
|
207
208
|
var _a, _b, _c, _d;
|
|
@@ -211,7 +212,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
211
212
|
onMouseleave,
|
|
212
213
|
onClick: vue.withModifiers(onClick, ["stop"])
|
|
213
214
|
}, [
|
|
214
|
-
vue.renderSlot(_ctx.$slots, vue.unref(data
|
|
215
|
+
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).prefix),
|
|
215
216
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(pcompon.value), vue.mergeProps(vue.unref(props).config, {
|
|
216
217
|
multiple: multiple.value,
|
|
217
218
|
class: [vue.unref(cs).z("value"), vue.unref(cs).z("start")],
|
|
@@ -265,7 +266,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
265
266
|
_: 1
|
|
266
267
|
})
|
|
267
268
|
], 2)) : vue.createCommentVNode("", true),
|
|
268
|
-
vue.renderSlot(_ctx.$slots, vue.unref(data
|
|
269
|
+
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).suffix)
|
|
269
270
|
], 34);
|
|
270
271
|
};
|
|
271
272
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, watch, onMounted, createElementBlock, openBlock, withModifiers, normalizeClass, unref, renderSlot, createBlock, createElementVNode, createCommentVNode, resolveDynamicComponent, mergeProps, toDisplayString, createVNode, withCtx } from "vue";
|
|
2
2
|
import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
4
|
import { Icon } from "../../icon/index.js";
|
|
5
5
|
import Clear from "../../../icons/vue/clear.js";
|
|
6
|
-
import
|
|
6
|
+
import "../../forms/src/data.js";
|
|
7
|
+
import { useGetCompons } from "../../common/compons.js";
|
|
7
8
|
import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
|
|
8
9
|
import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
|
|
9
10
|
import { useLocale } from "../../../hooks/locale/index.js";
|
|
@@ -13,15 +14,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
14
|
emits: dataEmits,
|
|
14
15
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
16
|
const { getLocale } = useLocale();
|
|
16
|
-
const compons = inject(provides.compons, {});
|
|
17
|
-
const pcompon = computed(() => {
|
|
18
|
-
if (typeof props.compon == "string") {
|
|
19
|
-
const tcom = lineToLargeHump(props.compon);
|
|
20
|
-
return compons[tcom] || props.compon;
|
|
21
|
-
} else {
|
|
22
|
-
return props.compon;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
17
|
const cs = useCssName(name);
|
|
26
18
|
const prs = __props;
|
|
27
19
|
const props = usePropsDefault(name, prs, dataProps, {
|
|
@@ -36,6 +28,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
28
|
}
|
|
37
29
|
});
|
|
38
30
|
viewProps(props, name);
|
|
31
|
+
const compons = useGetCompons(props.compons + "-compons");
|
|
32
|
+
const pcompon = computed(() => {
|
|
33
|
+
if (typeof props.compon == "string") {
|
|
34
|
+
const tcom = lineToLargeHump(props.compon);
|
|
35
|
+
return compons[tcom] || props.compon;
|
|
36
|
+
} else {
|
|
37
|
+
return props.compon;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
39
40
|
const emit = __emit;
|
|
40
41
|
const refInput = ref();
|
|
41
42
|
const isfocus = ref(false);
|
|
@@ -61,12 +61,14 @@ function getCompons(...arrs) {
|
|
|
61
61
|
});
|
|
62
62
|
return coms;
|
|
63
63
|
}
|
|
64
|
+
const comKey = "com-compons";
|
|
64
65
|
function useCompons(key, ...arrs) {
|
|
65
66
|
const tfcom = getCompons(...arrs);
|
|
66
|
-
vue.provide(key ||
|
|
67
|
+
vue.provide(key || comKey, tfcom);
|
|
68
|
+
return tfcom;
|
|
67
69
|
}
|
|
68
70
|
function useGetCompons(key, value = {}) {
|
|
69
|
-
return vue.inject(key ||
|
|
71
|
+
return vue.inject(key || comKey, value);
|
|
70
72
|
}
|
|
71
73
|
exports.components = components;
|
|
72
74
|
exports.getCompons = getCompons;
|
|
@@ -4,6 +4,6 @@ type Compons = {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const components: Compons;
|
|
6
6
|
export declare function getCompons(...arrs: Compons[]): Compons;
|
|
7
|
-
export declare function useCompons(key: string, ...arrs: Compons[]):
|
|
7
|
+
export declare function useCompons(key: string, ...arrs: Compons[]): Compons;
|
|
8
8
|
export declare function useGetCompons(key: string, value?: Compons): Compons;
|
|
9
9
|
export {};
|
|
@@ -59,12 +59,14 @@ function getCompons(...arrs) {
|
|
|
59
59
|
});
|
|
60
60
|
return coms;
|
|
61
61
|
}
|
|
62
|
+
const comKey = "com-compons";
|
|
62
63
|
function useCompons(key, ...arrs) {
|
|
63
64
|
const tfcom = getCompons(...arrs);
|
|
64
|
-
provide(key ||
|
|
65
|
+
provide(key || comKey, tfcom);
|
|
66
|
+
return tfcom;
|
|
65
67
|
}
|
|
66
68
|
function useGetCompons(key, value = {}) {
|
|
67
|
-
return inject(key ||
|
|
69
|
+
return inject(key || comKey, value);
|
|
68
70
|
}
|
|
69
71
|
export {
|
|
70
72
|
components,
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const urls = require("../../common/urls.cjs");
|
|
4
4
|
const name = "forms";
|
|
5
5
|
const provides = {
|
|
6
|
-
compons: "
|
|
7
|
-
form: "
|
|
6
|
+
compons: "form-compons",
|
|
7
|
+
form: "form-form"
|
|
8
8
|
};
|
|
9
9
|
const dataProps = {
|
|
10
10
|
...urls.props,
|
|
@@ -114,12 +114,12 @@ const dataProps = {
|
|
|
114
114
|
type: Boolean
|
|
115
115
|
},
|
|
116
116
|
/**
|
|
117
|
-
* @props { String } interval='
|
|
117
|
+
* @props { String } interval='8px'
|
|
118
118
|
* 查询模式的上下间距
|
|
119
119
|
*/
|
|
120
120
|
interval: {
|
|
121
121
|
type: String,
|
|
122
|
-
default: "
|
|
122
|
+
default: "8px"
|
|
123
123
|
},
|
|
124
124
|
/**
|
|
125
125
|
* @props { String } intervalHorizon
|
|
@@ -205,7 +205,7 @@ const dataEmits = [
|
|
|
205
205
|
"buts",
|
|
206
206
|
// : (obj: ObjAny, dataForm: ObjAny, index: number, event: Event) => {},
|
|
207
207
|
/**
|
|
208
|
-
* @emits upform (
|
|
208
|
+
* @emits upform (value:any, obj:[ListObj]列对象)
|
|
209
209
|
* 表单数据变动
|
|
210
210
|
*/
|
|
211
211
|
"upform"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { props, comHandle } from "../../common/urls.js";
|
|
2
2
|
const name = "forms";
|
|
3
3
|
const provides = {
|
|
4
|
-
compons: "
|
|
5
|
-
form: "
|
|
4
|
+
compons: "form-compons",
|
|
5
|
+
form: "form-form"
|
|
6
6
|
};
|
|
7
7
|
const dataProps = {
|
|
8
8
|
...props,
|
|
@@ -112,12 +112,12 @@ const dataProps = {
|
|
|
112
112
|
type: Boolean
|
|
113
113
|
},
|
|
114
114
|
/**
|
|
115
|
-
* @props { String } interval='
|
|
115
|
+
* @props { String } interval='8px'
|
|
116
116
|
* 查询模式的上下间距
|
|
117
117
|
*/
|
|
118
118
|
interval: {
|
|
119
119
|
type: String,
|
|
120
|
-
default: "
|
|
120
|
+
default: "8px"
|
|
121
121
|
},
|
|
122
122
|
/**
|
|
123
123
|
* @props { String } intervalHorizon
|
|
@@ -203,7 +203,7 @@ const dataEmits = [
|
|
|
203
203
|
"buts",
|
|
204
204
|
// : (obj: ObjAny, dataForm: ObjAny, index: number, event: Event) => {},
|
|
205
205
|
/**
|
|
206
|
-
* @emits upform (
|
|
206
|
+
* @emits upform (value:any, obj:[ListObj]列对象)
|
|
207
207
|
* 表单数据变动
|
|
208
208
|
*/
|
|
209
209
|
"upform"
|
|
@@ -105,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
105
|
"label-position": vue.unref(props).labelPosition == "auto" ? void 0 : vue.unref(props).labelPosition,
|
|
106
106
|
ref_key: "refForm",
|
|
107
107
|
ref: refForm,
|
|
108
|
-
onSubmit: _cache[
|
|
108
|
+
onSubmit: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
|
109
109
|
}, ["prevent"]))
|
|
110
110
|
}), {
|
|
111
111
|
default: vue.withCtx(() => [
|
|
@@ -126,7 +126,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
126
126
|
optionss: vue.unref(props).options,
|
|
127
127
|
valueobj: vue.unref(dataForm),
|
|
128
128
|
modelValue: vue.unref(dataForm),
|
|
129
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(dataForm) ? dataForm.value = $event : null)
|
|
129
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(dataForm) ? dataForm.value = $event : null),
|
|
130
|
+
onUpform: _cache[1] || (_cache[1] = (...arr) => emit("upform", ...arr))
|
|
130
131
|
}, vue.createSlots({ _: 2 }, [
|
|
131
132
|
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
132
133
|
return {
|
|
@@ -142,7 +143,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
142
143
|
optionss: vue.unref(props).options,
|
|
143
144
|
valueobj: vue.unref(dataForm),
|
|
144
145
|
modelValue: vue.unref(dataForm),
|
|
145
|
-
"onUpdate:modelValue": _cache[
|
|
146
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(dataForm) ? dataForm.value = $event : null),
|
|
147
|
+
onUpform: _cache[3] || (_cache[3] = (...arr) => emit("upform", ...arr))
|
|
146
148
|
}, vue.createSlots({ _: 2 }, [
|
|
147
149
|
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
148
150
|
return {
|
|
@@ -103,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
"label-position": unref(props).labelPosition == "auto" ? void 0 : unref(props).labelPosition,
|
|
104
104
|
ref_key: "refForm",
|
|
105
105
|
ref: refForm,
|
|
106
|
-
onSubmit: _cache[
|
|
106
|
+
onSubmit: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
107
107
|
}, ["prevent"]))
|
|
108
108
|
}), {
|
|
109
109
|
default: withCtx(() => [
|
|
@@ -124,7 +124,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
124
|
optionss: unref(props).options,
|
|
125
125
|
valueobj: unref(dataForm),
|
|
126
126
|
modelValue: unref(dataForm),
|
|
127
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dataForm) ? dataForm.value = $event : null)
|
|
127
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dataForm) ? dataForm.value = $event : null),
|
|
128
|
+
onUpform: _cache[1] || (_cache[1] = (...arr) => emit("upform", ...arr))
|
|
128
129
|
}, createSlots({ _: 2 }, [
|
|
129
130
|
renderList(Object.keys(unref(slots)), (k) => {
|
|
130
131
|
return {
|
|
@@ -140,7 +141,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
141
|
optionss: unref(props).options,
|
|
141
142
|
valueobj: unref(dataForm),
|
|
142
143
|
modelValue: unref(dataForm),
|
|
143
|
-
"onUpdate:modelValue": _cache[
|
|
144
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(dataForm) ? dataForm.value = $event : null),
|
|
145
|
+
onUpform: _cache[3] || (_cache[3] = (...arr) => emit("upform", ...arr))
|
|
144
146
|
}, createSlots({ _: 2 }, [
|
|
145
147
|
renderList(Object.keys(unref(slots)), (k) => {
|
|
146
148
|
return {
|
|
@@ -157,13 +157,6 @@ function setUp(props, emit, cs, refForm, getLocale) {
|
|
|
157
157
|
return rules;
|
|
158
158
|
}
|
|
159
159
|
const dataRules = vue.ref(getRules());
|
|
160
|
-
vue.watch(
|
|
161
|
-
() => dataForm.value,
|
|
162
|
-
() => {
|
|
163
|
-
emit("upform", dataForm.value);
|
|
164
|
-
},
|
|
165
|
-
{ deep: true }
|
|
166
|
-
);
|
|
167
160
|
vue.watch(
|
|
168
161
|
() => props.list.length,
|
|
169
162
|
() => {
|
|
@@ -155,13 +155,6 @@ function setUp(props, emit, cs, refForm, getLocale) {
|
|
|
155
155
|
return rules;
|
|
156
156
|
}
|
|
157
157
|
const dataRules = ref(getRules());
|
|
158
|
-
watch(
|
|
159
|
-
() => dataForm.value,
|
|
160
|
-
() => {
|
|
161
|
-
emit("upform", dataForm.value);
|
|
162
|
-
},
|
|
163
|
-
{ deep: true }
|
|
164
|
-
);
|
|
165
158
|
watch(
|
|
166
159
|
() => props.list.length,
|
|
167
160
|
() => {
|
|
@@ -7,6 +7,7 @@ const index = require("../../../hooks/cssname/index.cjs");
|
|
|
7
7
|
const use = require("../../common/use.cjs");
|
|
8
8
|
const isEqual = require("@fangzhongya/utils/basic/object/isEqual");
|
|
9
9
|
const index$1 = require("../../../hooks/props-default/index.cjs");
|
|
10
|
+
const compons = require("../../common/compons.cjs");
|
|
10
11
|
const data$1 = require("../../forms/src/data.cjs");
|
|
11
12
|
const objValue = require("@fangzhongya/utils/basic/object/objValue");
|
|
12
13
|
const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
|
|
@@ -21,7 +22,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
21
22
|
const prs = index$1.usePropsDefault(data.name, p, data.dataProps);
|
|
22
23
|
index$1.viewProps(prs, data.name);
|
|
23
24
|
const props = prs.listobj;
|
|
24
|
-
const compons =
|
|
25
|
+
const compons$1 = compons.useGetCompons(data$1.provides.compons);
|
|
25
26
|
const formvalue = vue.computed(() => {
|
|
26
27
|
const o = {};
|
|
27
28
|
if (typeof props.formvalue === "object") {
|
|
@@ -128,6 +129,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
128
129
|
if (!props.orig) {
|
|
129
130
|
emit("update:modelValue", v);
|
|
130
131
|
}
|
|
132
|
+
if (props.compon != "items") {
|
|
133
|
+
emit("upform", value2, props, v);
|
|
134
|
+
}
|
|
131
135
|
}
|
|
132
136
|
});
|
|
133
137
|
const options = vue.computed(() => {
|
|
@@ -163,12 +167,15 @@ const _sfc_main = vue.defineComponent({
|
|
|
163
167
|
optionss: prs.optionss,
|
|
164
168
|
valueobj: prs.valueobj,
|
|
165
169
|
[componValueName]: value.value,
|
|
166
|
-
["onUpdate:" + componValueName]: (v) => value.value = v
|
|
170
|
+
["onUpdate:" + componValueName]: (v) => value.value = v,
|
|
171
|
+
["onUpform"]: (...arr) => {
|
|
172
|
+
emit("upform", ...arr);
|
|
173
|
+
}
|
|
167
174
|
};
|
|
168
175
|
if (typeof compon == "string") {
|
|
169
176
|
const tcom = lineToLargeHump.lineToLargeHump(compon);
|
|
170
|
-
if (Object.keys(compons).includes(tcom)) {
|
|
171
|
-
return vue.h(compons[tcom], componObj, slots);
|
|
177
|
+
if (Object.keys(compons$1).includes(tcom)) {
|
|
178
|
+
return vue.h(compons$1[tcom], componObj, slots);
|
|
172
179
|
} else {
|
|
173
180
|
return vue.h(vue.resolveComponent(compon), componObj, slots);
|
|
174
181
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, h, resolveComponent } from "vue";
|
|
2
2
|
import { name, dataProps, dataEmits, dataExpose } from "./data.js";
|
|
3
3
|
import "../../../utils/index.js";
|
|
4
4
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
5
5
|
import { getOnObjs } from "../../common/use.js";
|
|
6
6
|
import { isEqual } from "@fangzhongya/utils/basic/object/isEqual";
|
|
7
7
|
import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
|
|
8
|
+
import { useGetCompons } from "../../common/compons.js";
|
|
8
9
|
import { provides } from "../../forms/src/data.js";
|
|
9
10
|
import { setObjValue, getObjValue } from "@fangzhongya/utils/basic/object/objValue";
|
|
10
11
|
import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
|
|
@@ -19,7 +20,7 @@ const _sfc_main = defineComponent({
|
|
|
19
20
|
const prs = usePropsDefault(name, p, dataProps);
|
|
20
21
|
viewProps(prs, name);
|
|
21
22
|
const props = prs.listobj;
|
|
22
|
-
const compons =
|
|
23
|
+
const compons = useGetCompons(provides.compons);
|
|
23
24
|
const formvalue = computed(() => {
|
|
24
25
|
const o = {};
|
|
25
26
|
if (typeof props.formvalue === "object") {
|
|
@@ -126,6 +127,9 @@ const _sfc_main = defineComponent({
|
|
|
126
127
|
if (!props.orig) {
|
|
127
128
|
emit("update:modelValue", v);
|
|
128
129
|
}
|
|
130
|
+
if (props.compon != "items") {
|
|
131
|
+
emit("upform", value2, props, v);
|
|
132
|
+
}
|
|
129
133
|
}
|
|
130
134
|
});
|
|
131
135
|
const options = computed(() => {
|
|
@@ -161,7 +165,10 @@ const _sfc_main = defineComponent({
|
|
|
161
165
|
optionss: prs.optionss,
|
|
162
166
|
valueobj: prs.valueobj,
|
|
163
167
|
[componValueName]: value.value,
|
|
164
|
-
["onUpdate:" + componValueName]: (v) => value.value = v
|
|
168
|
+
["onUpdate:" + componValueName]: (v) => value.value = v,
|
|
169
|
+
["onUpform"]: (...arr) => {
|
|
170
|
+
emit("upform", ...arr);
|
|
171
|
+
}
|
|
165
172
|
};
|
|
166
173
|
if (typeof compon == "string") {
|
|
167
174
|
const tcom = lineToLargeHump(compon);
|
|
@@ -69,8 +69,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
69
|
listobj: vue.unref(props),
|
|
70
70
|
optionss: vue.unref(prs).optionss,
|
|
71
71
|
valueobj: vue.unref(prs).valueobj,
|
|
72
|
+
onUpform: _cache[0] || (_cache[0] = (...arr) => emit("upform", ...arr)),
|
|
72
73
|
modelValue: value.value,
|
|
73
|
-
"onUpdate:modelValue": _cache[
|
|
74
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event)
|
|
74
75
|
}, vue.createSlots({ _: 2 }, [
|
|
75
76
|
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
76
77
|
return {
|
|
@@ -109,7 +110,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
110
|
optionss: vue.unref(prs).optionss,
|
|
110
111
|
valueobj: vue.unref(prs).valueobj,
|
|
111
112
|
modelValue: value.value,
|
|
112
|
-
"onUpdate:modelValue": _cache[
|
|
113
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
114
|
+
onUpform: _cache[3] || (_cache[3] = (...arr) => emit("upform", ...arr))
|
|
113
115
|
}, vue.createSlots({ _: 2 }, [
|
|
114
116
|
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
115
117
|
return {
|
|
@@ -67,8 +67,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
listobj: unref(props),
|
|
68
68
|
optionss: unref(prs).optionss,
|
|
69
69
|
valueobj: unref(prs).valueobj,
|
|
70
|
+
onUpform: _cache[0] || (_cache[0] = (...arr) => emit("upform", ...arr)),
|
|
70
71
|
modelValue: value.value,
|
|
71
|
-
"onUpdate:modelValue": _cache[
|
|
72
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event)
|
|
72
73
|
}, createSlots({ _: 2 }, [
|
|
73
74
|
renderList(Object.keys(unref(slots)), (k) => {
|
|
74
75
|
return {
|
|
@@ -107,7 +108,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
108
|
optionss: unref(prs).optionss,
|
|
108
109
|
valueobj: unref(prs).valueobj,
|
|
109
110
|
modelValue: value.value,
|
|
110
|
-
"onUpdate:modelValue": _cache[
|
|
111
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
112
|
+
onUpform: _cache[3] || (_cache[3] = (...arr) => emit("upform", ...arr))
|
|
111
113
|
}, createSlots({ _: 2 }, [
|
|
112
114
|
renderList(Object.keys(unref(slots)), (k) => {
|
|
113
115
|
return {
|
|
@@ -4,8 +4,9 @@ const vue = require("vue");
|
|
|
4
4
|
const use = require("../../common/use.cjs");
|
|
5
5
|
const isObject = require("@fangzhongya/utils/basic/object/isObject");
|
|
6
6
|
const data = require("../../forms/src/data.cjs");
|
|
7
|
+
const compons = require("../../common/compons.cjs");
|
|
7
8
|
function render(props, emit, slots, form) {
|
|
8
|
-
const compons =
|
|
9
|
+
const compons$1 = compons.useGetCompons(data.provides.compons);
|
|
9
10
|
let label = props.label ?? "";
|
|
10
11
|
const index = 0;
|
|
11
12
|
if (label) {
|
|
@@ -23,7 +24,7 @@ function render(props, emit, slots, form) {
|
|
|
23
24
|
label,
|
|
24
25
|
data2,
|
|
25
26
|
optionss,
|
|
26
|
-
compons,
|
|
27
|
+
compons$1,
|
|
27
28
|
emit,
|
|
28
29
|
index
|
|
29
30
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, inject } from "vue";
|
|
2
2
|
import { useSetSlot, useSetCompon, useGetDomValue } from "../../common/use.js";
|
|
3
3
|
import { isObject } from "@fangzhongya/utils/basic/object/isObject";
|
|
4
4
|
import { provides } from "../../forms/src/data.js";
|
|
5
|
+
import { useGetCompons } from "../../common/compons.js";
|
|
5
6
|
function render(props, emit, slots, form) {
|
|
6
|
-
const compons =
|
|
7
|
+
const compons = useGetCompons(provides.compons);
|
|
7
8
|
let label = props.label ?? "";
|
|
8
9
|
const index = 0;
|
|
9
10
|
if (label) {
|
|
@@ -87,7 +87,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
87
|
optionss: vue.unref(prs).optionss,
|
|
88
88
|
valueobj: vue.unref(prs).valueobj,
|
|
89
89
|
modelValue: value.value,
|
|
90
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
90
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
91
|
+
onUpform: _cache[1] || (_cache[1] = (...arr) => emit("upform", ...arr))
|
|
91
92
|
}), vue.createSlots({ _: 2 }, [
|
|
92
93
|
vue.renderList(Object.keys(vue.unref(slots)), (k, i) => {
|
|
93
94
|
return {
|
|
@@ -105,7 +106,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
106
|
optionss: vue.unref(prs).optionss,
|
|
106
107
|
valueobj: vue.unref(prs).valueobj,
|
|
107
108
|
modelValue: value.value,
|
|
108
|
-
"onUpdate:modelValue": _cache[
|
|
109
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
110
|
+
onUpform: _cache[3] || (_cache[3] = (...arr) => emit("upform", ...arr))
|
|
109
111
|
}), vue.createSlots({ _: 2 }, [
|
|
110
112
|
vue.renderList(Object.keys(vue.unref(slots)), (k, i) => {
|
|
111
113
|
return {
|