@opentiny/vue-dropdown-item 3.6.0 → 3.6.1-alpha.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/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
- import { $prefix, $props, $setup } from '@opentiny/vue-common';
2
- import PCTemplate from './pc';
3
- import MobileTemplate from './mobile';
4
-
5
- function ownKeys(object, enumerableOnly) {
6
- var keys = Object.keys(object);
7
- if (Object.getOwnPropertySymbols) {
8
- var symbols = Object.getOwnPropertySymbols(object);
9
- enumerableOnly && (symbols = symbols.filter(function (sym) {
10
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11
- })), keys.push.apply(keys, symbols);
12
- }
13
- return keys;
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
- var template = function template(mode) {
56
- if (process.env.TINY_MODE === 'pc') return PCTemplate;else if (process.env.TINY_MODE === 'mobile') return MobileTemplate;else return mode === 'mobile' ? MobileTemplate : PCTemplate;
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 + 'DropdownItem',
60
- componentName: 'TinyDropdownItem',
61
- props: _objectSpread2(_objectSpread2({}, $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: 'selection'
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 _default() {
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: 'label'
60
+ default: "label"
95
61
  }
96
62
  }),
97
63
  setup: function setup(props, context) {
98
64
  return $setup({
99
- props: props,
100
- context: context,
101
- template: 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: 'modelValue',
108
- event: 'update:modelValue'
73
+ prop: "modelValue",
74
+ event: "update:modelValue"
109
75
  };
110
- DropdownItem.install = function (Vue) {
76
+ DropdownItem.install = function(Vue) {
111
77
  Vue.component(DropdownItem.name, DropdownItem);
112
78
  };
113
- DropdownItem.version = '3.6.0';
114
-
115
- export { DropdownItem as default };
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 '@opentiny/vue-renderless/dropdown-item/vue';
2
- import { setup, props } 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, createTextVNode, vShow } from 'vue';
9
-
10
- function _toConsumableArray(arr) {
11
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
12
- }
13
- function _arrayWithoutHoles(arr) {
14
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
15
- }
16
- function _iterableToArray(iter) {
17
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
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) return;
21
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
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) n = o.constructor.name;
24
- if (n === "Map" || n === "Set") return Array.from(o);
25
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
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) len = arr.length;
29
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
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 _nonIterableSpread() {
33
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
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 script = {
54
+ var _sfc_main = /* @__PURE__ */ defineComponent({
37
55
  directives: {
38
- Clickoutside: Clickoutside
56
+ Clickoutside
39
57
  },
40
- props: [].concat(_toConsumableArray(props), ['modelValue', 'title', 'disabled', 'titleClass', 'options', 'icon', 'type']),
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: ['update:modelValue', 'open', 'opened', 'click', 'change', 'closed', 'close', 'reset', 'confirm', 'item-click'],
47
- setup: function setup$1(props, context) {
48
- return setup({
49
- props: props,
50
- context: context,
51
- renderless: renderless,
52
- api: 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
- function render(_ctx, _cache, $props, $setup, $data, $options) {
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("div", {
91
- ref: "wrapper",
92
- class: normalizeClass(['tiny-mobile-dropdown-item--' + _ctx.state.direction, "tiny-mobile-dropdown-item"]),
93
- onClick: _cache[1] || (_cache[1] = function () {
94
- return _ctx.clickWrapper && _ctx.clickWrapper.apply(_ctx, arguments);
95
- }),
96
- style: normalizeStyle(_ctx.state.itemStyle)
97
- }, [createVNode(_component_tiny_popup, {
98
- modelValue: _ctx.state.showPopup,
99
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
100
- return _ctx.state.showPopup = $event;
101
- }),
102
- popupClass: "tiny-mobile-dropdown-item__content",
103
- overlay: _ctx.state.overlay,
104
- "close-on-click-overlay": _ctx.state.closeOnClickOverlay,
105
- closeable: false,
106
- position: _ctx.state.direction === 'down' ? 'top' : 'bottom',
107
- duration: _ctx.state.transition ? _ctx.state.duration : 0,
108
- onOpen: _ctx.open,
109
- onClose: _ctx.close,
110
- onOpened: _ctx.opened,
111
- onClosed: _ctx.closed
112
- }, {
113
- default: withCtx(function () {
114
- return [renderSlot(_ctx.$slots, "default", {}, function () {
115
- return [$props.type === 'selection' ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, function (item, index) {
116
- return openBlock(), createElementBlock("div", {
117
- class: normalizeClass(["tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__option", item.value === $props.modelValue ? 'is-active' : '']),
118
- key: index,
119
- tabindex: "0",
120
- onClick: function onClick($event) {
121
- return _ctx.clickItem(item.value);
122
- }
123
- }, [createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "icon", {}, function () {
124
- return [(openBlock(), createBlock(resolveDynamicComponent($props.icon)))];
125
- })]), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "title", {
126
- titleData: item
127
- }, function () {
128
- return [createElementVNode("span", {
129
- style: normalizeStyle({
130
- color: item.value === $props.modelValue && _ctx.state.activeColor ? _ctx.state.activeColor : ''
131
- })
132
- }, toDisplayString(item.text), 5)];
133
- })]), createElementVNode("div", _hoisted_5, [item.value === $props.modelValue ? (openBlock(), createBlock(_component_icon_yes, {
134
- key: 0,
135
- fill: _ctx.state.activeColor ? _ctx.state.activeColor : '#f36f64'
136
- }, null, 8, ["fill"])) : createCommentVNode("", true)])], 10, _hoisted_2);
137
- }), 128))])) : createCommentVNode("", true), $props.type === 'filter' ? withDirectives((openBlock(), createElementBlock("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, function (item, key) {
138
- return openBlock(), createElementBlock("div", {
139
- key: key,
140
- class: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__filter-item"
141
- }, [createElementVNode("span", _hoisted_8, toDisplayString(item.title), 1), createElementVNode("ul", null, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.options.length === 0 ? item.data = [] : item.data, function (tag, tagkey) {
142
- return openBlock(), createElementBlock("li", {
143
- class: normalizeClass(["tiny-mobile-dropdown-item__filter-li", [$props.modelValue[key].indexOf(tag.value) > -1 ? 'checked' : '']]),
144
- style: normalizeStyle(_ctx.getOptionStyle(tag, $props.modelValue[key])),
145
- onClick: function onClick($event) {
146
- return _ctx.tagClick(key, tag, $event);
147
- },
148
- key: tagkey
149
- }, toDisplayString(tag.text), 15, _hoisted_9);
150
- }), 128))])]);
151
- }), 128))]), createElementVNode("div", _hoisted_10, [createVNode(_component_tiny_button, {
152
- onClick: _ctx.reset
153
- }, {
154
- default: withCtx(function () {
155
- return [createTextVNode("Reset")];
156
- }),
157
- _: 1
158
- }, 8, ["onClick"]), createVNode(_component_tiny_button, {
159
- type: "primary",
160
- onClick: _ctx.confirm
161
- }, {
162
- default: withCtx(function () {
163
- return [createTextVNode("OK")];
164
- }),
165
- _: 1
166
- }, 8, ["onClick"])])])), [[_directive_clickoutside, _ctx.clickOutside]]) : createCommentVNode("", true)];
167
- })];
168
- }),
169
- _: 3
170
- }, 8, ["modelValue", "overlay", "close-on-click-overlay", "position", "duration", "onOpen", "onClose", "onOpened", "onClosed"])], 6)), [[vShow, _ctx.state.showWrapper]]);
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
- script.render = render;
174
-
175
- export { script as default };
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, setup, props } from '@opentiny/vue-common';
2
- import { renderless, api } from '@opentiny/vue-renderless/dropdown-item/vue';
3
- import { iconDeltaLeft } from '@opentiny/vue-icon';
4
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createVNode, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, renderSlot, toDisplayString, Fragment, renderList, withCtx } from 'vue';
5
-
6
- function _toConsumableArray(arr) {
7
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
8
- }
9
- function _arrayWithoutHoles(arr) {
10
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
11
- }
12
- function _iterableToArray(iter) {
13
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
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) return;
17
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
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) n = o.constructor.name;
20
- if (n === "Map" || n === "Set") return Array.from(o);
21
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
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) len = arr.length;
25
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
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 _nonIterableSpread() {
29
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
30
- }
31
-
32
- function styleInject(css, ref) {
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
- if (style.styleSheet) {
53
- style.styleSheet.cssText = css;
54
- } else {
55
- style.appendChild(document.createTextNode(css));
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
- iconDeltaLeft: iconDeltaLeft()
57
+ IconDeltaLeft: iconDeltaLeft()
69
58
  },
70
- setup: function setup$1(props, context) {
71
- return setup({
72
- props: props,
73
- context: context,
74
- renderless: renderless,
75
- api: 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 render(_ctx, _cache, $props, $setup, $data, $options) {
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
- 'is-disabled': $props.disabled,
94
- 'tiny-dropdown-menu__item--divided': $props.divided
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 () {}, ["stop"])),
101
- "aria-disabled": $props.disabled,
102
- tabindex: $props.disabled ? null : -1
103
- }, [$props.itemData.children && $props.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_2, [createVNode(_component_icon_delta_left)])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [$props.icon ? (openBlock(), createBlock(resolveDynamicComponent($props.icon), {
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: $props.itemData
108
- }, function () {
109
- return [createElementVNode("span", null, toDisplayString($props.label), 1)];
110
- })]), $props.itemData.children && $props.itemData.children.length ? (openBlock(), createElementBlock("ul", {
111
- key: 1,
112
- class: normalizeClass(['tiny-dropdown-menu', 'tiny-dropdown-menu__item--child', _ctx.state.popperClass])
113
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.itemData.children, function (item, index) {
114
- return openBlock(), createBlock(_component_tiny_dropdown_item, {
115
- key: index,
116
- label: item[_ctx.state.textField],
117
- itemData: item,
118
- icon: item.icon,
119
- disabled: item.disabled,
120
- divided: item.divided
121
- }, {
122
- default: withCtx(function () {
123
- return [renderSlot(_ctx.$slots, "default", {
124
- itemData: item
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
- _: 2
128
- }, 1032, ["label", "itemData", "icon", "disabled", "divided"]);
129
- }), 128))], 2)) : createCommentVNode("", true)], 42, _hoisted_1);
132
+ 128
133
+ /* KEYED_FRAGMENT */
134
+ ))],
135
+ 2
136
+ /* CLASS */
137
+ )) : createCommentVNode("v-if", true)], 42, _hoisted_1);
130
138
  }
