@opentinyvue/vue-bulletin-board 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
@@ -53,7 +53,7 @@ var BulletinBoard = defineComponent({
53
53
  });
54
54
  }
55
55
  });
56
- var version = "2.21.0";
56
+ var version = "3.21.0";
57
57
  BulletinBoard.install = function(Vue) {
58
58
  Vue.component(BulletinBoard.name, BulletinBoard);
59
59
  };
package/lib/pc.js CHANGED
@@ -3,38 +3,42 @@ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import Tabs from '@opentinyvue/vue-tabs';
4
4
  import TabItem from '@opentinyvue/vue-tab-item';
5
5
  import { iconChevronRight } from '@opentinyvue/vue-icon';
6
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, resolveDynamicComponent, createCommentVNode } 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, ["title", "icon", "showMore", "moreLink", "tabTitle", "activeName", "data"]),
39
43
  components: {
40
44
  Tabs,
@@ -50,97 +54,148 @@ var __vue2_script = defineComponent({
50
54
  });
51
55
  }
52
56
  });
53
- var render = function render2() {
54
- var _vm = this;
55
- var _h = _vm.$createElement;
56
- var _c = _vm._self._c || _h;
57
- return _c("div", {
58
- staticClass: "tiny-bulletin-board"
59
- }, [_c("p", {
60
- staticClass: "tiny-bulletin-board__title"
61
- }, [_vm._v(_vm._s(_vm.title))]), _c("tabs", {
62
- model: {
63
- value: _vm.state.actName,
64
- callback: function callback($$v) {
65
- _vm.$set(_vm.state, "actName", $$v);
66
- },
67
- expression: "state.actName"
68
- }
69
- }, _vm._l(_vm.tabTitle, function(item, index) {
70
- return _c("tab-item", {
71
- key: index,
72
- attrs: {
73
- "name": (index + 1).toString()
74
- },
75
- scopedSlots: _vm._u([{
76
- key: "title",
77
- fn: function fn() {
78
- return [_c("span", [_vm._v(_vm._s(item))])];
79
- },
80
- proxy: true
81
- }], null, true)
82
- }, [_c("div", {
83
- staticClass: "tiny-bulletin-board__contain"
84
- }, [_vm._l(_vm.state.dataList, function(subItem, subIndex) {
85
- return _c("div", {
86
- key: subIndex,
87
- staticClass: "tiny-bulletin-board__item"
88
- }, [subItem.url || subItem.route ? _c("a", {
89
- staticClass: "tiny-bulletin-board__textTitle",
90
- attrs: {
91
- "href": subItem.url || _vm.getRoute(subItem.route),
92
- "target": subItem.target,
93
- "rel": "noopener noreferrer"
94
- },
95
- on: {
96
- "click": function click($event) {
97
- return _vm.handleBulletinBoardClick(subItem);
98
- }
99
- }
100
- }, [_vm._v(" " + _vm._s(subItem.text) + " "), subIndex === 0 ? _c("span", {
101
- staticClass: "tiny-bulletin-board__new"
102
- }, [_c(_vm.icon, {
103
- tag: "component",
104
- staticClass: "tiny-svg-size"
105
- }), _vm._v(_vm._s(_vm.icon ? "" : "NEW") + " ")], 1) : _vm._e()]) : _c("span", {
106
- staticClass: "tiny-bulletin-board__textTitle",
107
- on: {
108
- "click": function click($event) {
109
- return _vm.handleBulletinBoardClick(subItem);
110
- }
111
- }
112
- }, [_vm._v(" " + _vm._s(subItem.text) + " "), subIndex === 0 ? _c("span", {
113
- staticClass: "tiny-bulletin-board__new"
114
- }, [_c(_vm.icon, {
115
- tag: "component",
116
- staticClass: "tiny-svg-size"
117
- }), _vm._v(_vm._s(_vm.icon ? "" : "NEW") + " ")], 1) : _vm._e()]), _c("p", {
118
- staticClass: "tiny-bulletin-board__textDate"
119
- }, [_vm._v(_vm._s(subItem.date))])]);
120
- }), _vm.showMore ? _c("div", {
121
- staticClass: "tiny-bulletin-board__more"
122
- }, [_vm.showMore && _vm.state.moreLink && (_vm.state.moreLink.url || _vm.state.moreLink.route) ? _c("a", {
123
- staticClass: "tiny-bulletin-board__more-link",
124
- attrs: {
125
- "href": _vm.state.moreLink.url || _vm.getRoute(_vm.state.moreLink.route),
126
- "target": _vm.state.moreLink.target,
127
- "rel": "noopener noreferrer"
128
- }
129
- }, [_c("span", [_vm._v(_vm._s(_vm.state.moreLink.text || "more"))]), _c("icon-chevron-right", {
130
- staticClass: "tiny-svg-size"
131
- })], 1) : _vm._e()]) : _vm._e()], 2)]);
132
- }), 1)], 1);
57
+ var _hoisted_1 = {
58
+ class: "tiny-bulletin-board"
133
59
  };
134
- var staticRenderFns = [];
135
- var __cssModules = {};
136
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
137
- function __vue2_injectStyles(context) {
138
- for (var o in __cssModules) {
139
- this[o] = __cssModules[o];
140
- }
60
+ var _hoisted_2 = {
61
+ class: "tiny-bulletin-board__title"
62
+ };
63
+ var _hoisted_3 = {
64
+ class: "tiny-bulletin-board__contain"
65
+ };
66
+ var _hoisted_4 = ["href", "target", "onClick"];
67
+ var _hoisted_5 = {
68
+ key: 0,
69
+ class: "tiny-bulletin-board__new"
70
+ };
71
+ var _hoisted_6 = ["onClick"];
72
+ var _hoisted_7 = {
73
+ key: 0,
74
+ class: "tiny-bulletin-board__new"
75
+ };
76
+ var _hoisted_8 = {
77
+ class: "tiny-bulletin-board__textDate"
78
+ };
79
+ var _hoisted_9 = {
80
+ key: 0,
81
+ class: "tiny-bulletin-board__more"
82
+ };
83
+ var _hoisted_10 = ["href", "target"];
84
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
+ var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
86
+ var _component_tab_item = resolveComponent("tab-item");
87
+ var _component_tabs = resolveComponent("tabs");
88
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode(
89
+ "p",
90
+ _hoisted_2,
91
+ toDisplayString(_ctx.title),
92
+ 1
93
+ /* TEXT */
94
+ ), createVNode(_component_tabs, {
95
+ modelValue: _ctx.state.actName,
96
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
97
+ return _ctx.state.actName = $event;
98
+ })
99
+ }, {
100
+ default: withCtx(function() {
101
+ return [(openBlock(true), createElementBlock(
102
+ Fragment,
103
+ null,
104
+ renderList(_ctx.tabTitle, function(item, index) {
105
+ return openBlock(), createBlock(_component_tab_item, {
106
+ key: index,
107
+ name: (index + 1).toString()
108
+ }, {
109
+ title: withCtx(function() {
110
+ return [createElementVNode(
111
+ "span",
112
+ null,
113
+ toDisplayString(item),
114
+ 1
115
+ /* TEXT */
116
+ )];
117
+ }),
118
+ default: withCtx(function() {
119
+ return [createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(
120
+ Fragment,
121
+ null,
122
+ renderList(_ctx.state.dataList, function(subItem, subIndex) {
123
+ return openBlock(), createElementBlock("div", {
124
+ key: subIndex,
125
+ class: "tiny-bulletin-board__item"
126
+ }, [subItem.url || subItem.route ? (openBlock(), createElementBlock("a", {
127
+ key: 0,
128
+ href: subItem.url || _ctx.getRoute(subItem.route),
129
+ target: subItem.target,
130
+ class: "tiny-bulletin-board__textTitle",
131
+ rel: "noopener noreferrer",
132
+ onClick: function onClick($event) {
133
+ return _ctx.handleBulletinBoardClick(subItem);
134
+ }
135
+ }, [createTextVNode(
136
+ toDisplayString(subItem.text) + " ",
137
+ 1
138
+ /* TEXT */
139
+ ), subIndex === 0 ? (openBlock(), createElementBlock("span", _hoisted_5, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
140
+ class: "tiny-svg-size"
141
+ })), createTextVNode(
142
+ toDisplayString(_ctx.icon ? "" : "NEW"),
143
+ 1
144
+ /* TEXT */
145
+ )])) : createCommentVNode("v-if", true)], 8, _hoisted_4)) : (openBlock(), createElementBlock("span", {
146
+ key: 1,
147
+ class: "tiny-bulletin-board__textTitle",
148
+ onClick: function onClick($event) {
149
+ return _ctx.handleBulletinBoardClick(subItem);
150
+ }
151
+ }, [createTextVNode(
152
+ toDisplayString(subItem.text) + " ",
153
+ 1
154
+ /* TEXT */
155
+ ), subIndex === 0 ? (openBlock(), createElementBlock("span", _hoisted_7, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
156
+ class: "tiny-svg-size"
157
+ })), createTextVNode(
158
+ toDisplayString(_ctx.icon ? "" : "NEW"),
159
+ 1
160
+ /* TEXT */
161
+ )])) : createCommentVNode("v-if", true)], 8, _hoisted_6)), createElementVNode(
162
+ "p",
163
+ _hoisted_8,
164
+ toDisplayString(subItem.date),
165
+ 1
166
+ /* TEXT */
167
+ )]);
168
+ }),
169
+ 128
170
+ /* KEYED_FRAGMENT */
171
+ )), _ctx.showMore ? (openBlock(), createElementBlock("div", _hoisted_9, [_ctx.showMore && _ctx.state.moreLink && (_ctx.state.moreLink.url || _ctx.state.moreLink.route) ? (openBlock(), createElementBlock("a", {
172
+ key: 0,
173
+ href: _ctx.state.moreLink.url || _ctx.getRoute(_ctx.state.moreLink.route),
174
+ class: "tiny-bulletin-board__more-link",
175
+ target: _ctx.state.moreLink.target,
176
+ rel: "noopener noreferrer"
177
+ }, [createElementVNode(
178
+ "span",
179
+ null,
180
+ toDisplayString(_ctx.state.moreLink.text || "more"),
181
+ 1
182
+ /* TEXT */
183
+ ), createVNode(_component_icon_chevron_right, {
184
+ class: "tiny-svg-size"
185
+ })], 8, _hoisted_10)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)])];
186
+ }),
187
+ _: 2
188
+ /* DYNAMIC */
189
+ }, 1032, ["name"]);
190
+ }),
191
+ 128
192
+ /* KEYED_FRAGMENT */
193
+ ))];
194
+ }),
195
+ _: 1
196
+ /* STABLE */
197
+ }, 8, ["modelValue"])]);
141
198
  }
