@varlet/ui 2.6.0 → 2.6.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.
@@ -179,6 +179,10 @@
179
179
  "type": "string",
180
180
  "description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger` 默认值:default"
181
181
  },
182
+ "var-button/native-type": {
183
+ "type": "string",
184
+ "description": "原生类型,可选值为 `button` `submit` `reset` 默认值:button"
185
+ },
182
186
  "var-button/size": {
183
187
  "type": "string",
184
188
  "description": "尺寸,可选值为 `normal` `mini` `small` `large` 默认值:normal"
@@ -78,6 +78,7 @@
78
78
  "var-button": {
79
79
  "attributes": [
80
80
  "type",
81
+ "native-type",
81
82
  "size",
82
83
  "loading",
83
84
  "loading-radius",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.5.6",
4
+ "version": "2.6.0",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -592,6 +592,15 @@
592
592
  "kind": "expression"
593
593
  }
594
594
  },
595
+ {
596
+ "name": "native-type",
597
+ "description": "原生类型,可选值为 `button` `submit` `reset`",
598
+ "default": "button",
599
+ "value": {
600
+ "type": "string",
601
+ "kind": "expression"
602
+ }
603
+ },
595
604
  {
596
605
  "name": "size",
597
606
  "description": "尺寸,可选值为 `normal` `mini` `small` `large`",
@@ -25,7 +25,7 @@ var {
25
25
 
26
26
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
27
27
 
28
- var _hoisted_1 = ["disabled"];
28
+ var _hoisted_1 = ["type", "disabled"];
29
29
 
30
30
  function render(_ctx, _cache) {
31
31
  var _component_var_loading = (0, _vue.resolveComponent)("var-loading");
@@ -38,6 +38,7 @@ function render(_ctx, _cache) {
38
38
  color: _ctx.textColor,
39
39
  background: _ctx.color
40
40
  }),
41
+ type: _ctx.nativeType,
41
42
  disabled: _ctx.disabled,
42
43
  onClick: _cache[0] || (_cache[0] = function () {
43
44
  return _ctx.handleClick && _ctx.handleClick(...arguments);
@@ -17,12 +17,21 @@ function sizeValidator(size) {
17
17
  return ['normal', 'mini', 'small', 'large'].includes(size);
18
18
  }
19
19
 
20
+ function nativeTypeValidator(nativeType) {
21
+ return ['button', 'reset', 'submit'].includes(nativeType);
22
+ }
23
+
20
24
  var props = {
21
25
  type: {
22
26
  type: String,
23
27
  default: 'default',
24
28
  validator: typeValidator
25
29
  },
30
+ nativeType: {
31
+ type: String,
32
+ default: 'button',
33
+ validator: nativeTypeValidator
34
+ },
26
35
  size: {
27
36
  type: String,
28
37
  default: 'normal',
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports._PopupComponent = void 0;
4
+ exports.default = exports._OverlayComponent = void 0;
5
5
 
6
6
  var _Overlay = _interopRequireDefault(require("./Overlay"));
7
7
 
@@ -11,7 +11,7 @@ _Overlay.default.install = function (app) {
11
11
  app.component(_Overlay.default.name, _Overlay.default);
12
12
  };
13
13
 
14
- var _PopupComponent = _Overlay.default;
15
- exports._PopupComponent = _PopupComponent;
14
+ var _OverlayComponent = _Overlay.default;
15
+ exports._OverlayComponent = _OverlayComponent;
16
16
  var _default = _Overlay.default;
17
17
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -47,8 +47,8 @@
47
47
  "@popperjs/core": "^2.11.6",
48
48
  "dayjs": "^1.10.4",
49
49
  "decimal.js": "^10.2.1",
50
- "@varlet/icons": "2.6.0",
51
- "@varlet/shared": "2.6.0"
50
+ "@varlet/shared": "2.6.1",
51
+ "@varlet/icons": "2.6.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/jest": "^26.0.15",
@@ -63,8 +63,8 @@
63
63
  "typescript": "^4.4.4",
64
64
  "vue": "3.2.25",
65
65
  "vue-router": "4.0.12",
66
- "@varlet/cli": "2.6.0",
67
- "@varlet/touch-emulator": "2.6.0"
66
+ "@varlet/cli": "2.6.1",
67
+ "@varlet/touch-emulator": "2.6.1"
68
68
  },
69
69
  "browserslist": [
70
70
  "Chrome >= 54",
package/types/button.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { VarComponent, BasicAttributes, Type as ButtonType, Size as ButtonSize, ListenerProp } from './varComponent'
2
2
  import { LoadingType, LoadingSize } from './loading'
3
- import { VNode } from 'vue'
3
+ import { ButtonHTMLAttributes, VNode } from 'vue'
4
4
 
5
5
  export { ButtonType, ButtonSize }
6
6
 
7
7
  export interface ButtonProps extends BasicAttributes {
8
8
  type?: ButtonType
9
+ nativeType?: ButtonHTMLAttributes['type']
9
10
  size?: ButtonSize
10
11
  loading?: boolean
11
12
  round?: boolean