vft 0.0.129 → 0.0.131
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/index.css +1 -1
- package/es/components/config-provider/config-provider.vue2.js +24 -23
- package/es/components/icon/icon.vue2.js +22 -23
- package/es/components/modal/modal.vue2.js +27 -25
- package/es/components/table/use/use-table.js +22 -21
- package/es/package.json.js +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/table/use/use-table.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/multiple-tabs.scss +21 -21
- package/theme-style/src/select.scss +2 -2
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as r, watch as
|
|
2
|
-
import { inBrowser as k, kebabCase as
|
|
1
|
+
import { defineComponent as r, watch as m, computed as f, onActivated as d, onDeactivated as l, onBeforeUnmount as u, getCurrentInstance as h, openBlock as g, createElementBlock as p, normalizeClass as v, unref as C, normalizeStyle as V, renderSlot as b } from "vue";
|
|
2
|
+
import { inBrowser as k, kebabCase as y } from "@vft/utils";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
5
|
import "lodash";
|
|
6
|
-
import { useNamespace as
|
|
6
|
+
import { useNamespace as B } from "../../hooks/use-namespace/index.js";
|
|
7
7
|
import "@popperjs/core";
|
|
8
8
|
import "../../hooks/use-z-index/index.js";
|
|
9
|
-
import { messageConfig as
|
|
10
|
-
import { provideGlobalConfig as
|
|
11
|
-
const
|
|
9
|
+
import { messageConfig as D } from "./constants.js";
|
|
10
|
+
import { provideGlobalConfig as E } from "./hooks/use-global-config.js";
|
|
11
|
+
const L = (
|
|
12
12
|
/* hoist-static*/
|
|
13
|
-
|
|
14
|
-
),
|
|
13
|
+
B("config-provider")
|
|
14
|
+
), S = r({
|
|
15
15
|
name: "vft-config-provider"
|
|
16
16
|
}), N = /* @__PURE__ */ r({
|
|
17
|
-
...
|
|
17
|
+
...S,
|
|
18
18
|
props: {
|
|
19
19
|
theme: { default: "light" },
|
|
20
20
|
themeVars: {},
|
|
21
21
|
themeVarsDark: {},
|
|
22
22
|
themeVarsLight: {},
|
|
23
|
-
|
|
23
|
+
iconfontClass: {},
|
|
24
|
+
iconifyPrefixClass: { default: "ico-" },
|
|
24
25
|
namespace: { default: "vft" },
|
|
25
26
|
zIndex: {},
|
|
26
27
|
message: {},
|
|
@@ -28,14 +29,14 @@ const S = (
|
|
|
28
29
|
button: {}
|
|
29
30
|
},
|
|
30
31
|
setup(t) {
|
|
31
|
-
|
|
32
|
+
m(
|
|
32
33
|
() => t.message,
|
|
33
34
|
(e) => {
|
|
34
|
-
Object.assign(
|
|
35
|
+
Object.assign(D, e ?? {});
|
|
35
36
|
},
|
|
36
37
|
{ immediate: !0, deep: !0 }
|
|
37
38
|
);
|
|
38
|
-
const s =
|
|
39
|
+
const s = f(() => {
|
|
39
40
|
const e = t.theme === "dark";
|
|
40
41
|
return i({
|
|
41
42
|
...t.themeVars,
|
|
@@ -45,26 +46,26 @@ const S = (
|
|
|
45
46
|
if (k) {
|
|
46
47
|
const e = () => {
|
|
47
48
|
document.documentElement.classList.add(t.theme);
|
|
48
|
-
},
|
|
49
|
+
}, a = (n = t.theme) => {
|
|
49
50
|
document.documentElement.classList.remove(n);
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
+
m(
|
|
52
53
|
() => t.theme,
|
|
53
|
-
(n,
|
|
54
|
-
|
|
54
|
+
(n, o) => {
|
|
55
|
+
o && a(o), e();
|
|
55
56
|
},
|
|
56
57
|
{ immediate: !0 }
|
|
57
|
-
),
|
|
58
|
+
), d(e), l(a), u(a);
|
|
58
59
|
}
|
|
59
60
|
function i(e) {
|
|
60
|
-
const
|
|
61
|
+
const a = {};
|
|
61
62
|
return Object.keys(e).forEach((n) => {
|
|
62
|
-
|
|
63
|
-
}),
|
|
63
|
+
a[`--${t.namespace}-${y(n)}`] = e[n];
|
|
64
|
+
}), a;
|
|
64
65
|
}
|
|
65
66
|
const c = h();
|
|
66
|
-
return
|
|
67
|
-
class: v(C(
|
|
67
|
+
return E(c.props), (e, a) => (g(), p("div", {
|
|
68
|
+
class: v(C(L).b()),
|
|
68
69
|
style: V(s.value)
|
|
69
70
|
}, [
|
|
70
71
|
b(e.$slots, "default")
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { addUnit as
|
|
1
|
+
import { defineComponent as u, computed as r, openBlock as c, createElementBlock as a, normalizeClass as l, unref as i, normalizeStyle as m } from "vue";
|
|
2
|
+
import { addUnit as y } from "@vft/utils";
|
|
3
3
|
import "../config-provider/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { generateCssVars as
|
|
5
|
+
import { generateCssVars as C } from "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as g } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "@popperjs/core";
|
|
9
9
|
import "../../hooks/use-z-index/index.js";
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
10
|
+
import { useGlobalConfig as h } from "../config-provider/hooks/use-global-config.js";
|
|
11
|
+
const z = ["src"], f = (
|
|
12
12
|
/* hoist-static*/
|
|
13
|
-
|
|
14
|
-
),
|
|
13
|
+
g("icon")
|
|
14
|
+
), I = u({
|
|
15
15
|
name: "vft-icon"
|
|
16
|
-
}),
|
|
17
|
-
...
|
|
16
|
+
}), W = /* @__PURE__ */ u({
|
|
17
|
+
...I,
|
|
18
18
|
props: {
|
|
19
19
|
icon: {},
|
|
20
20
|
size: {},
|
|
@@ -25,28 +25,27 @@ const C = ["src"], c = (
|
|
|
25
25
|
hoverColor: {}
|
|
26
26
|
},
|
|
27
27
|
setup(o) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var s;
|
|
29
|
+
const t = h(), n = r(() => C({
|
|
30
|
+
size: y(o.size),
|
|
30
31
|
color: o.color,
|
|
31
32
|
hoverColor: o.hoverColor,
|
|
32
33
|
cursor: o.pointer ? "pointer" : void 0,
|
|
33
|
-
animation: o.rotate ? `${
|
|
34
|
-
}, "icon")),
|
|
35
|
-
return (e,
|
|
34
|
+
animation: o.rotate ? `${t.value.namespace}-rotate ${o.rotateSpeed}s linear 0s infinite` : void 0
|
|
35
|
+
}, "icon")), d = (e) => e == null ? void 0 : e.includes("/"), p = r(() => d(o.icon)), v = o.icon.startsWith((s = t.value) == null ? void 0 : s.iconifyPrefixClass) ? "" : t.value.iconfontClass;
|
|
36
|
+
return (e, B) => p.value ? (c(), a("img", {
|
|
36
37
|
key: 0,
|
|
37
|
-
class: l(
|
|
38
|
+
class: l(i(f).e("image")),
|
|
38
39
|
src: e.icon,
|
|
39
40
|
alt: "",
|
|
40
|
-
style:
|
|
41
|
-
}, null, 14,
|
|
41
|
+
style: m(n.value)
|
|
42
|
+
}, null, 14, z)) : (c(), a("i", {
|
|
42
43
|
key: 1,
|
|
43
|
-
class: l([
|
|
44
|
-
style:
|
|
45
|
-
...t.value
|
|
46
|
-
})
|
|
44
|
+
class: l([i(f).b(), e.icon, i(v)]),
|
|
45
|
+
style: m(n.value)
|
|
47
46
|
}, null, 6));
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
export {
|
|
51
|
-
|
|
50
|
+
W as default
|
|
52
51
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, useAttrs as v, ref as i, getCurrentInstance as M, computed as u, unref as t, watchEffect as S, watch as F, nextTick as r, openBlock as m, createBlock as B, mergeProps as P, createSlots as R, withCtx as h, renderSlot as _, createCommentVNode as A } from "vue";
|
|
2
2
|
import { isFunction as T, deepMerge as D } from "@vft/utils";
|
|
3
3
|
import { VftDialog as G } from "../dialog/index.js";
|
|
4
4
|
import I from "./modal-footer-action.vue2.js";
|
|
5
|
-
const N = /* @__PURE__ */
|
|
5
|
+
const N = /* @__PURE__ */ k({
|
|
6
6
|
__name: "modal",
|
|
7
7
|
props: {
|
|
8
8
|
closeFunc: {},
|
|
@@ -44,23 +44,23 @@ const N = /* @__PURE__ */ V({
|
|
|
44
44
|
"update:modelValue": [],
|
|
45
45
|
submit: []
|
|
46
46
|
},
|
|
47
|
-
setup(
|
|
48
|
-
const o =
|
|
47
|
+
setup(y, { emit: n }) {
|
|
48
|
+
const o = y, C = v(), c = i(null), l = i(!1), a = i(null), f = {
|
|
49
49
|
setModalProps: g,
|
|
50
50
|
emitVisible: void 0,
|
|
51
51
|
redoModalHeight: () => {
|
|
52
|
-
|
|
52
|
+
r(() => {
|
|
53
53
|
t(a) && t(a).setModalHeight();
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
const
|
|
56
|
+
}, s = M();
|
|
57
|
+
s && n("register", f, s.uid);
|
|
58
|
+
const b = u(() => ({
|
|
59
59
|
...o,
|
|
60
|
-
...t(
|
|
61
|
-
})),
|
|
62
|
-
...
|
|
63
|
-
...t(
|
|
60
|
+
...t(c)
|
|
61
|
+
})), w = u(() => ({
|
|
62
|
+
...C,
|
|
63
|
+
...t(b),
|
|
64
64
|
modelValue: t(l)
|
|
65
65
|
}));
|
|
66
66
|
S(() => {
|
|
@@ -68,7 +68,9 @@ const N = /* @__PURE__ */ V({
|
|
|
68
68
|
}), F(
|
|
69
69
|
() => t(l),
|
|
70
70
|
(e) => {
|
|
71
|
-
n("visible-change", e), n("update:modelValue", e),
|
|
71
|
+
n("visible-change", e), n("update:modelValue", e), s && r(() => {
|
|
72
|
+
f.emitVisible(e, s.uid);
|
|
73
|
+
}), r(() => {
|
|
72
74
|
o.scrollTop && e && t(a) && t(a).scrollTop();
|
|
73
75
|
});
|
|
74
76
|
},
|
|
@@ -76,39 +78,39 @@ const N = /* @__PURE__ */ V({
|
|
|
76
78
|
immediate: !1
|
|
77
79
|
}
|
|
78
80
|
);
|
|
79
|
-
async function
|
|
81
|
+
async function d(e) {
|
|
80
82
|
if (e == null || e.stopPropagation(), o.closeFunc && T(o.closeFunc)) {
|
|
81
|
-
const
|
|
82
|
-
l.value = !
|
|
83
|
+
const p = await o.closeFunc();
|
|
84
|
+
l.value = !p;
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
87
|
l.value = !1, n("close", e);
|
|
86
88
|
}
|
|
87
89
|
function g(e) {
|
|
88
|
-
|
|
90
|
+
c.value = D(t(c) || {}, e), Reflect.has(e, "modelValue") && (l.value = !!e.modelValue);
|
|
89
91
|
}
|
|
90
|
-
const O =
|
|
91
|
-
onClick: (e) =>
|
|
92
|
+
const O = u(() => ({
|
|
93
|
+
onClick: (e) => d(e),
|
|
92
94
|
...o.cancelButtonOptions
|
|
93
|
-
})),
|
|
95
|
+
})), V = u(() => ({
|
|
94
96
|
onClick: () => n("submit"),
|
|
95
97
|
...o.submitButtonOptions
|
|
96
98
|
}));
|
|
97
|
-
return (e,
|
|
98
|
-
default:
|
|
99
|
+
return (e, p) => (m(), B(t(G), P(w.value, { onClose: d }), R({
|
|
100
|
+
default: h(() => [
|
|
99
101
|
_(e.$slots, "default")
|
|
100
102
|
]),
|
|
101
103
|
_: 2
|
|
102
104
|
}, [
|
|
103
105
|
e.$slots.footer || e.showActionButtonGroup ? {
|
|
104
106
|
name: "footer",
|
|
105
|
-
fn:
|
|
106
|
-
e.showActionButtonGroup ? (
|
|
107
|
+
fn: h(() => [
|
|
108
|
+
e.showActionButtonGroup ? (m(), B(I, {
|
|
107
109
|
key: 0,
|
|
108
110
|
showCancelButton: e.showCancelButton,
|
|
109
111
|
showSubmitButton: e.showSubmitButton,
|
|
110
112
|
cancelButtonOptions: O.value,
|
|
111
|
-
submitButtonOptions:
|
|
113
|
+
submitButtonOptions: V.value
|
|
112
114
|
}, null, 8, ["showCancelButton", "showSubmitButton", "cancelButtonOptions", "submitButtonOptions"])) : A("", !0)
|
|
113
115
|
]),
|
|
114
116
|
key: "0"
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { getDynamicProps as
|
|
2
|
-
import { tryOnBeforeUnmount as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { getDynamicProps as c } from "@vft/utils";
|
|
2
|
+
import { tryOnBeforeUnmount as f } from "@vueuse/core";
|
|
3
|
+
import { ref as u, unref as i, watch as w, toRaw as r } from "vue";
|
|
4
|
+
function y(o) {
|
|
5
|
+
const n = u(null), s = u(!1), d = u(null);
|
|
6
|
+
let l;
|
|
7
|
+
function g(e, a) {
|
|
8
|
+
f(() => {
|
|
9
|
+
n.value = null, s.value = null;
|
|
10
|
+
}), !(i(s) && e === i(n)) && (n.value = e, d.value = a, o && e.setProps(c(o)), s.value = !0, l == null || l(), l = w(
|
|
11
|
+
() => o,
|
|
11
12
|
() => {
|
|
12
|
-
|
|
13
|
+
o && e.setProps(c(o));
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
immediate: !0,
|
|
@@ -18,10 +19,10 @@ function f(r) {
|
|
|
18
19
|
));
|
|
19
20
|
}
|
|
20
21
|
function t() {
|
|
21
|
-
const e =
|
|
22
|
+
const e = i(n);
|
|
22
23
|
return e || console.error("The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!"), e;
|
|
23
24
|
}
|
|
24
|
-
return [
|
|
25
|
+
return [g, {
|
|
25
26
|
reload: async (e) => await t().reload(e),
|
|
26
27
|
setProps: (e) => {
|
|
27
28
|
t().setProps(e);
|
|
@@ -29,7 +30,7 @@ function f(r) {
|
|
|
29
30
|
redoHeight: () => {
|
|
30
31
|
t().redoHeight();
|
|
31
32
|
},
|
|
32
|
-
setSelectedRows: (e) =>
|
|
33
|
+
setSelectedRows: (e) => r(t().setSelectedRows(e)),
|
|
33
34
|
setLoading: (e) => {
|
|
34
35
|
t().setLoading(e);
|
|
35
36
|
},
|
|
@@ -37,7 +38,7 @@ function f(r) {
|
|
|
37
38
|
getRawDataSource: () => t().getRawDataSource(),
|
|
38
39
|
getColumns: ({ ignoreIndex: e = !1 } = {}) => {
|
|
39
40
|
const a = t().getColumns({ ignoreIndex: e }) || [];
|
|
40
|
-
return
|
|
41
|
+
return r(a);
|
|
41
42
|
},
|
|
42
43
|
setColumns: (e) => {
|
|
43
44
|
t().setColumns(e);
|
|
@@ -47,8 +48,8 @@ function f(r) {
|
|
|
47
48
|
deleteSelectRowByKey: (e) => {
|
|
48
49
|
t().deleteSelectRowByKey(e);
|
|
49
50
|
},
|
|
50
|
-
getSelectRowKeys: () =>
|
|
51
|
-
getSelectRows: () =>
|
|
51
|
+
getSelectRowKeys: () => r(t().getSelectRowKeys()),
|
|
52
|
+
getSelectRows: () => r(t().getSelectRows()),
|
|
52
53
|
clearSelectedRowKeys: () => {
|
|
53
54
|
t().clearSelectedRowKeys();
|
|
54
55
|
},
|
|
@@ -56,8 +57,8 @@ function f(r) {
|
|
|
56
57
|
t().setSelectedRowKeys(e);
|
|
57
58
|
},
|
|
58
59
|
getPaginationRef: () => t().getPaginationRef(),
|
|
59
|
-
getSize: () =>
|
|
60
|
-
updateTableData: (e, a,
|
|
60
|
+
getSize: () => r(t().getSize()),
|
|
61
|
+
updateTableData: (e, a, R) => t().updateTableData(e, a, R),
|
|
61
62
|
deleteTableDataRecord: (e, a) => t().deleteTableDataRecord(e, a),
|
|
62
63
|
insertTableDataRecord: (e, a) => t().insertTableDataRecord(e, a),
|
|
63
64
|
updateTableDataRecord: (e, a) => t().updateTableDataRecord(e, a),
|
|
@@ -65,9 +66,9 @@ function f(r) {
|
|
|
65
66
|
setShowPagination: async (e) => {
|
|
66
67
|
t().setShowPagination(e);
|
|
67
68
|
},
|
|
68
|
-
getShowPagination: () =>
|
|
69
|
+
getShowPagination: () => r(t().getShowPagination())
|
|
69
70
|
}];
|
|
70
71
|
}
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
y as useTable
|
|
73
74
|
};
|
package/es/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vft/utils");require("@vueuse/core");require("../../utils/ns-cover.cjs");require("lodash");const m=require("../../hooks/use-namespace/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const l=require("./constants.cjs"),d=require("./hooks/use-global-config.cjs"),f=m.useNamespace("config-provider"),h=e.defineComponent({name:"vft-config-provider"}),g=e.defineComponent({...h,props:{theme:{default:"light"},themeVars:{},themeVarsDark:{},themeVarsLight:{},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vft/utils");require("@vueuse/core");require("../../utils/ns-cover.cjs");require("lodash");const m=require("../../hooks/use-namespace/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const l=require("./constants.cjs"),d=require("./hooks/use-global-config.cjs"),f=m.useNamespace("config-provider"),h=e.defineComponent({name:"vft-config-provider"}),g=e.defineComponent({...h,props:{theme:{default:"light"},themeVars:{},themeVarsDark:{},themeVarsLight:{},iconfontClass:{},iconifyPrefixClass:{default:"ico-"},namespace:{default:"vft"},zIndex:{},message:{},projectCfg:{},button:{}},setup(n){e.watch(()=>n.message,t=>{Object.assign(l.messageConfig,t??{})},{immediate:!0,deep:!0});const i=e.computed(()=>{const t=n.theme==="dark";return c({...n.themeVars,...t?n.themeVarsDark:n.themeVarsLight})});if(o.inBrowser){const t=()=>{document.documentElement.classList.add(n.theme)},s=(r=n.theme)=>{document.documentElement.classList.remove(r)};e.watch(()=>n.theme,(r,a)=>{a&&s(a),t()},{immediate:!0}),e.onActivated(t),e.onDeactivated(s),e.onBeforeUnmount(s)}function c(t){const s={};return Object.keys(t).forEach(r=>{s[`--${n.namespace}-${o.kebabCase(r)}`]=t[r]}),s}const u=e.getCurrentInstance();return d.provideGlobalConfig(u.props),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(f).b()),style:e.normalizeStyle(i.value)},[e.renderSlot(t.$slots,"default")],6))}});exports.default=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@vft/utils");require("../config-provider/index.cjs");require("@vueuse/core");const f=require("../../utils/ns-cover.cjs");require("lodash");const d=require("../../hooks/use-namespace/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const m=require("../config-provider/hooks/use-global-config.cjs"),v=["src"],s=d.useNamespace("icon"),C=e.defineComponent({name:"vft-icon"}),y=e.defineComponent({...C,props:{icon:{},size:{},color:{},rotate:{type:Boolean},rotateSpeed:{default:2},pointer:{type:Boolean},hoverColor:{}},setup(o){var r;const t=m.useGlobalConfig(),i=e.computed(()=>f.generateCssVars({size:u.addUnit(o.size),color:o.color,hoverColor:o.hoverColor,cursor:o.pointer?"pointer":void 0,animation:o.rotate?`${t.value.namespace}-rotate ${o.rotateSpeed}s linear 0s infinite`:void 0},"icon")),l=n=>n==null?void 0:n.includes("/"),c=e.computed(()=>l(o.icon)),a=o.icon.startsWith((r=t.value)==null?void 0:r.iconifyPrefixClass)?"":t.value.iconfontClass;return(n,q)=>c.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(s).e("image")),src:n.icon,alt:"",style:e.normalizeStyle(i.value)},null,14,v)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([e.unref(s).b(),n.icon,e.unref(a)]),style:e.normalizeStyle(i.value)},null,6))}});exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vft/utils"),b=require("../dialog/index.cjs"),g=require("./modal-footer-action.vue2.cjs"),w=e.defineComponent({__name:"modal",props:{closeFunc:{},showActionButtonGroup:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},beforeClose:{},destroyOnClose:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{default:0},closeDelay:{default:0},top:{},modelValue:{type:Boolean,default:!1},modalClass:{},width:{},zIndex:{},trapFocus:{type:Boolean,default:!1},center:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},closeIcon:{},customClass:{default:""},draggable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},title:{default:""},showSubmitButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},submitButtonOptions:{},cancelButtonOptions:{},actionRowOptions:{}},emits:{"visible-change":[],close:[],ok:[],register:[],"update:modelValue":[],submit:[]},setup(d,{emit:n}){const o=d,p=e.useAttrs(),s=e.ref(null),l=e.ref(!1),u=e.ref(null),c={setModalProps:h,emitVisible:void 0,redoModalHeight:()=>{e.nextTick(()=>{e.unref(u)&&e.unref(u).setModalHeight()})}},a=e.getCurrentInstance();a&&n("register",c,a.uid);const B=e.computed(()=>({...o,...e.unref(s)})),m=e.computed(()=>({...p,...e.unref(B),modelValue:e.unref(l)}));e.watchEffect(()=>{l.value=!!o.modelValue}),e.watch(()=>e.unref(l),t=>{n("visible-change",t),n("update:modelValue",t),a&&e.nextTick(()=>{c.emitVisible(t,a.uid)}),e.nextTick(()=>{o.scrollTop&&t&&e.unref(u)&&e.unref(u).scrollTop()})},{immediate:!1});async function r(t){if(t==null||t.stopPropagation(),o.closeFunc&&f.isFunction(o.closeFunc)){const i=await o.closeFunc();l.value=!i;return}l.value=!1,n("close",t)}function h(t){s.value=f.deepMerge(e.unref(s)||{},t),Reflect.has(t,"modelValue")&&(l.value=!!t.modelValue)}const y=e.computed(()=>({onClick:t=>r(t),...o.cancelButtonOptions})),C=e.computed(()=>({onClick:()=>n("submit"),...o.submitButtonOptions}));return(t,i)=>(e.openBlock(),e.createBlock(e.unref(b.VftDialog),e.mergeProps(m.value,{onClose:r}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots.footer||t.showActionButtonGroup?{name:"footer",fn:e.withCtx(()=>[t.showActionButtonGroup?(e.openBlock(),e.createBlock(g.default,{key:0,showCancelButton:t.showCancelButton,showSubmitButton:t.showSubmitButton,cancelButtonOptions:y.value,submitButtonOptions:C.value},null,8,["showCancelButton","showSubmitButton","cancelButtonOptions","submitButtonOptions"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1040))}});exports.default=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@vft/utils"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@vft/utils"),g=require("@vueuse/core"),a=require("vue");function R(o){const n=a.ref(null),u=a.ref(!1),c=a.ref(null);let l;function i(e,r){g.tryOnBeforeUnmount(()=>{n.value=null,u.value=null}),!(a.unref(u)&&e===a.unref(n))&&(n.value=e,c.value=r,o&&e.setProps(s.getDynamicProps(o)),u.value=!0,l==null||l(),l=a.watch(()=>o,()=>{o&&e.setProps(s.getDynamicProps(o))},{immediate:!0,deep:!0}))}function t(){const e=a.unref(n);return e||console.error("The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!"),e}return[i,{reload:async e=>await t().reload(e),setProps:e=>{t().setProps(e)},redoHeight:()=>{t().redoHeight()},setSelectedRows:e=>a.toRaw(t().setSelectedRows(e)),setLoading:e=>{t().setLoading(e)},getDataSource:()=>t().getDataSource(),getRawDataSource:()=>t().getRawDataSource(),getColumns:({ignoreIndex:e=!1}={})=>{const r=t().getColumns({ignoreIndex:e})||[];return a.toRaw(r)},setColumns:e=>{t().setColumns(e)},setTableData:e=>t().setTableData(e),setPagination:e=>t().setPagination(e),deleteSelectRowByKey:e=>{t().deleteSelectRowByKey(e)},getSelectRowKeys:()=>a.toRaw(t().getSelectRowKeys()),getSelectRows:()=>a.toRaw(t().getSelectRows()),clearSelectedRowKeys:()=>{t().clearSelectedRowKeys()},setSelectedRowKeys:e=>{t().setSelectedRowKeys(e)},getPaginationRef:()=>t().getPaginationRef(),getSize:()=>a.toRaw(t().getSize()),updateTableData:(e,r,d)=>t().updateTableData(e,r,d),deleteTableDataRecord:(e,r)=>t().deleteTableDataRecord(e,r),insertTableDataRecord:(e,r)=>t().insertTableDataRecord(e,r),updateTableDataRecord:(e,r)=>t().updateTableDataRecord(e,r),findTableDataRecord:e=>t().findTableDataRecord(e),setShowPagination:async e=>{t().setShowPagination(e)},getShowPagination:()=>a.toRaw(t().getShowPagination())}]}exports.useTable=R;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.131";exports.version=e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.131",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"resize-detector": "0.3.0",
|
|
55
55
|
"sortablejs": "^1.15.0",
|
|
56
56
|
"@vft/constants": "0.0.59",
|
|
57
|
+
"@vft/router": "0.0.28",
|
|
57
58
|
"@vft/store": "0.0.28",
|
|
58
59
|
"@vft/use": "0.0.31",
|
|
59
|
-
"@vft/router": "0.0.28",
|
|
60
60
|
"@vft/utils": "0.0.43",
|
|
61
61
|
"@vft/directives": "0.0.24"
|
|
62
62
|
},
|