@opentinyvue/vue-button 2.22.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
@@ -114,7 +114,7 @@ var Button = defineComponent({
114
114
  });
115
115
  }
116
116
  });
117
- var version = "2.22.0";
117
+ var version = "3.22.0";
118
118
  Button.install = function(Vue) {
119
119
  Vue.component(Button.name, Button);
120
120
  };
@@ -1,36 +1,40 @@
1
1
  import { renderless, api } from '@opentinyvue/vue-renderless/button/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import { iconLoading } from '@opentinyvue/vue-icon';
4
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createBlock, normalizeClass, createCommentVNode, resolveDynamicComponent, renderSlot, createElementVNode, toDisplayString } 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
39
  var classes = {
36
40
  "button": "inline-block text-center overflow-hidden overflow-ellipsis whitespace-nowrap transition-button duration-300 delay-[0ms] active:transition-all active:scale-[0.95] active:ease-[cubic-bezier(0.33,0,0.67,1)]",
@@ -79,7 +83,7 @@ var classes = {
79
83
  "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
84
  "button-banner": " w-[calc(100%-theme(spacing.8))] mx-4"
81
85
  };
82
- var __vue2_script = defineComponent({
86
+ var _sfc_main = defineComponent({
83
87
  emits: ["click"],
84
88
  props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "href", "customClass", "banner"]),
85
89
  components: {
@@ -95,45 +99,39 @@ var __vue2_script = defineComponent({
95
99
  });
96
100
  }
97
101
  });
98
- var render = function render2() {
99
- var _vm = this;
100
- var _h = _vm.$createElement;
101
- var _c = _vm._self._c || _h;
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({
104
- "is-border": _vm.circle || !(_vm.type === "text" || _vm.icon)
105
- }), _vm.gcls({
106
- "button-link": _vm.href
107
- }), _vm.customClass),
108
- attrs: {
109
- "data-tag": "tiny-button",
110
- "disabled": _vm.state.buttonDisabled || _vm.loading,
111
- "autofocus": _vm.autofocus,
112
- "type": _vm.nativeType,
113
- "tabindex": _vm.tabindex
114
- },
115
- on: {
116
- "click": _vm.handleClick
117
- }
118
- }, "button", _vm.a(_vm.$attrs, ["class", "style", "id"], true), false), [_vm.loading ? _c("icon-loading", {
119
- class: _vm.gcls("loading-svg")
120
- }) : _vm._e(), _vm.icon && !_vm.loading ? _c(_vm.icon, {
121
- tag: "component",
122
- class: [_vm.gcls("button-icon"), _vm.gcls("button-icon-" + (_vm.state.buttonDisabled ? "disabled" : "default"))]
123
- }) : _vm._e(), _vm._t("default", function() {
124
- return [_c("span", [_vm._v(_vm._s(_vm.text))])];
125
- })], 2);
126
- };
127
- var staticRenderFns = [];
128
- var __cssModules = {};
129
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
130
- function __vue2_injectStyles(context) {
131
- for (var o in __cssModules) {
132
- this[o] = __cssModules[o];
133
- }
102
+ var _hoisted_1 = ["disabled", "autofocus", "type", "tabindex"];
103
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
104
+ var _component_icon_loading = resolveComponent("icon-loading");
105
+ return openBlock(), createElementBlock("button", mergeProps({
106
+ "data-tag": "tiny-button",
107
+ onClick: _cache[0] || (_cache[0] = function() {
108
+ return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
109
+ }),
110
+ disabled: _ctx.state.buttonDisabled || _ctx.loading,
111
+ autofocus: _ctx.autofocus,
112
+ type: _ctx.nativeType,
113
+ class: _ctx.m(_ctx.gcls("button"), _ctx.gcls(_ctx.banner ? "button-banner" : "button-base-width"), _ctx.gcls("size-" + (_ctx.size || "default")), _ctx.gcls("type-" + (_ctx.type || "default") + (_ctx.icon ? "-icon" : _ctx.state.plain ? "-plain" : "") + (_ctx.state.buttonDisabled ? "-disabled" : "")), _ctx.gcls(_ctx.state.round ? "is-round" : "no-round"), _ctx.gcls(_ctx.circle ? "is-circle" : "no-circle"), _ctx.gcls({
114
+ "is-border": _ctx.circle || !(_ctx.type === "text" || _ctx.icon)
115
+ }), _ctx.gcls({
116
+ "button-link": _ctx.href
117
+ }), _ctx.customClass),
118
+ tabindex: _ctx.tabindex
119
+ }, _ctx.a(_ctx.$attrs, ["class", "style", "id"], true)), [_ctx.loading ? (openBlock(), createBlock(_component_icon_loading, {
120
+ key: 0,
121
+ class: normalizeClass(_ctx.gcls("loading-svg"))
122
+ }, null, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
123
+ key: 1,
124
+ class: normalizeClass([_ctx.gcls("button-icon"), _ctx.gcls("button-icon-" + (_ctx.state.buttonDisabled ? "disabled" : "default"))])
125
+ }, null, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() {
126
+ return [createElementVNode(
127
+ "span",
128
+ null,
129
+ toDisplayString(_ctx.text),
130
+ 1
131
+ /* TEXT */
132
+ )];
133
+ })], 16, _hoisted_1);
134
134
  }
