@opentinyvue/vue-button 3.21.0 → 3.22.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
@@ -7,9 +7,8 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
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 = "3.21.0";
117
+ var version = "3.22.0";
122
118
  Button.install = function(Vue) {
123
119
  Vue.component(Button.name, Button);
124
120
  };
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-button",
3
- "version": "3.21.0",
3
+ "version": "3.22.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": "~3.21.0",
11
- "@opentinyvue/vue-icon": "~3.21.0",
12
- "@opentinyvue/vue-renderless": "~3.21.0",
13
- "@opentinyvue/vue-theme-mobile": "~3.21.0",
14
- "@opentinyvue/vue-theme": "~3.21.0"
10
+ "@opentinyvue/vue-common": "~3.22.0",
11
+ "@opentinyvue/vue-icon": "~3.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
  };
@@ -154,7 +154,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
154
154
  tiny_mode: StringConstructor;
155
155
  tiny_mode_root: BooleanConstructor;
156
156
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
157
- tiny_renderless: FunctionConstructor; /** 是否圆形按钮 */
157
+ tiny_renderless: FunctionConstructor;
158
158
  tiny_theme: StringConstructor;
159
159
  tiny_chart_theme: ObjectConstructor;
160
160
  }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
@@ -235,27 +235,27 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
235
235
  tiny_mode: StringConstructor;
236
236
  tiny_mode_root: BooleanConstructor;
237
237
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
238
- tiny_renderless: FunctionConstructor; /** 是否圆形按钮 */
238
+ tiny_renderless: FunctionConstructor;
239
239
  tiny_theme: StringConstructor;
240
240
  tiny_chart_theme: ObjectConstructor;
241
241
  }>>, {
242
242
  disabled: boolean;
243
243
  icon: string | Record<string, any>;
244
+ href: string;
245
+ size: string;
244
246
  text: string;
245
247
  type: string;
248
+ loading: boolean;
249
+ circle: boolean;
246
250
  onClick: any;
247
- size: string;
251
+ customClass: string;
248
252
  tiny_mode_root: boolean;
249
253
  tabindex: string;
250
254
  round: boolean;
251
- circle: boolean;
252
255
  resetTime: number;
253
256
  nativeType: string;
254
- href: string;
255
257
  plain: boolean;
256
- loading: boolean;
257
258
  autofocus: boolean;
258
- customClass: string;
259
259
  banner: boolean;
260
260
  ghost: boolean;
261
261
  }, SlotsType<{
@@ -1,9 +1,13 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
2
  disabled?: any;
3
3
  icon?: any;
4
+ href?: any;
5
+ size?: any;
4
6
  text?: any;
5
7
  type?: any;
6
- size?: any;
8
+ loading?: any;
9
+ circle?: any;
10
+ customClass?: any;
7
11
  tiny_mode?: any;
8
12
  tiny_mode_root?: any;
9
13
  tiny_template?: any;
@@ -13,21 +17,21 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
13
17
  tiny_chart_theme?: any;
14
18
  tabindex?: any;
15
19
  round?: any;
16
- circle?: any;
17
20
  resetTime?: any;
18
21
  nativeType?: any;
19
- href?: any;
20
22
  plain?: any;
21
- loading?: any;
22
23
  autofocus?: any;
23
- customClass?: any;
24
24
  banner?: any;
25
25
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "click"[], "click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
26
  disabled?: any;
27
27
  icon?: any;
28
+ href?: any;
29
+ size?: any;
28
30
  text?: any;
29
31
  type?: any;
30
- size?: any;
32
+ loading?: any;
33
+ circle?: any;
34
+ customClass?: any;
31
35
  tiny_mode?: any;
32
36
  tiny_mode_root?: any;
33
37
  tiny_template?: any;
@@ -37,23 +41,23 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
37
41
  tiny_chart_theme?: any;
38
42
  tabindex?: any;
39
43
  round?: any;
40
- circle?: any;
41
44
  resetTime?: any;
42
45
  nativeType?: any;
43
- href?: any;
44
46
  plain?: any;
45
- loading?: any;
46
47
  autofocus?: any;
47
- customClass?: any;
48
48
  banner?: any;
49
49
  }>>> & {
50
50
  onClick?: ((...args: any[]) => any) | undefined;
51
51
  }, {
52
52
  readonly disabled?: any;
53
53
  readonly icon?: any;
54
+ readonly href?: any;
55
+ readonly size?: any;
54
56
  readonly text?: any;
55
57
  readonly type?: any;
56
- readonly size?: any;
58
+ readonly loading?: any;
59
+ readonly circle?: any;
60
+ readonly customClass?: any;
57
61
  readonly tiny_mode?: any;
58
62
  readonly tiny_mode_root?: any;
59
63
  readonly tiny_template?: any;
@@ -63,14 +67,10 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
63
67
  readonly tiny_chart_theme?: any;
64
68
  readonly tabindex?: any;
65
69
  readonly round?: any;
66
- readonly circle?: any;
67
70
  readonly resetTime?: any;
68
71
  readonly nativeType?: any;
69
- readonly href?: any;
70
72
  readonly plain?: any;
71
- readonly loading?: any;
72
73
  readonly autofocus?: any;
73
- readonly customClass?: any;
74
74
  readonly banner?: any;
75
75
  }, {}>;
