@opentiny/vue-dropdown-item 3.6.0 → 3.6.1-alpha.1
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/LICENSE +22 -0
- package/index.d.ts +13 -13
- package/lib/index.js +41 -74
- package/lib/mobile.js +183 -125
- package/lib/pc.js +109 -101
- package/package.json +11 -15
- package/src/index.d.ts +75 -37
- package/src/mobile.vue.d.ts +2 -22
- package/src/pc.vue.d.ts +17 -13
- package/src/index.vue.d.ts +0 -50
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 - present TinyVue Authors.
|
|
4
|
+
Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
*/
|
|
12
|
-
import DropdownItem from './src/index';
|
|
13
|
-
export default DropdownItem;
|
|
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
|
+
*/
|
|
12
|
+
import DropdownItem from './src/index';
|
|
13
|
+
export default DropdownItem;
|
package/lib/index.js
CHANGED
|
@@ -1,64 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
function _objectSpread2(target) {
|
|
16
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
17
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
18
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
19
|
-
_defineProperty(target, key, source[key]);
|
|
20
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
21
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return target;
|
|
25
|
-
}
|
|
26
|
-
function _defineProperty(obj, key, value) {
|
|
27
|
-
key = _toPropertyKey(key);
|
|
28
|
-
if (key in obj) {
|
|
29
|
-
Object.defineProperty(obj, key, {
|
|
30
|
-
value: value,
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true
|
|
34
|
-
});
|
|
35
|
-
} else {
|
|
36
|
-
obj[key] = value;
|
|
37
|
-
}
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
function _toPrimitive(input, hint) {
|
|
41
|
-
if (typeof input !== "object" || input === null) return input;
|
|
42
|
-
var prim = input[Symbol.toPrimitive];
|
|
43
|
-
if (prim !== undefined) {
|
|
44
|
-
var res = prim.call(input, hint || "default");
|
|
45
|
-
if (typeof res !== "object") return res;
|
|
46
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
47
|
-
}
|
|
48
|
-
return (hint === "string" ? String : Number)(input);
|
|
49
|
-
}
|
|
50
|
-
function _toPropertyKey(arg) {
|
|
51
|
-
var key = _toPrimitive(arg, "string");
|
|
52
|
-
return typeof key === "symbol" ? key : String(key);
|
|
1
|
+
function _extends() {
|
|
2
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
3
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4
|
+
var source = arguments[i];
|
|
5
|
+
for (var key in source) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
+
target[key] = source[key];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
return _extends.apply(this, arguments);
|
|
53
14
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
15
|
+
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
|
|
16
|
+
import PcTemplate from "./pc.js";
|
|
17
|
+
import MobileTemplate from "./mobile.js";
|
|
18
|
+
var template = function template2(mode) {
|
|
19
|
+
if ("mobile" === (process.env.TINY_MODE || mode))
|
|
20
|
+
return MobileTemplate;
|
|
21
|
+
else
|
|
22
|
+
return PcTemplate;
|
|
57
23
|
};
|
|
58
|
-
var DropdownItem = {
|
|
59
|
-
name: $prefix +
|
|
60
|
-
componentName:
|
|
61
|
-
props:
|
|
24
|
+
var DropdownItem = defineComponent({
|
|
25
|
+
name: $prefix + "DropdownItem",
|
|
26
|
+
componentName: "TinyDropdownItem",
|
|
27
|
+
props: _extends({}, $props, {
|
|
62
28
|
icon: [String, Object],
|
|
63
29
|
disabled: Boolean,
|
|
64
30
|
divided: Boolean,
|
|
@@ -73,15 +39,15 @@ var DropdownItem = {
|
|
|
73
39
|
},
|
|
74
40
|
type: {
|
|
75
41
|
type: String,
|
|
76
|
-
default:
|
|
42
|
+
default: "selection"
|
|
77
43
|
},
|
|
78
44
|
label: {
|
|
79
45
|
type: String,
|
|
80
|
-
default:
|
|
46
|
+
default: ""
|
|
81
47
|
},
|
|
82
48
|
itemData: {
|
|
83
49
|
type: Object,
|
|
84
|
-
default: function
|
|
50
|
+
default: function _default2() {
|
|
85
51
|
return {};
|
|
86
52
|
}
|
|
87
53
|
},
|
|
@@ -91,25 +57,26 @@ var DropdownItem = {
|
|
|
91
57
|
},
|
|
92
58
|
textField: {
|
|
93
59
|
type: String,
|
|
94
|
-
default:
|
|
60
|
+
default: "label"
|
|
95
61
|
}
|
|
96
62
|
}),
|
|
97
63
|
setup: function setup(props, context) {
|
|
98
64
|
return $setup({
|
|
99
|
-
props
|
|
100
|
-
context
|
|
101
|
-
template
|
|
65
|
+
props,
|
|
66
|
+
context,
|
|
67
|
+
template
|
|
102
68
|
});
|
|
103
69
|
}
|
|
104
|
-
};
|
|
105
|
-
|
|
70
|
+
});
|
|
71
|
+
var version = "3.7.0";
|
|
106
72
|
DropdownItem.model = {
|
|
107
|
-
prop:
|
|
108
|
-
event:
|
|
73
|
+
prop: "modelValue",
|
|
74
|
+
event: "update:modelValue"
|
|
109
75
|
};
|
|
110
|
-
DropdownItem.install = function
|
|
76
|
+
DropdownItem.install = function(Vue) {
|
|
111
77
|
Vue.component(DropdownItem.name, DropdownItem);
|
|
112
78
|
};
|
|
113
|
-
DropdownItem.version =
|
|
114
|
-
|
|
115
|
-
|
|
79
|
+
DropdownItem.version = version;
|
|
80
|
+
export {
|
|
81
|
+
DropdownItem as default
|
|
82
|
+
};
|
package/lib/mobile.js
CHANGED
|
@@ -1,59 +1,76 @@
|
|
|
1
|
-
import { renderless, api } from
|
|
2
|
-
import {
|
|
3
|
-
import { iconYes } from
|
|
4
|
-
import Popup from
|
|
5
|
-
import Button from
|
|
6
|
-
import Clickoutside from
|
|
7
|
-
import
|
|
8
|
-
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, withCtx, renderSlot, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
|
|
2
|
+
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
|
|
3
|
+
import { iconYes } from "@opentiny/vue-icon";
|
|
4
|
+
import Popup from "@opentiny/vue-popup";
|
|
5
|
+
import Button from "@opentiny/vue-button";
|
|
6
|
+
import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside";
|
|
7
|
+
import "@opentiny/vue-theme-mobile/dropdown-item/index.css";
|
|
8
|
+
import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, withCtx, renderSlot, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, vShow, createTextVNode } from "vue";
|
|
9
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
10
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
11
|
+
if (it)
|
|
12
|
+
return (it = it.call(o)).next.bind(it);
|
|
13
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
14
|
+
if (it)
|
|
15
|
+
o = it;
|
|
16
|
+
var i = 0;
|
|
17
|
+
return function() {
|
|
18
|
+
if (i >= o.length)
|
|
19
|
+
return { done: true };
|
|
20
|
+
return { done: false, value: o[i++] };
|
|
21
|
+
};
|
|
22
|
+
}
|
|
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.");
|
|
18
24
|
}
|
|
19
25
|
function _unsupportedIterableToArray(o, minLen) {
|
|
20
|
-
if (!o)
|
|
21
|
-
|
|
26
|
+
if (!o)
|
|
27
|
+
return;
|
|
28
|
+
if (typeof o === "string")
|
|
29
|
+
return _arrayLikeToArray(o, minLen);
|
|
22
30
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
23
|
-
if (n === "Object" && o.constructor)
|
|
24
|
-
|
|
25
|
-
if (n === "
|
|
31
|
+
if (n === "Object" && o.constructor)
|
|
32
|
+
n = o.constructor.name;
|
|
33
|
+
if (n === "Map" || n === "Set")
|
|
34
|
+
return Array.from(o);
|
|
35
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
36
|
+
return _arrayLikeToArray(o, minLen);
|
|
26
37
|
}
|
|
27
38
|
function _arrayLikeToArray(arr, len) {
|
|
28
|
-
if (len == null || len > arr.length)
|
|
29
|
-
|
|
39
|
+
if (len == null || len > arr.length)
|
|
40
|
+
len = arr.length;
|
|
41
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
42
|
+
arr2[i] = arr[i];
|
|
30
43
|
return arr2;
|
|
31
44
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
46
|
+
var target = sfc.__vccOpts || sfc;
|
|
47
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
48
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
49
|
+
target[key] = val;
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
};
|
|
35
53
|
|
|
36
|
-
var
|
|
54
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
37
55
|
directives: {
|
|
38
|
-
Clickoutside
|
|
56
|
+
Clickoutside
|
|
39
57
|
},
|
|
40
|
-
props: [].concat(
|
|
58
|
+
props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
|
|
41
59
|
components: {
|
|
42
60
|
IconYes: iconYes(),
|
|
43
61
|
TinyPopup: Popup,
|
|
44
62
|
TinyButton: Button
|
|
45
63
|
},
|
|
46
|
-
emits: [
|
|
47
|
-
setup: function setup
|
|
48
|
-
return
|
|
49
|
-
props:
|
|
50
|
-
context
|
|
51
|
-
renderless
|
|
52
|
-
api
|
|
64
|
+
emits: ["update:modelValue", "open", "opened", "click", "change", "closed", "close", "reset", "confirm", "item-click"],
|
|
65
|
+
setup: function setup(props2, context) {
|
|
66
|
+
return _setup({
|
|
67
|
+
props: props2,
|
|
68
|
+
context,
|
|
69
|
+
renderless,
|
|
70
|
+
api
|
|
53
71
|
});
|
|
54
72
|
}
|
|
55
|
-
};
|
|
56
|
-
|
|
73
|
+
});
|
|
57
74
|
var _hoisted_1 = {
|
|
58
75
|
key: 0,
|
|
59
76
|
class: "tiny-mobile-dropdown-item__options"
|
|
@@ -82,94 +99,135 @@ var _hoisted_9 = ["onClick"];
|
|
|
82
99
|
var _hoisted_10 = {
|
|
83
100
|
class: "tiny-mobile-dropdown-item__filter-operate"
|
|
84
101
|
};
|
|
85
|
-
|
|
102
|
+
var _hoisted_11 = /* @__PURE__ */ createTextVNode(" Reset ");
|
|
103
|
+
var _hoisted_12 = /* @__PURE__ */ createTextVNode(" OK ");
|
|
104
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
86
105
|
var _component_icon_yes = resolveComponent("icon-yes");
|
|
87
106
|
var _component_tiny_button = resolveComponent("tiny-button");
|
|
88
107
|
var _component_tiny_popup = resolveComponent("tiny-popup");
|
|
89
108
|
var _directive_clickoutside = resolveDirective("clickoutside");
|
|
90
|
-
return withDirectives((openBlock(), createElementBlock(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
109
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref: "wrapper",
|
|
113
|
+
class: normalizeClass(["tiny-mobile-dropdown-item--" + _ctx.state.direction, "tiny-mobile-dropdown-item"]),
|
|
114
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
115
|
+
return _ctx.clickWrapper && _ctx.clickWrapper.apply(_ctx, arguments);
|
|
116
|
+
}),
|
|
117
|
+
style: normalizeStyle(_ctx.state.itemStyle)
|
|
118
|
+
},
|
|
119
|
+
[createVNode(_component_tiny_popup, {
|
|
120
|
+
modelValue: _ctx.state.showPopup,
|
|
121
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
122
|
+
return _ctx.state.showPopup = $event;
|
|
123
|
+
}),
|
|
124
|
+
"popup-class": "tiny-mobile-dropdown-item__content",
|
|
125
|
+
overlay: _ctx.state.overlay,
|
|
126
|
+
"close-on-click-overlay": _ctx.state.closeOnClickOverlay,
|
|
127
|
+
closeable: false,
|
|
128
|
+
position: _ctx.state.direction === "down" ? "top" : "bottom",
|
|
129
|
+
duration: _ctx.state.transition ? _ctx.state.duration : 0,
|
|
130
|
+
onOpen: _ctx.open,
|
|
131
|
+
onClose: _ctx.close,
|
|
132
|
+
onOpened: _ctx.opened,
|
|
133
|
+
onClosed: _ctx.closed
|
|
134
|
+
}, {
|
|
135
|
+
default: withCtx(function() {
|
|
136
|
+
return [renderSlot(_ctx.$slots, "default", {}, function() {
|
|
137
|
+
return [_ctx.type === "selection" ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(
|
|
138
|
+
Fragment,
|
|
139
|
+
null,
|
|
140
|
+
renderList(_ctx.options, function(item, index) {
|
|
141
|
+
return openBlock(), createElementBlock("div", {
|
|
142
|
+
class: normalizeClass(["tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__option", item.value === _ctx.modelValue ? "is-active" : ""]),
|
|
143
|
+
key: index,
|
|
144
|
+
tabindex: "0",
|
|
145
|
+
onClick: function onClick($event) {
|
|
146
|
+
return _ctx.clickItem(item.value);
|
|
147
|
+
}
|
|
148
|
+
}, [createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "icon", {}, function() {
|
|
149
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))];
|
|
150
|
+
})]), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "title", {
|
|
151
|
+
titleData: item
|
|
152
|
+
}, function() {
|
|
153
|
+
return [createElementVNode(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
style: normalizeStyle({
|
|
157
|
+
color: item.value === _ctx.modelValue && _ctx.state.activeColor ? _ctx.state.activeColor : ""
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
toDisplayString(item.text),
|
|
161
|
+
5
|
|
162
|
+
/* TEXT, STYLE */
|
|
163
|
+
)];
|
|
164
|
+
})]), createElementVNode("div", _hoisted_5, [item.value === _ctx.modelValue ? (openBlock(), createBlock(_component_icon_yes, {
|
|
165
|
+
key: 0,
|
|
166
|
+
fill: _ctx.state.activeColor ? _ctx.state.activeColor : "#f36f64"
|
|
167
|
+
}, null, 8, ["fill"])) : createCommentVNode("v-if", true)])], 10, _hoisted_2);
|
|
168
|
+
}),
|
|
169
|
+
128
|
|
170
|
+
/* KEYED_FRAGMENT */
|
|
171
|
+
))])) : createCommentVNode("v-if", true), _ctx.type === "filter" ? withDirectives((openBlock(), createElementBlock("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(
|
|
172
|
+
Fragment,
|
|
173
|
+
null,
|
|
174
|
+
renderList(_ctx.options, function(item, key) {
|
|
175
|
+
return openBlock(), createElementBlock("div", {
|
|
176
|
+
key,
|
|
177
|
+
class: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__filter-item"
|
|
178
|
+
}, [createElementVNode(
|
|
179
|
+
"span",
|
|
180
|
+
_hoisted_8,
|
|
181
|
+
toDisplayString(item.title),
|
|
182
|
+
1
|
|
183
|
+
/* TEXT */
|
|
184
|
+
), createElementVNode("ul", null, [(openBlock(true), createElementBlock(
|
|
185
|
+
Fragment,
|
|
186
|
+
null,
|
|
187
|
+
renderList(_ctx.options.length === 0 ? item.data = [] : item.data, function(tag, tagkey) {
|
|
188
|
+
return openBlock(), createElementBlock("li", {
|
|
189
|
+
class: normalizeClass(["tiny-mobile-dropdown-item__filter-li", [_ctx.modelValue[key].indexOf(tag.value) > -1 ? "checked" : ""]]),
|
|
190
|
+
style: normalizeStyle(_ctx.getOptionStyle(tag, _ctx.modelValue[key])),
|
|
191
|
+
onClick: function onClick($event) {
|
|
192
|
+
return _ctx.tagClick(key, tag, $event);
|
|
193
|
+
},
|
|
194
|
+
key: tagkey
|
|
195
|
+
}, toDisplayString(tag.text), 15, _hoisted_9);
|
|
196
|
+
}),
|
|
197
|
+
128
|
|
198
|
+
/* KEYED_FRAGMENT */
|
|
199
|
+
))])]);
|
|
200
|
+
}),
|
|
201
|
+
128
|
|
202
|
+
/* KEYED_FRAGMENT */
|
|
203
|
+
))]), createElementVNode("div", _hoisted_10, [createVNode(_component_tiny_button, {
|
|
204
|
+
onClick: _ctx.reset
|
|
205
|
+
}, {
|
|
206
|
+
default: withCtx(function() {
|
|
207
|
+
return [_hoisted_11];
|
|
208
|
+
}),
|
|
209
|
+
_: 1
|
|
210
|
+
/* STABLE */
|
|
211
|
+
}, 8, ["onClick"]), createVNode(_component_tiny_button, {
|
|
212
|
+
type: "primary",
|
|
213
|
+
onClick: _ctx.confirm
|
|
214
|
+
}, {
|
|
215
|
+
default: withCtx(function() {
|
|
216
|
+
return [_hoisted_12];
|
|
217
|
+
}),
|
|
218
|
+
_: 1
|
|
219
|
+
/* STABLE */
|
|
220
|
+
}, 8, ["onClick"])])])), [[_directive_clickoutside, _ctx.clickOutside]]) : createCommentVNode("v-if", true)];
|
|
221
|
+
})];
|
|
222
|
+
}),
|
|
223
|
+
_: 3
|
|
224
|
+
/* FORWARDED */
|
|
225
|
+
}, 8, ["modelValue", "overlay", "close-on-click-overlay", "position", "duration", "onOpen", "onClose", "onOpened", "onClosed"])],
|
|
226
|
+
6
|
|
227
|
+
/* CLASS, STYLE */
|
|
228
|
+
)), [[vShow, _ctx.state.showWrapper]]);
|
|
171
229
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
230
|
+
var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
231
|
+
export {
|
|
232
|
+
mobile as default
|
|
233
|
+
};
|
package/lib/pc.js
CHANGED
|
@@ -1,82 +1,70 @@
|
|
|
1
|
-
import { $prefix,
|
|
2
|
-
import { renderless, api } from
|
|
3
|
-
import { iconDeltaLeft } from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (Array.isArray(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { defineComponent, $prefix, props, setup as _setup } from "@opentiny/vue-common";
|
|
2
|
+
import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
|
|
3
|
+
import { iconDeltaLeft } from "@opentiny/vue-icon";
|
|
4
|
+
import "@opentiny/vue-theme/dropdown-item/index.css";
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createVNode, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, renderSlot, toDisplayString, Fragment, renderList, withCtx } from "vue";
|
|
6
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
7
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
8
|
+
if (it)
|
|
9
|
+
return (it = it.call(o)).next.bind(it);
|
|
10
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
11
|
+
if (it)
|
|
12
|
+
o = it;
|
|
13
|
+
var i = 0;
|
|
14
|
+
return function() {
|
|
15
|
+
if (i >= o.length)
|
|
16
|
+
return { done: true };
|
|
17
|
+
return { done: false, value: o[i++] };
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
21
|
}
|
|
15
22
|
function _unsupportedIterableToArray(o, minLen) {
|
|
16
|
-
if (!o)
|
|
17
|
-
|
|
23
|
+
if (!o)
|
|
24
|
+
return;
|
|
25
|
+
if (typeof o === "string")
|
|
26
|
+
return _arrayLikeToArray(o, minLen);
|
|
18
27
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19
|
-
if (n === "Object" && o.constructor)
|
|
20
|
-
|
|
21
|
-
if (n === "
|
|
28
|
+
if (n === "Object" && o.constructor)
|
|
29
|
+
n = o.constructor.name;
|
|
30
|
+
if (n === "Map" || n === "Set")
|
|
31
|
+
return Array.from(o);
|
|
32
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
33
|
+
return _arrayLikeToArray(o, minLen);
|
|
22
34
|
}
|
|
23
35
|
function _arrayLikeToArray(arr, len) {
|
|
24
|
-
if (len == null || len > arr.length)
|
|
25
|
-
|
|
36
|
+
if (len == null || len > arr.length)
|
|
37
|
+
len = arr.length;
|
|
38
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
39
|
+
arr2[i] = arr[i];
|
|
26
40
|
return arr2;
|
|
27
41
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if ( ref === void 0 ) ref = {};
|
|
34
|
-
var insertAt = ref.insertAt;
|
|
35
|
-
|
|
36
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
37
|
-
|
|
38
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
39
|
-
var style = document.createElement('style');
|
|
40
|
-
style.type = 'text/css';
|
|
41
|
-
|
|
42
|
-
if (insertAt === 'top') {
|
|
43
|
-
if (head.firstChild) {
|
|
44
|
-
head.insertBefore(style, head.firstChild);
|
|
45
|
-
} else {
|
|
46
|
-
head.appendChild(style);
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
head.appendChild(style);
|
|
42
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
43
|
+
var target = sfc.__vccOpts || sfc;
|
|
44
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
45
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
46
|
+
target[key] = val;
|
|
50
47
|
}
|
|
48
|
+
return target;
|
|
49
|
+
};
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
var css_248z = "[class*=tiny-] li.tiny-dropdown-menu__item{--ti-dropdown-menu-item-hover-bg-color:var(--ti-base-color-hover-background);--ti-dropdown-menu-item-hover-text-color:var(--ti-base-color-brand-6);--ti-dropdown-menu-item-active-bg-color:var(--ti-base-color-brand-6);--ti-dropdown-menu-item-active-text-color:var(--ti-base-color-white);--ti-dropdown-menu-item-disabled-text-color:var(--ti-common-color-text-disabled);--ti-dropdown-menu-item-text-color:#333;--ti-dropdown-menu-item-height:1.5;--ti-dropdown-menu-item-padding-vertical:6px;--ti-dropdown-menu-item-padding-horizontal:20px;--ti-dropdown-menu-item-border-radius:0;--ti-dropdown-menu-item-max-width:130px;--ti-dropdown-menu-item-divided-bg-color:var(--ti-base-color-white);--ti-dropdown-menu-item-divided-margin-top:var(--ti-common-space-base);list-style:none;line-height:var(--ti-dropdown-menu-item-height);padding:var(--ti-dropdown-menu-item-padding-vertical) var(--ti-dropdown-menu-item-padding-horizontal);margin:0;font-size:var(--ti-common-font-size-base);color:var(--ti-dropdown-menu-item-text-color);cursor:pointer;outline:0;position:relative;word-break:break-all;max-width:var(--ti-dropdown-menu-item-max-width);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[class*=tiny-] li.tiny-dropdown-menu__item .tiny-dropdown-menu__item--child{position:absolute;right:100%;top:0;display:none}[class*=tiny-] li.tiny-dropdown-menu__item:focus,[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):hover{background-color:var(--ti-dropdown-menu-item-hover-bg-color);color:var(--ti-dropdown-menu-item-hover-text-color);border-radius:var(--ti-dropdown-menu-item-border-radius)}[class*=tiny-] li.tiny-dropdown-menu__item:focus>.tiny-dropdown-menu__item-content svg,[class*=tiny-] li.tiny-dropdown-menu__item:focus>.tiny-dropdown-menu__item-expand svg,[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):hover>.tiny-dropdown-menu__item-content svg,[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):hover>.tiny-dropdown-menu__item-expand svg{fill:var(--ti-dropdown-menu-item-hover-text-color)}[class*=tiny-] li.tiny-dropdown-menu__item:focus>.tiny-dropdown-menu__item--child,[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):hover>.tiny-dropdown-menu__item--child{display:block}[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):active{background-color:var(--ti-dropdown-menu-item-active-bg-color);color:var(--ti-dropdown-menu-item-active-text-color);border-radius:var(--ti-dropdown-menu-item-border-radius)}[class*=tiny-] li.tiny-dropdown-menu__item:not(.is-disabled):active svg{fill:var(--ti-dropdown-menu-item-active-text-color)}[class*=tiny-] li.tiny-dropdown-menu__item svg{margin-right:5px;margin-top:-2px}[class*=tiny-] li.tiny-dropdown-menu__item.is-disabled{cursor:not-allowed;color:var(--ti-dropdown-menu-item-disabled-text-color)}[class*=tiny-] li.tiny-dropdown-menu__item .tiny-dropdown-menu__item-expand{display:inline-block;height:100%;margin-left:-20px;width:20px}[class*=tiny-] li.tiny-dropdown-menu__item .tiny-dropdown-menu__item-expand .tiny-svg{width:.6em;height:.6em;margin-left:5px}.tiny-dropdown-menu__item--divided{position:relative;margin-top:6px;border-top:1px solid #e4e7ed}.tiny-dropdown-menu__item--divided:before{height:6px;display:block;margin:0 -20px;background-color:var(--ti-dropdown-menu-item-divided-bg-color)}";
|
|
60
|
-
styleInject(css_248z);
|
|
61
|
-
|
|
62
|
-
var script = {
|
|
63
|
-
name: $prefix + 'DropdownItem',
|
|
64
|
-
componentName: $prefix + 'DropdownItem',
|
|
65
|
-
emits: ['item-click'],
|
|
66
|
-
props: [].concat(_toConsumableArray(props), ['command', 'disabled', 'divided', 'icon', 'label', 'itemData', 'appendToBody', 'textField']),
|
|
51
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
52
|
+
name: $prefix + "DropdownItem",
|
|
53
|
+
componentName: $prefix + "DropdownItem",
|
|
54
|
+
emits: ["item-click"],
|
|
55
|
+
props: [].concat(props, ["command", "disabled", "divided", "icon", "label", "itemData", "appendToBody", "textField"]),
|
|
67
56
|
components: {
|
|
68
|
-
|
|
57
|
+
IconDeltaLeft: iconDeltaLeft()
|
|
69
58
|
},
|
|
70
|
-
setup: function setup
|
|
71
|
-
return
|
|
72
|
-
props:
|
|
73
|
-
context
|
|
74
|
-
renderless
|
|
75
|
-
api
|
|
59
|
+
setup: function setup(props2, context) {
|
|
60
|
+
return _setup({
|
|
61
|
+
props: props2,
|
|
62
|
+
context,
|
|
63
|
+
renderless,
|
|
64
|
+
api
|
|
76
65
|
});
|
|
77
66
|
}
|
|
78
|
-
};
|
|
79
|
-
|
|
67
|
+
});
|
|
80
68
|
var _hoisted_1 = ["aria-disabled", "tabindex"];
|
|
81
69
|
var _hoisted_2 = {
|
|
82
70
|
key: 0,
|
|
@@ -85,50 +73,70 @@ var _hoisted_2 = {
|
|
|
85
73
|
var _hoisted_3 = {
|
|
86
74
|
class: "tiny-dropdown-menu__item-content"
|
|
87
75
|
};
|
|
88
|
-
function
|
|
76
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
89
77
|
var _component_icon_delta_left = resolveComponent("icon-delta-left");
|
|
90
78
|
var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
|
|
91
79
|
return openBlock(), createElementBlock("li", {
|
|
92
80
|
class: normalizeClass(["tiny-dropdown-menu__item", {
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
"is-disabled": _ctx.disabled,
|
|
82
|
+
"tiny-dropdown-menu__item--divided": _ctx.divided
|
|
95
83
|
}]),
|
|
96
84
|
ref: "dropdownItem",
|
|
97
|
-
onClick: _cache[0] || (_cache[0] = function
|
|
85
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
98
86
|
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
|
|
99
87
|
}),
|
|
100
|
-
onMousedown: _cache[1] || (_cache[1] = withModifiers(function
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
|
|
89
|
+
}, ["stop"])),
|
|
90
|
+
"aria-disabled": _ctx.disabled,
|
|
91
|
+
tabindex: _ctx.disabled ? null : -1
|
|
92
|
+
}, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_2, [createVNode(_component_icon_delta_left)])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
|
|
104
93
|
key: 0,
|
|
105
94
|
class: "tiny-svg-size"
|
|
106
|
-
})) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default", {
|
|
107
|
-
itemData:
|
|
108
|
-
}, function
|
|
109
|
-
return [createElementVNode(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
95
|
+
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
|
|
96
|
+
itemData: _ctx.itemData
|
|
97
|
+
}, function() {
|
|
98
|
+
return [createElementVNode(
|
|
99
|
+
"span",
|
|
100
|
+
null,
|
|
101
|
+
toDisplayString(_ctx.label),
|
|
102
|
+
1
|
|
103
|
+
/* TEXT */
|
|
104
|
+
)];
|
|
105
|
+
})]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
|
|
106
|
+
"ul",
|
|
107
|
+
{
|
|
108
|
+
key: 1,
|
|
109
|
+
class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-menu__item--child", _ctx.state.popperClass])
|
|
110
|
+
},
|
|
111
|
+
[(openBlock(true), createElementBlock(
|
|
112
|
+
Fragment,
|
|
113
|
+
null,
|
|
114
|
+
renderList(_ctx.itemData.children, function(item, index) {
|
|
115
|
+
return openBlock(), createBlock(_component_tiny_dropdown_item, {
|
|
116
|
+
key: index,
|
|
117
|
+
label: item[_ctx.state.textField],
|
|
118
|
+
itemData: item,
|
|
119
|
+
icon: item.icon,
|
|
120
|
+
disabled: item.disabled,
|
|
121
|
+
divided: item.divided
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(function() {
|
|
124
|
+
return [renderSlot(_ctx.$slots, "default", {
|
|
125
|
+
itemData: item
|
|
126
|
+
})];
|
|
127
|
+
}),
|
|
128
|
+
_: 2
|
|
129
|
+
/* DYNAMIC */
|
|
130
|
+
}, 1032, ["label", "itemData", "icon", "disabled", "divided"]);
|
|
126
131
|
}),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
128
|
|
133
|
+
/* KEYED_FRAGMENT */
|
|
134
|
+
))],
|
|
135
|
+
2
|
|
136
|
+
/* CLASS */
|
|
137
|
+
)) : createCommentVNode("v-if", true)], 42, _hoisted_1);
|
|
130
138
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
140
|
+
export {
|
|
141
|
+
pc as default
|
|
142
|
+
};
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-dropdown-item",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"lint": "eslint src/**/*{.js,.html,.vue} --quiet",
|
|
8
|
-
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js",
|
|
9
|
-
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js"
|
|
10
|
-
},
|
|
5
|
+
"main": "./lib/index.js",
|
|
11
6
|
"dependencies": {
|
|
12
|
-
"@opentiny/vue-common": "~3.6.
|
|
13
|
-
"@opentiny/vue-icon": "~3.6.
|
|
14
|
-
"@opentiny/vue-renderless": "~3.6.
|
|
15
|
-
"@opentiny/vue-popup": "~3.6.
|
|
16
|
-
"@opentiny/vue-button": "~3.6.
|
|
17
|
-
"@opentiny/vue-theme": "~3.6.0",
|
|
18
|
-
"@opentiny/vue-theme-mobile": "~3.6.0"
|
|
7
|
+
"@opentiny/vue-common": "~3.6.1-alpha.1",
|
|
8
|
+
"@opentiny/vue-icon": "~3.6.1-alpha.1",
|
|
9
|
+
"@opentiny/vue-renderless": "~3.6.1-alpha.1",
|
|
10
|
+
"@opentiny/vue-popup": "~3.6.1-alpha.1",
|
|
11
|
+
"@opentiny/vue-button": "~3.6.1-alpha.1"
|
|
19
12
|
},
|
|
20
13
|
"license": "MIT",
|
|
21
14
|
"types": "index.d.ts",
|
|
22
|
-
"
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "pnpm -w build:ui $npm_package_name",
|
|
17
|
+
"//postversion": "pnpm build"
|
|
18
|
+
}
|
|
23
19
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,37 +1,75 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
icon: (
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
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
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
35
|
+
icon: (StringConstructor | ObjectConstructor)[];
|
|
36
|
+
disabled: BooleanConstructor;
|
|
37
|
+
divided: BooleanConstructor;
|
|
38
|
+
command: {};
|
|
39
|
+
title: StringConstructor;
|
|
40
|
+
titleClass: StringConstructor;
|
|
41
|
+
options: {
|
|
42
|
+
type: ArrayConstructor;
|
|
43
|
+
default: () => never[];
|
|
44
|
+
};
|
|
45
|
+
type: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
label: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
itemData: {
|
|
54
|
+
type: ObjectConstructor;
|
|
55
|
+
default: () => {};
|
|
56
|
+
};
|
|
57
|
+
appendToBody: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
textField: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
}>>, {
|
|
66
|
+
type: string;
|
|
67
|
+
disabled: boolean;
|
|
68
|
+
textField: string;
|
|
69
|
+
label: string;
|
|
70
|
+
options: unknown[];
|
|
71
|
+
divided: boolean;
|
|
72
|
+
itemData: Record<string, any>;
|
|
73
|
+
appendToBody: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
export default _default;
|
package/src/mobile.vue.d.ts
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
directives: {
|
|
4
|
-
Clickoutside: any;
|
|
5
|
-
};
|
|
6
|
-
props: string[];
|
|
7
|
-
components: {
|
|
8
|
-
IconYes: any;
|
|
9
|
-
TinyPopup: any;
|
|
10
|
-
TinyButton: any;
|
|
11
|
-
};
|
|
12
|
-
emits: string[];
|
|
13
|
-
setup(props: any, context: any): {
|
|
14
|
-
t: any;
|
|
15
|
-
vm: any;
|
|
16
|
-
f: (props: any, attrs?: {}) => {};
|
|
17
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
18
|
-
d: (props: any) => void;
|
|
19
|
-
dp: (props: any) => void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
1
|
+
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<unknown, object, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<unknown>, {}>;
|
|
2
|
+
export default _sfc_main;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
1
|
+
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
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
|
+
}, 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<{
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
}>>> & {
|
|
13
|
+
"onItem-click"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}>;
|
|
17
|
+
export default _sfc_main;
|
package/src/index.vue.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
modelValue: null;
|
|
3
|
-
title: StringConstructor;
|
|
4
|
-
disabled: BooleanConstructor;
|
|
5
|
-
titleClass: StringConstructor;
|
|
6
|
-
options: {
|
|
7
|
-
type: ArrayConstructor;
|
|
8
|
-
default: () => never[];
|
|
9
|
-
};
|
|
10
|
-
icon: ObjectConstructor;
|
|
11
|
-
type: {
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
}, {
|
|
16
|
-
t: any;
|
|
17
|
-
vm: any;
|
|
18
|
-
f: (props: any, attrs?: {}) => {};
|
|
19
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
20
|
-
d: (props: any) => void;
|
|
21
|
-
dp: (props: any) => void;
|
|
22
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue" | "close" | "confirm" | "open" | "opened" | "closed")[], "click" | "change" | "update:modelValue" | "close" | "confirm" | "open" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
-
modelValue: null;
|
|
24
|
-
title: StringConstructor;
|
|
25
|
-
disabled: BooleanConstructor;
|
|
26
|
-
titleClass: StringConstructor;
|
|
27
|
-
options: {
|
|
28
|
-
type: ArrayConstructor;
|
|
29
|
-
default: () => never[];
|
|
30
|
-
};
|
|
31
|
-
icon: ObjectConstructor;
|
|
32
|
-
type: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
default: string;
|
|
35
|
-
};
|
|
36
|
-
}>> & {
|
|
37
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
38
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
39
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
41
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
42
|
-
onOpen?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
onOpened?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
onClosed?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
type: string;
|
|
47
|
-
disabled: boolean;
|
|
48
|
-
options: unknown[];
|
|
49
|
-
}>;
|
|
50
|
-
export default _default;
|