@94ai/nf-form-item 5.0.38 → 6.1.1
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/lib/index.d.ts +66 -86
- package/lib/nf-form-item.cjs.js +23 -58
- package/lib/nf-form-item.esm-bundler.js +23 -58
- package/lib/nf-form-item.vue.d.ts +27 -37
- package/package/nf-form-item.vue +20 -46
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,86 +1,66 @@
|
|
|
1
|
-
import { PluginObject } from 'vue-demi';
|
|
2
|
-
declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{
|
|
3
|
-
isExpand: boolean;
|
|
4
|
-
initExpand: boolean;
|
|
5
|
-
}, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
6
|
-
hidden: {
|
|
7
|
-
type: BooleanConstructor;
|
|
8
|
-
default: boolean;
|
|
9
|
-
};
|
|
10
|
-
}>>, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
11
|
-
hidden: {
|
|
12
|
-
type: BooleanConstructor;
|
|
13
|
-
default: boolean;
|
|
14
|
-
};
|
|
15
|
-
}>>, {}, {
|
|
16
|
-
hidden: boolean;
|
|
17
|
-
}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{
|
|
18
|
-
hidden: {
|
|
19
|
-
type: BooleanConstructor;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
}>>> & import("vue-demi").ShallowUnwrapRef<{}> & {
|
|
23
|
-
isExpand: boolean;
|
|
24
|
-
initExpand: boolean;
|
|
25
|
-
} & import("vue/types/v3-component-options").ExtractComputedReturns<import("vue-demi").ComponentComputedOptions & {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
expandBtnIcon(): any;
|
|
68
|
-
expandBtnPlain(): any;
|
|
69
|
-
expandBtnSize(): any;
|
|
70
|
-
expandBtnRound(): any;
|
|
71
|
-
expandBtnCircle(): any;
|
|
72
|
-
expandBtnLoading(): any;
|
|
73
|
-
expandBtnDisabled(): any;
|
|
74
|
-
showBtn(): boolean;
|
|
75
|
-
isLastItem(): any;
|
|
76
|
-
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, typeof import("element-ui").FormItem, {}, string, {
|
|
77
|
-
hidden: boolean;
|
|
78
|
-
}> & {
|
|
79
|
-
props: {
|
|
80
|
-
hidden: {
|
|
81
|
-
type: BooleanConstructor;
|
|
82
|
-
default: boolean;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
} & PluginObject<undefined>;
|
|
86
|
-
export default _default;
|
|
1
|
+
import { PluginObject } from 'vue-demi';
|
|
2
|
+
declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{
|
|
3
|
+
isExpand: boolean;
|
|
4
|
+
initExpand: boolean;
|
|
5
|
+
}, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
6
|
+
hidden: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
}>>, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
11
|
+
hidden: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>>, {}, {
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{
|
|
18
|
+
hidden: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}>>> & import("vue-demi").ShallowUnwrapRef<{}> & {
|
|
23
|
+
isExpand: boolean;
|
|
24
|
+
initExpand: boolean;
|
|
25
|
+
} & import("vue/types/v3-component-options").ExtractComputedReturns<import("vue-demi").ComponentComputedOptions & {
|
|
26
|
+
unpackDesc(): any;
|
|
27
|
+
unpackIcon(): any;
|
|
28
|
+
isCollapse(): any;
|
|
29
|
+
labelPosition(): any;
|
|
30
|
+
inline(): any;
|
|
31
|
+
columns(): any;
|
|
32
|
+
showBtn(): any;
|
|
33
|
+
isLastItem(): any;
|
|
34
|
+
}> & import("vue-demi").ComponentMethodOptions & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
|
|
35
|
+
hidden: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
}>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{
|
|
40
|
+
hidden: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
}>>, {}, {
|
|
45
|
+
isExpand: boolean;
|
|
46
|
+
initExpand: boolean;
|
|
47
|
+
}, {
|
|
48
|
+
unpackDesc(): any;
|
|
49
|
+
unpackIcon(): any;
|
|
50
|
+
isCollapse(): any;
|
|
51
|
+
labelPosition(): any;
|
|
52
|
+
inline(): any;
|
|
53
|
+
columns(): any;
|
|
54
|
+
showBtn(): any;
|
|
55
|
+
isLastItem(): any;
|
|
56
|
+
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, typeof import("element-ui").FormItem, {}, string, {
|
|
57
|
+
hidden: boolean;
|
|
58
|
+
}> & {
|
|
59
|
+
props: {
|
|
60
|
+
hidden: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
} & PluginObject<undefined>;
|
|
66
|
+
export default _default;
|
package/lib/nf-form-item.cjs.js
CHANGED
|
@@ -55,21 +55,17 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
55
55
|
});
|
|
56
56
|
},
|
|
57
57
|
computed: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return
|
|
69
|
-
},
|
|
70
|
-
upIcon() {
|
|
71
|
-
var _a;
|
|
72
|
-
return (_a = this.form) == null ? void 0 : _a.upIcon;
|
|
58
|
+
// 展开收起文案
|
|
59
|
+
unpackDesc() {
|
|
60
|
+
if (!this.form)
|
|
61
|
+
return "";
|
|
62
|
+
return this.isExpand ? this.form.shrinkBtnTooltipDesc : this.form.expandBtnTooltipDesc;
|
|
63
|
+
},
|
|
64
|
+
// 展开收起icon
|
|
65
|
+
unpackIcon() {
|
|
66
|
+
if (!this.form)
|
|
67
|
+
return null;
|
|
68
|
+
return this.isExpand ? this.form.upIcon : this.form.downIcon;
|
|
73
69
|
},
|
|
74
70
|
isCollapse() {
|
|
75
71
|
var _a;
|
|
@@ -87,38 +83,6 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
87
83
|
var _a;
|
|
88
84
|
return (_a = this.form) == null ? void 0 : _a.columns;
|
|
89
85
|
},
|
|
90
|
-
expandBtnType() {
|
|
91
|
-
var _a;
|
|
92
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnType;
|
|
93
|
-
},
|
|
94
|
-
expandBtnIcon() {
|
|
95
|
-
var _a;
|
|
96
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnIcon;
|
|
97
|
-
},
|
|
98
|
-
expandBtnPlain() {
|
|
99
|
-
var _a;
|
|
100
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnPlain;
|
|
101
|
-
},
|
|
102
|
-
expandBtnSize() {
|
|
103
|
-
var _a;
|
|
104
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnSize;
|
|
105
|
-
},
|
|
106
|
-
expandBtnRound() {
|
|
107
|
-
var _a;
|
|
108
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnRound;
|
|
109
|
-
},
|
|
110
|
-
expandBtnCircle() {
|
|
111
|
-
var _a;
|
|
112
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnCircle;
|
|
113
|
-
},
|
|
114
|
-
expandBtnLoading() {
|
|
115
|
-
var _a;
|
|
116
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnLoading;
|
|
117
|
-
},
|
|
118
|
-
expandBtnDisabled() {
|
|
119
|
-
var _a;
|
|
120
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnDisabled;
|
|
121
|
-
},
|
|
122
86
|
showBtn() {
|
|
123
87
|
var _a, _b;
|
|
124
88
|
if (this.hidden)
|
|
@@ -168,6 +132,7 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
168
132
|
}
|
|
169
133
|
});
|
|
170
134
|
var _sfc_render = function render() {
|
|
135
|
+
var _a, _b, _c2, _d, _e, _f, _g, _h, _i;
|
|
171
136
|
var _vm = this, _c = _vm._self._c;
|
|
172
137
|
_vm._self._setupProxy;
|
|
173
138
|
return _c("div", {
|
|
@@ -182,7 +147,7 @@ var _sfc_render = function render() {
|
|
|
182
147
|
}, _vm.sizeClass ? "el-form-item--" + _vm.sizeClass : ""]
|
|
183
148
|
}, [_c("label-wrap", {
|
|
184
149
|
attrs: {
|
|
185
|
-
"is-auto-width": _vm.labelStyle
|
|
150
|
+
"is-auto-width": ((_a = _vm.labelStyle) == null ? void 0 : _a.width) === "auto",
|
|
186
151
|
"update-all": _vm.form.labelWidth === "auto"
|
|
187
152
|
}
|
|
188
153
|
}, [_vm.label || _vm.$slots.label ? _c("label", {
|
|
@@ -202,27 +167,27 @@ var _sfc_render = function render() {
|
|
|
202
167
|
staticClass: "nf-ml10"
|
|
203
168
|
}, [_c("el-tooltip", {
|
|
204
169
|
attrs: {
|
|
205
|
-
"content": _vm.
|
|
170
|
+
"content": _vm.unpackDesc,
|
|
206
171
|
"placement": "top"
|
|
207
172
|
}
|
|
208
173
|
}, [_c("nf-button", {
|
|
209
174
|
staticClass: "nf-pointer",
|
|
210
175
|
attrs: {
|
|
211
|
-
"type": _vm.expandBtnType,
|
|
212
|
-
"icon": _vm.expandBtnIcon,
|
|
213
|
-
"plain": _vm.expandBtnPlain,
|
|
214
|
-
"size": _vm.expandBtnSize,
|
|
215
|
-
"round": _vm.expandBtnRound,
|
|
216
|
-
"circle": _vm.expandBtnCircle,
|
|
217
|
-
"loading": _vm.expandBtnLoading,
|
|
218
|
-
"disabled": _vm.expandBtnDisabled
|
|
176
|
+
"type": (_b = _vm.form) == null ? void 0 : _b.expandBtnType,
|
|
177
|
+
"icon": (_c2 = _vm.form) == null ? void 0 : _c2.expandBtnIcon,
|
|
178
|
+
"plain": (_d = _vm.form) == null ? void 0 : _d.expandBtnPlain,
|
|
179
|
+
"size": (_e = _vm.form) == null ? void 0 : _e.expandBtnSize,
|
|
180
|
+
"round": (_f = _vm.form) == null ? void 0 : _f.expandBtnRound,
|
|
181
|
+
"circle": (_g = _vm.form) == null ? void 0 : _g.expandBtnCircle,
|
|
182
|
+
"loading": (_h = _vm.form) == null ? void 0 : _h.expandBtnLoading,
|
|
183
|
+
"disabled": (_i = _vm.form) == null ? void 0 : _i.expandBtnDisabled
|
|
219
184
|
},
|
|
220
185
|
on: {
|
|
221
186
|
"click": _vm.switchMode
|
|
222
187
|
}
|
|
223
188
|
}, [_c("i", {
|
|
224
189
|
staticClass: "iconfont nf-fs12",
|
|
225
|
-
class: _vm.
|
|
190
|
+
class: _vm.unpackIcon
|
|
226
191
|
})])], 1)], 1) : _vm._e()], 2) : _vm._t("default"), _c("transition", {
|
|
227
192
|
attrs: {
|
|
228
193
|
"name": "el-zoom-in-top"
|
|
@@ -53,21 +53,17 @@ const _sfc_main = defineComponent({
|
|
|
53
53
|
});
|
|
54
54
|
},
|
|
55
55
|
computed: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return
|
|
67
|
-
},
|
|
68
|
-
upIcon() {
|
|
69
|
-
var _a;
|
|
70
|
-
return (_a = this.form) == null ? void 0 : _a.upIcon;
|
|
56
|
+
// 展开收起文案
|
|
57
|
+
unpackDesc() {
|
|
58
|
+
if (!this.form)
|
|
59
|
+
return "";
|
|
60
|
+
return this.isExpand ? this.form.shrinkBtnTooltipDesc : this.form.expandBtnTooltipDesc;
|
|
61
|
+
},
|
|
62
|
+
// 展开收起icon
|
|
63
|
+
unpackIcon() {
|
|
64
|
+
if (!this.form)
|
|
65
|
+
return null;
|
|
66
|
+
return this.isExpand ? this.form.upIcon : this.form.downIcon;
|
|
71
67
|
},
|
|
72
68
|
isCollapse() {
|
|
73
69
|
var _a;
|
|
@@ -85,38 +81,6 @@ const _sfc_main = defineComponent({
|
|
|
85
81
|
var _a;
|
|
86
82
|
return (_a = this.form) == null ? void 0 : _a.columns;
|
|
87
83
|
},
|
|
88
|
-
expandBtnType() {
|
|
89
|
-
var _a;
|
|
90
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnType;
|
|
91
|
-
},
|
|
92
|
-
expandBtnIcon() {
|
|
93
|
-
var _a;
|
|
94
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnIcon;
|
|
95
|
-
},
|
|
96
|
-
expandBtnPlain() {
|
|
97
|
-
var _a;
|
|
98
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnPlain;
|
|
99
|
-
},
|
|
100
|
-
expandBtnSize() {
|
|
101
|
-
var _a;
|
|
102
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnSize;
|
|
103
|
-
},
|
|
104
|
-
expandBtnRound() {
|
|
105
|
-
var _a;
|
|
106
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnRound;
|
|
107
|
-
},
|
|
108
|
-
expandBtnCircle() {
|
|
109
|
-
var _a;
|
|
110
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnCircle;
|
|
111
|
-
},
|
|
112
|
-
expandBtnLoading() {
|
|
113
|
-
var _a;
|
|
114
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnLoading;
|
|
115
|
-
},
|
|
116
|
-
expandBtnDisabled() {
|
|
117
|
-
var _a;
|
|
118
|
-
return (_a = this.form) == null ? void 0 : _a.expandBtnDisabled;
|
|
119
|
-
},
|
|
120
84
|
showBtn() {
|
|
121
85
|
var _a, _b;
|
|
122
86
|
if (this.hidden)
|
|
@@ -166,6 +130,7 @@ const _sfc_main = defineComponent({
|
|
|
166
130
|
}
|
|
167
131
|
});
|
|
168
132
|
var _sfc_render = function render() {
|
|
133
|
+
var _a, _b, _c2, _d, _e, _f, _g, _h, _i;
|
|
169
134
|
var _vm = this, _c = _vm._self._c;
|
|
170
135
|
_vm._self._setupProxy;
|
|
171
136
|
return _c("div", {
|
|
@@ -180,7 +145,7 @@ var _sfc_render = function render() {
|
|
|
180
145
|
}, _vm.sizeClass ? "el-form-item--" + _vm.sizeClass : ""]
|
|
181
146
|
}, [_c("label-wrap", {
|
|
182
147
|
attrs: {
|
|
183
|
-
"is-auto-width": _vm.labelStyle
|
|
148
|
+
"is-auto-width": ((_a = _vm.labelStyle) == null ? void 0 : _a.width) === "auto",
|
|
184
149
|
"update-all": _vm.form.labelWidth === "auto"
|
|
185
150
|
}
|
|
186
151
|
}, [_vm.label || _vm.$slots.label ? _c("label", {
|
|
@@ -200,27 +165,27 @@ var _sfc_render = function render() {
|
|
|
200
165
|
staticClass: "nf-ml10"
|
|
201
166
|
}, [_c("el-tooltip", {
|
|
202
167
|
attrs: {
|
|
203
|
-
"content": _vm.
|
|
168
|
+
"content": _vm.unpackDesc,
|
|
204
169
|
"placement": "top"
|
|
205
170
|
}
|
|
206
171
|
}, [_c("nf-button", {
|
|
207
172
|
staticClass: "nf-pointer",
|
|
208
173
|
attrs: {
|
|
209
|
-
"type": _vm.expandBtnType,
|
|
210
|
-
"icon": _vm.expandBtnIcon,
|
|
211
|
-
"plain": _vm.expandBtnPlain,
|
|
212
|
-
"size": _vm.expandBtnSize,
|
|
213
|
-
"round": _vm.expandBtnRound,
|
|
214
|
-
"circle": _vm.expandBtnCircle,
|
|
215
|
-
"loading": _vm.expandBtnLoading,
|
|
216
|
-
"disabled": _vm.expandBtnDisabled
|
|
174
|
+
"type": (_b = _vm.form) == null ? void 0 : _b.expandBtnType,
|
|
175
|
+
"icon": (_c2 = _vm.form) == null ? void 0 : _c2.expandBtnIcon,
|
|
176
|
+
"plain": (_d = _vm.form) == null ? void 0 : _d.expandBtnPlain,
|
|
177
|
+
"size": (_e = _vm.form) == null ? void 0 : _e.expandBtnSize,
|
|
178
|
+
"round": (_f = _vm.form) == null ? void 0 : _f.expandBtnRound,
|
|
179
|
+
"circle": (_g = _vm.form) == null ? void 0 : _g.expandBtnCircle,
|
|
180
|
+
"loading": (_h = _vm.form) == null ? void 0 : _h.expandBtnLoading,
|
|
181
|
+
"disabled": (_i = _vm.form) == null ? void 0 : _i.expandBtnDisabled
|
|
217
182
|
},
|
|
218
183
|
on: {
|
|
219
184
|
"click": _vm.switchMode
|
|
220
185
|
}
|
|
221
186
|
}, [_c("i", {
|
|
222
187
|
staticClass: "iconfont nf-fs12",
|
|
223
|
-
class: _vm.
|
|
188
|
+
class: _vm.unpackIcon
|
|
224
189
|
})])], 1)], 1) : _vm._e()], 2) : _vm._t("default"), _c("transition", {
|
|
225
190
|
attrs: {
|
|
226
191
|
"name": "el-zoom-in-top"
|
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
import { FormItem } from 'element-ui';
|
|
2
|
-
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
|
-
hidden: {
|
|
4
|
-
type: BooleanConstructor;
|
|
5
|
-
default: boolean;
|
|
6
|
-
};
|
|
7
|
-
}, {}, {
|
|
8
|
-
isExpand: boolean;
|
|
9
|
-
initExpand: boolean;
|
|
10
|
-
}, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
isLastItem(): any;
|
|
29
|
-
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, typeof FormItem, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
30
|
-
hidden: {
|
|
31
|
-
type: BooleanConstructor;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
}>>, {
|
|
35
|
-
hidden: boolean;
|
|
36
|
-
}>;
|
|
37
|
-
export default _default;
|
|
1
|
+
import { FormItem } from 'element-ui';
|
|
2
|
+
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
|
+
hidden: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
}, {}, {
|
|
8
|
+
isExpand: boolean;
|
|
9
|
+
initExpand: boolean;
|
|
10
|
+
}, {
|
|
11
|
+
unpackDesc(): any;
|
|
12
|
+
unpackIcon(): any;
|
|
13
|
+
isCollapse(): any;
|
|
14
|
+
labelPosition(): any;
|
|
15
|
+
inline(): any;
|
|
16
|
+
columns(): any;
|
|
17
|
+
showBtn(): any;
|
|
18
|
+
isLastItem(): any;
|
|
19
|
+
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, typeof FormItem, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
20
|
+
hidden: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
hidden: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
package/package/nf-form-item.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
]"
|
|
15
15
|
>
|
|
16
16
|
<label-wrap
|
|
17
|
-
:is-auto-width="labelStyle
|
|
17
|
+
:is-auto-width="labelStyle?.width === 'auto'"
|
|
18
18
|
:update-all="form.labelWidth === 'auto'"
|
|
19
19
|
>
|
|
20
20
|
<label v-if="label || $slots.label" :for="labelFor" class="el-form-item__label" :style="labelStyle">
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
<div v-if="isLastItem" class="nf-flex">
|
|
26
26
|
<slot />
|
|
27
27
|
<div v-if="showBtn" class="nf-ml10">
|
|
28
|
-
<el-tooltip :content="
|
|
28
|
+
<el-tooltip :content="unpackDesc" placement="top">
|
|
29
29
|
<nf-button
|
|
30
30
|
class="nf-pointer"
|
|
31
31
|
@click="switchMode"
|
|
32
|
-
:type="expandBtnType"
|
|
33
|
-
:icon="expandBtnIcon"
|
|
34
|
-
:plain="expandBtnPlain"
|
|
35
|
-
:size="expandBtnSize"
|
|
36
|
-
:round="expandBtnRound"
|
|
37
|
-
:circle="expandBtnCircle"
|
|
38
|
-
:loading="expandBtnLoading"
|
|
39
|
-
:disabled="expandBtnDisabled"
|
|
32
|
+
:type="form?.expandBtnType"
|
|
33
|
+
:icon="form?.expandBtnIcon"
|
|
34
|
+
:plain="form?.expandBtnPlain"
|
|
35
|
+
:size="form?.expandBtnSize"
|
|
36
|
+
:round="form?.expandBtnRound"
|
|
37
|
+
:circle="form?.expandBtnCircle"
|
|
38
|
+
:loading="form?.expandBtnLoading"
|
|
39
|
+
:disabled="form?.expandBtnDisabled"
|
|
40
40
|
>
|
|
41
|
-
<i class="iconfont nf-fs12" :class="
|
|
41
|
+
<i class="iconfont nf-fs12" :class="unpackIcon" />
|
|
42
42
|
</nf-button>
|
|
43
|
-
|
|
43
|
+
</el-tooltip>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<slot v-else />
|
|
@@ -121,17 +121,15 @@ export default defineComponent({
|
|
|
121
121
|
})
|
|
122
122
|
},
|
|
123
123
|
computed: {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
// 展开收起文案
|
|
125
|
+
unpackDesc() {
|
|
126
|
+
if (!this.form) return ''
|
|
127
|
+
return this.isExpand ? this.form.shrinkBtnTooltipDesc : this.form.expandBtnTooltipDesc
|
|
126
128
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return this.form?.downIcon
|
|
132
|
-
},
|
|
133
|
-
upIcon() {
|
|
134
|
-
return this.form?.upIcon
|
|
129
|
+
// 展开收起icon
|
|
130
|
+
unpackIcon() {
|
|
131
|
+
if (!this.form) return null
|
|
132
|
+
return this.isExpand ? this.form.upIcon : this.form.downIcon
|
|
135
133
|
},
|
|
136
134
|
isCollapse() {
|
|
137
135
|
return this.form?.isCollapse
|
|
@@ -145,30 +143,6 @@ export default defineComponent({
|
|
|
145
143
|
columns() {
|
|
146
144
|
return this.form?.columns
|
|
147
145
|
},
|
|
148
|
-
expandBtnType() {
|
|
149
|
-
return this.form?.expandBtnType
|
|
150
|
-
},
|
|
151
|
-
expandBtnIcon() {
|
|
152
|
-
return this.form?.expandBtnIcon
|
|
153
|
-
},
|
|
154
|
-
expandBtnPlain() {
|
|
155
|
-
return this.form?.expandBtnPlain
|
|
156
|
-
},
|
|
157
|
-
expandBtnSize() {
|
|
158
|
-
return this.form?.expandBtnSize
|
|
159
|
-
},
|
|
160
|
-
expandBtnRound() {
|
|
161
|
-
return this.form?.expandBtnRound
|
|
162
|
-
},
|
|
163
|
-
expandBtnCircle() {
|
|
164
|
-
return this.form?.expandBtnCircle
|
|
165
|
-
},
|
|
166
|
-
expandBtnLoading() {
|
|
167
|
-
return this.form?.expandBtnLoading
|
|
168
|
-
},
|
|
169
|
-
expandBtnDisabled() {
|
|
170
|
-
return this.form?.expandBtnDisabled
|
|
171
|
-
},
|
|
172
146
|
showBtn() {
|
|
173
147
|
if (this.hidden) return false
|
|
174
148
|
if (!this.form?.showBtn) return false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-form-item",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^
|
|
17
|
+
"@94ai/nf-theme-chalk": "^6.1.1",
|
|
18
18
|
"vue-demi": "^0.14.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"types": "lib/index.d.ts",
|
|
31
31
|
"main": "lib/nf-form-item.cjs.js",
|
|
32
32
|
"module": "lib/nf-form-item.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "8cf48ea7eb7ec9a63f472fa4f5f738f624e18c54"
|
|
34
34
|
}
|