@opentinyvue/vue-button 3.24.0 → 3.26.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
@@ -90,6 +90,13 @@ var buttonProps = _extends({}, $props, {
90
90
  type: Boolean,
91
91
  default: false
92
92
  },
93
+ /** 自定义样式 */
94
+ customStyle: {
95
+ type: Object,
96
+ default: function _default() {
97
+ return {};
98
+ }
99
+ },
93
100
  /** 是否幽灵按钮 */
94
101
  ghost: Boolean,
95
102
  /** 点击事件 */
@@ -74,7 +74,7 @@ var classes = {
74
74
  "no-round": "rounded",
75
75
  "is-round": "rounded-full",
76
76
  "is-border": "border-0.5 sm:border",
77
- "no-circle": "sm:min-w-[theme(spacing.18)] pl-3 pr-3",
77
+ "no-circle": "sm:min-w-[theme(spacing.18)] pl-2 pr-2 leading-5.5",
78
78
  "is-circle": "sm:min-w-[theme(spacing.18)] sm:rounded-full sm:pl-2 sm:pr-2",
79
79
  "button-icon": "-mt-0.5 sm:text-base fill-current",
80
80
  "button-icon-default": "text-color-icon-primary hover:text-color-icon-hover active:text-color-icon-active",
@@ -85,7 +85,7 @@ var classes = {
85
85
  };
86
86
  var _sfc_main = defineComponent({
87
87
  emits: ["click"],
88
- props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "href", "customClass", "banner"]),
88
+ props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "href", "customClass", "banner", "customStyle"]),
89
89
  components: {
90
90
  IconLoading: iconLoading()
91
91
  },
@@ -115,6 +115,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
115
115
  }), _ctx.gcls({
116
116
  "button-link": _ctx.href
117
117
  }), _ctx.customClass),
118
+ style: _ctx.customStyle,
118
119
  tabindex: _ctx.tabindex
