@opentinyvue/vue-dropdown-item 2.21.0 → 2.22.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/lib/index.js CHANGED
@@ -7,9 +7,8 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
10
+ import { defineComponent, $props, $setup, $prefix } from "@opentinyvue/vue-common";
11
11
  import PcTemplate from "./pc.js";
12
- import MobileTemplate from "./mobile.js";
13
12
  import MobileFirstTemplate from "./mobile-first.js";
14
13
  var template = function template2(mode) {
15
14
  var _process$env;
@@ -17,9 +16,6 @@ var template = function template2(mode) {
17
16
  if ("pc" === (tinyMode || mode)) {
18
17
  return PcTemplate;
19
18
  }
20
- if ("mobile" === (tinyMode || mode)) {
21
- return MobileTemplate;
22
- }
23
19
  if ("mobile-first" === (tinyMode || mode)) {
24
20
  return MobileFirstTemplate;
25
21
  }
@@ -118,7 +114,7 @@ var DropdownItem = defineComponent({
118
114
  });
119
115
  }
120
116
  });
121
- var version = "2.21.0";
117
+ var version = "2.undefined";
122
118
  DropdownItem.model = {
123
119
  prop: "modelValue",
124
120
  event: "update:modelValue"
package/package.json CHANGED
@@ -1,21 +1,18 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-dropdown-item",
3
3
  "type": "module",
4
- "version": "2.21.0",
4
+ "version": "2.22.1",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/vue-button": "~2.21.0",
12
- "@opentinyvue/vue-common": "~2.21.0",
13
- "@opentinyvue/vue-directive": "~2.21.0",
14
- "@opentinyvue/vue-icon": "~2.21.0",
15
- "@opentinyvue/vue-popup": "~2.21.0",
16
- "@opentinyvue/vue-renderless": "~3.21.0",
17
- "@opentinyvue/vue-theme": "~3.21.0",
18
- "@opentinyvue/vue-theme-mobile": "~3.21.0"
11
+ "@opentinyvue/vue-common": "~2.22.0",
12
+ "@opentinyvue/vue-directive": "~2.22.0",
13
+ "@opentinyvue/vue-icon": "~2.22.0",
14
+ "@opentinyvue/vue-renderless": "~3.22.0",
15
+ "@opentinyvue/vue-theme": "~3.22.0"
19
16
  },
20
17
  "types": "index.d.ts",
