@opentinyvue/vue-dropdown 2.22.0 → 3.22.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 +1 -1
- package/lib/mobile-first.js +50 -97
- package/lib/pc.js +67 -108
- package/package.json +7 -7
- package/src/index.d.ts +1 -1
- package/src/mobile-first.vue.d.ts +148 -1
- package/src/pc.vue.d.ts +1 -1
package/lib/index.js
CHANGED
package/lib/mobile-first.js
CHANGED
|
@@ -1,40 +1,3 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/dropdown/vue';
|
|
2
|
-
import { defineComponent, $prefix, directive, setup, h, $props } from '@opentinyvue/vue-common';
|
|
3
|
-
import Button from '@opentinyvue/vue-button';
|
|
4
|
-
import ButtonGroup from '@opentinyvue/vue-button-group';
|
|
5
|
-
import { Clickoutside } from '@opentinyvue/vue-directive';
|
|
6
|
-
import { IconChevronDown, IconChevronUp, IconArrowBottom } from '@opentinyvue/vue-icon';
|
|
7
|
-
|
|
8
|
-
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
9
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
10
|
-
if (render) {
|
|
11
|
-
options.render = render;
|
|
12
|
-
options.staticRenderFns = staticRenderFns;
|
|
13
|
-
options._compiled = true;
|
|
14
|
-
}
|
|
15
|
-
var hook;
|
|
16
|
-
if (injectStyles) {
|
|
17
|
-
hook = injectStyles;
|
|
18
|
-
}
|
|
19
|
-
if (hook) {
|
|
20
|
-
if (options.functional) {
|
|
21
|
-
options._injectStyles = hook;
|
|
22
|
-
var originalRender = options.render;
|
|
23
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
24
|
-
hook.call(context);
|
|
25
|
-
return originalRender(h, context);
|
|
26
|
-
};
|
|
27
|
-
} else {
|
|
28
|
-
var existing = options.beforeCreate;
|
|
29
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
exports: scriptExports,
|
|
34
|
-
options
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
1
|
function _extends() {
|
|
39
2
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
40
3
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -44,7 +7,14 @@ function _extends() {
|
|
|
44
7
|
return n;
|
|
45
8
|
}, _extends.apply(null, arguments);
|
|
46
9
|
}
|
|
47
|
-
|
|
10
|
+
import { createVNode, resolveComponent, withDirectives, resolveDirective } from "vue";
|
|
11
|
+
import { api, renderless } from "@opentinyvue/vue-renderless/dropdown/vue";
|
|
12
|
+
import { defineComponent, $props, directive, setup as _setup, h, $prefix } from "@opentinyvue/vue-common";
|
|
13
|
+
import Button from "@opentinyvue/vue-button";
|
|
14
|
+
import ButtonGroup from "@opentinyvue/vue-button-group";
|
|
15
|
+
import { Clickoutside } from "@opentinyvue/vue-directive";
|
|
16
|
+
import { IconArrowBottom, IconChevronUp, IconChevronDown } from "@opentinyvue/vue-icon";
|
|
17
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
48
18
|
name: $prefix + "Dropdown",
|
|
49
19
|
componentName: "TinyDropdown",
|
|
50
20
|
components: {
|
|
@@ -111,8 +81,8 @@ var __vue2_script = defineComponent({
|
|
|
111
81
|
}
|
|
112
82
|
}),
|
|
113
83
|
emits: ["visible-change", "item-click", "button-click", "current-item-click", "menu-item-click", "is-disabled", "selected-index"],
|
|
114
|
-
setup: function setup
|
|
115
|
-
return
|
|
84
|
+
setup: function setup(props, context) {
|
|
85
|
+
return _setup({
|
|
116
86
|
props,
|
|
117
87
|
context,
|
|
118
88
|
renderless,
|
|
@@ -122,28 +92,27 @@ var __vue2_script = defineComponent({
|
|
|
122
92
|
});
|
|
123
93
|
},
|
|
124
94
|
render: function render() {
|
|
125
|
-
var h2 = arguments[0];
|
|
126
95
|
var type = this.type, disabled = this.disabled, handleMainButtonClick = this.handleMainButtonClick, slots = this.slots, size = this.size, state = this.state, border = this.border, round = this.round, m = this.m, clickOutside = this.clickOutside, singleButton = this.singleButton;
|
|
127
96
|
var params = {
|
|
128
97
|
visible: state.visible
|
|
129
98
|
};
|
|
130
99
|
var triggerElm = null;
|
|
131
100
|
if (singleButton) {
|
|
132
|
-
triggerElm =
|
|
101
|
+
triggerElm = createVNode(resolveComponent("tiny-button"), {
|
|
133
102
|
"ref": "trigger",
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
103
|
+
"type": type === "primary" ? type : "",
|
|
104
|
+
"size": size,
|
|
105
|
+
"customClass": m(["rounded active:rounded flex items-center justify-center", state.visible && type !== "primary" && "active:border-color-border-focus text-color-text-primary active:text-color-brand-focus focus:border-color-border-focus focus:text-color-brand-focus"]),
|
|
106
|
+
"disabled": disabled,
|
|
107
|
+
"reset-time": 0,
|
|
108
|
+
"onClick": handleMainButtonClick
|
|
109
|
+
}, {
|
|
110
|
+
default: function _default() {
|
|
111
|
+
return [createVNode("div", {
|
|
112
|
+
"class": "overflow-hidden overflow-ellipsis whitespace-nowrap w-full"
|
|
113
|
+
}, [slots.default && slots.default(params)])];
|
|
143
114
|
}
|
|
144
|
-
}
|
|
145
|
-
"class": "overflow-hidden overflow-ellipsis whitespace-nowrap w-full"
|
|
146
|
-
}, [slots.default && slots.default(params)])]);
|
|
115
|
+
});
|
|
147
116
|
} else {
|
|
148
117
|
var defaultSlot = slots.default && slots.default(params);
|
|
149
118
|
var suffixSlot = slots["suffix-icon"] && slots["suffix-icon"]();
|
|
@@ -153,64 +122,48 @@ var __vue2_script = defineComponent({
|
|
|
153
122
|
attrs.disabled = true;
|
|
154
123
|
vnodeData.attrs = attrs;
|
|
155
124
|
}
|
|
156
|
-
var defaultIcon =
|
|
125
|
+
var defaultIcon = createVNode("span", {
|
|
157
126
|
"class": "block text-[0]"
|
|
158
|
-
}, [
|
|
127
|
+
}, [createVNode(resolveComponent("icon-chevron-down"), {
|
|
159
128
|
"class": "sm:block hidden will-change-transform"
|
|
160
|
-
}),
|
|
129
|
+
}, null), createVNode(resolveComponent("icon-arrow-bottom"), {
|
|
161
130
|
"class": "sm:hidden block will-change-transform"
|
|
162
|
-
})]);
|
|
163
|
-
var suffixInner = state.showIcon &&
|
|
164
|
-
"
|
|
165
|
-
"data-tag": "tiny-dropdown-showicon"
|
|
166
|
-
},
|
|
131
|
+
}, null)]);
|
|
132
|
+
var suffixInner = state.showIcon && createVNode("span", {
|
|
133
|
+
"data-tag": "tiny-dropdown-showicon",
|
|
167
134
|
"class": ["ml-1 sm:ml-2 [&_svg:nth-of-type(1)]:align-top w-4 h-4 inline-block [&_svg]:transition-transform [&_svg]:duration-300", {
|
|
168
135
|
"fill-color-brand-focus [&_svg:nth-of-type(1)]:hover:fill-color-brand-hover [&_svg:nth-of-type(1)]:active:fill-color-brand-focus leading-4": !disabled && !border
|
|
169
136
|
}, border && (state.visible ? "[&_svg]:rotate-180" : "[&_svg]:rotate-0"), border && type !== "primary" && state.visible && "[&_svg]:fill-color-border-focus visited:[&_svg]:fill-color-border-focus active:[&_svg]:fill-color-border-focus"]
|
|
170
137
|
}, [suffixSlot || defaultIcon]);
|
|
171
|
-
triggerElm = border ?
|
|
138
|
+
triggerElm = border ? createVNode(resolveComponent("tiny-button"), {
|
|
172
139
|
"ref": "trigger",
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
140
|
+
"round": round,
|
|
141
|
+
"size": size,
|
|
142
|
+
"type": type === "primary" ? type : "",
|
|
143
|
+
"disabled": disabled,
|
|
144
|
+
"class": ["rounded inline-flex items-center justify-center", type === "primary" ? "[&_svg]:fill-color-bg-1" : state.visible ? "active:border-color-border-focus text-color-text-primary active:text-color-brand-focus focus:border-color-border-focus focus:text-color-brand-focus" : "[&_svg]:fill-color-icon-placeholder"],
|
|
145
|
+
"reset-time": 0
|
|
146
|
+
}, {
|
|
147
|
+
default: function _default() {
|
|
148
|
+
return [defaultSlot, suffixInner];
|
|
149
|
+
}
|
|
150
|
+
}) : createVNode("span", {
|
|
182
151
|
"ref": "trigger",
|
|
183
152
|
"class": [state.visible && !state.showSelfIcon ? "[&_svg]:rotate-180" : "[&_svg]:rotate-0", disabled && "cursor-not-allowed [&_svg]:fill-color-text-disabled", "inline-flex [&_svg]:transition-transform [&_svg]:duration-300"]
|
|
184
|
-
}, [
|
|
153
|
+
}, [createVNode("span", {
|
|
185
154
|
"class": ["inline-flex h-4 leading-4", disabled ? "text-color-text-disabled" : "hover:text-color-brand-hover active:text-color-brand-focus"]
|
|
186
|
-
}, [defaultSlot]),
|
|
155
|
+
}, [defaultSlot]), createVNode("span", {
|
|
187
156
|
"class": "align-bottom leading-4 h-4"
|
|
188
157
|
}, [suffixInner])]);
|
|
189
158
|
}
|
|
190
159
|
var menuElm = disabled ? null : slots.dropdown && slots.dropdown();
|
|
191
|
-
return
|
|
160
|
+
return withDirectives(createVNode("div", {
|
|
192
161
|
"class": ["relative inline-block [&>span:nth-of-type(1)]:text-color-brand-focus [&>span:nth-of-type(1)]:text-sm sm:[&>span:nth-of-type(1)]:text-xs", disabled && "[&>span:nth-of-type(1)]:text-color-brand-focus", state.showSelfIcon && "leading-4 h-4 [&_svg]:align-top [&_svg]:rotate-0"],
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}],
|
|
197
|
-
"attrs": {
|
|
198
|
-
"aria-disabled": disabled,
|
|
199
|
-
"data-tag": "tiny-dropdown"
|
|
200
|
-
}
|
|
201
|
-
}, [triggerElm, menuElm]);
|
|
162
|
+
"aria-disabled": disabled,
|
|
163
|
+
"data-tag": "tiny-dropdown"
|
|
164
|
+
}, [triggerElm, menuElm]), [[resolveDirective("clickoutside"), clickOutside]]);
|
|
202
165
|
}
|
|
203
166
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
function __vue2_injectStyles(context) {
|
|
208
|
-
for (var o in __cssModules) {
|
|
209
|
-
this[o] = __cssModules[o];
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
var mobileFirst = /* @__PURE__ */ function() {
|
|
213
|
-
return __component__.exports;
|
|
214
|
-
}();
|
|
215
|
-
|
|
216
|
-
export { mobileFirst as default };
|
|
167
|
+
export {
|
|
168
|
+
_sfc_main as default
|
|
169
|
+
};
|
package/lib/pc.js
CHANGED
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/dropdown/vue';
|
|
2
|
-
import { defineComponent, $prefix, directive, setup, h, $props } from '@opentinyvue/vue-common';
|
|
3
|
-
import Button from '@opentinyvue/vue-button';
|
|
4
|
-
import ButtonGroup from '@opentinyvue/vue-button-group';
|
|
5
|
-
import { Clickoutside } from '@opentinyvue/vue-directive';
|
|
6
|
-
import DropdownMenu from '@opentinyvue/vue-dropdown-menu';
|
|
7
|
-
import { iconDownWard } from '@opentinyvue/vue-icon';
|
|
8
|
-
|
|
9
|
-
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
10
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
11
|
-
if (render) {
|
|
12
|
-
options.render = render;
|
|
13
|
-
options.staticRenderFns = staticRenderFns;
|
|
14
|
-
options._compiled = true;
|
|
15
|
-
}
|
|
16
|
-
var hook;
|
|
17
|
-
if (injectStyles) {
|
|
18
|
-
hook = injectStyles;
|
|
19
|
-
}
|
|
20
|
-
if (hook) {
|
|
21
|
-
if (options.functional) {
|
|
22
|
-
options._injectStyles = hook;
|
|
23
|
-
var originalRender = options.render;
|
|
24
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
25
|
-
hook.call(context);
|
|
26
|
-
return originalRender(h, context);
|
|
27
|
-
};
|
|
28
|
-
} else {
|
|
29
|
-
var existing = options.beforeCreate;
|
|
30
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
exports: scriptExports,
|
|
35
|
-
options
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
1
|
function _extends() {
|
|
40
2
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
41
3
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -45,7 +7,15 @@ function _extends() {
|
|
|
45
7
|
return n;
|
|
46
8
|
}, _extends.apply(null, arguments);
|
|
47
9
|
}
|
|
48
|
-
|
|
10
|
+
import { createVNode, resolveComponent, withDirectives, resolveDirective } from "vue";
|
|
11
|
+
import { api, renderless } from "@opentinyvue/vue-renderless/dropdown/vue";
|
|
12
|
+
import { defineComponent, $props, directive, setup as _setup, h, $prefix } from "@opentinyvue/vue-common";
|
|
13
|
+
import Button from "@opentinyvue/vue-button";
|
|
14
|
+
import ButtonGroup from "@opentinyvue/vue-button-group";
|
|
15
|
+
import { Clickoutside } from "@opentinyvue/vue-directive";
|
|
16
|
+
import DropdownMenu from "@opentinyvue/vue-dropdown-menu";
|
|
17
|
+
import { iconDownWard } from "@opentinyvue/vue-icon";
|
|
18
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
49
19
|
name: $prefix + "Dropdown",
|
|
50
20
|
componentName: "TinyDropdown",
|
|
51
21
|
components: {
|
|
@@ -130,8 +100,8 @@ var __vue2_script = defineComponent({
|
|
|
130
100
|
}
|
|
131
101
|
}),
|
|
132
102
|
emits: ["visible-change", "item-click", "button-click", "menu-item-click", "handle-click", "is-disabled", "selected-index", "update:visible"],
|
|
133
|
-
setup: function setup
|
|
134
|
-
return
|
|
103
|
+
setup: function setup(props, context) {
|
|
104
|
+
return _setup({
|
|
135
105
|
props,
|
|
136
106
|
context,
|
|
137
107
|
renderless,
|
|
@@ -141,7 +111,6 @@ var __vue2_script = defineComponent({
|
|
|
141
111
|
},
|
|
142
112
|
render: function render() {
|
|
143
113
|
var _state$designConfig, _state$designConfig$i, _state$designConfig2, _state$designConfig2$;
|
|
144
|
-
var h2 = arguments[0];
|
|
145
114
|
var splitButton = this.splitButton, type = this.type, disabled = this.disabled, handleMainButtonClick = this.handleMainButtonClick, menuOptions = this.menuOptions, title = this.title, suffixIcon = this.suffixIcon, prefixIcon = this.prefixIcon;
|
|
146
115
|
var slots = this.slots, size = this.size, state = this.state, border = this.border, showIcon = this.showIcon, round = this.round, clickOutside = this.clickOutside, visible = this.visible;
|
|
147
116
|
var params = {
|
|
@@ -156,28 +125,34 @@ var __vue2_script = defineComponent({
|
|
|
156
125
|
var ButtonIconDown = ((_state$designConfig2 = state.designConfig) == null ? void 0 : (_state$designConfig2$ = _state$designConfig2.icons) == null ? void 0 : _state$designConfig2$.dropdownIcon) || iconDownWard();
|
|
157
126
|
var defaultSlot = slots.default && slots.default(params);
|
|
158
127
|
if (splitButton) {
|
|
159
|
-
triggerElm =
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
128
|
+
triggerElm = createVNode(resolveComponent("tiny-button-group"), null, {
|
|
129
|
+
default: function _default2() {
|
|
130
|
+
return [createVNode(resolveComponent("tiny-button"), {
|
|
131
|
+
"type": type,
|
|
132
|
+
"size": size,
|
|
133
|
+
"onClick": handleMainButtonClick,
|
|
134
|
+
"disabled": disabled,
|
|
135
|
+
"class": "tiny-dropdown__title-button"
|
|
136
|
+
}, {
|
|
137
|
+
default: function _default3() {
|
|
138
|
+
return [defaultSlot || createVNode("span", null, [title])];
|
|
139
|
+
}
|
|
140
|
+
}), createVNode(resolveComponent("tiny-button"), {
|
|
141
|
+
"ref": "trigger",
|
|
142
|
+
"type": type,
|
|
143
|
+
"size": size,
|
|
144
|
+
"class": "tiny-dropdown__caret-button " + triggerClass,
|
|
145
|
+
"disabled": disabled,
|
|
146
|
+
"reset-time": 0
|
|
147
|
+
}, {
|
|
148
|
+
default: function _default3() {
|
|
149
|
+
return [createVNode(ButtonIconDown, {
|
|
150
|
+
"class": visibleClass
|
|
151
|
+
}, null)];
|
|
152
|
+
}
|
|
153
|
+
})];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
181
156
|
} else {
|
|
182
157
|
var _defaultSlot$;
|
|
183
158
|
var suffixSlot = slots["suffix-icon"] && slots["suffix-icon"]();
|
|
@@ -188,60 +163,44 @@ var __vue2_script = defineComponent({
|
|
|
188
163
|
attrs.disabled = true;
|
|
189
164
|
vnodeData.attrs = attrs;
|
|
190
165
|
}
|
|
191
|
-
var suffixInner = showIcon ?
|
|
166
|
+
var suffixInner = showIcon ? createVNode("span", {
|
|
192
167
|
"class": "tiny-dropdown__suffix-inner " + visibleClass
|
|
193
|
-
}, [suffixSlot ||
|
|
194
|
-
var prefixInner = prefixIcon || prefixSlot ?
|
|
168
|
+
}, [suffixSlot || createVNode(IconDown, null, null)]) : "";
|
|
169
|
+
var prefixInner = prefixIcon || prefixSlot ? createVNode("span", {
|
|
195
170
|
"class": "tiny-dropdown__prefix-inner " + visibleClass
|
|
196
|
-
}, [prefixSlot ||
|
|
197
|
-
var defaultTriggerElm = defaultSlot || title ?
|
|
171
|
+
}, [prefixSlot || createVNode(IconPre, null, null)]) : "";
|
|
172
|
+
var defaultTriggerElm = defaultSlot || title ? createVNode("span", {
|
|
198
173
|
"class": "tiny-dropdown__title"
|
|
199
174
|
}, [defaultSlot || title]) : null;
|
|
200
|
-
triggerElm = border ?
|
|
175
|
+
triggerElm = border ? createVNode(resolveComponent("tiny-button"), {
|
|
201
176
|
"ref": "trigger",
|
|
202
|
-
"
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
177
|
+
"round": round,
|
|
178
|
+
"disabled": disabled,
|
|
179
|
+
"type": type,
|
|
180
|
+
"class": "tiny-dropdown__border " + (state.visible ? "is-expand" : "") + (showIcon ? " is-show-icon " : "") + " " + triggerClass,
|
|
181
|
+
"reset-time": 0
|
|
182
|
+
}, {
|
|
183
|
+
default: function _default2() {
|
|
184
|
+
return [prefixInner, defaultTriggerElm, suffixInner];
|
|
185
|
+
}
|
|
186
|
+
}) : createVNode("span", {
|
|
210
187
|
"ref": "trigger",
|
|
211
188
|
"class": "is-text" + (state.visible ? " is-expand" : " is-hide") + (disabled ? " is-disabled" : "") + " " + triggerClass
|
|
212
189
|
}, [prefixInner, defaultTriggerElm, suffixInner]);
|
|
213
190
|
}
|
|
214
|
-
var defaulMenuElm =
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
});
|
|
191
|
+
var defaulMenuElm = createVNode(resolveComponent("tiny-dropdown-menu"), {
|
|
192
|
+
"options": menuOptions.options,
|
|
193
|
+
"text-field": menuOptions.textField || menuOptions["text-field"],
|
|
194
|
+
"popper-class": menuOptions.popperClass || menuOptions["popper-class"],
|
|
195
|
+
"placement": menuOptions.placement
|
|
196
|
+
}, null);
|
|
222
197
|
var menuElm = disabled ? null : slots.dropdown && slots.dropdown() || defaulMenuElm;
|
|
223
|
-
return
|
|
198
|
+
return withDirectives(createVNode("div", {
|
|
224
199
|
"class": "tiny-dropdown",
|
|
225
|
-
"
|
|
226
|
-
|
|
227
|
-
value: !state.visibleIsBoolean && clickOutside
|
|
228
|
-
}],
|
|
229
|
-
"attrs": {
|
|
230
|
-
"aria-disabled": disabled
|
|
231
|
-
}
|
|
232
|
-
}, [triggerElm, menuElm]);
|
|
200
|
+
"aria-disabled": disabled
|
|
201
|
+
}, [triggerElm, menuElm]), [[resolveDirective("clickoutside"), !state.visibleIsBoolean && clickOutside]]);
|
|
233
202
|
}
|
|
234
203
|
});
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
function __vue2_injectStyles(context) {
|
|
239
|
-
for (var o in __cssModules) {
|
|
240
|
-
this[o] = __cssModules[o];
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
var pc = /* @__PURE__ */ function() {
|
|
244
|
-
return __component__.exports;
|
|
245
|
-
}();
|
|
246
|
-
|
|
247
|
-
export { pc as default };
|
|
204
|
+
export {
|
|
205
|
+
_sfc_main as default
|
|
206
|
+
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-dropdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.22.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"module": "./lib/index.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opentinyvue/vue-button": "~
|
|
12
|
-
"@opentinyvue/vue-button-group": "~
|
|
13
|
-
"@opentinyvue/vue-common": "~
|
|
14
|
-
"@opentinyvue/vue-directive": "~
|
|
15
|
-
"@opentinyvue/vue-dropdown-menu": "~
|
|
16
|
-
"@opentinyvue/vue-icon": "~
|
|
11
|
+
"@opentinyvue/vue-button": "~3.22.0",
|
|
12
|
+
"@opentinyvue/vue-button-group": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-common": "~3.22.0",
|
|
14
|
+
"@opentinyvue/vue-directive": "~3.22.0",
|
|
15
|
+
"@opentinyvue/vue-dropdown-menu": "~3.22.0",
|
|
16
|
+
"@opentinyvue/vue-icon": "~3.22.0",
|
|
17
17
|
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
18
18
|
"@opentinyvue/vue-theme": "~3.22.0"
|
|
19
19
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -80,5 +80,5 @@ export declare const dropdownProps: {
|
|
|
80
80
|
tiny_theme: StringConstructor;
|
|
81
81
|
tiny_chart_theme: ObjectConstructor;
|
|
82
82
|
};
|
|
83
|
-
declare const _default: any
|
|
83
|
+
declare const _default: import("@vue/runtime-core").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("@vue/runtime-core").PublicProps>;
|
|
84
84
|
export default _default;
|
|
@@ -1,2 +1,149 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
type: StringConstructor;
|
|
3
|
+
trigger: StringConstructor;
|
|
4
|
+
size: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
singleButton: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
showTimeout: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
hideTimeout: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
hideOnClick: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
tabindex: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
border: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
round: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
showIcon: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
45
|
+
showSelfIcon: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
lazyShowPopper: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
tiny_mode: StringConstructor;
|
|
54
|
+
tiny_mode_root: BooleanConstructor;
|
|
55
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
56
|
+
tiny_renderless: FunctionConstructor;
|
|
57
|
+
tiny_theme: StringConstructor;
|
|
58
|
+
tiny_chart_theme: ObjectConstructor;
|
|
59
|
+
}, {
|
|
60
|
+
t: (this: any, path: any, options?: any) => any;
|
|
61
|
+
vm: any;
|
|
62
|
+
f: (props: any, attrs?: {}) => {};
|
|
63
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
64
|
+
d: (props: any) => void;
|
|
65
|
+
dp: (props: any) => void;
|
|
66
|
+
gcls: (key: any) => any;
|
|
67
|
+
m: (...cssClasses: any[]) => string;
|
|
68
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("item-click" | "visible-change" | "is-disabled" | "menu-item-click" | "current-item-click" | "selected-index" | "button-click")[], "item-click" | "visible-change" | "is-disabled" | "menu-item-click" | "current-item-click" | "selected-index" | "button-click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
trigger: StringConstructor;
|
|
71
|
+
size: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
disabled: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
singleButton: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
showTimeout: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
default: number;
|
|
86
|
+
};
|
|
87
|
+
hideTimeout: {
|
|
88
|
+
type: NumberConstructor;
|
|
89
|
+
default: number;
|
|
90
|
+
};
|
|
91
|
+
hideOnClick: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
tabindex: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
default: number;
|
|
98
|
+
};
|
|
99
|
+
border: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
round: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
showIcon: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
112
|
+
showSelfIcon: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: boolean;
|
|
115
|
+
};
|
|
116
|
+
lazyShowPopper: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
tiny_mode: StringConstructor;
|
|
121
|
+
tiny_mode_root: BooleanConstructor;
|
|
122
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
123
|
+
tiny_renderless: FunctionConstructor;
|
|
124
|
+
tiny_theme: StringConstructor;
|
|
125
|
+
tiny_chart_theme: ObjectConstructor;
|
|
126
|
+
}>> & {
|
|
127
|
+
"onItem-click"?: ((...args: any[]) => any) | undefined;
|
|
128
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
129
|
+
"onMenu-item-click"?: ((...args: any[]) => any) | undefined;
|
|
130
|
+
"onIs-disabled"?: ((...args: any[]) => any) | undefined;
|
|
131
|
+
"onCurrent-item-click"?: ((...args: any[]) => any) | undefined;
|
|
132
|
+
"onSelected-index"?: ((...args: any[]) => any) | undefined;
|
|
133
|
+
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
disabled: boolean;
|
|
136
|
+
size: string;
|
|
137
|
+
tiny_mode_root: boolean;
|
|
138
|
+
singleButton: boolean;
|
|
139
|
+
showTimeout: number;
|
|
140
|
+
hideTimeout: number;
|
|
141
|
+
hideOnClick: boolean;
|
|
142
|
+
tabindex: number;
|
|
143
|
+
border: boolean;
|
|
144
|
+
round: boolean;
|
|
145
|
+
showIcon: boolean;
|
|
146
|
+
showSelfIcon: boolean;
|
|
147
|
+
lazyShowPopper: boolean;
|
|
148
|
+
}, {}>;
|
|
2
149
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: any
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("@vue/runtime-core").PublicProps>;
|
|
2
2
|
export default _default;
|