131
-
132
- script.render = render;
133
-
134
- export { script as default };
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.0",
3
+ "version": "3.6.1-alpha.0",
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.0",
13
- "@opentiny/vue-icon": "~3.6.0",
14
- "@opentiny/vue-renderless": "~3.6.0",
15
- "@opentiny/vue-popup": "~3.6.0",
16
- "@opentiny/vue-button": "~3.6.0",
17
- "@opentiny/vue-theme": "~3.6.0",
18
- "@opentiny/vue-theme-mobile": "~3.6.0"
7
+ "@opentiny/vue-common": "~3.6.1-alpha.0",
8
+ "@opentiny/vue-icon": "~3.6.1-alpha.0",
9
+ "@opentiny/vue-renderless": "~3.6.1-alpha.0",
10
+ "@opentiny/vue-popup": "~3.6.1-alpha.0",
11
+ "@opentiny/vue-button": "~3.6.1-alpha.0"
19
12
  },
20
13
  "license": "MIT",
21
14
  "types": "index.d.ts",
22
- "sideEffects": false
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: (ObjectConstructor | StringConstructor)[];
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
- }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
- icon: (ObjectConstructor | StringConstructor)[];
18
- disabled: BooleanConstructor;
19
- divided: BooleanConstructor;
20
- command: {};
21
- title: StringConstructor;
22
- titleClass: StringConstructor;
23
- options: {
24
- type: ArrayConstructor;
25
- default: () => never[];
26
- };
27
- type: {
28
- type: StringConstructor;
29
- default: string;
30
- };
31
- }>>, {
32
- type: string;
33
- disabled: boolean;
34
- options: unknown[];
35
- divided: boolean;
36
- }>;
37
- export default _default;
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;
@@ -1,22 +1,2 @@
1
- import '@opentiny/vue-theme-mobile/dropdown-item/index.css';
2
- declare const _default: {
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 '@opentiny/vue-theme/dropdown-item/index.css';
2
- declare const _default: {
3
- props: string[];
4
- setup(props: any, context: any): {
5
- t: any;
6
- vm: any;
7
- f: (props: any, attrs?: {}) => {};
8
- a: (attrs: any, filters: any, include: any) => {};
9
- d: (props: any) => void;
10
- dp: (props: any) => void;
11
- };
12
- };
13
- export default _default;
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;
@@ -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;