119
120
  }, _ctx.a(_ctx.$attrs, ["class", "style", "id"], true)), [_ctx.loading ? (openBlock(), createBlock(_component_icon_loading, {
120
121
  key: 0,
package/lib/pc.js CHANGED
@@ -39,7 +39,7 @@ var _export_sfc = function _export_sfc2(sfc, props) {
39
39
 
40
40
  var _sfc_main = defineComponent({
41
41
  emits: ["click"],
42
- props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost"]),
42
+ props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost", "customStyle"]),
43
43
  components: {
44
44
  IconLoading: iconLoadingShadow()
45
45
  },
@@ -72,6 +72,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
72
72
  disabled: _ctx.state.buttonDisabled || _ctx.loading,
73
73
  autofocus: _ctx.autofocus,
74
74
  type: _ctx.nativeType,
75
+ style: _ctx.customStyle,
75
76
  tabindex: _ctx.tabindex
76
77
  }, _ctx.a(_ctx.$attrs, ["class", "style", "title", "id"], true)), [_ctx.loading ? (openBlock(), createBlock(_component_icon_loading, {
77
78
  key: 0,
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-button",
3
- "version": "3.24.0",
3
+ "version": "3.26.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.24.0",
11
- "@opentinyvue/vue-icon": "~3.24.0",
12
- "@opentinyvue/vue-renderless": "~3.24.0",
13
- "@opentinyvue/vue-theme": "~3.24.0"
10
+ "@opentinyvue/vue-common": "~3.26.0",
11
+ "@opentinyvue/vue-icon": "~3.26.0",
12
+ "@opentinyvue/vue-renderless": "~3.26.0",
13
+ "@opentinyvue/vue-theme": "~3.26.0"
14
14
  },
15
15
  "license": "MIT",
16
16
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type PropType } from '@opentinyvue/vue-common';
1
2
  export declare const buttonProps: {
2
3
  /** 展示按钮不同的状态,设置为text则展示为文本按钮。可取值为:'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' */
3
4
  type: {
@@ -65,6 +66,11 @@ export declare const buttonProps: {
65
66
  type: BooleanConstructor;
66
67
  default: boolean;
67
68
  };
69
+ /** 自定义样式 */
70
+ customStyle: {
71
+ type: ObjectConstructor;
72
+ default: () => {};
73
+ };
68
74
  /** 是否幽灵按钮 */
69
75
  ghost: BooleanConstructor;
70
76
  /** 点击事件 */
@@ -72,7 +78,7 @@ export declare const buttonProps: {
72
78
  type: PropType<(ev: MouseEvent) => void>;
73
79
  };
74
80
  tiny_mode: StringConstructor;
75
- tiny_mode_root: BooleanConstructor; /** 是否圆角按钮 */
81
+ tiny_mode_root: BooleanConstructor;
76
82
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
77
83
  tiny_renderless: FunctionConstructor;
78
84
  tiny_theme: StringConstructor;
@@ -146,6 +152,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
146
152
  type: BooleanConstructor;
147
153
  default: boolean;
148
154
  };
155
+ /** 自定义样式 */
156
+ customStyle: {
157
+ type: ObjectConstructor;
158
+ default: () => {};
159
+ };
149
160
  /** 是否幽灵按钮 */
150
161
  ghost: BooleanConstructor;
151
162
  /** 点击事件 */
@@ -153,7 +164,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
153
164
  type: PropType<(ev: MouseEvent) => void>;
154
165
  };
155
166
  tiny_mode: StringConstructor;
156
- tiny_mode_root: BooleanConstructor; /** 是否圆角按钮 */
167
+ tiny_mode_root: BooleanConstructor;
157
168
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
158
169
  tiny_renderless: FunctionConstructor;
159
170
  tiny_theme: StringConstructor;
@@ -228,6 +239,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
228
239
  type: BooleanConstructor;
229
240
  default: boolean;
230
241
  };
242
+ /** 自定义样式 */
243
+ customStyle: {
244
+ type: ObjectConstructor;
245
+ default: () => {};
246
+ };
231
247
  /** 是否幽灵按钮 */
232
248
  ghost: BooleanConstructor;
233
249
  /** 点击事件 */
@@ -235,7 +251,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
235
251
  type: PropType<(ev: MouseEvent) => void>;
236
252
  };
237
253
  tiny_mode: StringConstructor;
238
- tiny_mode_root: BooleanConstructor; /** 是否圆角按钮 */
254
+ tiny_mode_root: BooleanConstructor;
239
255
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
240
256
  tiny_renderless: FunctionConstructor;
241
257
  tiny_theme: StringConstructor;
@@ -250,7 +266,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
250
266
  type: string;
251
267
  loading: boolean;
252
268
  circle: boolean;
253
- onClick: any;
254
269
  customClass: string;
255
270
  tiny_mode_root: boolean;
256
271
  tabindex: string;
@@ -260,6 +275,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
260
275
  plain: boolean;
261
276
  autofocus: boolean;
262
277
  banner: boolean;
278
+ customStyle: Record<string, any>;
263
279
  ghost: boolean;
264
280
  }, SlotsType<{
265
281
  /** 默认插槽 */
@@ -23,6 +23,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
23
23
  plain?: any;
24
24
  autofocus?: any;
25
25
  banner?: any;
26
+ customStyle?: any;
26
27
  }>, 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<{
27
28
  disabled?: any;
28
29
  icon?: any;
@@ -48,6 +49,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
48
49
  plain?: any;
49
50
  autofocus?: any;
50
51
  banner?: any;
52
+ customStyle?: any;
51
53
  }>>> & {
52
54
  onClick?: ((...args: any[]) => any) | undefined;
53
55
  }, {
@@ -75,5 +77,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
75
77
  readonly plain?: any;
76
78
  readonly autofocus?: any;
77
79
  readonly banner?: any;
80
+ readonly customStyle?: any;
78
81
  }, {}>;
79
82
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -22,6 +22,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
22
22
  nativeType?: any;
23
23
  plain?: any;
24
24
  autofocus?: any;
25
+ customStyle?: any;
25
26
  ghost?: any;
26
27
  }>, 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<{
27
28
  disabled?: any;
@@ -46,6 +47,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
46
47
  nativeType?: any;
47
48
  plain?: any;
48
49
  autofocus?: any;
50
+ customStyle?: any;
49
51
  ghost?: any;
50
52
  }>>> & {
51
53
  onClick?: ((...args: any[]) => any) | undefined;
@@ -72,6 +74,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
72
74
  readonly nativeType?: any;
73
75
  readonly plain?: any;
74
76
  readonly autofocus?: any;
77
+ readonly customStyle?: any;
75
78
  readonly ghost?: any;
76
79
  }, {}>;
77
80
  export default _default;