@opentiny/vue-dropdown-item 2.8.0 → 2.8.2
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 +6 -6
- package/src/index.d.ts +1 -137
- package/src/mobile-first.vue.d.ts +1 -11
- package/src/mobile.vue.d.ts +1 -29
- package/src/pc.vue.d.ts +1 -29
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,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"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.
|
|
8
|
+
"@opentiny/vue-common": "~2.8.2",
|
|
9
|
+
"@opentiny/vue-icon": "~2.8.2",
|
|
10
|
+
"@opentiny/vue-renderless": "~3.8.2",
|
|
11
|
+
"@opentiny/vue-popup": "~2.8.2",
|
|
12
|
+
"@opentiny/vue-button": "~2.8.2"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -1,138 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
2
|
-
icon: (StringConstructor | ObjectConstructor)[];
|
|
3
|
-
disabled: BooleanConstructor;
|
|
4
|
-
divided: BooleanConstructor;
|
|
5
|
-
command: {};
|
|
6
|
-
title: StringConstructor;
|
|
7
|
-
titleClass: StringConstructor;
|
|
8
|
-
options: {
|
|
9
|
-
type: ArrayConstructor;
|
|
10
|
-
default: () => never[];
|
|
11
|
-
};
|
|
12
|
-
type: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
label: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
itemData: {
|
|
21
|
-
type: ObjectConstructor;
|
|
22
|
-
default: () => {};
|
|
23
|
-
};
|
|
24
|
-
appendToBody: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
textField: {
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
default: string;
|
|
31
|
-
};
|
|
32
|
-
selected: {
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
|
-
selectedField: {
|
|
37
|
-
type: StringConstructor;
|
|
38
|
-
default: string;
|
|
39
|
-
};
|
|
40
|
-
multiStage: {
|
|
41
|
-
type: BooleanConstructor;
|
|
42
|
-
default: boolean;
|
|
43
|
-
};
|
|
44
|
-
currentIndex: {
|
|
45
|
-
type: NumberConstructor;
|
|
46
|
-
default: () => number;
|
|
47
|
-
};
|
|
48
|
-
tiny_mode: StringConstructor;
|
|
49
|
-
tiny_mode_root: BooleanConstructor;
|
|
50
|
-
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
51
|
-
tiny_renderless: FunctionConstructor;
|
|
52
|
-
tiny_theme: StringConstructor;
|
|
53
|
-
tiny_chart_theme: ObjectConstructor;
|
|
54
|
-
}, {
|
|
55
|
-
type: string;
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
tiny_mode_root: boolean;
|
|
58
|
-
label: string;
|
|
59
|
-
options: unknown[];
|
|
60
|
-
textField: string;
|
|
61
|
-
selected: boolean;
|
|
62
|
-
divided: boolean;
|
|
63
|
-
itemData: Record<string, any>;
|
|
64
|
-
appendToBody: boolean;
|
|
65
|
-
selectedField: string;
|
|
66
|
-
multiStage: boolean;
|
|
67
|
-
currentIndex: number;
|
|
68
|
-
} & {
|
|
69
|
-
title?: string | undefined;
|
|
70
|
-
tiny_mode?: string | undefined;
|
|
71
|
-
tiny_template?: unknown;
|
|
72
|
-
tiny_renderless?: Function | undefined;
|
|
73
|
-
tiny_theme?: string | undefined;
|
|
74
|
-
tiny_chart_theme?: Record<string, any> | undefined;
|
|
75
|
-
titleClass?: string | undefined;
|
|
76
|
-
icon?: unknown;
|
|
77
|
-
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;
|
|
82
|
-
label: string;
|
|
83
|
-
options: unknown[];
|
|
84
|
-
textField: string;
|
|
85
|
-
selected: boolean;
|
|
86
|
-
divided: boolean;
|
|
87
|
-
itemData: Record<string, any>;
|
|
88
|
-
appendToBody: boolean;
|
|
89
|
-
selectedField: string;
|
|
90
|
-
multiStage: boolean;
|
|
91
|
-
currentIndex: number;
|
|
92
|
-
} & {
|
|
93
|
-
title?: string | undefined;
|
|
94
|
-
tiny_mode?: string | undefined;
|
|
95
|
-
tiny_template?: unknown;
|
|
96
|
-
tiny_renderless?: Function | undefined;
|
|
97
|
-
tiny_theme?: string | undefined;
|
|
98
|
-
tiny_chart_theme?: Record<string, any> | undefined;
|
|
99
|
-
titleClass?: string | undefined;
|
|
100
|
-
icon?: unknown;
|
|
101
|
-
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;
|
|
106
|
-
label: string;
|
|
107
|
-
options: unknown[];
|
|
108
|
-
textField: string;
|
|
109
|
-
selected: boolean;
|
|
110
|
-
divided: boolean;
|
|
111
|
-
itemData: Record<string, any>;
|
|
112
|
-
appendToBody: boolean;
|
|
113
|
-
selectedField: string;
|
|
114
|
-
multiStage: boolean;
|
|
115
|
-
currentIndex: number;
|
|
116
|
-
} & {
|
|
117
|
-
title?: string | undefined;
|
|
118
|
-
tiny_mode?: string | undefined;
|
|
119
|
-
tiny_template?: unknown;
|
|
120
|
-
tiny_renderless?: Function | undefined;
|
|
121
|
-
tiny_theme?: string | undefined;
|
|
122
|
-
tiny_chart_theme?: Record<string, any> | undefined;
|
|
123
|
-
titleClass?: string | undefined;
|
|
124
|
-
icon?: unknown;
|
|
125
|
-
command?: unknown;
|
|
126
|
-
}, {
|
|
127
|
-
type: string;
|
|
128
|
-
label: string;
|
|
129
|
-
options: unknown[];
|
|
130
|
-
textField: string;
|
|
131
|
-
selected: boolean;
|
|
132
|
-
itemData: Record<string, any>;
|
|
133
|
-
appendToBody: boolean;
|
|
134
|
-
selectedField: string;
|
|
135
|
-
multiStage: boolean;
|
|
136
|
-
currentIndex: number;
|
|
137
|
-
}, true>);
|
|
1
|
+
declare const _default: any;
|
|
138
2
|
export default _default;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
}>, {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<any>, import("@vue/composition-api").Data, {}, {}, {
|
|
8
|
-
[x: string]: any;
|
|
9
|
-
} & {}, {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
}, true>);
|
|
1
|
+
declare const _sfc_main: any;
|
|
12
2
|
export default _sfc_main;
|
package/src/mobile.vue.d.ts
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
2
|
-
t: (this: any, path: any, options?: any) => any;
|
|
3
|
-
vm: any;
|
|
4
|
-
f: (props: any, attrs?: {}) => {};
|
|
5
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
6
|
-
d: (props: any) => void;
|
|
7
|
-
dp: (props: any) => void;
|
|
8
|
-
gcls: (key: any) => any;
|
|
9
|
-
m: (...cssClasses: any[]) => string;
|
|
10
|
-
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}>, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
17
|
-
t: (this: any, path: any, options?: any) => any;
|
|
18
|
-
vm: any;
|
|
19
|
-
f: (props: any, attrs?: {}) => {};
|
|
20
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
21
|
-
d: (props: any) => void;
|
|
22
|
-
dp: (props: any) => void;
|
|
23
|
-
gcls: (key: any) => any;
|
|
24
|
-
m: (...cssClasses: any[]) => string;
|
|
25
|
-
}>, import("@vue/composition-api").Data, {}, {}, {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
} & {}, {
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
}, true>);
|
|
1
|
+
declare const _sfc_main: any;
|
|
30
2
|
export default _sfc_main;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
2
|
-
t: (this: any, path: any, options?: any) => any;
|
|
3
|
-
vm: any;
|
|
4
|
-
f: (props: any, attrs?: {}) => {};
|
|
5
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
6
|
-
d: (props: any) => void;
|
|
7
|
-
dp: (props: any) => void;
|
|
8
|
-
gcls: (key: any) => any;
|
|
9
|
-
m: (...cssClasses: any[]) => string;
|
|
10
|
-
}> & import("@vue/composition-api").Data, {}, {}, Readonly<{
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}>, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
17
|
-
t: (this: any, path: any, options?: any) => any;
|
|
18
|
-
vm: any;
|
|
19
|
-
f: (props: any, attrs?: {}) => {};
|
|
20
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
21
|
-
d: (props: any) => void;
|
|
22
|
-
dp: (props: any) => void;
|
|
23
|
-
gcls: (key: any) => any;
|
|
24
|
-
m: (...cssClasses: any[]) => string;
|
|
25
|
-
}>, import("@vue/composition-api").Data, {}, {}, {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
} & {}, {
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
}, true>);
|
|
1
|
+
declare const _sfc_main: any;
|
|
30
2
|
export default _sfc_main;
|