142
- var pc = /* @__PURE__ */ function() {
143
- return __component__.exports;
144
- }();
199
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
145
200
 
146
201
  export { pc as default };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-bulletin-board",
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-tabs": "~2.21.0",
14
- "@opentinyvue/vue-tab-item": "~2.21.0",
13
+ "@opentinyvue/vue-tabs": "~3.21.0",
14
+ "@opentinyvue/vue-tab-item": "~3.21.0",
15
15
  "@opentinyvue/vue-theme": "~3.21.0"
16
16
  },
17
17
  "license": "MIT",
package/src/index.d.ts CHANGED
@@ -1,2 +1,69 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
2
+ title: StringConstructor;
3
+ icon: (StringConstructor | ObjectConstructor)[];
4
+ showMore: {
5
+ type: BooleanConstructor;
6
+ default: boolean;
7
+ };
8
+ moreLink: {
9
+ type: ObjectConstructor;
10
+ default: () => void;
11
+ };
12
+ tabTitle: {
13
+ type: ArrayConstructor;
14
+ required: true;
15
+ validator: (value: unknown) => boolean;
16
+ };
17
+ activeName: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ data: {
22
+ type: ArrayConstructor;
23
+ required: true;
24
+ };
25
+ tiny_mode: StringConstructor;
26
+ tiny_mode_root: BooleanConstructor;
27
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
28
+ tiny_renderless: FunctionConstructor;
29
+ tiny_theme: StringConstructor;
30
+ tiny_chart_theme: ObjectConstructor;
31
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
32
+ [key: string]: any;
33
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
34
+ title: StringConstructor;
35
+ icon: (StringConstructor | ObjectConstructor)[];
36
+ showMore: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ moreLink: {
41
+ type: ObjectConstructor;
42
+ default: () => void;
43
+ };
44
+ tabTitle: {
45
+ type: ArrayConstructor;
46
+ required: true;
47
+ validator: (value: unknown) => boolean;
48
+ };
49
+ activeName: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ data: {
54
+ type: ArrayConstructor;
55
+ required: true;
56
+ };
57
+ tiny_mode: StringConstructor;
58
+ tiny_mode_root: BooleanConstructor;
59
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
60
+ tiny_renderless: FunctionConstructor;
61
+ tiny_theme: StringConstructor;
62
+ tiny_chart_theme: ObjectConstructor;
63
+ }>>, {
64
+ tiny_mode_root: boolean;
65
+ activeName: string;
66
+ showMore: boolean;
67
+ moreLink: Record<string, any>;
68
+ }, {}>;
2
69
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,56 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ icon?: any;
3
+ data?: any;
4
+ title?: any;
5
+ tiny_mode?: any;
6
+ tiny_mode_root?: any;
7
+ tiny_template?: any;
8
+ tiny_renderless?: any;
9
+ _constants?: any;
10
+ tiny_theme?: any;
11
+ tiny_chart_theme?: any;
12
+ activeName?: any;
13
+ showMore?: any;
14
+ moreLink?: any;
15
+ tabTitle?: any;
16
+ }>, {
17
+ t: (this: any, path: any, options?: any) => any;
18
+ vm: any;
19
+ f: (props: any, attrs?: {}) => {};
20
+ a: (attrs: any, filters: any, include: any) => {};
21
+ d: (props: any) => void;
22
+ dp: (props: any) => void;
23
+ gcls: (key: any) => any;
24
+ m: (...cssClasses: any[]) => string;
25
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
+ icon?: any;
27
+ data?: any;
28
+ title?: any;
29
+ tiny_mode?: any;
30
+ tiny_mode_root?: any;
31
+ tiny_template?: any;
32
+ tiny_renderless?: any;
33
+ _constants?: any;
34
+ tiny_theme?: any;
35
+ tiny_chart_theme?: any;
36
+ activeName?: any;
37
+ showMore?: any;
38
+ moreLink?: any;
39
+ tabTitle?: any;
40
+ }>>>, {
41
+ readonly icon?: any;
42
+ readonly data?: any;
43
+ readonly title?: any;
44
+ readonly tiny_mode?: any;
45
+ readonly tiny_mode_root?: any;
46
+ readonly tiny_template?: any;
47
+ readonly tiny_renderless?: any;
48
+ readonly _constants?: any;
49
+ readonly tiny_theme?: any;
50
+ readonly tiny_chart_theme?: any;
51
+ readonly activeName?: any;
52
+ readonly showMore?: any;
53
+ readonly moreLink?: any;
54
+ readonly tabTitle?: any;
55
+ }, {}>;
2
56
  export default _default;