@opentinyvue/vue-badge 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
@@ -77,7 +77,7 @@ var Badge = defineComponent({
77
77
  });
78
78
  }
79
79
  });
80
- var version = "2.21.0";
80
+ var version = "3.21.0";
81
81
  Badge.model = {
82
82
  prop: "modelValue",
83
83
  event: "update:modelValue"
@@ -1,35 +1,39 @@
1
1
  import { renderless, api } from '@opentinyvue/vue-renderless/badge/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
+ import { openBlock, createElementBlock, normalizeClass, toDisplayString, renderSlot, createCommentVNode } from 'vue';
3
4
 
4
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
5
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
6
- if (render) {
7
- options.render = render;
8
- options.staticRenderFns = staticRenderFns;
9
- options._compiled = true;
5
+ function _createForOfIteratorHelperLoose(r, e) {
6
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
7
+ if (t) return (t = t.call(r)).next.bind(t);
8
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
9
+ t && (r = t);
10
+ var o = 0;
11
+ return function() {
12
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
13
+ };
10
14
  }
11
- var hook;
12
- if (injectStyles) {
13
- hook = injectStyles;
14
- }
15
- if (hook) {
16
- if (options.functional) {
17
- options._injectStyles = hook;
18
- var originalRender = options.render;
19
- options.render = function renderWithStyleInjection(h, context) {
20
- hook.call(context);
21
- return originalRender(h, context);
22
- };
23
- } else {
24
- var existing = options.beforeCreate;
25
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
26
- }
15
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16
+ }
17
+ function _unsupportedIterableToArray(r, a) {
18
+ if (r) {
19
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
20
+ var t = {}.toString.call(r).slice(8, -1);
21
+ 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;
27
22
  }
28
- return {
29
- exports: scriptExports,
30
- options
31
- };
32
23
  }
24
+ function _arrayLikeToArray(r, a) {
25
+ (null == a || a > r.length) && (a = r.length);
26
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
27
+ return n;
28
+ }
29
+ var _export_sfc = function _export_sfc2(sfc, props) {
30
+ var target = sfc.__vccOpts || sfc;
31
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
32
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
33
+ target[key] = val;
34
+ }
35
+ return target;
36
+ };
33
37
 
34
38
  var classes = {
35
39
  "primary-status": "inline-flex items-center justify-center leading-4 relative",
@@ -50,7 +54,7 @@ var classes = {
50
54
  "state-href": "!text-color-bg-1 !no-underline",
51
55
  "state-not-href": "inline-block align-top"
52
56
  };
53
- var __vue2_script = defineComponent({
57
+ var _sfc_main = defineComponent({
54
58
  props: [].concat(props, ["showLeft", "isDot", "hidden", "type", "max", "value", "modelValue", "href", "target", "data"]),
55
59
  setup: function setup$1(props2, context) {
56
60
  return setup({
@@ -62,55 +66,69 @@ var __vue2_script = defineComponent({
62
66
  });
63
67
  }
64
68
  });
65
- var render = function render2() {
66
- var _vm = this;
67
- var _h = _vm.$createElement;
68
- var _c = _vm._self._c || _h;
69
- return _c("div", {
70
- class: _vm.m(_vm.gcls("primary-status"), _vm.gcls({
71
- "dot-showleft": _vm.isDot && _vm.showLeft
72
- })),
73
- attrs: {
74
- "data-tag": "tiny-badge"
75
- }
76
- }, [_vm.data ? _c("span", [_vm._v(_vm._s(_vm.data))]) : _vm._t("default"), !_vm.hidden && (_vm.state.content || _vm.state.content === 0 || _vm.isDot || _vm.showLeft) ? _c("div", {
77
- class: _vm.m(_vm.gcls("primary-status-child"), _vm.gcls({
78
- "dot-showleft-child": _vm.showLeft && _vm.isDot
79
- }), _vm.gcls("type-" + (_vm.type || "default")), _vm.gcls({
80
- "circle": !_vm.isDot
81
- }), _vm.gcls({
82
- "dot-default-icon-label": !_vm.showLeft && _vm.isDot && ["icon", "label"].includes(_vm.type)
83
- }), _vm.gcls({
84
- "dot-default": !_vm.showLeft && _vm.isDot && !["icon", "label"].includes(_vm.type)
85
- }), _vm.gcls({
86
- "circle-icon-label": !_vm.isDot && ["icon", "label"].includes(_vm.type)
87
- })),
88
- attrs: {
89
- "data-tag": "tiny-badge-content"
90
- }
91
- }, [_vm._t("content", function() {
92
- return [_vm.state.href ? _c("a", {
93
- class: _vm.m(_vm.gcls("state-href")),
94
- attrs: {
95
- "href": _vm.state.href,
96
- "target": _vm.target,
97
- "rel": "noopener noreferrer"
98
- }
99
- }, [_vm._v(_vm._s(_vm.state.content))]) : _c("span", {
100
- class: _vm.m(_vm.gcls("state-not-href"))
101
- }, [_vm._v(_vm._s(_vm.state.content))])];
102
- })], 2) : _vm._e()], 2);
69
+ var _hoisted_1 = {
70
+ key: 0
103
71
  };
104
- var staticRenderFns = [];
105
- var __cssModules = {};
106
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
107
- function __vue2_injectStyles(context) {
108
- for (var o in __cssModules) {
109
- this[o] = __cssModules[o];
110
- }
72
+ var _hoisted_2 = ["href", "target"];
73
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
74
+ return openBlock(), createElementBlock(
75
+ "div",
76
+ {
77
+ "data-tag": "tiny-badge",
78
+ class: normalizeClass(_ctx.m(_ctx.gcls("primary-status"), _ctx.gcls({
79
+ "dot-showleft": _ctx.isDot && _ctx.showLeft
80
+ })))
81
+ },
82
+ [_ctx.data ? (openBlock(), createElementBlock(
83
+ "span",
84
+ _hoisted_1,
85
+ toDisplayString(_ctx.data),
86
+ 1
87
+ /* TEXT */
88
+ )) : renderSlot(_ctx.$slots, "default", {
89
+ key: 1
90
+ }), !_ctx.hidden && (_ctx.state.content || _ctx.state.content === 0 || _ctx.isDot || _ctx.showLeft) ? (openBlock(), createElementBlock(
91
+ "div",
92
+ {
93
+ key: 2,
94
+ "data-tag": "tiny-badge-content",
95
+ class: normalizeClass(_ctx.m(_ctx.gcls("primary-status-child"), _ctx.gcls({
96
+ "dot-showleft-child": _ctx.showLeft && _ctx.isDot
97
+ }), _ctx.gcls("type-" + (_ctx.type || "default")), _ctx.gcls({
98
+ "circle": !_ctx.isDot
99
+ }), _ctx.gcls({
100
+ "dot-default-icon-label": !_ctx.showLeft && _ctx.isDot && ["icon", "label"].includes(_ctx.type)
101
+ }), _ctx.gcls({
102
+ "dot-default": !_ctx.showLeft && _ctx.isDot && !["icon", "label"].includes(_ctx.type)
103
+ }), _ctx.gcls({
104
+ "circle-icon-label": !_ctx.isDot && ["icon", "label"].includes(_ctx.type)
105
+ })))
106
+ },
107
+ [renderSlot(_ctx.$slots, "content", {}, function() {
108
+ return [_ctx.state.href ? (openBlock(), createElementBlock("a", {
109
+ key: 0,
110
+ class: normalizeClass(_ctx.m(_ctx.gcls("state-href"))),
111
+ href: _ctx.state.href,
112
+ target: _ctx.target,
113
+ rel: "noopener noreferrer"
114
+ }, toDisplayString(_ctx.state.content), 11, _hoisted_2)) : (openBlock(), createElementBlock(
115
+ "span",
116
+ {
117
+ key: 1,
118
+ class: normalizeClass(_ctx.m(_ctx.gcls("state-not-href")))
119
+ },
120
+ toDisplayString(_ctx.state.content),
121
+ 3
122
+ /* TEXT, CLASS */
123
+ ))];
124
+ })],
125
+ 2
126
+ /* CLASS */
127
+ )) : createCommentVNode("v-if", true)],
128
+ 2
129
+ /* CLASS */
130
+ );
111
131
  }
112
- var mobileFirst = /* @__PURE__ */ function() {
113
- return __component__.exports;
114
- }();
132
+ var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
115
133
 
116
134
  export { mobileFirst as default };
package/lib/mobile.js CHANGED
@@ -1,38 +1,42 @@
1
1
  import { renderless, api } from '@opentinyvue/vue-renderless/badge/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import '@opentinyvue/vue-theme-mobile/badge/index.css';
4
+ import { openBlock, createElementBlock, renderSlot, normalizeClass, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
4
5
 
5
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
6
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
7
- if (render) {
8
- options.render = render;
9
- options.staticRenderFns = staticRenderFns;
10
- options._compiled = true;
6
+ function _createForOfIteratorHelperLoose(r, e) {
7
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
8
+ if (t) return (t = t.call(r)).next.bind(t);
9
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
10
+ t && (r = t);
11
+ var o = 0;
12
+ return function() {
13
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
14
+ };
11
15
  }
12
- var hook;
13
- if (injectStyles) {
14
- hook = injectStyles;
15
- }
16
- if (hook) {
17
- if (options.functional) {
18
- options._injectStyles = hook;
19
- var originalRender = options.render;
20
- options.render = function renderWithStyleInjection(h, context) {
21
- hook.call(context);
22
- return originalRender(h, context);
23
- };
24
- } else {
25
- var existing = options.beforeCreate;
26
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
27
- }
16
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17
+ }
18
+ function _unsupportedIterableToArray(r, a) {
19
+ if (r) {
20
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
21
+ var t = {}.toString.call(r).slice(8, -1);
22
+ 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;
28
23
  }
29
- return {
30
- exports: scriptExports,
31
- options
32
- };
33
24
  }
25
+ function _arrayLikeToArray(r, a) {
26
+ (null == a || a > r.length) && (a = r.length);
27
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
28
+ return n;
29
+ }
30
+ var _export_sfc = function _export_sfc2(sfc, props) {
31
+ var target = sfc.__vccOpts || sfc;
32
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
33
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
34
+ target[key] = val;
35
+ }
36
+ return target;
37
+ };
34
38
 
35
- var __vue2_script = defineComponent({
39
+ var _sfc_main = defineComponent({
36
40
  props: [].concat(props, ["isDot", "isFixed", "isMini", "hidden", "max", "type", "value", "modelValue", "href", "target"]),
37
41
  setup: function setup$1(props2, context) {
38
42
  return setup({
@@ -43,40 +47,36 @@ var __vue2_script = defineComponent({
43
47
  });
44
48
  }
45
49
  });
46
- var render = function render2() {
47
- var _vm = this;
48
- var _h = _vm.$createElement;
49
- var _c = _vm._self._c || _h;
50
- return _c("div", {
51
- staticClass: "tiny-mobile-badge"
52
- }, [_vm._t("default"), !_vm.hidden && (_vm.value > 0 || _vm.isDot) ? _c("div", {
53
- staticClass: "tiny-mobile-badge__content",
54
- class: [{
55
- "is-dot": _vm.isDot,
56
- "is-fixed": _vm.isFixed,
57
- "is-mini": _vm.isMini
58
- }, _vm.value < 10 ? "is-circle" : "", _vm.type ? "tiny-mobile-badge--" + _vm.type : ""]
59
- }, [!_vm.isDot ? _c("span", [_vm._t("content", function() {
60
- return [_c("a", {
61
- staticClass: "tiny-mobile-badge__link",
62
- attrs: {
63
- "href": _vm.state.href,
64
- "target": _vm.target,
65
- "rel": "noopener noreferrer"
66
- }
67
- }, [_vm._v(_vm._s(_vm.state.content))])];
68
- })], 2) : _vm._e()]) : _vm._e()], 2);
50
+ var _hoisted_1 = {
51
+ class: "tiny-mobile-badge"
69
52
  };
70
- var staticRenderFns = [];
71
- var __cssModules = {};
72
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
73
- function __vue2_injectStyles(context) {
74
- for (var o in __cssModules) {
75
- this[o] = __cssModules[o];
76
- }
53
+ var _hoisted_2 = {
54
+ key: 0
55
+ };
56
+ var _hoisted_3 = ["href", "target"];
57
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
+ return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default"), !_ctx.hidden && (_ctx.value > 0 || _ctx.isDot) ? (openBlock(), createElementBlock(
59
+ "div",
60
+ {
61
+ key: 0,
62
+ class: normalizeClass(["tiny-mobile-badge__content", [{
63
+ "is-dot": _ctx.isDot,
64
+ "is-fixed": _ctx.isFixed,
65
+ "is-mini": _ctx.isMini
66
+ }, _ctx.value < 10 ? "is-circle" : "", _ctx.type ? "tiny-mobile-badge--" + _ctx.type : ""]])
67
+ },
68
+ [!_ctx.isDot ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "content", {}, function() {
69
+ return [createElementVNode("a", {
70
+ href: _ctx.state.href,
71
+ target: _ctx.target,
72
+ rel: "noopener noreferrer",
73
+ class: "tiny-mobile-badge__link"
74
+ }, toDisplayString(_ctx.state.content), 9, _hoisted_3)];
75
+ })])) : createCommentVNode("v-if", true)],
76
+ 2
77
+ /* CLASS */
78
+ )) : createCommentVNode("v-if", true)]);
77
79
  }
78
- var mobile = /* @__PURE__ */ function() {
79
- return __component__.exports;
80
- }();
80
+ var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
81
81
 
82
82
  export { mobile as default };
package/lib/pc.js CHANGED
@@ -1,38 +1,42 @@
1
1
  import { renderless, api } from '@opentinyvue/vue-renderless/badge/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import '@opentinyvue/vue-theme/badge/index.css';
4
+ import { openBlock, createElementBlock, toDisplayString, renderSlot, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
4
5
 
5
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
6
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
7
- if (render) {
8
- options.render = render;
9
- options.staticRenderFns = staticRenderFns;
10
- options._compiled = true;
6
+ function _createForOfIteratorHelperLoose(r, e) {
7
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
8
+ if (t) return (t = t.call(r)).next.bind(t);
9
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
10
+ t && (r = t);
11
+ var o = 0;
12
+ return function() {
13
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
14
+ };
11
15
  }
12
- var hook;
13
- if (injectStyles) {
14
- hook = injectStyles;
15
- }
16
- if (hook) {
17
- if (options.functional) {
18
- options._injectStyles = hook;
19
- var originalRender = options.render;
20
- options.render = function renderWithStyleInjection(h, context) {
21
- hook.call(context);
22
- return originalRender(h, context);
23
- };
24
- } else {
25
- var existing = options.beforeCreate;
26
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
27
- }
16
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17
+ }
18
+ function _unsupportedIterableToArray(r, a) {
19
+ if (r) {
20
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
21
+ var t = {}.toString.call(r).slice(8, -1);
22
+ 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;
28
23
  }
29
- return {
30
- exports: scriptExports,
31
- options
32
- };
33
24
  }
25
+ function _arrayLikeToArray(r, a) {
26
+ (null == a || a > r.length) && (a = r.length);
27
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
28
+ return n;
29
+ }
30
+ var _export_sfc = function _export_sfc2(sfc, props) {
31
+ var target = sfc.__vccOpts || sfc;
32
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
33
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
34
+ target[key] = val;
35
+ }
36
+ return target;
37
+ };
34
38
 
35
- var __vue2_script = defineComponent({
39
+ var _sfc_main = defineComponent({
36
40
  props: [].concat(props, ["isDot", "hidden", "type", "max", "value", "modelValue", "href", "target", "badgeClass", "offset", "data"]),
37
41
  setup: function setup$1(props2, context) {
38
42
  return setup({
@@ -43,38 +47,51 @@ var __vue2_script = defineComponent({
43
47
  });
44
48
  }
45
49
  });
46
- var render = function render2() {
47
- var _vm = this;
48
- var _h = _vm.$createElement;
49
- var _c = _vm._self._c || _h;
50
- return _c("div", {
51
- staticClass: "tiny-badge__wrapper"
52
- }, [_vm.data ? _c("span", [_vm._v(_vm._s(_vm.data))]) : _vm._t("default"), !_vm.hidden && (_vm.state.content || _vm.state.content === 0 || _vm.isDot) ? _c("div", {
53
- staticClass: "tiny-badge",
54
- class: [_vm.isDot ? "tiny-badge--default" : "", _vm.state.isOverstep ? "tiny-badge--max" : "", _vm.type ? "tiny-badge--" + _vm.type : "", _vm.badgeClass || ""],
55
- style: !_vm.isDot ? _vm.state.transform : ""
56
- }, [_vm._t("content", function() {
57
- return [_vm.state.href ? _c("a", {
58
- attrs: {
59
- "href": _vm.state.href,
60
- "target": _vm.target,
61
- "rel": "noopener noreferrer"
62
- }
63
- }, [_vm._v(_vm._s(_vm.state.content))]) : _vm._e(), !_vm.state.href ? _c("span", {
64
- staticClass: "tiny-badge__content-text"
65
- }, [_vm._v(_vm._s(_vm.state.content))]) : _vm._e()];
66
- })], 2) : _vm._e()], 2);
50
+ var _hoisted_1 = {
51
+ class: "tiny-badge__wrapper"
67
52
  };
68
- var staticRenderFns = [];
69
- var __cssModules = {};
70
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
71
- function __vue2_injectStyles(context) {
72
- for (var o in __cssModules) {
73
- this[o] = __cssModules[o];
74
- }
53
+ var _hoisted_2 = {
54
+ key: 0
55
+ };
56
+ var _hoisted_3 = ["href", "target"];
57
+ var _hoisted_4 = {
58
+ key: 1,
59
+ class: "tiny-badge__content-text"
60
+ };
61
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
62
+ return openBlock(), createElementBlock("div", _hoisted_1, [_ctx.data ? (openBlock(), createElementBlock(
63
+ "span",
64
+ _hoisted_2,
65
+ toDisplayString(_ctx.data),
66
+ 1
67
+ /* TEXT */
68
+ )) : renderSlot(_ctx.$slots, "default", {
69
+ key: 1
70
+ }), !_ctx.hidden && (_ctx.state.content || _ctx.state.content === 0 || _ctx.isDot) ? (openBlock(), createElementBlock(
71
+ "div",
72
+ {
73
+ key: 2,
74
+ class: normalizeClass(["tiny-badge", [_ctx.isDot ? "tiny-badge--default" : "", _ctx.state.isOverstep ? "tiny-badge--max" : "", _ctx.type ? "tiny-badge--" + _ctx.type : "", _ctx.badgeClass || ""]]),
75
+ style: normalizeStyle(!_ctx.isDot ? _ctx.state.transform : "")
76
+ },
77
+ [renderSlot(_ctx.$slots, "content", {}, function() {
78
+ return [_ctx.state.href ? (openBlock(), createElementBlock("a", {
79
+ key: 0,
80
+ href: _ctx.state.href,
81
+ target: _ctx.target,
82
+ rel: "noopener noreferrer"
83
+ }, toDisplayString(_ctx.state.content), 9, _hoisted_3)) : createCommentVNode("v-if", true), !_ctx.state.href ? (openBlock(), createElementBlock(
84
+ "span",
85
+ _hoisted_4,
86
+ toDisplayString(_ctx.state.content),
87
+ 1
88
+ /* TEXT */
89
+ )) : createCommentVNode("v-if", true)];
90
+ })],
91
+ 6
92
+ /* CLASS, STYLE */
93
+ )) : createCommentVNode("v-if", true)]);
75
94
  }
76
- var pc = /* @__PURE__ */ function() {
77
- return __component__.exports;
78
- }();
95
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
79
96
 
80
97
  export { pc as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-badge",
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",
@@ -8,7 +8,7 @@
8
8
  "type": "module",
9
9
  "dependencies": {
10
10
  "@opentinyvue/vue-renderless": "~3.21.0",
11
- "@opentinyvue/vue-common": "~2.21.0",
11
+ "@opentinyvue/vue-common": "~3.21.0",
12
12
  "@opentinyvue/vue-theme-mobile": "~3.21.0",
13
13
  "@opentinyvue/vue-theme": "~3.21.0"
14
14
  },
package/src/index.d.ts CHANGED
@@ -41,5 +41,99 @@ export declare const badgeProps: {
41
41
  tiny_theme: StringConstructor;
42
42
  tiny_chart_theme: ObjectConstructor;
43
43
  };
44
- declare const _default: any;
44
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
45
+ showLeft: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ isDot: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ isFixed: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ isMini: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ max: NumberConstructor;
62
+ value: (StringConstructor | NumberConstructor)[];
63
+ modelValue: (StringConstructor | NumberConstructor)[];
64
+ href: StringConstructor;
65
+ target: StringConstructor;
66
+ hidden: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ type: {
71
+ type: StringConstructor;
72
+ validator: (value: string) => boolean;
73
+ };
74
+ badgeClass: StringConstructor;
75
+ offset: {
76
+ type: ArrayConstructor;
77
+ default: () => number[];
78
+ };
79
+ data: (StringConstructor | NumberConstructor)[];
80
+ tiny_mode: StringConstructor;
81
+ tiny_mode_root: BooleanConstructor;
82
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
83
+ tiny_renderless: FunctionConstructor;
84
+ tiny_theme: StringConstructor;
85
+ tiny_chart_theme: ObjectConstructor;
86
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
87
+ [key: string]: any;
88
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
89
+ showLeft: {
90
+ type: BooleanConstructor;
91
+ default: boolean;
92
+ };
93
+ isDot: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ isFixed: {
98
+ type: BooleanConstructor;
99
+ default: boolean;
100
+ };
101
+ isMini: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
105
+ max: NumberConstructor;
106
+ value: (StringConstructor | NumberConstructor)[];
107
+ modelValue: (StringConstructor | NumberConstructor)[];
108
+ href: StringConstructor;
109
+ target: StringConstructor;
110
+ hidden: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
114
+ type: {
115
+ type: StringConstructor;
116
+ validator: (value: string) => boolean;
117
+ };
118
+ badgeClass: StringConstructor;
119
+ offset: {
120
+ type: ArrayConstructor;
121
+ default: () => number[];
122
+ };
123
+ data: (StringConstructor | NumberConstructor)[];
124
+ tiny_mode: StringConstructor;
125
+ tiny_mode_root: BooleanConstructor;
126
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
127
+ tiny_renderless: FunctionConstructor;
128
+ tiny_theme: StringConstructor;
129
+ tiny_chart_theme: ObjectConstructor;
130
+ }>>, {
131
+ tiny_mode_root: boolean;
132
+ offset: unknown[];
133
+ hidden: boolean;
134
+ isDot: boolean;
135
+ isFixed: boolean;
136
+ isMini: boolean;
137
+ showLeft: boolean;
138
+ }, {}>;
45
139
  export default _default;
@@ -1,2 +1,56 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ value?: any;
3
+ type?: any;
4
+ data?: any;
5
+ target?: any;
6
+ tiny_mode?: any;
7
+ tiny_mode_root?: any;
8
+ tiny_template?: any;
9
+ tiny_renderless?: any;
10
+ _constants?: any;
11
+ tiny_theme?: any;
12
+ tiny_chart_theme?: any;
13
+ modelValue?: any;
14
+ href?: any;
15
+ hidden?: any;
16
+ max?: any;
17
+ isDot?: any;
18
+ showLeft?: any;
19
+ }>, any, 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
+ value?: any;
21
+ type?: any;
22
+ data?: any;
23
+ target?: any;
24
+ tiny_mode?: any;
25
+ tiny_mode_root?: any;
26
+ tiny_template?: any;
27
+ tiny_renderless?: any;
28
+ _constants?: any;
29
+ tiny_theme?: any;
30
+ tiny_chart_theme?: any;
31
+ modelValue?: any;
32
+ href?: any;
33
+ hidden?: any;
34
+ max?: any;
35
+ isDot?: any;
36
+ showLeft?: any;
37
+ }>>>, {
38
+ readonly value?: any;
39
+ readonly type?: any;
40
+ readonly data?: any;
41
+ readonly target?: any;
42
+ readonly tiny_mode?: any;
43
+ readonly tiny_mode_root?: any;
44
+ readonly tiny_template?: any;
45
+ readonly tiny_renderless?: any;
46
+ readonly _constants?: any;
47
+ readonly tiny_theme?: any;
48
+ readonly tiny_chart_theme?: any;
49
+ readonly modelValue?: any;
50
+ readonly href?: any;
51
+ readonly hidden?: any;
52
+ readonly max?: any;
53
+ readonly isDot?: any;
54
+ readonly showLeft?: any;
55
+ }, {}>;
2
56
  export default _default;
@@ -1,2 +1,65 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ value?: any;
3
+ type?: any;
4
+ target?: 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
+ modelValue?: any;
13
+ href?: any;
14
+ hidden?: any;
15
+ max?: any;
16
+ isDot?: any;
17
+ isFixed?: any;
18
+ isMini?: any;
19
+ }>, {
20
+ t: (this: any, path: any, options?: any) => any;
21
+ vm: any;
22
+ f: (props: any, attrs?: {}) => {};
23
+ a: (attrs: any, filters: any, include: any) => {};
24
+ d: (props: any) => void;
25
+ dp: (props: any) => void;
26
+ gcls: (key: any) => any;
27
+ m: (...cssClasses: any[]) => string;
28
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
29
+ value?: any;
30
+ type?: any;
31
+ target?: any;
32
+ tiny_mode?: any;
33
+ tiny_mode_root?: any;
34
+ tiny_template?: any;
35
+ tiny_renderless?: any;
36
+ _constants?: any;
37
+ tiny_theme?: any;
38
+ tiny_chart_theme?: any;
39
+ modelValue?: any;
40
+ href?: any;
41
+ hidden?: any;
42
+ max?: any;
43
+ isDot?: any;
44
+ isFixed?: any;
45
+ isMini?: any;
46
+ }>>>, {
47
+ readonly value?: any;
48
+ readonly type?: any;
49
+ readonly target?: any;
50
+ readonly tiny_mode?: any;
51
+ readonly tiny_mode_root?: any;
52
+ readonly tiny_template?: any;
53
+ readonly tiny_renderless?: any;
54
+ readonly _constants?: any;
55
+ readonly tiny_theme?: any;
56
+ readonly tiny_chart_theme?: any;
57
+ readonly modelValue?: any;
58
+ readonly href?: any;
59
+ readonly hidden?: any;
60
+ readonly max?: any;
61
+ readonly isDot?: any;
62
+ readonly isFixed?: any;
63
+ readonly isMini?: any;
64
+ }, {}>;
2
65
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,60 @@
1
- declare const _default: any;
1
+ import type { IBadgeApi } from '@opentinyvue/vue-renderless/types/badge.type';
2
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
+ value?: any;
4
+ type?: any;
5
+ data?: any;
6
+ target?: any;
7
+ tiny_mode?: any;
8
+ tiny_mode_root?: any;
9
+ tiny_template?: any;
10
+ tiny_renderless?: any;
11
+ _constants?: any;
12
+ tiny_theme?: any;
13
+ tiny_chart_theme?: any;
14
+ modelValue?: any;
15
+ href?: any;
16
+ offset?: any;
17
+ hidden?: any;
18
+ max?: any;
19
+ isDot?: any;
20
+ badgeClass?: any;
21
+ }>, IBadgeApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
22
+ value?: any;
23
+ type?: any;
24
+ data?: any;
25
+ target?: any;
26
+ tiny_mode?: any;
27
+ tiny_mode_root?: any;
28
+ tiny_template?: any;
29
+ tiny_renderless?: any;
30
+ _constants?: any;
31
+ tiny_theme?: any;
32
+ tiny_chart_theme?: any;
33
+ modelValue?: any;
34
+ href?: any;
35
+ offset?: any;
36
+ hidden?: any;
37
+ max?: any;
38
+ isDot?: any;
39
+ badgeClass?: any;
40
+ }>>>, {
41
+ readonly value?: any;
42
+ readonly type?: any;
43
+ readonly data?: any;
44
+ readonly target?: any;
45
+ readonly tiny_mode?: any;
46
+ readonly tiny_mode_root?: any;
47
+ readonly tiny_template?: any;
48
+ readonly tiny_renderless?: any;
49
+ readonly _constants?: any;
50
+ readonly tiny_theme?: any;
51
+ readonly tiny_chart_theme?: any;
52
+ readonly modelValue?: any;
53
+ readonly href?: any;
54
+ readonly offset?: any;
55
+ readonly hidden?: any;
56
+ readonly max?: any;
57
+ readonly isDot?: any;
58
+ readonly badgeClass?: any;
59
+ }, {}>;
2
60
  export default _default;