21
18
  "scripts": {
package/lib/mobile.js DELETED
@@ -1,195 +0,0 @@
1
- import { renderless, api } from '@opentinyvue/vue-renderless/dropdown-item/vue';
2
- import { defineComponent, directive, props, setup } from '@opentinyvue/vue-common';
3
- import { iconYes } from '@opentinyvue/vue-icon';
4
- import Popup from '@opentinyvue/vue-popup';
5
- import Button from '@opentinyvue/vue-button';
6
- import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
7
- import '@opentinyvue/vue-theme-mobile/dropdown-item/index.css';
8
-
9
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
10
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
11
- if (render) {
12
- options.render = render;
13
- options.staticRenderFns = staticRenderFns;
14
- options._compiled = true;
15
- }
16
- var hook;
17
- if (injectStyles) {
18
- hook = injectStyles;
19
- }
20
- if (hook) {
21
- if (options.functional) {
22
- options._injectStyles = hook;
23
- var originalRender = options.render;
24
- options.render = function renderWithStyleInjection(h, context) {
25
- hook.call(context);
26
- return originalRender(h, context);
27
- };
28
- } else {
29
- var existing = options.beforeCreate;
30
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
31
- }
32
- }
33
- return {
34
- exports: scriptExports,
35
- options
36
- };
37
- }
38
-
39
- var __vue2_script = defineComponent({
40
- directives: directive({
41
- Clickoutside
42
- }),
43
- props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
44
- components: {
45
- IconYes: iconYes(),
46
- TinyPopup: Popup,
47
- TinyButton: Button
48
- },
49
- emits: ["update:modelValue", "open", "opened", "click", "change", "closed", "close", "reset", "confirm", "item-click"],
50
- setup: function setup$1(props2, context) {
51
- return setup({
52
- props: props2,
53
- context,
54
- renderless,
55
- api
56
- });
57
- }
58
- });
59
- var render = function render2() {
60
- var _vm = this;
61
- var _h = _vm.$createElement;
62
- var _c = _vm._self._c || _h;
63
- return _c("div", {
64
- directives: [{
65
- name: "show",
66
- rawName: "v-show",
67
- value: _vm.state.showWrapper,
68
- expression: "state.showWrapper"
69
- }],
70
- ref: "wrapper",
71
- staticClass: "tiny-mobile-dropdown-item",
72
- class: "tiny-mobile-dropdown-item--" + _vm.state.direction,
73
- style: _vm.state.itemStyle,
74
- on: {
75
- "click": _vm.clickWrapper
76
- }
77
- }, [_c("tiny-popup", {
78
- attrs: {
79
- "popup-class": "tiny-mobile-dropdown-item__content",
80
- "overlay": _vm.state.overlay,
81
- "close-on-click-overlay": _vm.state.closeOnClickOverlay,
82
- "closeable": false,
83
- "position": _vm.state.direction === "down" ? "top" : "bottom",
84
- "duration": _vm.state.transition ? _vm.state.duration : 0
85
- },
86
- on: {
87
- "open": _vm.open,
88
- "close": _vm.close,
89
- "opened": _vm.opened,
90
- "closed": _vm.closed
91
- },
92
- model: {
93
- value: _vm.state.showPopup,
94
- callback: function callback($$v) {
95
- _vm.$set(_vm.state, "showPopup", $$v);
96
- },
97
- expression: "state.showPopup"
98
- }
99
- }, [_vm._t("default", function() {
100
- return [_vm.type === "selection" ? _c("div", {
101
- staticClass: "tiny-mobile-dropdown-item__options"
102
- }, _vm._l(_vm.options, function(item, index) {
103
- return _c("div", {
104
- key: index,
105
- staticClass: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__option",
106
- class: item.value === _vm.modelValue ? "is-active" : "",
107
- attrs: {
108
- "tabindex": "0"
109
- },
110
- on: {
111
- "click": function click($event) {
112
- return _vm.clickItem(item.value);
113
- }
114
- }
115
- }, [_c("div", {
116
- staticClass: "tiny-mobile-dropdown-item__option-icon"
117
- }, [_vm._t("icon", function() {
118
- return [_c(_vm.icon, {
119
- tag: "component"
120
- })];
121
- })], 2), _c("div", {
122
- staticClass: "tiny-mobile-dropdown-item__option-title"
123
- }, [_vm._t("title", function() {
124
- return [_c("span", {
125
- style: {
126
- color: item.value === _vm.modelValue && _vm.state.activeColor ? _vm.state.activeColor : ""
127
- }
128
- }, [_vm._v(_vm._s(item.text))])];
129
- }, {
130
- "titleData": item
131
- })], 2), _c("div", {
132
- staticClass: "tiny-mobile-dropdown-item__option-value"
133
- }, [item.value === _vm.modelValue ? _c("icon-yes", {
134
- attrs: {
135
- "fill": _vm.state.activeColor ? _vm.state.activeColor : "#f36f64"
136
- }
137
- }) : _vm._e()], 1)]);
138
- }), 0) : _vm._e(), _vm.type === "filter" ? _c("div", {
139
- directives: [{
140
- name: "clickoutside",
141
- rawName: "v-clickoutside",
142
- value: _vm.clickOutside,
143
- expression: "clickOutside"
144
- }],
145
- staticClass: "tiny-mobile-dropdown-item__filter"
146
- }, [_c("div", {
147
- staticClass: "tiny-mobile-dropdown-item__filter-wrap"
148
- }, _vm._l(_vm.options, function(item, key) {
149
- return _c("div", {
150
- key,
151
- staticClass: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__filter-item"
152
- }, [_c("span", {
153
- staticClass: "tiny-mobile-dropdown-item__filter-title"
154
- }, [_vm._v(_vm._s(item.title))]), _c("ul", _vm._l(_vm.options.length === 0 ? item.data = [] : item.data, function(tag, tagkey) {
155
- return _c("li", {
156
- key: tagkey,
157
- staticClass: "tiny-mobile-dropdown-item__filter-li",
158
- class: [_vm.modelValue[key].indexOf(tag.value) > -1 ? "checked" : ""],
159
- style: _vm.getOptionStyle(tag, _vm.modelValue[key]),
160
- on: {
161
- "click": function click($event) {
162
- return _vm.tagClick(key, tag, $event);
163
- }
164
- }
165
- }, [_vm._v(" " + _vm._s(tag.text) + " ")]);
166
- }), 0)]);
167
- }), 0), _c("div", {
168
- staticClass: "tiny-mobile-dropdown-item__filter-operate"
169
- }, [_c("tiny-button", {
170
- on: {
171
- "click": _vm.reset
172
- }
173
- }, [_vm._v(" Reset ")]), _c("tiny-button", {
174
- attrs: {
175
- "type": "primary"
176
- },
177
- on: {
178
- "click": _vm.confirm
179
- }
180
- }, [_vm._v(" OK ")])], 1)]) : _vm._e()];
181
- })], 2)], 1);
182
- };
183
- var staticRenderFns = [];
184
- var __cssModules = {};
185
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
186
- function __vue2_injectStyles(context) {
187
- for (var o in __cssModules) {
188
- this[o] = __cssModules[o];
189
- }
190
- }
191
- var mobile = /* @__PURE__ */ function() {
192
- return __component__.exports;
193
- }();
194
-
195
- export { mobile as default };
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;