@varlet/ui 1.23.6 → 1.23.7-alpha.4
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/es/loading/Loading.js +15 -5
- package/es/loading/props.js +1 -2
- package/es/themes/dark/index.d.ts +5 -0
- package/highlight/attributes.json +4 -0
- package/highlight/tags.json +2 -1
- package/highlight/web-types.json +9 -0
- package/lib/loading/Loading.js +14 -4
- package/lib/loading/props.js +1 -2
- package/lib/themes/dark/index.d.ts +5 -0
- package/package.json +2 -2
- package/umd/varlet.js +1 -1
package/es/loading/Loading.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent } from 'vue';
|
|
1
|
+
import { computed, defineComponent } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { toNumber } from '../utils/shared';
|
|
4
4
|
import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
@@ -29,8 +29,9 @@ export function render(_ctx, _cache) {
|
|
|
29
29
|
return _openBlock(), _createElementBlock("div", _hoisted_1, [_ctx.type === 'circle' ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_createElementVNode("span", {
|
|
30
30
|
class: "var-loading__circle-block",
|
|
31
31
|
style: _normalizeStyle({
|
|
32
|
-
width: _ctx.
|
|
33
|
-
height: _ctx.
|
|
32
|
+
width: _ctx.getRadius * 2 + 'px',
|
|
33
|
+
height: _ctx.getRadius * 2 + 'px',
|
|
34
|
+
color: _ctx.color
|
|
34
35
|
})
|
|
35
36
|
}, _hoisted_4, 4
|
|
36
37
|
/* STYLE */
|
|
@@ -66,16 +67,25 @@ export default defineComponent({
|
|
|
66
67
|
name: 'VarLoading',
|
|
67
68
|
props,
|
|
68
69
|
|
|
69
|
-
setup() {
|
|
70
|
+
setup(props) {
|
|
70
71
|
var loadingTypeDict = {
|
|
71
72
|
wave: 5,
|
|
72
73
|
cube: 4,
|
|
73
74
|
rect: 8,
|
|
74
75
|
disappear: 3
|
|
75
76
|
};
|
|
77
|
+
var sizeDict = {
|
|
78
|
+
mini: 9,
|
|
79
|
+
small: 12,
|
|
80
|
+
normal: 15,
|
|
81
|
+
large: 18
|
|
82
|
+
};
|
|
83
|
+
var getRadius = computed(() => {
|
|
84
|
+
return props.radius ? toNumber(props.radius) : sizeDict[props.size];
|
|
85
|
+
});
|
|
76
86
|
return {
|
|
77
87
|
loadingTypeDict,
|
|
78
|
-
|
|
88
|
+
getRadius
|
|
79
89
|
};
|
|
80
90
|
}
|
|
81
91
|
|
package/es/loading/props.js
CHANGED
|
@@ -839,6 +839,10 @@
|
|
|
839
839
|
"type": "string",
|
|
840
840
|
"description": "loading 的大小,可选值位 `large` `normal` `small` `mini` 默认值:normal"
|
|
841
841
|
},
|
|
842
|
+
"var-loading/radius": {
|
|
843
|
+
"type": "string | number",
|
|
844
|
+
"description": "loading 的类型为`circle`时,可设置其大小 默认值:-"
|
|
845
|
+
},
|
|
842
846
|
"var-menu/v-model:show": {
|
|
843
847
|
"type": "string",
|
|
844
848
|
"description": "是否显示菜单 默认值:default"
|
package/highlight/tags.json
CHANGED
package/highlight/web-types.json
CHANGED
|
@@ -2534,6 +2534,15 @@
|
|
|
2534
2534
|
"type": "string",
|
|
2535
2535
|
"kind": "expression"
|
|
2536
2536
|
}
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
"name": "radius",
|
|
2540
|
+
"description": "loading 的类型为`circle`时,可设置其大小",
|
|
2541
|
+
"default": "-",
|
|
2542
|
+
"value": {
|
|
2543
|
+
"type": "string | number",
|
|
2544
|
+
"kind": "expression"
|
|
2545
|
+
}
|
|
2537
2546
|
}
|
|
2538
2547
|
],
|
|
2539
2548
|
"events": [],
|
package/lib/loading/Loading.js
CHANGED
|
@@ -37,8 +37,9 @@ function render(_ctx, _cache) {
|
|
|
37
37
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [_ctx.type === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_2, [(0, _vue.createElementVNode)("span", {
|
|
38
38
|
class: "var-loading__circle-block",
|
|
39
39
|
style: (0, _vue.normalizeStyle)({
|
|
40
|
-
width: _ctx.
|
|
41
|
-
height: _ctx.
|
|
40
|
+
width: _ctx.getRadius * 2 + 'px',
|
|
41
|
+
height: _ctx.getRadius * 2 + 'px',
|
|
42
|
+
color: _ctx.color
|
|
42
43
|
})
|
|
43
44
|
}, _hoisted_4, 4
|
|
44
45
|
/* STYLE */
|
|
@@ -75,16 +76,25 @@ var _default = (0, _vue.defineComponent)({
|
|
|
75
76
|
name: 'VarLoading',
|
|
76
77
|
props: _props.props,
|
|
77
78
|
|
|
78
|
-
setup() {
|
|
79
|
+
setup(props) {
|
|
79
80
|
var loadingTypeDict = {
|
|
80
81
|
wave: 5,
|
|
81
82
|
cube: 4,
|
|
82
83
|
rect: 8,
|
|
83
84
|
disappear: 3
|
|
84
85
|
};
|
|
86
|
+
var sizeDict = {
|
|
87
|
+
mini: 9,
|
|
88
|
+
small: 12,
|
|
89
|
+
normal: 15,
|
|
90
|
+
large: 18
|
|
91
|
+
};
|
|
92
|
+
var getRadius = (0, _vue.computed)(() => {
|
|
93
|
+
return props.radius ? (0, _shared.toNumber)(props.radius) : sizeDict[props.size];
|
|
94
|
+
});
|
|
85
95
|
return {
|
|
86
96
|
loadingTypeDict,
|
|
87
|
-
|
|
97
|
+
getRadius
|
|
88
98
|
};
|
|
89
99
|
}
|
|
90
100
|
|
package/lib/loading/props.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.7-alpha.4+21c1a885",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"vue": "^3.2.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "21c1a8859ba686314f1422afdc34e881fbcc92eb",
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@varlet/cli": "^1.23.5"
|
|
55
55
|
},
|