@opentiny/vue-dropdown-item 3.8.0 → 3.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 +4 -4
- package/package.json +6 -6
- package/src/index.d.ts +1 -123
- package/src/mobile-first.vue.d.ts +1 -7
- package/src/mobile.vue.d.ts +1 -1
- package/src/pc.vue.d.ts +1 -18
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
|
@@ -2,7 +2,7 @@ import { defineComponent, $prefix, props, setup as _setup } from "@opentiny/vue-
|
|
|
2
2
|
import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
|
|
3
3
|
import { iconDeltaLeft } from "@opentiny/vue-icon";
|
|
4
4
|
import "@opentiny/vue-theme/dropdown-item/index.css";
|
|
5
|
-
import { resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, withModifiers,
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, withModifiers, createBlock, resolveDynamicComponent, renderSlot, toDisplayString, renderList, withCtx } from "vue";
|
|
6
6
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
7
7
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
8
8
|
if (it)
|
|
@@ -77,7 +77,6 @@ var _hoisted_4 = {
|
|
|
77
77
|
class: "tiny-dropdown-item__content tiny-dropdown-menu__item-content"
|
|
78
78
|
};
|
|
79
79
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
80
|
-
var _component_icon_delta_left = resolveComponent("icon-delta-left");
|
|
81
80
|
var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
|
|
82
81
|
return openBlock(), createElementBlock(
|
|
83
82
|
Fragment,
|
|
@@ -85,7 +84,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
84
|
[createCommentVNode(" TINY-TODO: tiny-dropdown-menu__item命名不规范,后续统一有个迭代去掉 "), createElementVNode("li", {
|
|
86
85
|
class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
|
|
87
86
|
"is-disabled": _ctx.disabled,
|
|
88
|
-
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided
|
|
87
|
+
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
|
|
88
|
+
"has-children": _ctx.itemData.children && _ctx.itemData.children.length
|
|
89
89
|
}]),
|
|
90
90
|
ref: "dropdownItem",
|
|
91
91
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
@@ -95,7 +95,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
95
95
|
}, ["stop"])),
|
|
96
96
|
"aria-disabled": _ctx.disabled,
|
|
97
97
|
tabindex: _ctx.disabled ? null : -1
|
|
98
|
-
}, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [
|
|
98
|
+
}, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
|
|
99
99
|
key: 0,
|
|
100
100
|
class: "tiny-svg-size"
|
|
101
101
|
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@opentiny/vue-common": "~3.8.
|
|
9
|
-
"@opentiny/vue-icon": "~3.8.
|
|
10
|
-
"@opentiny/vue-renderless": "~3.8.
|
|
11
|
-
"@opentiny/vue-popup": "~3.8.
|
|
12
|
-
"@opentiny/vue-button": "~3.8.
|
|
8
|
+
"@opentiny/vue-common": "~3.8.2",
|
|
9
|
+
"@opentiny/vue-icon": "~3.8.2",
|
|
10
|
+
"@opentiny/vue-renderless": "~3.8.2",
|
|
11
|
+
"@opentiny/vue-popup": "~3.8.2",
|
|
12
|
+
"@opentiny/vue-button": "~3.8.2"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -1,124 +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
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
57
|
-
icon: (StringConstructor | ObjectConstructor)[];
|
|
58
|
-
disabled: BooleanConstructor;
|
|
59
|
-
divided: BooleanConstructor;
|
|
60
|
-
command: {};
|
|
61
|
-
title: StringConstructor;
|
|
62
|
-
titleClass: StringConstructor;
|
|
63
|
-
options: {
|
|
64
|
-
type: ArrayConstructor;
|
|
65
|
-
default: () => never[];
|
|
66
|
-
};
|
|
67
|
-
type: {
|
|
68
|
-
type: StringConstructor;
|
|
69
|
-
default: string;
|
|
70
|
-
};
|
|
71
|
-
label: {
|
|
72
|
-
type: StringConstructor;
|
|
73
|
-
default: string;
|
|
74
|
-
};
|
|
75
|
-
itemData: {
|
|
76
|
-
type: ObjectConstructor;
|
|
77
|
-
default: () => {};
|
|
78
|
-
};
|
|
79
|
-
appendToBody: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
default: boolean;
|
|
82
|
-
};
|
|
83
|
-
textField: {
|
|
84
|
-
type: StringConstructor;
|
|
85
|
-
default: string;
|
|
86
|
-
};
|
|
87
|
-
selected: {
|
|
88
|
-
type: BooleanConstructor;
|
|
89
|
-
default: boolean;
|
|
90
|
-
};
|
|
91
|
-
selectedField: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
multiStage: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: boolean;
|
|
98
|
-
};
|
|
99
|
-
currentIndex: {
|
|
100
|
-
type: NumberConstructor;
|
|
101
|
-
default: () => number;
|
|
102
|
-
};
|
|
103
|
-
tiny_mode: StringConstructor;
|
|
104
|
-
tiny_mode_root: BooleanConstructor;
|
|
105
|
-
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
106
|
-
tiny_renderless: FunctionConstructor;
|
|
107
|
-
tiny_theme: StringConstructor;
|
|
108
|
-
tiny_chart_theme: ObjectConstructor;
|
|
109
|
-
}>>, {
|
|
110
|
-
type: string;
|
|
111
|
-
disabled: boolean;
|
|
112
|
-
tiny_mode_root: boolean;
|
|
113
|
-
label: string;
|
|
114
|
-
options: unknown[];
|
|
115
|
-
textField: string;
|
|
116
|
-
selected: boolean;
|
|
117
|
-
divided: boolean;
|
|
118
|
-
itemData: Record<string, any>;
|
|
119
|
-
appendToBody: boolean;
|
|
120
|
-
selectedField: string;
|
|
121
|
-
multiStage: boolean;
|
|
122
|
-
currentIndex: number;
|
|
123
|
-
}>;
|
|
1
|
+
declare const _default: any;
|
|
124
2
|
export default _default;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
}>, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
}>>>, {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}>;
|
|
1
|
+
declare const _sfc_main: any;
|
|
8
2
|
export default _sfc_main;
|
package/src/mobile.vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
1
|
+
declare const _sfc_main: any;
|
|
2
2
|
export default _sfc_main;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
declare const _sfc_main:
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
}>, {
|
|
4
|
-
t: (this: any, path: any, options?: any) => any;
|
|
5
|
-
vm: any;
|
|
6
|
-
f: (props: any, attrs?: {}) => {};
|
|
7
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
8
|
-
d: (props: any) => void;
|
|
9
|
-
dp: (props: any) => void;
|
|
10
|
-
gcls: (key: any) => any;
|
|
11
|
-
m: (...cssClasses: any[]) => string;
|
|
12
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "item-click"[], "item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
}>>> & {
|
|
15
|
-
"onItem-click"?: ((...args: any[]) => any) | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
}>;
|
|
1
|
+
declare const _sfc_main: any;
|
|
19
2
|
export default _sfc_main;
|