@fmdeui/fmui 1.0.63 → 1.0.65
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/fmtree/index.d.ts +35 -0
- package/es/components/fmtree/index.vue.d.ts +35 -0
- package/es/packages/components/fmtree/index.vue2.mjs +18 -7
- package/index.js +19 -8
- package/index.min.js +5 -5
- package/index.min.mjs +6 -6
- package/index.mjs +19 -8
- package/lib/components/fmtree/index.d.ts +35 -0
- package/lib/components/fmtree/index.vue.d.ts +35 -0
- package/lib/packages/components/fmtree/index.vue2.js +18 -7
- 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/lib/{defaults.css → index.css} +0 -0
|
@@ -32,6 +32,23 @@ export declare const FmTree: DefineComponent<ExtractPropTypes<{
|
|
|
32
32
|
type: StringConstructor;
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
|
+
treeData: {
|
|
36
|
+
type: {
|
|
37
|
+
(arrayLength: number): any[];
|
|
38
|
+
(...items: any[]): any[];
|
|
39
|
+
new (arrayLength: number): any[];
|
|
40
|
+
new (...items: any[]): any[];
|
|
41
|
+
isArray(arg: any): arg is any[];
|
|
42
|
+
readonly prototype: any[];
|
|
43
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
44
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
45
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
46
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
47
|
+
of<T>(...items: T[]): T[];
|
|
48
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
49
|
+
};
|
|
50
|
+
default: () => never[];
|
|
51
|
+
};
|
|
35
52
|
modelValue: {
|
|
36
53
|
type: PropType<any>;
|
|
37
54
|
};
|
|
@@ -74,6 +91,23 @@ export declare const FmTree: DefineComponent<ExtractPropTypes<{
|
|
|
74
91
|
type: StringConstructor;
|
|
75
92
|
default: string;
|
|
76
93
|
};
|
|
94
|
+
treeData: {
|
|
95
|
+
type: {
|
|
96
|
+
(arrayLength: number): any[];
|
|
97
|
+
(...items: any[]): any[];
|
|
98
|
+
new (arrayLength: number): any[];
|
|
99
|
+
new (...items: any[]): any[];
|
|
100
|
+
isArray(arg: any): arg is any[];
|
|
101
|
+
readonly prototype: any[];
|
|
102
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
103
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
104
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
105
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
106
|
+
of<T>(...items: T[]): T[];
|
|
107
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
108
|
+
};
|
|
109
|
+
default: () => never[];
|
|
110
|
+
};
|
|
77
111
|
modelValue: {
|
|
78
112
|
type: PropType<any>;
|
|
79
113
|
};
|
|
@@ -88,6 +122,7 @@ export declare const FmTree: DefineComponent<ExtractPropTypes<{
|
|
|
88
122
|
paras: Record<string, any>;
|
|
89
123
|
nodeKey: string;
|
|
90
124
|
defaultProps: Record<string, any>;
|
|
125
|
+
treeData: any[];
|
|
91
126
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
92
127
|
treeRef: unknown;
|
|
93
128
|
}, any>;
|
|
@@ -38,6 +38,23 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
38
38
|
type: StringConstructor;
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
|
+
treeData: {
|
|
42
|
+
type: {
|
|
43
|
+
(arrayLength: number): any[];
|
|
44
|
+
(...items: any[]): any[];
|
|
45
|
+
new (arrayLength: number): any[];
|
|
46
|
+
new (...items: any[]): any[];
|
|
47
|
+
isArray(arg: any): arg is any[];
|
|
48
|
+
readonly prototype: any[];
|
|
49
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
50
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
51
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
52
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
53
|
+
of<T>(...items: T[]): T[];
|
|
54
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
55
|
+
};
|
|
56
|
+
default: () => never[];
|
|
57
|
+
};
|
|
41
58
|
modelValue: {
|
|
42
59
|
type: PropType<any>;
|
|
43
60
|
};
|
|
@@ -86,6 +103,23 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
86
103
|
type: StringConstructor;
|
|
87
104
|
default: string;
|
|
88
105
|
};
|
|
106
|
+
treeData: {
|
|
107
|
+
type: {
|
|
108
|
+
(arrayLength: number): any[];
|
|
109
|
+
(...items: any[]): any[];
|
|
110
|
+
new (arrayLength: number): any[];
|
|
111
|
+
new (...items: any[]): any[];
|
|
112
|
+
isArray(arg: any): arg is any[];
|
|
113
|
+
readonly prototype: any[];
|
|
114
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
115
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
116
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
117
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
118
|
+
of<T>(...items: T[]): T[];
|
|
119
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
120
|
+
};
|
|
121
|
+
default: () => never[];
|
|
122
|
+
};
|
|
89
123
|
modelValue: {
|
|
90
124
|
type: PropType<any>;
|
|
91
125
|
};
|
|
@@ -100,6 +134,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
100
134
|
paras: Record<string, any>;
|
|
101
135
|
nodeKey: string;
|
|
102
136
|
defaultProps: Record<string, any>;
|
|
137
|
+
treeData: any[];
|
|
103
138
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
104
139
|
treeRef: unknown;
|
|
105
140
|
}, any>;
|
|
@@ -20,14 +20,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
*/
|
|
21
21
|
apiService: {
|
|
22
22
|
type: String,
|
|
23
|
-
default: "
|
|
23
|
+
default: ""
|
|
24
24
|
},
|
|
25
25
|
/**
|
|
26
26
|
* api service 下的方法
|
|
27
27
|
*/
|
|
28
28
|
apiAction: {
|
|
29
29
|
type: String,
|
|
30
|
-
default: "
|
|
30
|
+
default: ""
|
|
31
31
|
},
|
|
32
32
|
paras: {
|
|
33
33
|
type: Object,
|
|
@@ -44,6 +44,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
placeholder: {
|
|
45
45
|
type: String,
|
|
46
46
|
default: "\u7C7B\u578B\u540D\u79F0"
|
|
47
|
+
},
|
|
48
|
+
treeData: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default: () => []
|
|
47
51
|
}
|
|
48
52
|
}, {
|
|
49
53
|
"modelValue": {},
|
|
@@ -62,11 +66,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
66
|
strictly: false
|
|
63
67
|
});
|
|
64
68
|
onMounted(async () => {
|
|
65
|
-
|
|
69
|
+
if (props.apiService != "" && props.apiAction != "") {
|
|
70
|
+
await fetchTreeData();
|
|
71
|
+
}
|
|
66
72
|
});
|
|
67
73
|
watch(filterText, (val) => {
|
|
68
74
|
treeRef.value.filter(val);
|
|
69
75
|
});
|
|
76
|
+
watch(() => props.treeData, (newVal) => {
|
|
77
|
+
state.folderData = newVal;
|
|
78
|
+
const rtreeData = newVal != null ? newVal : [];
|
|
79
|
+
modeValue.value = rtreeData.length > 0 ? rtreeData[0] : { id: 0, name: "", code: "" };
|
|
80
|
+
});
|
|
70
81
|
const fetchTreeData = async (showLoading = true) => {
|
|
71
82
|
var _a, _b;
|
|
72
83
|
if (showLoading) state.loading = true;
|
|
@@ -103,10 +114,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
114
|
}
|
|
104
115
|
};
|
|
105
116
|
const emit = __emit;
|
|
106
|
-
const nodeClick = (node
|
|
107
|
-
|
|
108
|
-
modeValue.value = { id: node.id, name: node.name, code:
|
|
109
|
-
emit("node-click", { id: node.id, name: node.name, code:
|
|
117
|
+
const nodeClick = (node) => {
|
|
118
|
+
const reldata = state.folderData.find((item) => item.id == node.id);
|
|
119
|
+
modeValue.value = { id: node.id, name: node.name, code: reldata ? reldata.code : "" };
|
|
120
|
+
emit("node-click", { id: node.id, name: node.name, code: reldata ? reldata.code : "" });
|
|
110
121
|
};
|
|
111
122
|
const setCurrentKey = (key, shouldAutoExpandParent) => {
|
|
112
123
|
var _a;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.65 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -26171,14 +26171,14 @@
|
|
|
26171
26171
|
*/
|
|
26172
26172
|
apiService: {
|
|
26173
26173
|
type: String,
|
|
26174
|
-
default: "
|
|
26174
|
+
default: ""
|
|
26175
26175
|
},
|
|
26176
26176
|
/**
|
|
26177
26177
|
* api service 下的方法
|
|
26178
26178
|
*/
|
|
26179
26179
|
apiAction: {
|
|
26180
26180
|
type: String,
|
|
26181
|
-
default: "
|
|
26181
|
+
default: ""
|
|
26182
26182
|
},
|
|
26183
26183
|
paras: {
|
|
26184
26184
|
type: Object,
|
|
@@ -26195,6 +26195,10 @@
|
|
|
26195
26195
|
placeholder: {
|
|
26196
26196
|
type: String,
|
|
26197
26197
|
default: "\u7C7B\u578B\u540D\u79F0"
|
|
26198
|
+
},
|
|
26199
|
+
treeData: {
|
|
26200
|
+
type: Array,
|
|
26201
|
+
default: () => []
|
|
26198
26202
|
}
|
|
26199
26203
|
}, {
|
|
26200
26204
|
"modelValue": {},
|
|
@@ -26213,11 +26217,18 @@
|
|
|
26213
26217
|
strictly: false
|
|
26214
26218
|
});
|
|
26215
26219
|
vue.onMounted(async () => {
|
|
26216
|
-
|
|
26220
|
+
if (props.apiService != "" && props.apiAction != "") {
|
|
26221
|
+
await fetchTreeData();
|
|
26222
|
+
}
|
|
26217
26223
|
});
|
|
26218
26224
|
vue.watch(filterText, (val) => {
|
|
26219
26225
|
treeRef.value.filter(val);
|
|
26220
26226
|
});
|
|
26227
|
+
vue.watch(() => props.treeData, (newVal) => {
|
|
26228
|
+
state.folderData = newVal;
|
|
26229
|
+
const rtreeData = newVal != null ? newVal : [];
|
|
26230
|
+
modeValue.value = rtreeData.length > 0 ? rtreeData[0] : { id: 0, name: "", code: "" };
|
|
26231
|
+
});
|
|
26221
26232
|
const fetchTreeData = async (showLoading = true) => {
|
|
26222
26233
|
var _a, _b;
|
|
26223
26234
|
if (showLoading) state.loading = true;
|
|
@@ -26254,10 +26265,10 @@
|
|
|
26254
26265
|
}
|
|
26255
26266
|
};
|
|
26256
26267
|
const emit = __emit;
|
|
26257
|
-
const nodeClick = (node
|
|
26258
|
-
|
|
26259
|
-
modeValue.value = { id: node.id, name: node.name, code:
|
|
26260
|
-
emit("node-click", { id: node.id, name: node.name, code:
|
|
26268
|
+
const nodeClick = (node) => {
|
|
26269
|
+
const reldata = state.folderData.find((item) => item.id == node.id);
|
|
26270
|
+
modeValue.value = { id: node.id, name: node.name, code: reldata ? reldata.code : "" };
|
|
26271
|
+
emit("node-click", { id: node.id, name: node.name, code: reldata ? reldata.code : "" });
|
|
26261
26272
|
};
|
|
26262
26273
|
const setCurrentKey = (key, shouldAutoExpandParent) => {
|
|
26263
26274
|
var _a;
|