@opentinyvue/vue-dropdown-menu 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 +2 -6
- package/package.json +6 -8
- package/lib/mobile.js +0 -135
- package/src/mobile.vue.d.ts +0 -2
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, $
|
|
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
|
}
|
|
@@ -96,7 +92,7 @@ var DropdownMenu = defineComponent({
|
|
|
96
92
|
});
|
|
97
93
|
}
|
|
98
94
|
});
|
|
99
|
-
var version = "2.
|
|
95
|
+
var version = "2.undefined";
|
|
100
96
|
DropdownMenu.install = function(Vue) {
|
|
101
97
|
Vue.component(DropdownMenu.name, DropdownMenu);
|
|
102
98
|
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-dropdown-menu",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
11
|
-
"@opentinyvue/vue-common": "~2.
|
|
12
|
-
"@opentinyvue/vue-
|
|
13
|
-
"@opentinyvue/vue-
|
|
14
|
-
"@opentinyvue/vue-theme
|
|
15
|
-
"@opentinyvue/vue-dropdown-item": "~2.21.0",
|
|
16
|
-
"@opentinyvue/vue-theme": "~3.21.0"
|
|
10
|
+
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
11
|
+
"@opentinyvue/vue-common": "~2.22.0",
|
|
12
|
+
"@opentinyvue/vue-tooltip": "~2.22.0",
|
|
13
|
+
"@opentinyvue/vue-dropdown-item": "~2.22.0",
|
|
14
|
+
"@opentinyvue/vue-theme": "~3.22.0"
|
|
17
15
|
},
|
|
18
16
|
"license": "MIT",
|
|
19
17
|
"types": "index.d.ts",
|
package/lib/mobile.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/dropdown-menu/vue';
|
|
2
|
-
import { defineComponent, props, directive, setup } from '@opentinyvue/vue-common';
|
|
3
|
-
import { iconUp, iconDown, iconUnfilter, iconSort, iconDeltaDown, iconDeltaUp } from '@opentinyvue/vue-icon';
|
|
4
|
-
import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
|
|
5
|
-
import '@opentinyvue/vue-theme-mobile/dropdown-menu/index.css';
|
|
6
|
-
|
|
7
|
-
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
8
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
9
|
-
if (render) {
|
|
10
|
-
options.render = render;
|
|
11
|
-
options.staticRenderFns = staticRenderFns;
|
|
12
|
-
options._compiled = true;
|
|
13
|
-
}
|
|
14
|
-
var hook;
|
|
15
|
-
if (injectStyles) {
|
|
16
|
-
hook = injectStyles;
|
|
17
|
-
}
|
|
18
|
-
if (hook) {
|
|
19
|
-
if (options.functional) {
|
|
20
|
-
options._injectStyles = hook;
|
|
21
|
-
var originalRender = options.render;
|
|
22
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
23
|
-
hook.call(context);
|
|
24
|
-
return originalRender(h, context);
|
|
25
|
-
};
|
|
26
|
-
} else {
|
|
27
|
-
var existing = options.beforeCreate;
|
|
28
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
exports: scriptExports,
|
|
33
|
-
options
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var __vue2_script = defineComponent({
|
|
38
|
-
props: [].concat(props, ["activeColor", "closeOnClickOutside", "closeOnClickOverlay", "direction", "duration", "overlay", "zIndex"]),
|
|
39
|
-
components: {
|
|
40
|
-
IconUp: iconUp(),
|
|
41
|
-
IconDown: iconDown(),
|
|
42
|
-
IconUnfilter: iconUnfilter(),
|
|
43
|
-
IconSort: iconSort(),
|
|
44
|
-
IconDeltaDown: iconDeltaDown(),
|
|
45
|
-
IconDeltaUp: iconDeltaUp()
|
|
46
|
-
},
|
|
47
|
-
directives: directive({
|
|
48
|
-
Clickoutside
|
|
49
|
-
}),
|
|
50
|
-
emits: ["open", "created"],
|
|
51
|
-
setup: function setup$1(props2, context) {
|
|
52
|
-
return setup({
|
|
53
|
-
props: props2,
|
|
54
|
-
context,
|
|
55
|
-
renderless,
|
|
56
|
-
api
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
var render = function render2() {
|
|
61
|
-
var _vm = this;
|
|
62
|
-
var _h = _vm.$createElement;
|
|
63
|
-
var _c = _vm._self._c || _h;
|
|
64
|
-
return _c("div", {
|
|
65
|
-
ref: "menu",
|
|
66
|
-
staticClass: "tiny-mobile-dropdown-menu"
|
|
67
|
-
}, [_c("div", {
|
|
68
|
-
staticClass: "tiny-mobile-dropdown-menu__bar tiny-mobile-dropdown-menu__bar--opened"
|
|
69
|
-
}, _vm._l(_vm.state.children, function(item, index) {
|
|
70
|
-
return _c("div", {
|
|
71
|
-
directives: [{
|
|
72
|
-
name: "clickoutside",
|
|
73
|
-
rawName: "v-clickoutside",
|
|
74
|
-
value: _vm.clickOutside,
|
|
75
|
-
expression: "clickOutside"
|
|
76
|
-
}],
|
|
77
|
-
key: index,
|
|
78
|
-
staticClass: "tiny-mobile-dropdown-menu__item",
|
|
79
|
-
class: [item.disabled ? "is-disabled" : "", item.titleClass],
|
|
80
|
-
attrs: {
|
|
81
|
-
"role": "button",
|
|
82
|
-
"tabindex": item.disabled ? -1 : 0
|
|
83
|
-
},
|
|
84
|
-
on: {
|
|
85
|
-
"click": function click($event) {
|
|
86
|
-
return _vm.toggleItem(index, item);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, [_c("div", {
|
|
90
|
-
staticClass: "tiny-mobile-dropdown-menu__title",
|
|
91
|
-
class: {
|
|
92
|
-
"is-active": item.state.showPopup,
|
|
93
|
-
"is-down": item.state.showPopup === (_vm.direction === "down")
|
|
94
|
-
},
|
|
95
|
-
style: {
|
|
96
|
-
color: item.state.showPopup ? _vm.activeColor : ""
|
|
97
|
-
}
|
|
98
|
-
}, [_c("div", {
|
|
99
|
-
staticClass: "tiny-mobile-dropdown-menu__title-wrap"
|
|
100
|
-
}, [!_vm.slots.title ? _c("span", [_c("span", {
|
|
101
|
-
staticClass: "tiny-mobile-dropdown-menu__title-text"
|
|
102
|
-
}, [_vm._v(_vm._s(item.state.displayTitle))]), item.type === "sort" ? _c("span", {
|
|
103
|
-
staticClass: "tiny-mobile-dropdown-menu__title-icon"
|
|
104
|
-
}, [_c("icon-delta-up", {
|
|
105
|
-
staticClass: "up",
|
|
106
|
-
attrs: {
|
|
107
|
-
"fill": item.state.sort === "asc" ? _vm.activeColor ? _vm.activeColor : "#f36f64" : "#ccc"
|
|
108
|
-
}
|
|
109
|
-
}), _c("icon-delta-down", {
|
|
110
|
-
staticClass: "down",
|
|
111
|
-
attrs: {
|
|
112
|
-
"fill": item.state.sort === "desc" ? _vm.activeColor ? _vm.activeColor : "#f36f64" : "#ccc"
|
|
113
|
-
}
|
|
114
|
-
})], 1) : _c(item.type === "filter" ? "IconUnfilter" : item.type === "selection" && item.state.showPopup ? "IconUp" : "IconDown", {
|
|
115
|
-
tag: "component",
|
|
116
|
-
class: [item.type === "filter" ? "filter-icon" : ""],
|
|
117
|
-
attrs: {
|
|
118
|
-
"fill": item.state.showPopup ? _vm.activeColor ? _vm.activeColor : "#f36f64" : "#ccc"
|
|
119
|
-
}
|
|
120
|
-
})], 1) : _vm._t("title")], 2)])]);
|
|
121
|
-
}), 0), _vm._t("default")], 2);
|
|
122
|
-
};
|
|
123
|
-
var staticRenderFns = [];
|
|
124
|
-
var __cssModules = {};
|
|
125
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
126
|
-
function __vue2_injectStyles(context) {
|
|
127
|
-
for (var o in __cssModules) {
|
|
128
|
-
this[o] = __cssModules[o];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
var mobile = /* @__PURE__ */ function() {
|
|
132
|
-
return __component__.exports;
|
|
133
|
-
}();
|
|
134
|
-
|
|
135
|
-
export { mobile as default };
|
package/src/mobile.vue.d.ts
DELETED