76
76
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -2,9 +2,12 @@ import type { IButtonApi } from '@opentinyvue/vue-renderless/types/button.type';
2
2
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  disabled?: any;
4
4
  icon?: any;
5
+ size?: any;
5
6
  text?: any;
6
7
  type?: any;
7
- size?: any;
8
+ loading?: any;
9
+ circle?: any;
10
+ customClass?: any;
8
11
  tiny_mode?: any;
9
12
  tiny_mode_root?: any;
10
13
  tiny_template?: any;
@@ -14,20 +17,20 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
14
17
  tiny_chart_theme?: any;
15
18
  tabindex?: any;
16
19
  round?: any;
17
- circle?: any;
18
20
  resetTime?: any;
19
21
  nativeType?: any;
20
22
  plain?: any;
21
- loading?: any;
22
23
  autofocus?: any;
23
- customClass?: any;
24
24
  ghost?: any;
25
25
  }>, IButtonApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "click"[], "click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
26
  disabled?: any;
27
27
  icon?: any;
28
+ size?: any;
28
29
  text?: any;
29
30
  type?: any;
30
- size?: any;
31
+ loading?: any;
32
+ circle?: any;
33
+ customClass?: any;
31
34
  tiny_mode?: any;
32
35
  tiny_mode_root?: any;
33
36
  tiny_template?: any;
@@ -37,22 +40,22 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
37
40
  tiny_chart_theme?: any;
38
41
  tabindex?: any;
39
42
  round?: any;
40
- circle?: any;
41
43
  resetTime?: any;
42
44
  nativeType?: any;
43
45
  plain?: any;
44
- loading?: any;
45
46
  autofocus?: any;
46
- customClass?: any;
47
47
  ghost?: any;
48
48
  }>>> & {
49
49
  onClick?: ((...args: any[]) => any) | undefined;
50
50
  }, {
51
51
  readonly disabled?: any;
52
52
  readonly icon?: any;
53
+ readonly size?: any;
53
54
  readonly text?: any;
54
55
  readonly type?: any;
55
- readonly size?: any;
56
+ readonly loading?: any;
57
+ readonly circle?: any;
58
+ readonly customClass?: any;
56
59
  readonly tiny_mode?: any;
57
60
  readonly tiny_mode_root?: any;
58
61
  readonly tiny_template?: any;
@@ -62,13 +65,10 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
62
65
  readonly tiny_chart_theme?: any;
63
66
  readonly tabindex?: any;
64
67
  readonly round?: any;
65
- readonly circle?: any;
66
68
  readonly resetTime?: any;
67
69
  readonly nativeType?: any;
68
70
  readonly plain?: any;
69
- readonly loading?: any;
70
71
  readonly autofocus?: any;
71
- readonly customClass?: any;
72
72
  readonly ghost?: any;
73
73
  }, {}>;
74
74
  export default _default;
