@94ai/nf-form-item 9.0.0 → 10.0.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/lib/index.d.ts +66 -66
- package/lib/nf-form-item.cjs.js +11 -15
- package/lib/nf-form-item.esm-bundler.js +11 -15
- package/lib/nf-form-item.vue.d.ts +27 -27
- package/lib/style/css.d.ts +1 -0
- package/lib/style/index.d.ts +1 -0
- package/package/nf-form-item.vue +9 -13
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -1,66 +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
|
-
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;
|
|
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
|
@@ -43,15 +43,11 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
43
43
|
}
|
|
44
44
|
vueDemi.nextTick(() => {
|
|
45
45
|
var _a2;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (!this.isExpand) {
|
|
49
|
-
this.refreshButtonList();
|
|
50
|
-
}
|
|
51
|
-
this.initExpand = true;
|
|
52
|
-
} else {
|
|
46
|
+
this.isExpand = !((_a2 = this.form) == null ? void 0 : _a2.isCollapse);
|
|
47
|
+
if (!this.isExpand) {
|
|
53
48
|
this.refreshButtonList();
|
|
54
49
|
}
|
|
50
|
+
this.initExpand = true;
|
|
55
51
|
});
|
|
56
52
|
},
|
|
57
53
|
computed: {
|
|
@@ -118,16 +114,16 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
118
114
|
},
|
|
119
115
|
// 切换显示模式
|
|
120
116
|
switchMode(e) {
|
|
121
|
-
var _a;
|
|
122
|
-
let target =
|
|
123
|
-
if (target.nodeName == "SPAN") {
|
|
124
|
-
target =
|
|
125
|
-
} else if (target.nodeName == "I") {
|
|
126
|
-
target =
|
|
117
|
+
var _a, _b;
|
|
118
|
+
let target = e == null ? void 0 : e.target;
|
|
119
|
+
if ((target == null ? void 0 : target.nodeName) == "SPAN") {
|
|
120
|
+
target = target.parentNode;
|
|
121
|
+
} else if ((target == null ? void 0 : target.nodeName) == "I") {
|
|
122
|
+
target = target.parentNode.parentNode;
|
|
127
123
|
}
|
|
128
|
-
target.blur();
|
|
124
|
+
(_a = target == null ? void 0 : target.blur) == null ? void 0 : _a.call(target);
|
|
129
125
|
this.isExpand = !this.isExpand;
|
|
130
|
-
(
|
|
126
|
+
(_b = this.form) == null ? void 0 : _b.$emit("isCollapseChange", this.isExpand);
|
|
131
127
|
this.refreshButtonList();
|
|
132
128
|
}
|
|
133
129
|
}
|
|
@@ -41,15 +41,11 @@ const _sfc_main = defineComponent({
|
|
|
41
41
|
}
|
|
42
42
|
nextTick(() => {
|
|
43
43
|
var _a2;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (!this.isExpand) {
|
|
47
|
-
this.refreshButtonList();
|
|
48
|
-
}
|
|
49
|
-
this.initExpand = true;
|
|
50
|
-
} else {
|
|
44
|
+
this.isExpand = !((_a2 = this.form) == null ? void 0 : _a2.isCollapse);
|
|
45
|
+
if (!this.isExpand) {
|
|
51
46
|
this.refreshButtonList();
|
|
52
47
|
}
|
|
48
|
+
this.initExpand = true;
|
|
53
49
|
});
|
|
54
50
|
},
|
|
55
51
|
computed: {
|
|
@@ -116,16 +112,16 @@ const _sfc_main = defineComponent({
|
|
|
116
112
|
},
|
|
117
113
|
// 切换显示模式
|
|
118
114
|
switchMode(e) {
|
|
119
|
-
var _a;
|
|
120
|
-
let target =
|
|
121
|
-
if (target.nodeName == "SPAN") {
|
|
122
|
-
target =
|
|
123
|
-
} else if (target.nodeName == "I") {
|
|
124
|
-
target =
|
|
115
|
+
var _a, _b;
|
|
116
|
+
let target = e == null ? void 0 : e.target;
|
|
117
|
+
if ((target == null ? void 0 : target.nodeName) == "SPAN") {
|
|
118
|
+
target = target.parentNode;
|
|
119
|
+
} else if ((target == null ? void 0 : target.nodeName) == "I") {
|
|
120
|
+
target = target.parentNode.parentNode;
|
|
125
121
|
}
|
|
126
|
-
target.blur();
|
|
122
|
+
(_a = target == null ? void 0 : target.blur) == null ? void 0 : _a.call(target);
|
|
127
123
|
this.isExpand = !this.isExpand;
|
|
128
|
-
(
|
|
124
|
+
(_b = this.form) == null ? void 0 : _b.$emit("isCollapseChange", this.isExpand);
|
|
129
125
|
this.refreshButtonList();
|
|
130
126
|
}
|
|
131
127
|
}
|
|
@@ -1,27 +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
|
-
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;
|
|
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/lib/style/css.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/lib/style/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package/nf-form-item.vue
CHANGED
|
@@ -109,15 +109,11 @@ export default defineComponent({
|
|
|
109
109
|
this.form?.getFormItems()
|
|
110
110
|
}
|
|
111
111
|
nextTick(() => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (!this.isExpand) {
|
|
115
|
-
this.refreshButtonList()
|
|
116
|
-
}
|
|
117
|
-
this.initExpand = true
|
|
118
|
-
} else {
|
|
112
|
+
this.isExpand = !this.form?.isCollapse
|
|
113
|
+
if (!this.isExpand) {
|
|
119
114
|
this.refreshButtonList()
|
|
120
115
|
}
|
|
116
|
+
this.initExpand = true
|
|
121
117
|
})
|
|
122
118
|
},
|
|
123
119
|
computed: {
|
|
@@ -180,14 +176,14 @@ export default defineComponent({
|
|
|
180
176
|
},
|
|
181
177
|
// 切换显示模式
|
|
182
178
|
switchMode(e) {
|
|
183
|
-
let target =
|
|
179
|
+
let target = e?.target
|
|
184
180
|
// 点击的是i、span、button中的哪一个
|
|
185
|
-
if (target
|
|
186
|
-
target =
|
|
187
|
-
} else if (target
|
|
188
|
-
target =
|
|
181
|
+
if (target?.nodeName == 'SPAN') {
|
|
182
|
+
target = target.parentNode
|
|
183
|
+
} else if (target?.nodeName == 'I') {
|
|
184
|
+
target = target.parentNode.parentNode
|
|
189
185
|
}
|
|
190
|
-
target
|
|
186
|
+
target?.blur?.()
|
|
191
187
|
this.isExpand = !this.isExpand
|
|
192
188
|
this.form?.$emit('isCollapseChange', this.isExpand)
|
|
193
189
|
this.refreshButtonList()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-form-item",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
"url": "http://gitlab.94ai.pro/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^
|
|
18
|
-
"vue-demi": "^0.14.5"
|
|
17
|
+
"@94ai/nf-theme-chalk": "^10.0.0",
|
|
18
|
+
"vue-demi": "^0.14.5",
|
|
19
|
+
"@94ai/vue2-runtime-helpers": "1.0.1"
|
|
19
20
|
},
|
|
20
21
|
"peerDependenciesMeta": {
|
|
21
22
|
"@vue/composition-api": {
|
|
@@ -24,11 +25,10 @@
|
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"@vue/composition-api": "^1.0.0-rc.1",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
28
|
+
"vue": "^2.0.0 || >=3.0.0",
|
|
29
|
+
"element-ui": ">=2.13.2"
|
|
29
30
|
},
|
|
30
31
|
"types": "lib/index.d.ts",
|
|
31
32
|
"main": "lib/nf-form-item.cjs.js",
|
|
32
|
-
"module": "lib/nf-form-item.esm-bundler.js"
|
|
33
|
-
"gitHead": "afe3016f0e42dfb7fedf6cbbe400ec08bf4b8662"
|
|
33
|
+
"module": "lib/nf-form-item.esm-bundler.js"
|
|
34
34
|
}
|