@fmdeui/fmui 1.0.172 → 1.0.174
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/es/components/fm-tooltip/index.d.ts +94 -29
- package/es/components/fm-tooltip/index.vue.d.ts +25 -1
- package/es/index.mjs +1 -0
- package/es/packages/components/fm-tooltip/index2.vue.mjs +25 -9
- package/es/packages/stores/index.mjs +1 -0
- package/es/packages/stores/thepagefromdata.mjs +55 -0
- package/es/stores/index.d.ts +1 -0
- package/es/stores/thepagefromdata.d.ts +28 -0
- package/index.js +103 -37
- package/index.min.js +7 -7
- package/index.min.mjs +7 -7
- package/index.mjs +103 -38
- package/lib/components/fm-tooltip/index.d.ts +94 -29
- package/lib/components/fm-tooltip/index.vue.d.ts +25 -1
- package/lib/index.js +2 -0
- package/lib/packages/components/fm-tooltip/index2.vue.js +24 -8
- package/lib/packages/stores/index.js +2 -0
- package/lib/packages/stores/thepagefromdata.js +57 -0
- package/lib/stores/index.d.ts +1 -0
- package/lib/stores/thepagefromdata.d.ts +28 -0
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/es/{defaults.css → index.css} +0 -0
|
@@ -1,31 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const FmTooltip:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
tipdata: {
|
|
8
|
-
type: {
|
|
9
|
-
(arrayLength: number): any[];
|
|
10
|
-
(...items: any[]): any[];
|
|
11
|
-
new (arrayLength: number): any[];
|
|
12
|
-
new (...items: any[]): any[];
|
|
13
|
-
isArray(arg: any): arg is any[];
|
|
14
|
-
readonly prototype: any[];
|
|
15
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
16
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
17
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
18
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
19
|
-
of<T>(...items: T[]): T[];
|
|
20
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
|
+
export declare const FmTooltip: {
|
|
3
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
4
|
+
label: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
21
7
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
tipdata: {
|
|
9
|
+
type: {
|
|
10
|
+
(arrayLength: number): any[];
|
|
11
|
+
(...items: any[]): any[];
|
|
12
|
+
new (arrayLength: number): any[];
|
|
13
|
+
new (...items: any[]): any[];
|
|
14
|
+
isArray(arg: any): arg is any[];
|
|
15
|
+
readonly prototype: any[];
|
|
16
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
17
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
18
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
19
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
20
|
+
of<T>(...items: T[]): T[];
|
|
21
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
22
|
+
};
|
|
23
|
+
default: never[];
|
|
24
|
+
};
|
|
25
|
+
content: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
params: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
default: () => void;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
34
|
+
content: string;
|
|
35
|
+
params: Record<string, any>;
|
|
36
|
+
label: string;
|
|
37
|
+
tipdata: any[];
|
|
38
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
39
|
+
P: {};
|
|
40
|
+
B: {};
|
|
41
|
+
D: {};
|
|
42
|
+
C: {};
|
|
43
|
+
M: {};
|
|
44
|
+
Defaults: {};
|
|
45
|
+
}, Readonly< ExtractPropTypes<{
|
|
46
|
+
label: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
tipdata: {
|
|
51
|
+
type: {
|
|
52
|
+
(arrayLength: number): any[];
|
|
53
|
+
(...items: any[]): any[];
|
|
54
|
+
new (arrayLength: number): any[];
|
|
55
|
+
new (...items: any[]): any[];
|
|
56
|
+
isArray(arg: any): arg is any[];
|
|
57
|
+
readonly prototype: any[];
|
|
58
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
59
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
60
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
61
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
62
|
+
of<T>(...items: T[]): T[];
|
|
63
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
64
|
+
};
|
|
65
|
+
default: never[];
|
|
66
|
+
};
|
|
67
|
+
content: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
params: {
|
|
72
|
+
type: ObjectConstructor;
|
|
73
|
+
default: () => void;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
76
|
+
content: string;
|
|
77
|
+
params: Record<string, any>;
|
|
78
|
+
label: string;
|
|
79
|
+
tipdata: any[];
|
|
80
|
+
}>;
|
|
81
|
+
__isFragment?: never;
|
|
82
|
+
__isTeleport?: never;
|
|
83
|
+
__isSuspense?: never;
|
|
84
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
29
85
|
label: {
|
|
30
86
|
type: StringConstructor;
|
|
31
87
|
default: string;
|
|
@@ -51,8 +107,17 @@ export declare const FmTooltip: DefineComponent<ExtractPropTypes<{
|
|
|
51
107
|
type: StringConstructor;
|
|
52
108
|
default: string;
|
|
53
109
|
};
|
|
54
|
-
|
|
110
|
+
params: {
|
|
111
|
+
type: ObjectConstructor;
|
|
112
|
+
default: () => void;
|
|
113
|
+
};
|
|
114
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
55
115
|
content: string;
|
|
116
|
+
params: Record<string, any>;
|
|
56
117
|
label: string;
|
|
57
118
|
tipdata: any[];
|
|
58
|
-
}, {},
|
|
119
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
120
|
+
$slots: {
|
|
121
|
+
default?(_: {}): any;
|
|
122
|
+
};
|
|
123
|
+
});
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
3
12
|
label: {
|
|
4
13
|
type: StringConstructor;
|
|
5
14
|
default: string;
|
|
@@ -25,6 +34,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
25
34
|
type: StringConstructor;
|
|
26
35
|
default: string;
|
|
27
36
|
};
|
|
37
|
+
params: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
default: () => void;
|
|
40
|
+
};
|
|
28
41
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
29
42
|
label: {
|
|
30
43
|
type: StringConstructor;
|
|
@@ -51,9 +64,20 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
51
64
|
type: StringConstructor;
|
|
52
65
|
default: string;
|
|
53
66
|
};
|
|
67
|
+
params: {
|
|
68
|
+
type: ObjectConstructor;
|
|
69
|
+
default: () => void;
|
|
70
|
+
};
|
|
54
71
|
}>> & Readonly<{}>, {
|
|
55
72
|
content: string;
|
|
73
|
+
params: Record<string, any>;
|
|
56
74
|
label: string;
|
|
57
75
|
tipdata: any[];
|
|
58
76
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
77
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
59
78
|
export default _default;
|
|
79
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
80
|
+
new (): {
|
|
81
|
+
$slots: S;
|
|
82
|
+
};
|
|
83
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -51,6 +51,7 @@ export { useTagsViewRoutes } from './packages/stores/tagsViewRoutes.mjs';
|
|
|
51
51
|
export { useThemeConfig } from './packages/stores/themeConfig.mjs';
|
|
52
52
|
export { useUserInfo } from './packages/stores/userInfo.mjs';
|
|
53
53
|
export { useVxeTable } from './packages/hooks/useVxeTableOptionsHook.mjs';
|
|
54
|
+
export { usefmPageFormDatatore } from './packages/stores/thepagefromdata.mjs';
|
|
54
55
|
export { usefminputdropdownstore } from './packages/stores/ainputdropdow.mjs';
|
|
55
56
|
export { validateFormWithScroll, validateFormWithScrollCallback } from './packages/utils/formValidate.mjs';
|
|
56
57
|
export { default as zhCn } from './packages/locale/lang/zh-cn.mjs';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, createTextVNode, toDisplayString,
|
|
1
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, renderSlot, createTextVNode, toDisplayString, createBlock, withCtx, createVNode, unref, Fragment, renderList, createElementVNode, createCommentVNode } from 'vue';
|
|
2
2
|
import { Opportunity } from '@element-plus/icons-vue';
|
|
3
|
+
import '../../stores/index.mjs';
|
|
4
|
+
import { usefmPageFormDatatore } from '../../stores/thepagefromdata.mjs';
|
|
3
5
|
|
|
4
|
-
const _hoisted_1 =
|
|
6
|
+
const _hoisted_1 = { style: { "display": "inline-flex" } };
|
|
7
|
+
const _hoisted_2 = ["innerHTML"];
|
|
5
8
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
9
|
...{
|
|
7
10
|
name: "FmTooltip"
|
|
@@ -19,28 +22,41 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
22
|
content: {
|
|
20
23
|
type: String,
|
|
21
24
|
default: ""
|
|
25
|
+
},
|
|
26
|
+
params: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => {
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
},
|
|
24
32
|
setup(__props) {
|
|
33
|
+
const props = __props;
|
|
34
|
+
const useBaseApi = usefmPageFormDatatore();
|
|
35
|
+
const tipLoadData = computed(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
return useBaseApi.getLableLogData(props.params.table, props.params.field, props.params.bizid, ((_a = props.params) == null ? void 0 : _a.bizType) || "basefrom");
|
|
38
|
+
});
|
|
25
39
|
return (_ctx, _cache) => {
|
|
26
40
|
const _component_el_icon = resolveComponent("el-icon");
|
|
27
41
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
28
|
-
return openBlock(), createElementBlock("div",
|
|
42
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
43
|
+
renderSlot(_ctx.$slots, "default"),
|
|
29
44
|
createTextVNode(
|
|
30
|
-
toDisplayString(__props.label) + " ",
|
|
45
|
+
" " + toDisplayString(__props.label) + " ",
|
|
31
46
|
1
|
|
32
47
|
/* TEXT */
|
|
33
48
|
),
|
|
34
|
-
|
|
49
|
+
tipLoadData.value.length > 0 || __props.content ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
50
|
+
key: 0,
|
|
35
51
|
"raw-content": "",
|
|
36
52
|
placement: "top",
|
|
37
53
|
effect: "light"
|
|
38
54
|
}, {
|
|
39
55
|
content: withCtx(() => [
|
|
40
|
-
|
|
56
|
+
tipLoadData.value.length > 0 ? (openBlock(true), createElementBlock(
|
|
41
57
|
Fragment,
|
|
42
58
|
{ key: 0 },
|
|
43
|
-
renderList(
|
|
59
|
+
renderList(tipLoadData.value, (value) => {
|
|
44
60
|
return openBlock(), createElementBlock("p", null, [
|
|
45
61
|
_cache[0] || (_cache[0] = createTextVNode(
|
|
46
62
|
" \u4ECE\u3010",
|
|
@@ -85,7 +101,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
101
|
)) : (openBlock(), createElementBlock("p", {
|
|
86
102
|
key: 1,
|
|
87
103
|
innerHTML: __props.content
|
|
88
|
-
}, null, 8,
|
|
104
|
+
}, null, 8, _hoisted_2))
|
|
89
105
|
]),
|
|
90
106
|
default: withCtx(() => [
|
|
91
107
|
createVNode(_component_el_icon, { color: "#ff4d4f" }, {
|
|
@@ -98,7 +114,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
114
|
]),
|
|
99
115
|
_: 1
|
|
100
116
|
/* STABLE */
|
|
101
|
-
})
|
|
117
|
+
})) : createCommentVNode("v-if", true)
|
|
102
118
|
]);
|
|
103
119
|
};
|
|
104
120
|
}
|
|
@@ -6,3 +6,4 @@ export { useTagsViewRoutes } from './tagsViewRoutes.mjs';
|
|
|
6
6
|
export { useThemeConfig } from './themeConfig.mjs';
|
|
7
7
|
export { useUserInfo } from './userInfo.mjs';
|
|
8
8
|
export { usefminputdropdownstore } from './ainputdropdow.mjs';
|
|
9
|
+
export { usefmPageFormDatatore } from './thepagefromdata.mjs';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineStore } from 'pinia';
|
|
2
|
+
import { reactive } from 'vue';
|
|
3
|
+
|
|
4
|
+
const usefmPageFormDatatore = defineStore("fmPageFormDatatore", () => {
|
|
5
|
+
const state = reactive({
|
|
6
|
+
formData: {},
|
|
7
|
+
currentBizType: ""
|
|
8
|
+
});
|
|
9
|
+
const setFormData = (data, bizType = "basefrom") => {
|
|
10
|
+
state.formData[bizType] = data;
|
|
11
|
+
};
|
|
12
|
+
const setCurrentBizType = (bizType = "") => {
|
|
13
|
+
state.currentBizType = bizType;
|
|
14
|
+
};
|
|
15
|
+
const getFormData = (bizType = "basefrom") => {
|
|
16
|
+
return state.formData[bizType];
|
|
17
|
+
};
|
|
18
|
+
const clearFormData = (bizType = "basefrom") => {
|
|
19
|
+
state.formData[bizType] = {};
|
|
20
|
+
};
|
|
21
|
+
const clearAllFormData = () => {
|
|
22
|
+
state.formData = {};
|
|
23
|
+
};
|
|
24
|
+
const getLableLogData = (table, field, bizid, bizinType = "basefrom") => {
|
|
25
|
+
const resultLogData = [];
|
|
26
|
+
const bizType = state.currentBizType != "" ? state.currentBizType : bizinType;
|
|
27
|
+
if (state.formData[bizType]) {
|
|
28
|
+
state.formData[bizType].forEach((item) => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const filteredLogs = (_b = (_a = item.logData) == null ? void 0 : _a.filter(
|
|
31
|
+
(log) => log.table === table && log.field === field && log.bizid === bizid && log.actionType === "update"
|
|
32
|
+
)) != null ? _b : [];
|
|
33
|
+
filteredLogs.forEach((log) => {
|
|
34
|
+
resultLogData.push({
|
|
35
|
+
...log,
|
|
36
|
+
// 保留原有属性
|
|
37
|
+
opUser: item.createUserName,
|
|
38
|
+
opDate: item.createTime
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return resultLogData;
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
setCurrentBizType,
|
|
47
|
+
setFormData,
|
|
48
|
+
getFormData,
|
|
49
|
+
clearFormData,
|
|
50
|
+
clearAllFormData,
|
|
51
|
+
getLableLogData
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export { usefmPageFormDatatore };
|
package/es/stores/index.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
|
2
|
+
/**
|
|
3
|
+
* 页面表单数据
|
|
4
|
+
* @methods setFormData 设置表单数据
|
|
5
|
+
* @methods getFormData 获取表单数据
|
|
6
|
+
*/
|
|
7
|
+
export declare const usefmPageFormDatatore: StoreDefinition<"fmPageFormDatatore", Pick<{
|
|
8
|
+
setCurrentBizType: (bizType?: string) => void;
|
|
9
|
+
setFormData: (data: any, bizType?: string) => void;
|
|
10
|
+
getFormData: (bizType?: string) => any;
|
|
11
|
+
clearFormData: (bizType?: string) => void;
|
|
12
|
+
clearAllFormData: () => void;
|
|
13
|
+
getLableLogData: (table: any, field: any, bizid: any, bizinType?: string) => any[];
|
|
14
|
+
}, never>, Pick<{
|
|
15
|
+
setCurrentBizType: (bizType?: string) => void;
|
|
16
|
+
setFormData: (data: any, bizType?: string) => void;
|
|
17
|
+
getFormData: (bizType?: string) => any;
|
|
18
|
+
clearFormData: (bizType?: string) => void;
|
|
19
|
+
clearAllFormData: () => void;
|
|
20
|
+
getLableLogData: (table: any, field: any, bizid: any, bizinType?: string) => any[];
|
|
21
|
+
}, never>, Pick<{
|
|
22
|
+
setCurrentBizType: (bizType?: string) => void;
|
|
23
|
+
setFormData: (data: any, bizType?: string) => void;
|
|
24
|
+
getFormData: (bizType?: string) => any;
|
|
25
|
+
clearFormData: (bizType?: string) => void;
|
|
26
|
+
clearAllFormData: () => void;
|
|
27
|
+
getLableLogData: (table: any, field: any, bizid: any, bizinType?: string) => any[];
|
|
28
|
+
}, "setCurrentBizType" | "setFormData" | "getFormData" | "clearFormData" | "clearAllFormData" | "getLableLogData">>;
|