package/lib/mobile.js DELETED
@@ -1,102 +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
- import { openBlock, createElementBlock, mergeProps, normalizeClass, createCommentVNode, createBlock, resolveDynamicComponent, renderSlot, createElementVNode, normalizeStyle, toDisplayString } from 'vue';
5
-
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
- };
15
- }
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;
23
- }
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
- };
38
-
39
- var _sfc_main = defineComponent({
40
- emits: ["click"],
41
- props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "customClass"]),
42
- components: {},
43
- setup: function setup$1(props2, context) {
44
- return setup({
45
- props: props2,
46
- context,
47
- renderless,
48
- api
49
- });
50
- }
51
- });
52
- var _hoisted_1 = ["disabled", "type"];
53
- var _hoisted_2 = /* @__PURE__ */ createElementVNode(
54
- "div",
55
- {
56
- class: "tiny-mobile-button-loading-inner"
57
- },
58
- null,
59
- -1
60
- /* HOISTED */
61
- );
62
- var _hoisted_3 = [_hoisted_2];
63
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
64
- return openBlock(), createElementBlock("button", mergeProps({
65
- class: ["tiny-mobile-button", [_ctx.type ? "tiny-mobile-button--" + _ctx.type : "", _ctx.size ? "tiny-mobile-button--" + _ctx.size : "", {
66
- "is-disabled": _ctx.state.buttonDisabled,
67
- "is-loading": _ctx.loading
68
- }]],
69
- onClick: _cache[0] || (_cache[0] = function() {
70
- return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
71
- }),
72
- disabled: _ctx.state.buttonDisabled || _ctx.loading,
73
- type: _ctx.nativeType
74
- }, _ctx.a(_ctx.$attrs, ["class", "style"], true)), [_ctx.loading ? (openBlock(), createElementBlock(
75
- "div",
76
- {
77
- key: 0,
78
- class: normalizeClass(["tiny-mobile-button-loading", "tiny-mobile-button-loading-" + (_ctx.type === "primary" ? "white" : "black")])
79
- },
80
- _hoisted_3,
81
- 2
82
- /* CLASS */
83
- )) : createCommentVNode("v-if", true), _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
84
- key: 1,
85
- class: normalizeClass(["tiny-icon", "is-icon", _ctx.text ? "small" : null])
86
- }, null, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() {
87
- return [createElementVNode(
88
- "span",
89
- {
90
- style: normalizeStyle({
91
- marginLeft: _ctx.text && (_ctx.icon || _ctx.loading) ? "4px" : 0
92
- })
93
- },
94
- toDisplayString(_ctx.text),
95
- 5
96
- /* TEXT, STYLE */
97
- )];
98
- })], 16, _hoisted_1);
99
- }
100
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
101
-
102
- export { mobile as default };
@@ -1,64 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- disabled?: any;
3
- icon?: any;
4
- text?: any;
5
- type?: any;
6
- size?: 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
- resetTime?: any;
15
- nativeType?: any;
16
- loading?: any;
17
- customClass?: any;
18
- }>, {
19
- t: (this: any, path: any, options?: any) => any;
20
- vm: any;
21
- f: (props: any, attrs?: {}) => {};
22
- a: (attrs: any, filters: any, include: any) => {};
23
- d: (props: any) => void;
24
- dp: (props: any) => void;
25
- gcls: (key: any) => any;
26
- m: (...cssClasses: any[]) => string;
27
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "click"[], "click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
28
- disabled?: any;
29
- icon?: any;
30
- text?: any;
31
- type?: any;
32
- size?: any;
33
- tiny_mode?: any;
34
- tiny_mode_root?: any;
35
- tiny_template?: any;
36
- tiny_renderless?: any;
37
- _constants?: any;
38
- tiny_theme?: any;
39
- tiny_chart_theme?: any;
40
- resetTime?: any;
41
- nativeType?: any;
42
- loading?: any;
43
- customClass?: any;
44
- }>>> & {
45
- onClick?: ((...args: any[]) => any) | undefined;
46
- }, {
47
- readonly disabled?: any;
48
- readonly icon?: any;
49
- readonly text?: any;
50
- readonly type?: any;
51
- readonly size?: any;
52
- readonly tiny_mode?: any;
53
- readonly tiny_mode_root?: any;
54
- readonly tiny_template?: any;
55
- readonly tiny_renderless?: any;
56
- readonly _constants?: any;
57
- readonly tiny_theme?: any;
58
- readonly tiny_chart_theme?: any;
59
- readonly resetTime?: any;
60
- readonly nativeType?: any;
61
- readonly loading?: any;
62
- readonly customClass?: any;
63
- }, {}>;
64
- export default _default;