@opentiny/vue-dropdown-item 3.11.0-alpha.0 → 3.11.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 +2 -1
- package/lib/mobile-first.js +11 -10
- package/lib/mobile.js +5 -5
- package/lib/pc.js +5 -5
- package/package.json +7 -7
- package/src/mobile-first.vue.d.ts +11 -2
package/lib/index.js
CHANGED
|
@@ -82,6 +82,7 @@ var dropdownItemProps = _extends({}, $props, {
|
|
|
82
82
|
return -1;
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
+
// tiny新增
|
|
85
86
|
appendToBody: {
|
|
86
87
|
type: Boolean,
|
|
87
88
|
default: true
|
|
@@ -111,7 +112,7 @@ var DropdownItem = defineComponent({
|
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
|
-
var version = "3.11.0
|
|
115
|
+
var version = "3.11.0";
|
|
115
116
|
DropdownItem.model = {
|
|
116
117
|
prop: "modelValue",
|
|
117
118
|
event: "update:modelValue"
|
package/lib/mobile-first.js
CHANGED
|
@@ -5,7 +5,7 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
5
5
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
6
6
|
if (it)
|
|
7
7
|
return (it = it.call(o)).next.bind(it);
|
|
8
|
-
if (Array.isArray(o) || (it =
|
|
8
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray_tiny(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
9
9
|
if (it)
|
|
10
10
|
o = it;
|
|
11
11
|
var i = 0;
|
|
@@ -17,20 +17,20 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
17
17
|
}
|
|
18
18
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function _unsupportedIterableToArray_tiny(o, minLen) {
|
|
21
21
|
if (!o)
|
|
22
22
|
return;
|
|
23
23
|
if (typeof o === "string")
|
|
24
|
-
return
|
|
24
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
25
25
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
26
26
|
if (n === "Object" && o.constructor)
|
|
27
27
|
n = o.constructor.name;
|
|
28
28
|
if (n === "Map" || n === "Set")
|
|
29
29
|
return Array.from(o);
|
|
30
30
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
31
|
-
return
|
|
31
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function _arrayLikeToArray_tiny(arr, len) {
|
|
34
34
|
if (len == null || len > arr.length)
|
|
35
35
|
len = arr.length;
|
|
36
36
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -47,6 +47,7 @@ var _export_sfc = function _export_sfc2(sfc, props) {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
var _sfc_main = defineComponent({
|
|
50
|
+
emits: ["update:modelValue", "change", "closed", "open", "opened", "close", "confirm", "reset"],
|
|
50
51
|
props: [].concat(props, ["disabled", "icon", "itemData", "selected", "label", "level", "currentIndex"]),
|
|
51
52
|
setup: function setup(props2, context) {
|
|
52
53
|
return _setup({
|
|
@@ -60,17 +61,16 @@ var _sfc_main = defineComponent({
|
|
|
60
61
|
var _hoisted_1 = ["aria-disabled", "tabindex"];
|
|
61
62
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
62
63
|
return openBlock(), createElementBlock("li", {
|
|
64
|
+
"data-tag": "tiny-dropdown-item",
|
|
63
65
|
onMouseenter: _cache[0] || (_cache[0] = function() {
|
|
64
66
|
return _ctx.mouseEnter && _ctx.mouseEnter.apply(_ctx, arguments);
|
|
65
67
|
}),
|
|
66
68
|
onMouseleave: _cache[1] || (_cache[1] = function() {
|
|
67
69
|
return _ctx.mouseLeave && _ctx.mouseLeave.apply(_ctx, arguments);
|
|
68
70
|
}),
|
|
69
|
-
class: normalizeClass(_ctx.m("list-none leading-10 sm:leading-8
|
|
70
|
-
"text-color-brand-focus": _ctx.dataStore.checkedStatus && _ctx.selected
|
|
71
|
-
},
|
|
72
|
-
"!px-0": _ctx.dataStore.multiStage
|
|
73
|
-
})),
|
|
71
|
+
class: normalizeClass(_ctx.m("rounded-sm list-none leading-10 sm:leading-8 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", _ctx.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-2 focus:bg-color-bg-4 cursor-pointer", {
|
|
72
|
+
"text-color-brand-focus bg-color-fill-6": _ctx.dataStore.checkedStatus && _ctx.selected
|
|
73
|
+
}, _ctx.dataStore.multiStage ? "!px-0 mb-1" : "[&:not(:last-of-type)]:mb-1")),
|
|
74
74
|
onClick: _cache[2] || (_cache[2] = withModifiers(function() {
|
|
75
75
|
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
|
|
76
76
|
}, ["stop"])),
|
|
@@ -79,6 +79,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79
79
|
}, [createElementVNode(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
|
+
"data-tag": "tiny-dropdown-level",
|
|
82
83
|
ref: "level",
|
|
83
84
|
class: normalizeClass(["sm:text-xs text-sm", _ctx.level === "2" ? "mx-6 overflow-hidden text-ellipsis whitespace-nowrap" : "mx-4 sm:mx-3 overflow-hidden text-ellipsis whitespace-nowrap"])
|
|
84
85
|
},
|
package/lib/mobile.js
CHANGED
|
@@ -10,7 +10,7 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
10
10
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
11
11
|
if (it)
|
|
12
12
|
return (it = it.call(o)).next.bind(it);
|
|
13
|
-
if (Array.isArray(o) || (it =
|
|
13
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray_tiny(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
14
14
|
if (it)
|
|
15
15
|
o = it;
|
|
16
16
|
var i = 0;
|
|
@@ -22,20 +22,20 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
22
22
|
}
|
|
23
23
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function _unsupportedIterableToArray_tiny(o, minLen) {
|
|
26
26
|
if (!o)
|
|
27
27
|
return;
|
|
28
28
|
if (typeof o === "string")
|
|
29
|
-
return
|
|
29
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
30
30
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
31
31
|
if (n === "Object" && o.constructor)
|
|
32
32
|
n = o.constructor.name;
|
|
33
33
|
if (n === "Map" || n === "Set")
|
|
34
34
|
return Array.from(o);
|
|
35
35
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
36
|
-
return
|
|
36
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function _arrayLikeToArray_tiny(arr, len) {
|
|
39
39
|
if (len == null || len > arr.length)
|
|
40
40
|
len = arr.length;
|
|
41
41
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
package/lib/pc.js
CHANGED
|
@@ -8,7 +8,7 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
8
8
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
9
9
|
if (it)
|
|
10
10
|
return (it = it.call(o)).next.bind(it);
|
|
11
|
-
if (Array.isArray(o) || (it =
|
|
11
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray_tiny(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
12
12
|
if (it)
|
|
13
13
|
o = it;
|
|
14
14
|
var i = 0;
|
|
@@ -20,20 +20,20 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
|
|
|
20
20
|
}
|
|
21
21
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function _unsupportedIterableToArray_tiny(o, minLen) {
|
|
24
24
|
if (!o)
|
|
25
25
|
return;
|
|
26
26
|
if (typeof o === "string")
|
|
27
|
-
return
|
|
27
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
28
28
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
29
29
|
if (n === "Object" && o.constructor)
|
|
30
30
|
n = o.constructor.name;
|
|
31
31
|
if (n === "Map" || n === "Set")
|
|
32
32
|
return Array.from(o);
|
|
33
33
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
34
|
-
return
|
|
34
|
+
return _arrayLikeToArray_tiny(o, minLen);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function _arrayLikeToArray_tiny(arr, len) {
|
|
37
37
|
if (len == null || len > arr.length)
|
|
38
38
|
len = arr.length;
|
|
39
39
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "3.11.0
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentiny/vue-common": "~3.11.0
|
|
11
|
-
"@opentiny/vue-icon": "~3.11.0
|
|
12
|
-
"@opentiny/vue-renderless": "~3.11.0
|
|
13
|
-
"@opentiny/vue-popup": "~3.11.0
|
|
14
|
-
"@opentiny/vue-button": "~3.11.0
|
|
15
|
-
"@opentiny/vue-tooltip": "~3.11.0
|
|
10
|
+
"@opentiny/vue-common": "~3.11.0",
|
|
11
|
+
"@opentiny/vue-icon": "~3.11.0",
|
|
12
|
+
"@opentiny/vue-renderless": "~3.11.0",
|
|
13
|
+
"@opentiny/vue-popup": "~3.11.0",
|
|
14
|
+
"@opentiny/vue-button": "~3.11.0",
|
|
15
|
+
"@opentiny/vue-tooltip": "~3.11.0"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"types": "index.d.ts",
|
|
@@ -13,7 +13,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
13
13
|
itemData?: any;
|
|
14
14
|
level?: any;
|
|
15
15
|
currentIndex?: any;
|
|
16
|
-
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin,
|
|
16
|
+
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("confirm" | "update:modelValue" | "close" | "change" | "reset" | "open" | "closed" | "opened")[], "confirm" | "update:modelValue" | "close" | "change" | "reset" | "open" | "closed" | "opened", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
17
17
|
label?: any;
|
|
18
18
|
selected?: any;
|
|
19
19
|
disabled?: any;
|
|
@@ -28,7 +28,16 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
28
28
|
itemData?: any;
|
|
29
29
|
level?: any;
|
|
30
30
|
currentIndex?: any;
|
|
31
|
-
}
|
|
31
|
+
}>>> & {
|
|
32
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
onClosed?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
onOpened?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
}, {
|
|
32
41
|
readonly label?: any;
|
|
33
42
|
readonly selected?: any;
|
|
34
43
|
readonly disabled?: any;
|