wyfe-ivue 0.8.7 → 0.9.0
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/README.md +21 -5
- package/dist/{InlineForm-DC1lqOwN.js → InlineForm-ByXRqJ8r.js} +29 -29
- package/dist/{RecTableColumn-CQz9NDpd.js → RecTableColumn-wFwCpkLM.js} +15 -15
- package/dist/{RowForm-DPU_OZq-.js → RowForm-D1cefdhy.js} +66 -66
- package/dist/{Selection-BrvRLYD8.js → Selection-CNBnt_16.js} +2 -2
- package/dist/{Span-BbXSa8ak.js → Span-B_uVhTcx.js} +8 -8
- package/dist/{el-radio-DMvIhc3J.js → el-radio--lsMjG87.js} +1 -1
- package/dist/{index-MzlgxHOB.js → index-Dz6FLYua.js} +2436 -2337
- package/dist/index.es.js +7 -6
- package/dist/index.umd.js +5 -5
- package/dist/types/index.d.ts +163 -7
- package/dist/{useFormHook-DYgWi8dF.js → useFormHook-7dt0Wf6Q.js} +5 -4
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -12,16 +12,28 @@
|
|
|
12
12
|
$ pnpm i wyfe-ivue
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
## 使用
|
|
15
|
+
## 使用(仅需3步配置即刻上手)
|
|
16
16
|
```js
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 1、创建plugins/WyfeIVue.ts:
|
|
19
|
+
*/
|
|
18
20
|
|
|
19
|
-
// UseSvgIcon组件需要手动引入svg图标注册脚本 并且需在vite.config.ts中配置插件
|
|
21
|
+
// 如需使用UseSvgIcon组件需要手动引入svg图标注册脚本 并且需在vite.config.ts中配置插件
|
|
20
22
|
import 'virtual:svg-icons-register'
|
|
23
|
+
|
|
21
24
|
import { type App, type Component } from 'vue'
|
|
22
25
|
import 'wyfe-ivue/dist/wyfe-ivue.css'
|
|
23
26
|
import * as WyfeIVue from 'wyfe-ivue'
|
|
24
27
|
|
|
28
|
+
// 如需使用UseIconfont组件需要手动引入iconfont图标链接地址
|
|
29
|
+
import { dynamicLoadFile } from '@/utils'
|
|
30
|
+
import { getConfig } from '@/config'
|
|
31
|
+
|
|
32
|
+
// 引入iconfont font图标
|
|
33
|
+
dynamicLoadFile(getConfig('ICONFONT_URL.FONT'))
|
|
34
|
+
// 引入iconfont symbol图标
|
|
35
|
+
dynamicLoadFile(getConfig('ICONFONT_URL.SYMBOL'), 'js')
|
|
36
|
+
|
|
25
37
|
type ComponentExports = {
|
|
26
38
|
[K in keyof typeof WyfeIVue]: (typeof WyfeIVue)[K] extends Component
|
|
27
39
|
? (typeof WyfeIVue)[K]
|
|
@@ -37,12 +49,16 @@ export default (app: App) => {
|
|
|
37
49
|
}
|
|
38
50
|
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
/**
|
|
53
|
+
* 2、在main.ts中引入使用:
|
|
54
|
+
*/
|
|
41
55
|
import WyfeIVuePlugins from './plugins/WyfeIVue'
|
|
42
56
|
|
|
43
57
|
createApp(App).use(WyfeIVuePlugins).mount('#app')
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
/**
|
|
60
|
+
* 3、在页面中使用(以使用UseElButton为例):
|
|
61
|
+
*/
|
|
46
62
|
<UseElButton btnText="保存" @onClick="handleClick"/>
|
|
47
63
|
```
|
|
48
64
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Q as
|
|
2
|
-
import { h as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
const
|
|
1
|
+
import { Q as S, D as U, T as Q, R as K } from "./index-Dz6FLYua.js";
|
|
2
|
+
import { h as N, E as R, i as L, j as W, k as q } from "./useFormHook-7dt0Wf6Q.js";
|
|
3
|
+
import { defineComponent as D, computed as T, onMounted as j, createElementBlock as C, openBlock as t, normalizeStyle as a, createVNode as i, createElementVNode as x, withModifiers as z, withCtx as d, Fragment as A, renderList as H, createBlock as p, createCommentVNode as u, withKeys as f, unref as m, createTextVNode as k } from "vue";
|
|
4
|
+
const O = { class: "btnWrapper" }, G = /* @__PURE__ */ D({
|
|
5
5
|
__name: "InlineForm",
|
|
6
|
-
props:
|
|
6
|
+
props: S,
|
|
7
7
|
emits: ["onQuery"],
|
|
8
8
|
setup(_, { expose: b, emit: V }) {
|
|
9
|
-
const s = _,
|
|
9
|
+
const s = _, c = V, w = T(
|
|
10
10
|
() => s.showBorberBottom ? "1px solid var(--el-border-color)" : ""
|
|
11
11
|
);
|
|
12
|
-
|
|
12
|
+
j(() => {
|
|
13
13
|
document.querySelectorAll(".el-select__input").forEach((o) => {
|
|
14
14
|
o.addEventListener(
|
|
15
15
|
"keydown",
|
|
@@ -21,32 +21,32 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
const r = () => {
|
|
24
|
-
|
|
24
|
+
c("onQuery", s.formModel);
|
|
25
25
|
}, P = () => {
|
|
26
|
-
|
|
27
|
-
}, { formRef:
|
|
28
|
-
return b({ formRef:
|
|
29
|
-
const
|
|
30
|
-
return t(),
|
|
26
|
+
c("onQuery", {});
|
|
27
|
+
}, { formRef: h, selectOptions: E, dateFormatComputed: y } = N(s);
|
|
28
|
+
return b({ formRef: h }), (o, l) => {
|
|
29
|
+
const M = U, v = W, B = q, F = L, I = R, g = Q;
|
|
30
|
+
return t(), C("div", {
|
|
31
31
|
class: "inlineForm",
|
|
32
32
|
style: a({ borderBottom: w.value })
|
|
33
33
|
}, [
|
|
34
|
-
i(
|
|
34
|
+
i(I, {
|
|
35
35
|
ref_key: "formRef",
|
|
36
|
-
ref:
|
|
36
|
+
ref: h,
|
|
37
37
|
inline: "",
|
|
38
38
|
model: o.formModel,
|
|
39
39
|
"label-suffix": o.labelSuffix,
|
|
40
|
-
onSubmit: l[0] || (l[0] =
|
|
40
|
+
onSubmit: l[0] || (l[0] = z(() => {
|
|
41
41
|
}, ["prevent"]))
|
|
42
42
|
}, {
|
|
43
43
|
default: d(() => [
|
|
44
|
-
(t(!0),
|
|
44
|
+
(t(!0), C(A, null, H(o.formColumns, (e) => (t(), p(F, {
|
|
45
45
|
key: e.label,
|
|
46
46
|
label: e.label
|
|
47
47
|
}, {
|
|
48
48
|
default: d(() => [
|
|
49
|
-
e.inputConfig ? (t(), p(
|
|
49
|
+
e.inputConfig ? (t(), p(M, {
|
|
50
50
|
key: 0,
|
|
51
51
|
modelValue: o.formModel[e.prop],
|
|
52
52
|
"onUpdate:modelValue": (n) => o.formModel[e.prop] = n,
|
|
@@ -58,18 +58,18 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
58
58
|
onClear: r,
|
|
59
59
|
onKeyup: f(r, ["enter"])
|
|
60
60
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "style"])) : u("", !0),
|
|
61
|
-
e.selectConfig ? (t(), p(
|
|
61
|
+
e.selectConfig ? (t(), p(v, {
|
|
62
62
|
key: 1,
|
|
63
63
|
modelValue: o.formModel[e.prop],
|
|
64
64
|
"onUpdate:modelValue": (n) => o.formModel[e.prop] = n,
|
|
65
|
-
options: e
|
|
66
|
-
props: e.selectConfig?.props ||
|
|
65
|
+
options: m(E)(e),
|
|
66
|
+
props: e.selectConfig?.props || o.dictProps,
|
|
67
67
|
style: a({ width: e.selectConfig.width || o.formItemWidth }),
|
|
68
68
|
clearable: "",
|
|
69
69
|
onClear: r,
|
|
70
70
|
onKeyup: f(r, ["enter"])
|
|
71
71
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "style"])) : u("", !0),
|
|
72
|
-
e.datePickerConfig ? (t(), p(
|
|
72
|
+
e.datePickerConfig ? (t(), p(B, {
|
|
73
73
|
key: 2,
|
|
74
74
|
modelValue: o.formModel[e.prop],
|
|
75
75
|
"onUpdate:modelValue": (n) => o.formModel[e.prop] = n,
|
|
@@ -77,8 +77,8 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
77
77
|
"range-separator": e.datePickerConfig.rangeSeparator || "至",
|
|
78
78
|
"start-placeholder": e.datePickerConfig.startPlaceholder || "开始日期",
|
|
79
79
|
"end-placeholder": e.datePickerConfig.endPlaceholder || "结束日期",
|
|
80
|
-
format:
|
|
81
|
-
"value-format":
|
|
80
|
+
format: m(y)(e.datePickerConfig),
|
|
81
|
+
"value-format": m(y)(e.datePickerConfig),
|
|
82
82
|
placeholder: e.datePickerConfig.placeholder || "请选择",
|
|
83
83
|
style: a({ width: e.datePickerConfig.width ?? "100%" }),
|
|
84
84
|
onClear: r,
|
|
@@ -90,8 +90,8 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
90
90
|
]),
|
|
91
91
|
_: 1
|
|
92
92
|
}, 8, ["model", "label-suffix"]),
|
|
93
|
-
|
|
94
|
-
i(
|
|
93
|
+
x("div", O, [
|
|
94
|
+
i(g, {
|
|
95
95
|
type: "primary",
|
|
96
96
|
loading: o.queryLoading,
|
|
97
97
|
onClick: r
|
|
@@ -101,7 +101,7 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
101
101
|
])]),
|
|
102
102
|
_: 1
|
|
103
103
|
}, 8, ["loading"]),
|
|
104
|
-
i(
|
|
104
|
+
i(g, { onClick: P }, {
|
|
105
105
|
default: d(() => [...l[2] || (l[2] = [
|
|
106
106
|
k("重置", -1)
|
|
107
107
|
])]),
|
|
@@ -111,7 +111,7 @@ const H = { class: "btnWrapper" }, G = /* @__PURE__ */ q({
|
|
|
111
111
|
], 4);
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
}),
|
|
114
|
+
}), Z = /* @__PURE__ */ K(G, [["__scopeId", "data-v-b593a1c9"]]);
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
Z as default
|
|
117
117
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bb as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const R = /* @__PURE__ */
|
|
1
|
+
import { bb as s } from "./index-Dz6FLYua.js";
|
|
2
|
+
import { defineComponent as f, defineAsyncComponent as g, resolveComponent as h, createBlock as t, openBlock as n, withCtx as r, createElementBlock as u, Fragment as c, renderList as C, renderSlot as b, mergeProps as d, unref as y, normalizeProps as j, guardReactiveProps as k } from "vue";
|
|
3
|
+
const R = /* @__PURE__ */ f({
|
|
4
4
|
__name: "RecTableColumn",
|
|
5
5
|
props: {
|
|
6
6
|
columnObj: {
|
|
@@ -11,16 +11,16 @@ const R = /* @__PURE__ */ m({
|
|
|
11
11
|
type: String,
|
|
12
12
|
default: "center"
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
tableProps: {
|
|
15
15
|
type: Object,
|
|
16
16
|
default: () => ({})
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(l) {
|
|
20
|
-
const
|
|
20
|
+
const i = g(() => import("./Span-B_uVhTcx.js"));
|
|
21
21
|
return (a, O) => {
|
|
22
|
-
const
|
|
23
|
-
return n(), t(
|
|
22
|
+
const m = h("RecTableColumn", !0), p = s;
|
|
23
|
+
return n(), t(p, {
|
|
24
24
|
label: l.columnObj.label,
|
|
25
25
|
align: l.columnObj.align || l.tableColumnAlign
|
|
26
26
|
}, {
|
|
@@ -28,13 +28,13 @@ const R = /* @__PURE__ */ m({
|
|
|
28
28
|
b(a.$slots, "header", j(k({ label: l.columnObj.label, prop: l.columnObj.prop })))
|
|
29
29
|
]),
|
|
30
30
|
default: r(() => [
|
|
31
|
-
(n(!0), u(c, null,
|
|
31
|
+
(n(!0), u(c, null, C(l.columnObj.children, (e) => (n(), u(c, {
|
|
32
32
|
key: e.prop
|
|
33
33
|
}, [
|
|
34
|
-
e.children && e.children.length ? (n(), t(
|
|
34
|
+
e.children && e.children.length ? (n(), t(m, {
|
|
35
35
|
key: 0,
|
|
36
36
|
columnObj: e
|
|
37
|
-
}, null, 8, ["columnObj"])) : (n(), t(
|
|
37
|
+
}, null, 8, ["columnObj"])) : (n(), t(p, {
|
|
38
38
|
key: 1,
|
|
39
39
|
label: e.label,
|
|
40
40
|
prop: e.prop,
|
|
@@ -44,20 +44,20 @@ const R = /* @__PURE__ */ m({
|
|
|
44
44
|
}, {
|
|
45
45
|
default: r(({ row: o }) => [
|
|
46
46
|
e.prop && Object.keys(o).length ? (n(), u(c, { key: 0 }, [
|
|
47
|
-
e?.extConfig?.slot ? b(a.$slots, e.prop,
|
|
47
|
+
e?.extConfig?.slot ? b(a.$slots, e.prop, d({
|
|
48
48
|
key: 0,
|
|
49
49
|
ref_for: !0
|
|
50
50
|
}, {
|
|
51
51
|
row: o,
|
|
52
52
|
data: o[e.prop],
|
|
53
53
|
dict: e.extConfig?.dict
|
|
54
|
-
})) : (n(), t(y(
|
|
54
|
+
})) : (n(), t(y(i), {
|
|
55
55
|
key: 1,
|
|
56
56
|
item: e,
|
|
57
57
|
data: o[e.prop],
|
|
58
|
-
|
|
59
|
-
}, null, 8, ["item", "data", "
|
|
60
|
-
], 64)) : b(a.$slots, "default",
|
|
58
|
+
tableProps: l.tableProps
|
|
59
|
+
}, null, 8, ["item", "data", "tableProps"]))
|
|
60
|
+
], 64)) : b(a.$slots, "default", d({
|
|
61
61
|
key: 1,
|
|
62
62
|
ref_for: !0
|
|
63
63
|
}, { row: o }))
|