@opentinyvue/vue-fall-menu 2.21.0 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -34,7 +34,7 @@ var FallMenu = defineComponent({
34
34
  });
35
35
  }
36
36
  });
37
- var version = "2.21.0";
37
+ var version = "3.21.0";
38
38
  FallMenu.install = function(Vue) {
39
39
  Vue.component(FallMenu.name, FallMenu);
40
40
  };
package/lib/pc.js CHANGED
@@ -3,38 +3,42 @@ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import Row from '@opentinyvue/vue-row';
4
4
  import Col from '@opentinyvue/vue-col';
5
5
  import { iconChevronLeft, iconChevronRight } from '@opentinyvue/vue-icon';
6
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, withDirectives, renderSlot, createVNode, vShow, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, withCtx, createBlock } from 'vue';
6
7
 
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;
8
+ function _createForOfIteratorHelperLoose(r, e) {
9
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10
+ if (t) return (t = t.call(r)).next.bind(t);
11
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
12
+ t && (r = t);
13
+ var o = 0;
14
+ return function() {
15
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
16
+ };
13
17
  }
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
- }
18
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19
+ }
20
+ function _unsupportedIterableToArray(r, a) {
21
+ if (r) {
22
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
23
+ var t = {}.toString.call(r).slice(8, -1);
24
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
30
25
  }
31
- return {
32
- exports: scriptExports,
33
- options
34
- };
35
26
  }
27
+ function _arrayLikeToArray(r, a) {
28
+ (null == a || a > r.length) && (a = r.length);
29
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
30
+ return n;
31
+ }
32
+ var _export_sfc = function _export_sfc2(sfc, props) {
33
+ var target = sfc.__vccOpts || sfc;
34
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
35
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
36
+ target[key] = val;
37
+ }
38
+ return target;
39
+ };
36
40
 
