@opentiny/vue-dropdown-item 2.8.0 → 2.8.3
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.js +22 -7
- package/lib/pc.js +5 -2
- package/package.json +7 -6
- package/src/index.d.ts +37 -25
- package/src/mobile-first.vue.d.ts +3 -3
- package/src/mobile.vue.d.ts +5 -5
- package/src/pc.vue.d.ts +5 -5
package/lib/index.js
CHANGED
|
@@ -17,17 +17,32 @@ import PcTemplate from "./pc.js";
|
|
|
17
17
|
import MobileTemplate from "./mobile.js";
|
|
18
18
|
import MobileFirstTemplate from "./mobile-first.js";
|
|
19
19
|
var template = function template2(mode) {
|
|
20
|
-
if ("
|
|
20
|
+
if ("pc" === (process.env.TINY_MODE || mode)) {
|
|
21
|
+
return PcTemplate;
|
|
22
|
+
}
|
|
23
|
+
if ("mobile" === (process.env.TINY_MODE || mode)) {
|
|
21
24
|
return MobileTemplate;
|
|
22
|
-
|
|
25
|
+
}
|
|
26
|
+
if ("mobile-first" === (process.env.TINY_MODE || mode)) {
|
|
23
27
|
return MobileFirstTemplate;
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
}
|
|
29
|
+
return PcTemplate;
|
|
30
|
+
};
|
|
31
|
+
var $constants = {
|
|
32
|
+
ICON_MAP: {
|
|
33
|
+
leftWardArrow: "icon-delta-left"
|
|
34
|
+
}
|
|
26
35
|
};
|
|
27
36
|
var DropdownItem = defineComponent({
|
|
28
37
|
name: $prefix + "DropdownItem",
|
|
29
38
|
componentName: "TinyDropdownItem",
|
|
30
39
|
props: _extends({}, $props, {
|
|
40
|
+
_constants: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: function _default() {
|
|
43
|
+
return $constants;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
31
46
|
icon: [String, Object],
|
|
32
47
|
disabled: Boolean,
|
|
33
48
|
divided: Boolean,
|
|
@@ -36,7 +51,7 @@ var DropdownItem = defineComponent({
|
|
|
36
51
|
titleClass: String,
|
|
37
52
|
options: {
|
|
38
53
|
type: Array,
|
|
39
|
-
default: function
|
|
54
|
+
default: function _default2() {
|
|
40
55
|
return [];
|
|
41
56
|
}
|
|
42
57
|
},
|
|
@@ -50,7 +65,7 @@ var DropdownItem = defineComponent({
|
|
|
50
65
|
},
|
|
51
66
|
itemData: {
|
|
52
67
|
type: Object,
|
|
53
|
-
default: function
|
|
68
|
+
default: function _default3() {
|
|
54
69
|
return {};
|
|
55
70
|
}
|
|
56
71
|
},
|
|
@@ -76,7 +91,7 @@ var DropdownItem = defineComponent({
|
|
|
76
91
|
},
|
|
77
92
|
currentIndex: {
|
|
78
93
|
type: Number,
|
|
79
|
-
default: function
|
|
94
|
+
default: function _default4() {
|
|
80
95
|
return -1;
|
|
81
96
|
}
|
|
82
97
|
}
|
package/lib/pc.js
CHANGED
|
@@ -82,7 +82,8 @@ var render = function render2() {
|
|
|
82
82
|
staticClass: "tiny-dropdown-item tiny-dropdown-menu__item",
|
|
83
83
|
class: {
|
|
84
84
|
"is-disabled": _vm.disabled,
|
|
85
|
-
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _vm.divided
|
|
85
|
+
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _vm.divided,
|
|
86
|
+
"has-children": _vm.itemData.children && _vm.itemData.children.length
|
|
86
87
|
},
|
|
87
88
|
attrs: {
|
|
88
89
|
"aria-disabled": _vm.disabled,
|
|
@@ -98,7 +99,9 @@ var render = function render2() {
|
|
|
98
99
|
staticClass: "tiny-dropdown-item__wrap"
|
|
99
100
|
}, [_vm.itemData.children && _vm.itemData.children.length ? _c("span", {
|
|
100
101
|
staticClass: "tiny-dropdown-item__expand tiny-dropdown-menu__item-expand"
|
|
101
|
-
}, [_c(
|
|
102
|
+
}, [_c(_vm.state.getIcon, {
|
|
103
|
+
tag: "component"
|
|
104
|
+
})], 1) : _vm._e(), _c("div", {
|
|
102
105
|
staticClass: "tiny-dropdown-item__content tiny-dropdown-menu__item-content"
|
|
103
106
|
}, [_vm.icon ? _c(_vm.icon, {
|
|
104
107
|
tag: "component",
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"dependencies": {
|
|
8
|
-
"@opentiny/vue-common": "~2.8.
|
|
9
|
-
"@opentiny/vue-icon": "~2.8.
|
|
10
|
-
"@opentiny/vue-renderless": "~3.8.
|
|
11
|
-
"@opentiny/vue-popup": "~2.8.
|
|
12
|
-
"@opentiny/vue-button": "~2.8.
|
|
9
|
+
"@opentiny/vue-common": "~2.8.3",
|
|
10
|
+
"@opentiny/vue-icon": "~2.8.3",
|
|
11
|
+
"@opentiny/vue-renderless": "~3.8.3",
|
|
12
|
+
"@opentiny/vue-popup": "~2.8.3",
|
|
13
|
+
"@opentiny/vue-button": "~2.8.3"
|
|
13
14
|
},
|
|
14
15
|
"license": "MIT",
|
|
15
16
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<() => import("vue").VNode> & import("@vue/composition-api").Data, {}, {}, {
|
|
2
|
-
|
|
1
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<() => import("vue").VNode> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
2
|
+
_constants: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
ICON_MAP: {
|
|
6
|
+
leftWardArrow: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
icon: (ObjectConstructor | StringConstructor)[];
|
|
3
11
|
disabled: BooleanConstructor;
|
|
4
12
|
divided: BooleanConstructor;
|
|
5
13
|
command: {};
|
|
@@ -47,90 +55,94 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
47
55
|
};
|
|
48
56
|
tiny_mode: StringConstructor;
|
|
49
57
|
tiny_mode_root: BooleanConstructor;
|
|
50
|
-
tiny_template: (
|
|
58
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
51
59
|
tiny_renderless: FunctionConstructor;
|
|
52
60
|
tiny_theme: StringConstructor;
|
|
53
61
|
tiny_chart_theme: ObjectConstructor;
|
|
54
62
|
}, {
|
|
55
|
-
type: string;
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
tiny_mode_root: boolean;
|
|
58
63
|
label: string;
|
|
59
64
|
options: unknown[];
|
|
60
65
|
textField: string;
|
|
66
|
+
type: string;
|
|
67
|
+
tiny_mode_root: boolean;
|
|
68
|
+
_constants: Record<string, any>;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
appendToBody: boolean;
|
|
61
71
|
selected: boolean;
|
|
62
72
|
divided: boolean;
|
|
63
73
|
itemData: Record<string, any>;
|
|
64
|
-
appendToBody: boolean;
|
|
65
74
|
selectedField: string;
|
|
66
75
|
multiStage: boolean;
|
|
67
76
|
currentIndex: number;
|
|
68
77
|
} & {
|
|
69
|
-
title?: string | undefined;
|
|
70
78
|
tiny_mode?: string | undefined;
|
|
79
|
+
title?: string | undefined;
|
|
71
80
|
tiny_template?: unknown;
|
|
72
81
|
tiny_renderless?: Function | undefined;
|
|
73
82
|
tiny_theme?: string | undefined;
|
|
74
83
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
75
|
-
titleClass?: string | undefined;
|
|
76
84
|
icon?: unknown;
|
|
85
|
+
titleClass?: string | undefined;
|
|
77
86
|
command?: unknown;
|
|
78
|
-
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
79
|
-
type: string;
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
tiny_mode_root: boolean;
|
|
87
|
+
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
|
|
82
88
|
label: string;
|
|
83
89
|
options: unknown[];
|
|
84
90
|
textField: string;
|
|
91
|
+
type: string;
|
|
92
|
+
tiny_mode_root: boolean;
|
|
93
|
+
_constants: Record<string, any>;
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
appendToBody: boolean;
|
|
85
96
|
selected: boolean;
|
|
86
97
|
divided: boolean;
|
|
87
98
|
itemData: Record<string, any>;
|
|
88
|
-
appendToBody: boolean;
|
|
89
99
|
selectedField: string;
|
|
90
100
|
multiStage: boolean;
|
|
91
101
|
currentIndex: number;
|
|
92
102
|
} & {
|
|
93
|
-
title?: string | undefined;
|
|
94
103
|
tiny_mode?: string | undefined;
|
|
104
|
+
title?: string | undefined;
|
|
95
105
|
tiny_template?: unknown;
|
|
96
106
|
tiny_renderless?: Function | undefined;
|
|
97
107
|
tiny_theme?: string | undefined;
|
|
98
108
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
99
|
-
titleClass?: string | undefined;
|
|
100
109
|
icon?: unknown;
|
|
110
|
+
titleClass?: string | undefined;
|
|
101
111
|
command?: unknown;
|
|
102
|
-
}, import("@vue/composition-api").ShallowUnwrapRef<() => import("vue").VNode>, import("@vue/composition-api").Data, {}, {}, {
|
|
103
|
-
type: string;
|
|
104
|
-
disabled: boolean;
|
|
105
|
-
tiny_mode_root: boolean;
|
|
112
|
+
}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<() => import("vue").VNode>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
106
113
|
label: string;
|
|
107
114
|
options: unknown[];
|
|
108
115
|
textField: string;
|
|
116
|
+
type: string;
|
|
117
|
+
tiny_mode_root: boolean;
|
|
118
|
+
_constants: Record<string, any>;
|
|
119
|
+
disabled: boolean;
|
|
120
|
+
appendToBody: boolean;
|
|
109
121
|
selected: boolean;
|
|
110
122
|
divided: boolean;
|
|
111
123
|
itemData: Record<string, any>;
|
|
112
|
-
appendToBody: boolean;
|
|
113
124
|
selectedField: string;
|
|
114
125
|
multiStage: boolean;
|
|
115
126
|
currentIndex: number;
|
|
116
127
|
} & {
|
|
117
|
-
title?: string | undefined;
|
|
118
128
|
tiny_mode?: string | undefined;
|
|
129
|
+
title?: string | undefined;
|
|
119
130
|
tiny_template?: unknown;
|
|
120
131
|
tiny_renderless?: Function | undefined;
|
|
121
132
|
tiny_theme?: string | undefined;
|
|
122
133
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
123
|
-
titleClass?: string | undefined;
|
|
124
134
|
icon?: unknown;
|
|
135
|
+
titleClass?: string | undefined;
|
|
125
136
|
command?: unknown;
|
|
126
137
|
}, {
|
|
127
|
-
type: string;
|
|
128
138
|
label: string;
|
|
129
139
|
options: unknown[];
|
|
130
140
|
textField: string;
|
|
141
|
+
type: string;
|
|
142
|
+
_constants: Record<string, any>;
|
|
143
|
+
appendToBody: boolean;
|
|
131
144
|
selected: boolean;
|
|
132
145
|
itemData: Record<string, any>;
|
|
133
|
-
appendToBody: boolean;
|
|
134
146
|
selectedField: string;
|
|
135
147
|
multiStage: boolean;
|
|
136
148
|
currentIndex: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<any> & import("@vue/composition-api").Data, {}, {}, Readonly<{
|
|
1
|
+
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<any> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
}>, {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
5
|
+
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<any>, import("@vue/composition-api").Data, {}, {}, {
|
|
7
|
+
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<any>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
8
8
|
[x: string]: any;
|
|
9
9
|
} & {}, {
|
|
10
10
|
[x: string]: any;
|
package/src/mobile.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
1
|
+
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
|
|
2
2
|
t: (this: any, path: any, options?: any) => any;
|
|
3
3
|
vm: any;
|
|
4
4
|
f: (props: any, attrs?: {}) => {};
|
|
@@ -7,13 +7,13 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
7
7
|
dp: (props: any) => void;
|
|
8
8
|
gcls: (key: any) => any;
|
|
9
9
|
m: (...cssClasses: any[]) => string;
|
|
10
|
-
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{
|
|
10
|
+
}> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
}>, {
|
|
13
13
|
[x: string]: any;
|
|
14
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
14
|
+
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
|
|
15
15
|
[x: string]: any;
|
|
16
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
16
|
+
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
|
|
17
17
|
t: (this: any, path: any, options?: any) => any;
|
|
18
18
|
vm: any;
|
|
19
19
|
f: (props: any, attrs?: {}) => {};
|
|
@@ -22,7 +22,7 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
22
22
|
dp: (props: any) => void;
|
|
23
23
|
gcls: (key: any) => any;
|
|
24
24
|
m: (...cssClasses: any[]) => string;
|
|
25
|
-
}>, import("@vue/composition-api").Data, {}, {}, {
|
|
25
|
+
}>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
26
26
|
[x: string]: any;
|
|
27
27
|
} & {}, {
|
|
28
28
|
[x: string]: any;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
1
|
+
declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
|
|
2
2
|
t: (this: any, path: any, options?: any) => any;
|
|
3
3
|
vm: any;
|
|
4
4
|
f: (props: any, attrs?: {}) => {};
|
|
@@ -7,13 +7,13 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
7
7
|
dp: (props: any) => void;
|
|
8
8
|
gcls: (key: any) => any;
|
|
9
9
|
m: (...cssClasses: any[]) => string;
|
|
10
|
-
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{
|
|
10
|
+
}> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
}>, {
|
|
13
13
|
[x: string]: any;
|
|
14
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
14
|
+
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
|
|
15
15
|
[x: string]: any;
|
|
16
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
16
|
+
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
|
|
17
17
|
t: (this: any, path: any, options?: any) => any;
|
|
18
18
|
vm: any;
|
|
19
19
|
f: (props: any, attrs?: {}) => {};
|
|
@@ -22,7 +22,7 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
22
22
|
dp: (props: any) => void;
|
|
23
23
|
gcls: (key: any) => any;
|
|
24
24
|
m: (...cssClasses: any[]) => string;
|
|
25
|
-
}>, import("@vue/composition-api").Data, {}, {}, {
|
|
25
|
+
}>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
26
26
|
[x: string]: any;
|
|
27
27
|
} & {}, {
|
|
28
28
|
[x: string]: any;
|