@opentinyvue/vue-button 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/mobile-first.js +2 -2
- package/package.json +5 -6
- package/src/index.d.ts +1 -1
- package/lib/mobile.js +0 -92
- 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
|
}
|
|
@@ -118,7 +114,7 @@ var Button = defineComponent({
|
|
|
118
114
|
});
|
|
119
115
|
}
|
|
120
116
|
});
|
|
121
|
-
var version = "2.
|
|
117
|
+
var version = "2.undefined";
|
|
122
118
|
Button.install = function(Vue) {
|
|
123
119
|
Vue.component(Button.name, Button);
|
|
124
120
|
};
|
package/lib/mobile-first.js
CHANGED
|
@@ -75,7 +75,7 @@ var classes = {
|
|
|
75
75
|
"button-icon": "-mt-0.5 sm:text-base fill-current",
|
|
76
76
|
"button-icon-default": "text-color-icon-primary hover:text-color-icon-hover active:text-color-icon-active",
|
|
77
77
|
"button-icon-disabled": "text-color-icon-disabled hover:cursor-not-allowed",
|
|
78
|
-
"loading-svg": "animate-spin
|
|
78
|
+
"loading-svg": "animate-spin mr-1 fill-current -left-0.5 -right-0.5 -top-0.5 -bottom-0.5",
|
|
79
79
|
"button-link": "text-color-link hover:text-color-link-hover active:color-link-hover active:hover:text-color-link-hover sm:hover:text-color-link-hover",
|
|
80
80
|
"button-banner": " w-[calc(100%-theme(spacing.8))] mx-4"
|
|
81
81
|
};
|
|
@@ -100,7 +100,7 @@ var render = function render2() {
|
|
|
100
100
|
var _h = _vm.$createElement;
|
|
101
101
|
var _c = _vm._self._c || _h;
|
|
102
102
|
return _c("button", _vm._b({
|
|
103
|
-
class: _vm.m(_vm.gcls("button"), _vm.gcls(_vm.banner ? "button-banner" : "button-base-width"), _vm.gcls("size-" + (_vm.size || "default")), _vm.gcls("type-" + (_vm.type || "default") + (_vm.icon ? "-icon" : _vm.state.plain ? "-plain" : "") + (_vm.state.buttonDisabled ? "-disabled" : "")), _vm.gcls(_vm.state.round ? "is-round" : "no-round"), _vm.gcls(_vm.circle ? "is-circle" : "no-circle"), _vm.gcls({
|
|
103
|
+
class: _vm.m(_vm.gcls("button"), _vm.gcls(_vm.banner ? "button-banner" : "button-base-width"), _vm.gcls("size-" + (_vm.size || "default")), _vm.gcls("type-" + (_vm.type || "default") + (_vm.icon ? "-icon" : _vm.state.plain ? "-plain" : "") + (_vm.state.buttonDisabled || _vm.loading ? "-disabled" : "")), _vm.gcls(_vm.state.round ? "is-round" : "no-round"), _vm.gcls(_vm.circle ? "is-circle" : "no-circle"), _vm.gcls({
|
|
104
104
|
"is-border": _vm.circle || !(_vm.type === "text" || _vm.icon)
|
|
105
105
|
}), _vm.gcls({
|
|
106
106
|
"button-link": _vm.href
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-button",
|
|
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-common": "~2.
|
|
11
|
-
"@opentinyvue/vue-icon": "~2.
|
|
12
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
13
|
-
"@opentinyvue/vue-theme
|
|
14
|
-
"@opentinyvue/vue-theme": "~3.21.0"
|
|
10
|
+
"@opentinyvue/vue-common": "~2.22.0",
|
|
11
|
+
"@opentinyvue/vue-icon": "~2.22.0",
|
|
12
|
+
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-theme": "~3.22.0"
|
|
15
14
|
},
|
|
16
15
|
"license": "MIT",
|
|
17
16
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare const buttonProps: {
|
|
|
74
74
|
tiny_mode: StringConstructor;
|
|
75
75
|
tiny_mode_root: BooleanConstructor;
|
|
76
76
|
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
77
|
-
tiny_renderless: FunctionConstructor;
|
|
77
|
+
tiny_renderless: FunctionConstructor;
|
|
78
78
|
tiny_theme: StringConstructor;
|
|
79
79
|
tiny_chart_theme: ObjectConstructor;
|
|
80
80
|
};
|
package/lib/mobile.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/button/vue';
|
|
2
|
-
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
|
-
import '@opentinyvue/vue-theme-mobile/button/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
|
-
emits: ["click"],
|
|
37
|
-
props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "customClass"]),
|
|
38
|
-
components: {},
|
|
39
|
-
setup: function setup$1(props2, context) {
|
|
40
|
-
return setup({
|
|
41
|
-
props: props2,
|
|
42
|
-
context,
|
|
43
|
-
renderless,
|
|
44
|
-
api
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
var render = function render2() {
|
|
49
|
-
var _vm = this;
|
|
50
|
-
var _h = _vm.$createElement;
|
|
51
|
-
var _c = _vm._self._c || _h;
|
|
52
|
-
return _c("button", _vm._b({
|
|
53
|
-
staticClass: "tiny-mobile-button",
|
|
54
|
-
class: [_vm.type ? "tiny-mobile-button--" + _vm.type : "", _vm.size ? "tiny-mobile-button--" + _vm.size : "", {
|
|
55
|
-
"is-disabled": _vm.state.buttonDisabled,
|
|
56
|
-
"is-loading": _vm.loading
|
|
57
|
-
}],
|
|
58
|
-
attrs: {
|
|
59
|
-
"disabled": _vm.state.buttonDisabled || _vm.loading,
|
|
60
|
-
"type": _vm.nativeType
|
|
61
|
-
},
|
|
62
|
-
on: {
|
|
63
|
-
"click": _vm.handleClick
|
|
64
|
-
}
|
|
65
|
-
}, "button", _vm.a(_vm.$attrs, ["class", "style"], true), false), [_vm.loading ? [_c("div", {
|
|
66
|
-
class: ["tiny-mobile-button-loading", "tiny-mobile-button-loading-" + (_vm.type === "primary" ? "white" : "black")]
|
|
67
|
-
}, [_c("div", {
|
|
68
|
-
staticClass: "tiny-mobile-button-loading-inner"
|
|
69
|
-
})])] : _vm._e(), _vm.icon && !_vm.loading ? _c(_vm.icon, {
|
|
70
|
-
tag: "component",
|
|
71
|
-
class: ["tiny-icon", "is-icon", _vm.text ? "small" : null]
|
|
72
|
-
}) : _vm._e(), _vm._t("default", function() {
|
|
73
|
-
return [_c("span", {
|
|
74
|
-
style: {
|
|
75
|
-
marginLeft: _vm.text && (_vm.icon || _vm.loading) ? "4px" : 0
|
|
76
|
-
}
|
|
77
|
-
}, [_vm._v(_vm._s(_vm.text))])];
|
|
78
|
-
})], 2);
|
|
79
|
-
};
|
|
80
|
-
var staticRenderFns = [];
|
|
81
|
-
var __cssModules = {};
|
|
82
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
83
|
-
function __vue2_injectStyles(context) {
|
|
84
|
-
for (var o in __cssModules) {
|
|
85
|
-
this[o] = __cssModules[o];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
var mobile = /* @__PURE__ */ function() {
|
|
89
|
-
return __component__.exports;
|
|
90
|
-
}();
|
|
91
|
-
|
|
92
|
-
export { mobile as default };
|
package/src/mobile.vue.d.ts
DELETED