37
- var __vue2_script = defineComponent({
41
+ var _sfc_main = defineComponent({
38
42
  props: [].concat(props, ["data"]),
39
43
  components: {
40
44
  TinyRow: Row,
@@ -51,148 +55,185 @@ var __vue2_script = defineComponent({
51
55
  });
52
56
  }
53
57
  });
54
- var render = function render2() {
55
- var _vm = this;
56
- var _h = _vm.$createElement;
57
- var _c = _vm._self._c || _h;
58
- return _c("div", {
59
- staticClass: "tiny-fall-menu"
60
- }, [_c("div", {
61
- staticClass: "tiny-fall-menu__wrap"
62
- }, [_c("div", {
63
- staticClass: "tiny-fall-menu__nav"
64
- }, [_c("div", {
65
- staticClass: "tiny-fall-menu__subnav"
66
- }, [_c("div", {
67
- directives: [{
68
- name: "show",
69
- rawName: "v-show",
70
- value: _vm.state.pager !== 1,
71
- expression: "state.pager !== 1"
72
- }],
73
- staticClass: "icon-slot-left",
74
- on: {
75
- "click": function click($event) {
76
- return _vm.arrowClick(-1);
77
- }
78
- }
79
- }, [_vm._t("left", function() {
80
- return [_c("icon-chevron-left", {
81
- staticClass: "tiny-svg-size"
82
- })];
83
- })], 2), _c("div", {
84
- ref: "list",
85
- staticClass: "tiny-fall-menu__list",
86
- style: {
87
- left: _vm.state.left
88
- }
89
- }, [_c("ul", _vm._l(_vm.state.data, function(level1, index) {
90
- return _c("li", {
91
- key: index,
92
- class: [index >= _vm.state.pagerData.index[_vm.state.pager - 1] && _vm.state.pager !== _vm.state.pagerData.size ? "fall-hide" : ""],
93
- on: {
94
- "click": function click($event) {
95
- return _vm.clickActive(index);
96
- },
97
- "mouseover": function mouseover($event) {
98
- return _vm.mouseover(index);
99
- },
100
- "mouseout": _vm.mouseout
101
- }
102
- }, [_vm._t("level1", function() {
103
- return [_c("a", {
104
- class: [index === _vm.state.active ? "active-show" : "", index === _vm.state.activeNode ? "now" : ""],
105
- attrs: {
106
- "href": level1.url
107
- }
108
- }, [_vm._v(_vm._s(level1.title) + " ")])];
109
- }, {
110
- "slotScope": level1
111
- })], 2);
112
- }), 0)]), _c("div", {
113
- directives: [{
114
- name: "show",
115
- rawName: "v-show",
116
- value: _vm.state.pager !== _vm.state.pagerData.size,
117
- expression: "state.pager !== state.pagerData.size"
118
- }],
119
- staticClass: "icon-slot-right",
120
- on: {
121
- "click": function click($event) {
122
- return _vm.arrowClick(1);
123
- }
124
- }
125
- }, [_vm._t("right", function() {
126
- return [_c("icon-chevron-right", {
127
- staticClass: "tiny-svg-size"
128
- })];
129
- })], 2)]), _c("tiny-row", [_c("div", {
130
- directives: [{
131
- name: "show",
132
- rawName: "v-show",
133
- value: _vm.state.isActive,
134
- expression: "state.isActive"
135
- }],
136
- ref: "fall",
137
- staticClass: "tiny-fall-menu__box",
138
- class: {
139
- active: _vm.state.isActive
140
- },
141
- on: {
142
- "mouseover": function mouseover($event) {
143
- return _vm.overContent(true);
144
- },
145
- "mouseout": function mouseout($event) {
146
- return _vm.overContent(false);
147
- }
148
- }
149
- }, [_c("div", {
150
- staticClass: "contbox"
151
- }, _vm._l(_vm.state.level2data, function(level2, index) {
152
- return _c("tiny-col", {
153
- key: index,
154
- staticClass: "cont",
155
- attrs: {
156
- "xs": 6,
157
- "sm": 3,
158
- "md": 3,
159
- "lg": 3,
160
- "xl": 2
161
- }
162
- }, [_c("ul", {
163
- staticClass: "sublist clearfix"
164
- }, [_c("li", [_c("h3", {
165
- staticClass: "mcate-item-hd"
166
- }, [_vm._t("level2", function() {
167
- return [_c("span", [_vm._v(_vm._s(level2.title))])];
168
- }, {
169
- "slotScope": level2
170
- })], 2), _c("p", {
171
- staticClass: "mcate-item-bd"
172
- }, [_vm._t("level3", function() {
173
- return _vm._l(level2.children, function(level3, index3) {
174
- return _c("a", {
175
- key: index3,
176
- attrs: {
177
- "href": level3.url
178
- }
179
- }, [_vm._v(_vm._s(level3.title))]);
180
- });
181
- }, {
182
- "slotScope": level2.children
183
- })], 2)])])]);
184
- }), 1)])])], 1)])]);
58
+ var _hoisted_1 = {
59
+ class: "tiny-fall-menu"
185
60
  };
186
- var staticRenderFns = [];
187
- var __cssModules = {};
188
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
189
- function __vue2_injectStyles(context) {
190
- for (var o in __cssModules) {
191
- this[o] = __cssModules[o];
192
- }
61
+ var _hoisted_2 = {
62
+ class: "tiny-fall-menu__wrap"
63
+ };
64
+ var _hoisted_3 = {
65
+ class: "tiny-fall-menu__nav"
66
+ };
67
+ var _hoisted_4 = {
68
+ class: "tiny-fall-menu__subnav"
69
+ };
70
+ var _hoisted_5 = ["onClick", "onMouseover"];
71
+ var _hoisted_6 = ["href"];
72
+ var _hoisted_7 = {
73
+ class: "contbox"
74
+ };
75
+ var _hoisted_8 = {
76
+ class: "sublist clearfix"
77
+ };
78
+ var _hoisted_9 = {
79
+ class: "mcate-item-hd"
80
+ };
81
+ var _hoisted_10 = {
82
+ class: "mcate-item-bd"
83
+ };
84
+ var _hoisted_11 = ["href"];
85
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
+ var _component_icon_chevron_left = resolveComponent("icon-chevron-left");
87
+ var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
88
+ var _component_tiny_col = resolveComponent("tiny-col");
89
+ var _component_tiny_row = resolveComponent("tiny-row");
90
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [withDirectives(createElementVNode(
91
+ "div",
92
+ {
93
+ class: "icon-slot-left",
94
+ onClick: _cache[0] || (_cache[0] = function($event) {
95
+ return _ctx.arrowClick(-1);
96
+ })
97
+ },
98
+ [renderSlot(_ctx.$slots, "left", {}, function() {
99
+ return [createVNode(_component_icon_chevron_left, {
100
+ class: "tiny-svg-size"
101
+ })];
102
+ })],
103
+ 512
104
+ /* NEED_PATCH */
105
+ ), [[vShow, _ctx.state.pager !== 1]]), createElementVNode(
106
+ "div",
107
+ {
108
+ ref: "list",
109
+ style: normalizeStyle({
110
+ left: _ctx.state.left
111
+ }),
112
+ class: "tiny-fall-menu__list"
113
+ },
114
+ [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
115
+ Fragment,
116
+ null,
117
+ renderList(_ctx.state.data, function(level1, index) {
118
+ return openBlock(), createElementBlock("li", {
119
+ key: index,
120
+ onClick: function onClick($event) {
121
+ return _ctx.clickActive(index);
122
+ },
123
+ onMouseover: function onMouseover($event) {
124
+ return _ctx.mouseover(index);
125
+ },
126
+ onMouseout: _cache[1] || (_cache[1] = function() {
127
+ return _ctx.mouseout && _ctx.mouseout.apply(_ctx, arguments);
128
+ }),
129
+ class: normalizeClass([index >= _ctx.state.pagerData.index[_ctx.state.pager - 1] && _ctx.state.pager !== _ctx.state.pagerData.size ? "fall-hide" : ""])
130
+ }, [renderSlot(_ctx.$slots, "level1", {
131
+ slotScope: level1
132
+ }, function() {
133
+ return [createElementVNode("a", {
134
+ class: normalizeClass([index === _ctx.state.active ? "active-show" : "", index === _ctx.state.activeNode ? "now" : ""]),
135
+ href: level1.url
136
+ }, toDisplayString(level1.title), 11, _hoisted_6)];
137
+ })], 42, _hoisted_5);
138
+ }),
139
+ 128
140
+ /* KEYED_FRAGMENT */
141
+ ))])],
142
+ 4
143
+ /* STYLE */
144
+ ), withDirectives(createElementVNode(
145
+ "div",
146
+ {
147
+ class: "icon-slot-right",
148
+ onClick: _cache[2] || (_cache[2] = function($event) {
149
+ return _ctx.arrowClick(1);
150
+ })
151
+ },
152
+ [renderSlot(_ctx.$slots, "right", {}, function() {
153
+ return [createVNode(_component_icon_chevron_right, {
154
+ class: "tiny-svg-size"
155
+ })];
156
+ })],
157
+ 512
158
+ /* NEED_PATCH */
159
+ ), [[vShow, _ctx.state.pager !== _ctx.state.pagerData.size]])]), createVNode(_component_tiny_row, null, {
160
+ default: withCtx(function() {
161
+ return [withDirectives(createElementVNode(
162
+ "div",
163
+ {
164
+ ref: "fall",
165
+ class: normalizeClass([{
166
+ active: _ctx.state.isActive
167
+ }, "tiny-fall-menu__box"]),
168
+ onMouseover: _cache[3] || (_cache[3] = function($event) {
169
+ return _ctx.overContent(true);
170
+ }),
171
+ onMouseout: _cache[4] || (_cache[4] = function($event) {
172
+ return _ctx.overContent(false);
173
+ })
174
+ },
175
+ [createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(
176
+ Fragment,
177
+ null,
178
+ renderList(_ctx.state.level2data, function(level2, index) {
179
+ return openBlock(), createBlock(
180
+ _component_tiny_col,
181
+ {
182
+ key: index,
183
+ xs: 6,
184
+ sm: 3,
185
+ md: 3,
186
+ lg: 3,
187
+ xl: 2,
188
+ class: "cont"
189
+ },
190
+ {
191
+ default: withCtx(function() {
192
+ return [createElementVNode("ul", _hoisted_8, [createElementVNode("li", null, [createElementVNode("h3", _hoisted_9, [renderSlot(_ctx.$slots, "level2", {
193
+ slotScope: level2
194
+ }, function() {
195
+ return [createElementVNode(
196
+ "span",
197
+ null,
198
+ toDisplayString(level2.title),
199
+ 1
200
+ /* TEXT */
201
+ )];
202
+ })]), createElementVNode("p", _hoisted_10, [renderSlot(_ctx.$slots, "level3", {
203
+ slotScope: level2.children
204
+ }, function() {
205
+ return [(openBlock(true), createElementBlock(
206
+ Fragment,
207
+ null,
208
+ renderList(level2.children, function(level3, index3) {
209
+ return openBlock(), createElementBlock("a", {
210
+ href: level3.url,
211
+ key: index3
212
+ }, toDisplayString(level3.title), 9, _hoisted_11);
213
+ }),
214
+ 128
215
+ /* KEYED_FRAGMENT */
216
+ ))];
217
+ })])])])];
218
+ }),
219
+ _: 2
220
+ /* DYNAMIC */
221
+ },
222
+ 1024
223
+ /* DYNAMIC_SLOTS */
224
+ );
225
+ }),
226
+ 128
227
+ /* KEYED_FRAGMENT */
228
+ ))])],
229
+ 34
230
+ /* CLASS, NEED_HYDRATION */
231
+ ), [[vShow, _ctx.state.isActive]])];
232
+ }),
233
+ _: 3
234
+ /* FORWARDED */
235
+ })])])]);
193
236
  }