135
- var mobileFirst = /* @__PURE__ */ function() {
136
- return __component__.exports;
137
- }();
135
+ var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
138
136
 
139
137
  export { mobileFirst as default };
package/lib/pc.js CHANGED
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/button/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import { iconLoadingShadow } from '@opentinyvue/vue-icon';
4
4
  import '@opentinyvue/vue-theme/button/index.css';
5
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createBlock, createCommentVNode, resolveDynamicComponent, normalizeClass, renderSlot, createElementVNode, toDisplayString } from 'vue';
5
6
 
6
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
7
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
8
- if (render) {
9
- options.render = render;
10
- options.staticRenderFns = staticRenderFns;
11
- options._compiled = true;
7
+ function _createForOfIteratorHelperLoose(r, e) {
8
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
+ if (t) return (t = t.call(r)).next.bind(t);
10
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
11
+ t && (r = t);
12
+ var o = 0;
13
+ return function() {
14
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
15
+ };
12
16
  }
13
- var hook;
14
- if (injectStyles) {
15
- hook = injectStyles;
16
- }
17
- if (hook) {
18
- if (options.functional) {
19
- options._injectStyles = hook;
20
- var originalRender = options.render;
21
- options.render = function renderWithStyleInjection(h, context) {
22
- hook.call(context);
23
- return originalRender(h, context);
24
- };
25
- } else {
26
- var existing = options.beforeCreate;
27
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
28
- }
17
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
18
+ }
19
+ function _unsupportedIterableToArray(r, a) {
20
+ if (r) {
21
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
22
+ var t = {}.toString.call(r).slice(8, -1);
23
+ 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;
29
24
  }
30
- return {
31
- exports: scriptExports,
32
- options
33
- };
34
25
  }
26
+ function _arrayLikeToArray(r, a) {
27
+ (null == a || a > r.length) && (a = r.length);
28
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
29
+ return n;
30
+ }
31
+ var _export_sfc = function _export_sfc2(sfc, props) {
32
+ var target = sfc.__vccOpts || sfc;
33
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
34
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
35
+ target[key] = val;
36
+ }
37
+ return target;
38
+ };
35
39
 
