@opentiny/vue-dropdown-item 2.8.3 → 2.10.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.js +27 -21
- package/lib/mobile-first.js +3 -7
- package/lib/pc.js +18 -6
- package/package.json +8 -6
- package/src/index.d.ts +73 -46
- package/src/mobile-first.vue.d.ts +2 -2
- package/src/mobile.vue.d.ts +2 -2
- package/src/pc.vue.d.ts +2 -2
package/lib/index.js
CHANGED
|
@@ -46,8 +46,16 @@ var DropdownItem = defineComponent({
|
|
|
46
46
|
icon: [String, Object],
|
|
47
47
|
disabled: Boolean,
|
|
48
48
|
divided: Boolean,
|
|
49
|
-
|
|
49
|
+
itemData: {
|
|
50
|
+
type: [String, Object],
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
50
53
|
title: String,
|
|
54
|
+
label: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
level: String,
|
|
51
59
|
titleClass: String,
|
|
52
60
|
options: {
|
|
53
61
|
type: Array,
|
|
@@ -59,24 +67,6 @@ var DropdownItem = defineComponent({
|
|
|
59
67
|
type: String,
|
|
60
68
|
default: "selection"
|
|
61
69
|
},
|
|
62
|
-
label: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: ""
|
|
65
|
-
},
|
|
66
|
-
itemData: {
|
|
67
|
-
type: Object,
|
|
68
|
-
default: function _default3() {
|
|
69
|
-
return {};
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
appendToBody: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: true
|
|
75
|
-
},
|
|
76
|
-
textField: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: "label"
|
|
79
|
-
},
|
|
80
70
|
selected: {
|
|
81
71
|
type: Boolean,
|
|
82
72
|
default: false
|
|
@@ -91,9 +81,25 @@ var DropdownItem = defineComponent({
|
|
|
91
81
|
},
|
|
92
82
|
currentIndex: {
|
|
93
83
|
type: Number,
|
|
94
|
-
default: function
|
|
84
|
+
default: function _default3() {
|
|
95
85
|
return -1;
|
|
96
86
|
}
|
|
87
|
+
},
|
|
88
|
+
appendToBody: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: true
|
|
91
|
+
},
|
|
92
|
+
textField: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "label"
|
|
95
|
+
},
|
|
96
|
+
tip: {
|
|
97
|
+
type: [String, Function],
|
|
98
|
+
default: ""
|
|
99
|
+
},
|
|
100
|
+
tipPosition: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: "right"
|
|
97
103
|
}
|
|
98
104
|
}),
|
|
99
105
|
setup: function setup(props, context) {
|
|
@@ -104,7 +110,7 @@ var DropdownItem = defineComponent({
|
|
|
104
110
|
});
|
|
105
111
|
}
|
|
106
112
|
});
|
|
107
|
-
var version = "
|
|
113
|
+
var version = "2.10.0";
|
|
108
114
|
DropdownItem.model = {
|
|
109
115
|
prop: "modelValue",
|
|
110
116
|
event: "update:modelValue"
|
package/lib/mobile-first.js
CHANGED
|
@@ -70,15 +70,11 @@ var render = function render2() {
|
|
|
70
70
|
var _h = _vm.$createElement;
|
|
71
71
|
var _c = _vm._self._c || _h;
|
|
72
72
|
return _c("li", {
|
|
73
|
-
class:
|
|
74
|
-
"text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4": !_vm.disabled
|
|
75
|
-
}, {
|
|
76
|
-
"cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled": _vm.disabled
|
|
77
|
-
}, {
|
|
73
|
+
class: _vm.m("list-none leading-10 sm:leading-8 m-0 outline-0 min-w-[theme(spacing.18)] max-w-[theme(spacing.52)] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", _vm.disabled ? "cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled" : "text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4 cursor-pointer", {
|
|
78
74
|
"text-color-brand-focus": _vm.dataStore.checkedStatus && _vm.selected
|
|
79
75
|
}, {
|
|
80
|
-
"!px-0
|
|
81
|
-
}
|
|
76
|
+
"!px-0": _vm.dataStore.multiStage
|
|
77
|
+
}),
|
|
82
78
|
attrs: {
|
|
83
79
|
"aria-disabled": _vm.disabled,
|
|
84
80
|
"tabindex": _vm.disabled ? null : -1
|
package/lib/pc.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, $prefix, props, setup as _setup } from "@opentiny/vue-common";
|
|
2
2
|
import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
|
|
3
3
|
import { iconDeltaLeft } from "@opentiny/vue-icon";
|
|
4
|
+
import Tooltip from "@opentiny/vue-tooltip";
|
|
4
5
|
import "@opentiny/vue-theme/dropdown-item/index.css";
|
|
5
6
|
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
6
7
|
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
@@ -60,9 +61,10 @@ var __vue2_script = defineComponent({
|
|
|
60
61
|
name: $prefix + "DropdownItem",
|
|
61
62
|
componentName: $prefix + "DropdownItem",
|
|
62
63
|
emits: ["item-click"],
|
|
63
|
-
props: [].concat(props, ["
|
|
64
|
+
props: [].concat(props, ["disabled", "divided", "icon", "itemData", "title", "titleClass", "options", "type", "label", "appendToBody", "textField", "selected", "selectedField", "multiStage", "currentIndex", "tip", "tipPosition"]),
|
|
64
65
|
components: {
|
|
65
|
-
IconDeltaLeft: iconDeltaLeft()
|
|
66
|
+
IconDeltaLeft: iconDeltaLeft(),
|
|
67
|
+
TinyTooltip: Tooltip
|
|
66
68
|
},
|
|
67
69
|
setup: function setup(props2, context) {
|
|
68
70
|
return _setup({
|
|
@@ -77,7 +79,12 @@ var render = function render2() {
|
|
|
77
79
|
var _vm = this;
|
|
78
80
|
var _h = _vm.$createElement;
|
|
79
81
|
var _c = _vm._self._c || _h;
|
|
80
|
-
return _c("
|
|
82
|
+
return _c("tiny-tooltip", {
|
|
83
|
+
attrs: {
|
|
84
|
+
"content": _vm.getTip,
|
|
85
|
+
"placement": _vm.tipPosition
|
|
86
|
+
}
|
|
87
|
+
}, [_c("li", {
|
|
81
88
|
ref: "dropdownItem",
|
|
82
89
|
staticClass: "tiny-dropdown-item tiny-dropdown-menu__item",
|
|
83
90
|
class: {
|
|
@@ -90,7 +97,10 @@ var render = function render2() {
|
|
|
90
97
|
"tabindex": _vm.disabled ? null : -1
|
|
91
98
|
},
|
|
92
99
|
on: {
|
|
93
|
-
"click":
|
|
100
|
+
"click": function click($event) {
|
|
101
|
+
$event.stopPropagation();
|
|
102
|
+
return _vm.handleClick.apply(null, arguments);
|
|
103
|
+
},
|
|
94
104
|
"mousedown": function mousedown($event) {
|
|
95
105
|
$event.stopPropagation();
|
|
96
106
|
}
|
|
@@ -120,12 +130,14 @@ var render = function render2() {
|
|
|
120
130
|
"item-data": item,
|
|
121
131
|
"icon": item.icon,
|
|
122
132
|
"disabled": item.disabled,
|
|
123
|
-
"divided": item.divided
|
|
133
|
+
"divided": item.divided,
|
|
134
|
+
"tip": item.tip,
|
|
135
|
+
"tip-position": item.tipPosition
|
|
124
136
|
}
|
|
125
137
|
}, [_vm._t("default", null, {
|
|
126
138
|
"itemData": item
|
|
127
139
|
})], 2);
|
|
128
|
-
}), 1) : _vm._e()])]);
|
|
140
|
+
}), 1) : _vm._e()])])]);
|
|
129
141
|
};
|
|
130
142
|
var staticRenderFns = [];
|
|
131
143
|
var __cssModules = {};
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
|
+
"type": "module",
|
|
8
9
|
"dependencies": {
|
|
9
|
-
"@opentiny/vue-common": "~2.
|
|
10
|
-
"@opentiny/vue-icon": "~2.
|
|
11
|
-
"@opentiny/vue-renderless": "~3.
|
|
12
|
-
"@opentiny/vue-popup": "~2.
|
|
13
|
-
"@opentiny/vue-button": "~2.
|
|
10
|
+
"@opentiny/vue-common": "~2.10.0",
|
|
11
|
+
"@opentiny/vue-icon": "~2.10.0",
|
|
12
|
+
"@opentiny/vue-renderless": "~3.10.0",
|
|
13
|
+
"@opentiny/vue-popup": "~2.10.0",
|
|
14
|
+
"@opentiny/vue-button": "~2.10.0",
|
|
15
|
+
"@opentiny/vue-tooltip": "~2.10.0"
|
|
14
16
|
},
|
|
15
17
|
"license": "MIT",
|
|
16
18
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 - present TinyVue Authors.
|
|
3
|
+
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
|
6
|
+
*
|
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
1
12
|
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
13
|
_constants: {
|
|
3
14
|
type: ObjectConstructor;
|
|
@@ -10,30 +21,22 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
10
21
|
icon: (ObjectConstructor | StringConstructor)[];
|
|
11
22
|
disabled: BooleanConstructor;
|
|
12
23
|
divided: BooleanConstructor;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
titleClass: StringConstructor;
|
|
16
|
-
options: {
|
|
17
|
-
type: ArrayConstructor;
|
|
18
|
-
default: () => never[];
|
|
19
|
-
};
|
|
20
|
-
type: {
|
|
21
|
-
type: StringConstructor;
|
|
24
|
+
itemData: {
|
|
25
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
22
26
|
default: string;
|
|
23
27
|
};
|
|
28
|
+
title: StringConstructor;
|
|
24
29
|
label: {
|
|
25
30
|
type: StringConstructor;
|
|
26
31
|
default: string;
|
|
27
32
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
33
|
+
level: StringConstructor;
|
|
34
|
+
titleClass: StringConstructor;
|
|
35
|
+
options: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
default: () => never[];
|
|
35
38
|
};
|
|
36
|
-
|
|
39
|
+
type: {
|
|
37
40
|
type: StringConstructor;
|
|
38
41
|
default: string;
|
|
39
42
|
};
|
|
@@ -53,6 +56,22 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
53
56
|
type: NumberConstructor;
|
|
54
57
|
default: () => number;
|
|
55
58
|
};
|
|
59
|
+
appendToBody: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
textField: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
tip: {
|
|
68
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
tipPosition: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
56
75
|
tiny_mode: StringConstructor;
|
|
57
76
|
tiny_mode_root: BooleanConstructor;
|
|
58
77
|
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
@@ -61,90 +80,98 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
61
80
|
tiny_chart_theme: ObjectConstructor;
|
|
62
81
|
}, {
|
|
63
82
|
label: string;
|
|
64
|
-
options: unknown[];
|
|
65
|
-
textField: string;
|
|
66
83
|
type: string;
|
|
84
|
+
selected: boolean;
|
|
85
|
+
disabled: boolean;
|
|
67
86
|
tiny_mode_root: boolean;
|
|
68
87
|
_constants: Record<string, any>;
|
|
69
|
-
|
|
88
|
+
options: unknown[];
|
|
89
|
+
textField: string;
|
|
70
90
|
appendToBody: boolean;
|
|
71
|
-
|
|
91
|
+
tip: string;
|
|
92
|
+
multiStage: boolean;
|
|
72
93
|
divided: boolean;
|
|
73
|
-
itemData:
|
|
94
|
+
itemData: string;
|
|
74
95
|
selectedField: string;
|
|
75
|
-
multiStage: boolean;
|
|
76
96
|
currentIndex: number;
|
|
97
|
+
tipPosition: string;
|
|
77
98
|
} & {
|
|
78
|
-
tiny_mode?: string | undefined;
|
|
79
99
|
title?: string | undefined;
|
|
100
|
+
tiny_mode?: string | undefined;
|
|
80
101
|
tiny_template?: unknown;
|
|
81
102
|
tiny_renderless?: Function | undefined;
|
|
82
103
|
tiny_theme?: string | undefined;
|
|
83
104
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
84
105
|
icon?: unknown;
|
|
106
|
+
level?: string | undefined;
|
|
85
107
|
titleClass?: string | undefined;
|
|
86
|
-
command?: unknown;
|
|
87
108
|
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
|
|
88
109
|
label: string;
|
|
89
|
-
options: unknown[];
|
|
90
|
-
textField: string;
|
|
91
110
|
type: string;
|
|
111
|
+
selected: boolean;
|
|
112
|
+
disabled: boolean;
|
|
92
113
|
tiny_mode_root: boolean;
|
|
93
114
|
_constants: Record<string, any>;
|
|
94
|
-
|
|
115
|
+
options: unknown[];
|
|
116
|
+
textField: string;
|
|
95
117
|
appendToBody: boolean;
|
|
96
|
-
|
|
118
|
+
tip: string;
|
|
119
|
+
multiStage: boolean;
|
|
97
120
|
divided: boolean;
|
|
98
|
-
itemData:
|
|
121
|
+
itemData: string;
|
|
99
122
|
selectedField: string;
|
|
100
|
-
multiStage: boolean;
|
|
101
123
|
currentIndex: number;
|
|
124
|
+
tipPosition: string;
|
|
102
125
|
} & {
|
|
103
|
-
tiny_mode?: string | undefined;
|
|
104
126
|
title?: string | undefined;
|
|
127
|
+
tiny_mode?: string | undefined;
|
|
105
128
|
tiny_template?: unknown;
|
|
106
129
|
tiny_renderless?: Function | undefined;
|
|
107
130
|
tiny_theme?: string | undefined;
|
|
108
131
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
109
132
|
icon?: unknown;
|
|
133
|
+
level?: string | undefined;
|
|
110
134
|
titleClass?: string | undefined;
|
|
111
|
-
command?: unknown;
|
|
112
135
|
}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<() => import("vue").VNode>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
|
|
113
136
|
label: string;
|
|
114
|
-
options: unknown[];
|
|
115
|
-
textField: string;
|
|
116
137
|
type: string;
|
|
138
|
+
selected: boolean;
|
|
139
|
+
disabled: boolean;
|
|
117
140
|
tiny_mode_root: boolean;
|
|
118
141
|
_constants: Record<string, any>;
|
|
119
|
-
|
|
142
|
+
options: unknown[];
|
|
143
|
+
textField: string;
|
|
120
144
|
appendToBody: boolean;
|
|
121
|
-
|
|
145
|
+
tip: string;
|
|
146
|
+
multiStage: boolean;
|
|
122
147
|
divided: boolean;
|
|
123
|
-
itemData:
|
|
148
|
+
itemData: string;
|
|
124
149
|
selectedField: string;
|
|
125
|
-
multiStage: boolean;
|
|
126
150
|
currentIndex: number;
|
|
151
|
+
tipPosition: string;
|
|
127
152
|
} & {
|
|
128
|
-
tiny_mode?: string | undefined;
|
|
129
153
|
title?: string | undefined;
|
|
154
|
+
tiny_mode?: string | undefined;
|
|
130
155
|
tiny_template?: unknown;
|
|
131
156
|
tiny_renderless?: Function | undefined;
|
|
132
157
|
tiny_theme?: string | undefined;
|
|
133
158
|
tiny_chart_theme?: Record<string, any> | undefined;
|
|
134
159
|
icon?: unknown;
|
|
160
|
+
level?: string | undefined;
|
|
135
161
|
titleClass?: string | undefined;
|
|
136
|
-
command?: unknown;
|
|
137
162
|
}, {
|
|
138
163
|
label: string;
|
|
139
|
-
options: unknown[];
|
|
140
|
-
textField: string;
|
|
141
164
|
type: string;
|
|
165
|
+
selected: boolean;
|
|
142
166
|
_constants: Record<string, any>;
|
|
167
|
+
options: unknown[];
|
|
168
|
+
textField: string;
|
|
143
169
|
appendToBody: boolean;
|
|
144
|
-
|
|
145
|
-
itemData: Record<string, any>;
|
|
146
|
-
selectedField: string;
|
|
170
|
+
tip: string;
|
|
147
171
|
multiStage: boolean;
|
|
172
|
+
itemData: string;
|
|
173
|
+
selectedField: string;
|
|
148
174
|
currentIndex: number;
|
|
175
|
+
tipPosition: string;
|
|
149
176
|
}, true>);
|
|
150
177
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: 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;
|
|
@@ -9,4 +9,4 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
9
9
|
} & {}, {
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
}, true>);
|
|
12
|
-
export default
|
|
12
|
+
export default _default;
|
package/src/mobile.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: 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?: {}) => {};
|
|
@@ -27,4 +27,4 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
27
27
|
} & {}, {
|
|
28
28
|
[x: string]: any;
|
|
29
29
|
}, true>);
|
|
30
|
-
export default
|
|
30
|
+
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: 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?: {}) => {};
|
|
@@ -27,4 +27,4 @@ declare const _sfc_main: import("vue").ComponentOptions<import("vue").default, i
|
|
|
27
27
|
} & {}, {
|
|
28
28
|
[x: string]: any;
|
|
29
29
|
}, true>);
|
|
30
|
-
export default
|
|
30
|
+
export default _default;
|