194
- var pc = /* @__PURE__ */ function() {
195
- return __component__.exports;
196
- }();
237
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
197
238
 
198
239
  export { pc as default };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-fall-menu",
3
- "version": "2.21.0",
3
+ "version": "3.21.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.21.0",
11
- "@opentinyvue/vue-icon": "~2.21.0",
10
+ "@opentinyvue/vue-common": "~3.21.0",
11
+ "@opentinyvue/vue-icon": "~3.21.0",
12
12
  "@opentinyvue/vue-renderless": "~3.21.0",
13
- "@opentinyvue/vue-row": "~2.21.0",
14
- "@opentinyvue/vue-col": "~2.21.0",
13
+ "@opentinyvue/vue-row": "~3.21.0",
14
+ "@opentinyvue/vue-col": "~3.21.0",
15
15
  "@opentinyvue/vue-theme": "~3.21.0"
16
16
  },
17
17
  "license": "MIT",
package/src/index.d.ts CHANGED
@@ -27,5 +27,58 @@ export declare const fallMenuProps: {
27
27
  tiny_theme: StringConstructor;
28
28
  tiny_chart_theme: ObjectConstructor;
29
29
  };
30
- declare const _default: any;
30
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
31
+ data: {
32
+ type: {
33
+ (arrayLength: number): IData[];
34
+ (...items: IData[]): IData[];
35
+ new (arrayLength: number): IData[];
36
+ new (...items: IData[]): IData[];
37
+ isArray(arg: any): arg is any[];
38
+ readonly prototype: any[];
39
+ from<T>(arrayLike: ArrayLike<T>): T[];
40
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
41
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
42
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
43
+ of<T_4>(...items: T_4[]): T_4[];
44
+ readonly [Symbol.species]: ArrayConstructor;
45
+ };
46
+ default: () => never[];
47
+ };
48
+ tiny_mode: StringConstructor;
49
+ tiny_mode_root: BooleanConstructor;
50
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
51
+ tiny_renderless: FunctionConstructor;
52
+ tiny_theme: StringConstructor;
53
+ tiny_chart_theme: ObjectConstructor;
54
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
55
+ [key: string]: any;
56
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
57
+ data: {
58
+ type: {
59
+ (arrayLength: number): IData[];
60
+ (...items: IData[]): IData[];
61
+ new (arrayLength: number): IData[];
62
+ new (...items: IData[]): IData[];
63
+ isArray(arg: any): arg is any[];
64
+ readonly prototype: any[];
65
+ from<T>(arrayLike: ArrayLike<T>): T[];
66
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
67
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
68
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
69
+ of<T_4>(...items: T_4[]): T_4[];
70
+ readonly [Symbol.species]: ArrayConstructor;
71
+ };
72
+ default: () => never[];
73
+ };
74
+ tiny_mode: StringConstructor;
75
+ tiny_mode_root: BooleanConstructor;
76
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
77
+ tiny_renderless: FunctionConstructor;
78
+ tiny_theme: StringConstructor;
79
+ tiny_chart_theme: ObjectConstructor;
80
+ }>>, {
81
+ data: IData[];
82
+ tiny_mode_root: boolean;
83
+ }, {}>;
31
84
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,38 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ data?: any;
3
+ tiny_mode?: any;
4
+ tiny_mode_root?: any;
5
+ tiny_template?: any;
6
+ tiny_renderless?: any;
7
+ _constants?: any;
8
+ tiny_theme?: any;
9
+ tiny_chart_theme?: any;
10
+ }>, {
11
+ t: (this: any, path: any, options?: any) => any;
12
+ vm: any;
13
+ f: (props: any, attrs?: {}) => {};
14
+ a: (attrs: any, filters: any, include: any) => {};
15
+ d: (props: any) => void;
16
+ dp: (props: any) => void;
17
+ gcls: (key: any) => any;
18
+ m: (...cssClasses: any[]) => string;
19
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
20
+ data?: any;
21
+ tiny_mode?: any;
22
+ tiny_mode_root?: any;
23
+ tiny_template?: any;
24
+ tiny_renderless?: any;
25
+ _constants?: any;
26
+ tiny_theme?: any;
27
+ tiny_chart_theme?: any;
28
+ }>>>, {
29
+ readonly data?: any;
30
+ readonly tiny_mode?: any;
31
+ readonly tiny_mode_root?: any;
32
+ readonly tiny_template?: any;
33
+ readonly tiny_renderless?: any;
34
+ readonly _constants?: any;
35
+ readonly tiny_theme?: any;
36
+ readonly tiny_chart_theme?: any;
37
+ }, {}>;
2
38
  export default _default;