36
- var __vue2_script = defineComponent({
40
+ var _sfc_main = defineComponent({
37
41
  emits: ["click"],
38
42
  props: [].concat(props, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost"]),
39
43
  components: {
@@ -48,52 +52,45 @@ var __vue2_script = defineComponent({
48
52
  });
49
53
  }
50
54
  });
51
- var render = function render2() {
52
- var _vm = this;
53
- var _h = _vm.$createElement;
54
- var _c = _vm._self._c || _h;
55
- return _c("button", _vm._b({
56
- staticClass: "tiny-button",
57
- class: [_vm.type ? "tiny-button--" + _vm.type : "", _vm.size ? "tiny-button--" + _vm.size : "", {
58
- "is-disabled": _vm.state.buttonDisabled,
59
- "is-loading": _vm.loading,
60
- "is-plain": _vm.state.plain,
61
- "is-ghost": _vm.ghost,
62
- "is-round": _vm.state.round,
63
- "is-circle": _vm.circle,
64
- "is-icon": _vm.icon && !_vm.loading && (_vm.text || _vm.slots.default),
65
- "is-only-icon": _vm.icon && !_vm.loading && !(_vm.text || _vm.slots.default)
66
- }],
67
- attrs: {
68
- "disabled": _vm.state.buttonDisabled || _vm.loading,
69
- "autofocus": _vm.autofocus,
70
- "type": _vm.nativeType,
71
- "tabindex": _vm.tabindex
72
- },
73
- on: {
74
- "click": _vm.handleClick
75
- }
76
- }, "button", _vm.a(_vm.$attrs, ["class", "style", "title", "id"], true), false), [_vm.loading ? _c("icon-loading", {
77
- staticClass: "tiny-icon-loading tiny-svg-size"
78
- }) : _vm._e(), _vm.icon && !_vm.loading ? _c(_vm.icon, {
79
- tag: "component",
80
- class: {
81
- "is-text": _vm.text || _vm.slots.default
82
- }
83
- }) : _vm._e(), _vm._t("default", function() {
84
- return [_c("span", [_vm._v(_vm._s(_vm.text))])];
85
- })], 2);
86
- };
87
- var staticRenderFns = [];
88
- var __cssModules = {};
89
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
90
- function __vue2_injectStyles(context) {
91
- for (var o in __cssModules) {
92
- this[o] = __cssModules[o];
93
- }
55
+ var _hoisted_1 = ["disabled", "autofocus", "type", "tabindex"];
56
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
57
+ var _component_icon_loading = resolveComponent("icon-loading");
58
+ return openBlock(), createElementBlock("button", mergeProps({
59
+ class: ["tiny-button", [_ctx.type ? "tiny-button--" + _ctx.type : "", _ctx.size ? "tiny-button--" + _ctx.size : "", {
60
+ "is-disabled": _ctx.state.buttonDisabled,
61
+ "is-loading": _ctx.loading,
62
+ "is-plain": _ctx.state.plain,
63
+ "is-ghost": _ctx.ghost,
64
+ "is-round": _ctx.state.round,
65
+ "is-circle": _ctx.circle,
66
+ "is-icon": _ctx.icon && !_ctx.loading && (_ctx.text || _ctx.slots.default),
67
+ "is-only-icon": _ctx.icon && !_ctx.loading && !(_ctx.text || _ctx.slots.default)
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
+ autofocus: _ctx.autofocus,
74
+ type: _ctx.nativeType,
75
+ tabindex: _ctx.tabindex
76
+ }, _ctx.a(_ctx.$attrs, ["class", "style", "title", "id"], true)), [_ctx.loading ? (openBlock(), createBlock(_component_icon_loading, {
77
+ key: 0,
78
+ class: "tiny-icon-loading tiny-svg-size"
79
+ })) : createCommentVNode("v-if", true), _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
80
+ key: 1,
81
+ class: normalizeClass({
82
+ "is-text": _ctx.text || _ctx.slots.default
83
+ })
84
+ }, null, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, function() {
85
+ return [createElementVNode(
86
+ "span",
87
+ null,
88
+ toDisplayString(_ctx.text),
89
+ 1
90
+ /* TEXT */
91
+ )];
92
+ })], 16, _hoisted_1);
94
93
  }
95
- var pc = /* @__PURE__ */ function() {
96
- return __component__.exports;
97
- }();
94
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
98
95
 
99
96
  export { pc as default };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-button",
3
- "version": "2.22.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": "~2.22.0",
11
- "@opentinyvue/vue-icon": "~2.22.0",
10
+ "@opentinyvue/vue-common": "~3.22.0",
11
+ "@opentinyvue/vue-icon": "~3.22.0",
12
12
  "@opentinyvue/vue-renderless": "~3.22.0",
13
13
  "@opentinyvue/vue-theme": "~3.22.0"
14
14
  },
package/src/index.d.ts CHANGED
@@ -78,5 +78,188 @@ export declare const buttonProps: {
78
78
  tiny_theme: StringConstructor;
79
79
  tiny_chart_theme: ObjectConstructor;
80
80
  };
81
- declare const _default: any;
81
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
82
+ /** 展示按钮不同的状态,设置为text则展示为文本按钮。可取值为:'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' */
83
+ type: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ /** 设置原生的tabindex属性 */
88
+ tabindex: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ /** 按钮左侧展示的图标,接收为Icon组件 */
93
+ icon: {
94
+ type: (StringConstructor | ObjectConstructor)[];
95
+ default: string;
96
+ };
97
+ /** 按钮显示的文本 */
98
+ text: {
99
+ type: StringConstructor;
100
+ default: string;
101
+ };
102
+ /** 设置按钮禁用时间,防止重复提交,单位毫秒 */
103
+ resetTime: {
104
+ type: NumberConstructor;
105
+ default: number;
106
+ };
107
+ /** 对应按钮原生 type 属性 */
108
+ nativeType: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ /** 当配置href后,点击按钮则更新 location.href 进行页面跳转 */
113
+ href: {
114
+ type: StringConstructor;
115
+ default: string;
116
+ };
117
+ /** 定义按钮尺寸 */
118
+ size: {
119
+ type: StringConstructor;
120
+ default: string;
121
+ validator(val: string): boolean;
122
+ };
123
+ /** 是否圆角按钮 */
124
+ round: {
125
+ type: BooleanConstructor;
126
+ default: undefined;
127
+ };
128
+ /** 是否朴素按钮 */
129
+ plain: BooleanConstructor;
130
+ /** 是否圆形按钮 */
131
+ circle: BooleanConstructor;
132
+ /** 是否加载中状态 */
133
+ loading: BooleanConstructor;
134
+ /** 是否被禁用按钮 */
135
+ disabled: BooleanConstructor;
136
+ /** 是否默认聚焦 */
137
+ autofocus: BooleanConstructor;
138
+ /** 自定义类名, 仅 mobile-first 模板时有效 */
139
+ customClass: {
140
+ type: StringConstructor;
141
+ default: string;
142
+ };
143
+ /** 设置通栏按钮,宽度充满水平方向, 仅 mobile-first 模板时有效 */
144
+ banner: {
145
+ type: BooleanConstructor;
146
+ default: boolean;
147
+ };
148
+ /** 是否幽灵按钮 */
149
+ ghost: BooleanConstructor;
150
+ /** 点击事件 */
151
+ onClick: {
152
+ type: PropType<(ev: MouseEvent) => void>;
153
+ };
154
+ tiny_mode: StringConstructor;
155
+ tiny_mode_root: BooleanConstructor;
156
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
157
+ tiny_renderless: FunctionConstructor;
158
+ tiny_theme: StringConstructor;
159
+ tiny_chart_theme: ObjectConstructor;
160
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
161
+ [key: string]: any;
162
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
163
+ /** 展示按钮不同的状态,设置为text则展示为文本按钮。可取值为:'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' */
164
+ type: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ /** 设置原生的tabindex属性 */
169
+ tabindex: {
170
+ type: StringConstructor;
171
+ default: string;
172
+ };
173
+ /** 按钮左侧展示的图标,接收为Icon组件 */
174
+ icon: {
175
+ type: (StringConstructor | ObjectConstructor)[];
176
+ default: string;
177
+ };
178
+ /** 按钮显示的文本 */
179
+ text: {
180
+ type: StringConstructor;
181
+ default: string;
182
+ };
183
+ /** 设置按钮禁用时间,防止重复提交,单位毫秒 */
184
+ resetTime: {
185
+ type: NumberConstructor;
186
+ default: number;
187
+ };
188
+ /** 对应按钮原生 type 属性 */
189
+ nativeType: {
190
+ type: StringConstructor;
191
+ default: string;
192
+ };
193
+ /** 当配置href后,点击按钮则更新 location.href 进行页面跳转 */
194
+ href: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ /** 定义按钮尺寸 */
199
+ size: {
200
+ type: StringConstructor;
201
+ default: string;
202
+ validator(val: string): boolean;
203
+ };
204
+ /** 是否圆角按钮 */
205
+ round: {
206
+ type: BooleanConstructor;
207
+ default: undefined;
208
+ };
209
+ /** 是否朴素按钮 */
210
+ plain: BooleanConstructor;
211
+ /** 是否圆形按钮 */
212
+ circle: BooleanConstructor;
213
+ /** 是否加载中状态 */
214
+ loading: BooleanConstructor;
215
+ /** 是否被禁用按钮 */
216
+ disabled: BooleanConstructor;
217
+ /** 是否默认聚焦 */
218
+ autofocus: BooleanConstructor;
219
+ /** 自定义类名, 仅 mobile-first 模板时有效 */
220
+ customClass: {
221
+ type: StringConstructor;
222
+ default: string;
223
+ };
224
+ /** 设置通栏按钮,宽度充满水平方向, 仅 mobile-first 模板时有效 */
225
+ banner: {
226
+ type: BooleanConstructor;
227
+ default: boolean;
228
+ };
229
+ /** 是否幽灵按钮 */
230
+ ghost: BooleanConstructor;
231
+ /** 点击事件 */
232
+ onClick: {
233
+ type: PropType<(ev: MouseEvent) => void>;
234
+ };
235
+ tiny_mode: StringConstructor;
236
+ tiny_mode_root: BooleanConstructor;
237
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
238
+ tiny_renderless: FunctionConstructor;
239
+ tiny_theme: StringConstructor;
240
+ tiny_chart_theme: ObjectConstructor;
241
+ }>>, {
242
+ disabled: boolean;
243
+ icon: string | Record<string, any>;
244
+ href: string;
245
+ size: string;
246
+ text: string;
247
+ type: string;
248
+ loading: boolean;
249
+ circle: boolean;
250
+ onClick: any;
251
+ customClass: string;
252
+ tiny_mode_root: boolean;
253
+ tabindex: string;
254
+ round: boolean;
255
+ resetTime: number;
256
+ nativeType: string;
257
+ plain: boolean;
258
+ autofocus: boolean;
259
+ banner: boolean;
260
+ ghost: boolean;
261
+ }, SlotsType<{
262
+ /** 默认插槽 */
263
+ default: {};
264
+ }>>;
82
265
  export default _default;
@@ -1,2 +1,76 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ disabled?: any;
3
+ icon?: any;
4
+ href?: any;
5
+ size?: any;
6
+ text?: any;
7
+ type?: any;
8
+ loading?: any;
9
+ circle?: any;
10
+ customClass?: any;
11
+ tiny_mode?: any;
12
+ tiny_mode_root?: any;
13
+ tiny_template?: any;
14
+ tiny_renderless?: any;
15
+ _constants?: any;
16
+ tiny_theme?: any;
17
+ tiny_chart_theme?: any;
18
+ tabindex?: any;
19
+ round?: any;
20
+ resetTime?: any;
21
+ nativeType?: any;
22
+ plain?: any;
23
+ autofocus?: any;
24
+ banner?: any;
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
+ disabled?: any;
27
+ icon?: any;
28
+ href?: any;
29
+ size?: any;
30
+ text?: any;
31
+ type?: any;
32
+ loading?: any;
33
+ circle?: any;
34
+ customClass?: any;
35
+ tiny_mode?: any;
36
+ tiny_mode_root?: any;
37
+ tiny_template?: any;
38
+ tiny_renderless?: any;
39
+ _constants?: any;
40
+ tiny_theme?: any;
41
+ tiny_chart_theme?: any;
42
+ tabindex?: any;
43
+ round?: any;
44
+ resetTime?: any;
45
+ nativeType?: any;
46
+ plain?: any;
47
+ autofocus?: any;
48
+ banner?: any;
49
+ }>>> & {
50
+ onClick?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ readonly disabled?: any;
53
+ readonly icon?: any;
54
+ readonly href?: any;
55
+ readonly size?: any;
56
+ readonly text?: any;
57
+ readonly type?: any;
58
+ readonly loading?: any;
59
+ readonly circle?: any;
60
+ readonly customClass?: any;
61
+ readonly tiny_mode?: any;
62
+ readonly tiny_mode_root?: any;
63
+ readonly tiny_template?: any;
64
+ readonly tiny_renderless?: any;
65
+ readonly _constants?: any;
66
+ readonly tiny_theme?: any;
67
+ readonly tiny_chart_theme?: any;
68
+ readonly tabindex?: any;
69
+ readonly round?: any;
70
+ readonly resetTime?: any;
71
+ readonly nativeType?: any;
72
+ readonly plain?: any;
73
+ readonly autofocus?: any;
74
+ readonly banner?: any;
75
+ }, {}>;
2
76
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,74 @@
1
- declare const _default: any;
1
+ import type { IButtonApi } from '@opentinyvue/vue-renderless/types/button.type';
2
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
+ disabled?: any;
4
+ icon?: any;
5
+ size?: any;
6
+ text?: any;
7
+ type?: any;
8
+ loading?: any;
9
+ circle?: any;
10
+ customClass?: any;
11
+ tiny_mode?: any;
12
+ tiny_mode_root?: any;
13
+ tiny_template?: any;
14
+ tiny_renderless?: any;
15
+ _constants?: any;
16
+ tiny_theme?: any;
17
+ tiny_chart_theme?: any;
18
+ tabindex?: any;
19
+ round?: any;
20
+ resetTime?: any;
21
+ nativeType?: any;
22
+ plain?: any;
23
+ autofocus?: any;
24
+ ghost?: any;
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
+ disabled?: any;
27
+ icon?: any;
28
+ size?: any;
29
+ text?: any;
30
+ type?: any;
31
+ loading?: any;
32
+ circle?: any;
33
+ customClass?: any;
34
+ tiny_mode?: any;
35
+ tiny_mode_root?: any;
36
+ tiny_template?: any;
37
+ tiny_renderless?: any;
38
+ _constants?: any;
39
+ tiny_theme?: any;
40
+ tiny_chart_theme?: any;
41
+ tabindex?: any;
42
+ round?: any;
43
+ resetTime?: any;
44
+ nativeType?: any;
45
+ plain?: any;
46
+ autofocus?: any;
47
+ ghost?: any;
48
+ }>>> & {
49
+ onClick?: ((...args: any[]) => any) | undefined;
50
+ }, {
51
+ readonly disabled?: any;
52
+ readonly icon?: any;
53
+ readonly size?: any;
54
+ readonly text?: any;
55
+ readonly type?: any;
56
+ readonly loading?: any;
57
+ readonly circle?: any;
58
+ readonly customClass?: any;
59
+ readonly tiny_mode?: any;
60
+ readonly tiny_mode_root?: any;
61
+ readonly tiny_template?: any;
62
+ readonly tiny_renderless?: any;
63
+ readonly _constants?: any;
64
+ readonly tiny_theme?: any;
65
+ readonly tiny_chart_theme?: any;
66
+ readonly tabindex?: any;
67
+ readonly round?: any;
68
+ readonly resetTime?: any;
69
+ readonly nativeType?: any;
70
+ readonly plain?: any;
71
+ readonly autofocus?: any;
72
+ readonly ghost?: any;
73
+ }, {}>;
2
74
  export default _default;