@opentinyvue/vue-badge 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/lib/pc.js +1 -1
- package/package.json +4 -5
- package/lib/mobile.js +0 -82
- 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
|
}
|
|
@@ -77,7 +73,7 @@ var Badge = defineComponent({
|
|
|
77
73
|
});
|
|
78
74
|
}
|
|
79
75
|
});
|
|
80
|
-
var version = "2.
|
|
76
|
+
var version = "2.undefined";
|
|
81
77
|
Badge.model = {
|
|
82
78
|
prop: "modelValue",
|
|
83
79
|
event: "update:modelValue"
|
package/lib/pc.js
CHANGED
|
@@ -62,7 +62,7 @@ var render = function render2() {
|
|
|
62
62
|
}
|
|
63
63
|
}, [_vm._v(_vm._s(_vm.state.content))]) : _vm._e(), !_vm.state.href ? _c("span", {
|
|
64
64
|
staticClass: "tiny-badge__content-text"
|
|
65
|
-
}, [_vm._v(_vm._s(_vm.state.content))]) : _vm._e()];
|
|
65
|
+
}, [!_vm.isDot ? [_vm._v(" " + _vm._s(_vm.state.content) + " ")] : _vm._e()], 2) : _vm._e()];
|
|
66
66
|
})], 2) : _vm._e()], 2);
|
|
67
67
|
};
|
|
68
68
|
var staticRenderFns = [];
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-badge",
|
|
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-theme
|
|
13
|
-
"@opentinyvue/vue-theme": "~3.21.0"
|
|
10
|
+
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
11
|
+
"@opentinyvue/vue-common": "~2.22.0",
|
|
12
|
+
"@opentinyvue/vue-theme": "~3.22.0"
|
|
14
13
|
},
|
|
15
14
|
"license": "MIT",
|
|
16
15
|
"types": "index.d.ts",
|
package/lib/mobile.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/badge/vue';
|
|
2
|
-
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
|
-
import '@opentinyvue/vue-theme-mobile/badge/index.css';
|
|
4
|
-
|
|
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;
|
|
11
|
-
}
|
|
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
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
exports: scriptExports,
|
|
31
|
-
options
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var __vue2_script = defineComponent({
|
|
36
|
-
props: [].concat(props, ["isDot", "isFixed", "isMini", "hidden", "max", "type", "value", "modelValue", "href", "target"]),
|
|
37
|
-
setup: function setup$1(props2, context) {
|
|
38
|
-
return setup({
|
|
39
|
-
props: props2,
|
|
40
|
-
context,
|
|
41
|
-
renderless,
|
|
42
|
-
api
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
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);
|
|
69
|
-
};
|
|
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
|
-
}
|
|
77
|
-
}
|
|
78
|
-
var mobile = /* @__PURE__ */ function() {
|
|
79
|
-
return __component__.exports;
|
|
80
|
-
}();
|
|
81
|
-
|
|
82
|
-
export { mobile as default };
|
package/src/mobile.vue.d.ts
DELETED