@varlet/cli 1.22.0-alpha.3 → 1.22.0-alpha.64
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/README.en-US.md +11 -0
- package/README.md +11 -0
- package/generators/sfc/package.json +3 -3
- package/generators/sfc/varlet.config.js +5 -0
- package/generators/tsx/package.json +3 -3
- package/generators/tsx/varlet.config.js +5 -0
- package/lib/commands/dev.js +14 -3
- package/lib/commands/preview.d.ts +1 -0
- package/lib/commands/preview.js +65 -0
- package/lib/compiler/compileSiteEntry.d.ts +1 -4
- package/lib/compiler/compileSiteEntry.js +10 -20
- package/lib/config/jest.config.js +0 -1
- package/lib/config/vite.config.js +16 -7
- package/lib/index.js +2 -0
- package/lib/shared/constant.d.ts +1 -9
- package/lib/shared/constant.js +2 -10
- package/lib/site/components/app-bar/index.d.ts +3 -0
- package/lib/site/components/app-bar/index.js +12 -0
- package/lib/site/components/app-bar/props.d.ts +21 -0
- package/lib/site/components/app-bar/props.js +28 -0
- package/lib/site/components/button/index.d.ts +3 -0
- package/lib/site/components/button/index.js +12 -0
- package/lib/site/components/button/props.d.ts +62 -0
- package/lib/site/components/button/props.js +69 -0
- package/lib/site/components/cell/index.d.ts +3 -0
- package/lib/site/components/cell/index.js +12 -0
- package/lib/site/components/cell/props.d.ts +27 -0
- package/lib/site/components/cell/props.js +30 -0
- package/lib/site/components/context/index.d.ts +15 -0
- package/lib/site/components/context/index.js +11 -0
- package/lib/site/components/context/lock.d.ts +10 -0
- package/lib/site/components/context/lock.js +94 -0
- package/lib/site/components/context/zIndex.d.ts +4 -0
- package/lib/site/components/context/zIndex.js +19 -0
- package/lib/site/components/icon/index.d.ts +3 -0
- package/lib/site/components/icon/index.js +12 -0
- package/lib/site/components/icon/props.d.ts +23 -0
- package/lib/site/components/icon/props.js +25 -0
- package/lib/site/components/loading/index.d.ts +3 -0
- package/lib/site/components/loading/index.js +12 -0
- package/lib/site/components/loading/props.d.ts +26 -0
- package/lib/site/components/loading/props.js +34 -0
- package/lib/site/components/menu/index.d.ts +3 -0
- package/lib/site/components/menu/index.js +12 -0
- package/lib/site/components/menu/props.d.ts +40 -0
- package/lib/site/components/menu/props.js +43 -0
- package/lib/site/components/progress/index.d.ts +3 -0
- package/lib/site/components/progress/index.js +12 -0
- package/lib/site/components/progress/props.d.ts +43 -0
- package/lib/site/components/progress/props.js +57 -0
- package/lib/site/components/ripple/index.d.ts +8 -0
- package/lib/site/components/ripple/index.js +125 -0
- package/lib/site/components/utils/components.d.ts +53 -0
- package/lib/site/components/utils/components.js +279 -0
- package/lib/site/components/utils/elements.d.ts +30 -0
- package/lib/site/components/utils/elements.js +240 -0
- package/lib/site/components/utils/shared.d.ts +36 -0
- package/lib/site/components/utils/shared.js +181 -0
- package/lib/site/mobile/main.d.ts +3 -0
- package/lib/site/mobile/main.js +93 -0
- package/lib/site/pc/main.d.ts +3 -0
- package/lib/site/pc/main.js +69 -0
- package/lib/site/useProgress.d.ts +4 -0
- package/lib/site/useProgress.js +58 -0
- package/lib/site/utils.d.ts +24 -0
- package/lib/site/utils.js +133 -0
- package/package.json +10 -9
- package/site/.DS_Store +0 -0
- package/site/components/app-bar/AppBar.vue +45 -0
- package/site/components/app-bar/appBar.less +66 -0
- package/site/components/app-bar/index.ts +10 -0
- package/site/components/app-bar/props.ts +25 -0
- package/site/components/button/Button.vue +84 -0
- package/site/components/button/button.less +183 -0
- package/site/components/button/index.ts +10 -0
- package/site/components/button/props.ts +70 -0
- package/site/components/cell/Cell.vue +42 -0
- package/site/components/cell/cell.less +74 -0
- package/site/components/cell/index.ts +10 -0
- package/site/components/cell/props.ts +27 -0
- package/site/components/context/index.ts +17 -0
- package/site/components/context/lock.ts +103 -0
- package/site/components/context/zIndex.ts +20 -0
- package/site/components/icon/Icon.vue +68 -0
- package/site/components/icon/icon.less +25 -0
- package/site/components/icon/index.ts +10 -0
- package/site/components/icon/props.ts +24 -0
- package/site/components/loading/Loading.vue +55 -0
- package/site/components/loading/index.ts +10 -0
- package/site/components/loading/loading.less +420 -0
- package/site/components/loading/props.ts +37 -0
- package/site/components/menu/Menu.vue +113 -0
- package/site/components/menu/index.ts +10 -0
- package/site/components/menu/menu.less +27 -0
- package/site/components/menu/props.ts +43 -0
- package/site/components/progress/Progress.vue +108 -0
- package/site/components/progress/index.ts +10 -0
- package/site/components/progress/progress.less +98 -0
- package/site/components/progress/props.ts +55 -0
- package/site/components/ripple/index.ts +167 -0
- package/site/components/ripple/ripple.less +17 -0
- package/site/components/styles/common.less +64 -0
- package/site/components/styles/elevation.less +126 -0
- package/site/components/styles/var.less +27 -0
- package/site/components/utils/components.ts +53 -0
- package/site/components/utils/elements.ts +83 -0
- package/site/components/utils/shared.ts +27 -0
- package/site/mobile/App.vue +21 -17
- package/site/mobile/components/AppHome.vue +6 -6
- package/site/mobile/main.ts +15 -8
- package/site/pc/App.vue +16 -11
- package/site/pc/components/AppHeader.vue +15 -11
- package/site/pc/components/AppMobile.vue +3 -3
- package/site/pc/components/AppSidebar.vue +17 -21
- package/site/pc/main.ts +8 -5
- package/site/useProgress.ts +11 -9
- package/site/utils.ts +14 -3
- package/varlet.default.config.js +3 -2
- package/generators/sfc/yarn.lock +0 -11231
- package/generators/tsx/yarn.lock +0 -11231
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = void 0;
|
|
4
|
+
var props_1 = require("../loading/props");
|
|
5
|
+
var components_1 = require("../utils/components");
|
|
6
|
+
function typeValidator(type) {
|
|
7
|
+
return ['default', 'primary', 'info', 'success', 'warning', 'danger'].includes(type);
|
|
8
|
+
}
|
|
9
|
+
function sizeValidator(size) {
|
|
10
|
+
return ['normal', 'mini', 'small', 'large'].includes(size);
|
|
11
|
+
}
|
|
12
|
+
exports.props = {
|
|
13
|
+
type: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'default',
|
|
16
|
+
validator: typeValidator,
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'normal',
|
|
21
|
+
validator: sizeValidator,
|
|
22
|
+
},
|
|
23
|
+
loading: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
round: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
block: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
text: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
outline: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
ripple: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true,
|
|
50
|
+
},
|
|
51
|
+
color: {
|
|
52
|
+
type: String,
|
|
53
|
+
},
|
|
54
|
+
textColor: {
|
|
55
|
+
type: String,
|
|
56
|
+
},
|
|
57
|
+
loadingRadius: {
|
|
58
|
+
type: [Number, String],
|
|
59
|
+
default: 12,
|
|
60
|
+
},
|
|
61
|
+
loadingType: components_1.pickProps(props_1.props, 'type'),
|
|
62
|
+
loadingSize: components_1.pickProps(props_1.props, 'size'),
|
|
63
|
+
onClick: {
|
|
64
|
+
type: Function,
|
|
65
|
+
},
|
|
66
|
+
onTouchstart: {
|
|
67
|
+
type: Function,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._CellComponent = void 0;
|
|
7
|
+
var Cell_vue_1 = __importDefault(require("./Cell.vue"));
|
|
8
|
+
Cell_vue_1.default.install = function (app) {
|
|
9
|
+
app.component(Cell_vue_1.default.name, Cell_vue_1.default);
|
|
10
|
+
};
|
|
11
|
+
exports._CellComponent = Cell_vue_1.default;
|
|
12
|
+
exports.default = Cell_vue_1.default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const props: {
|
|
2
|
+
title: {
|
|
3
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
4
|
+
};
|
|
5
|
+
icon: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
desc: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
border: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
iconClass: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
titleClass: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
descClass: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
extraClass: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = void 0;
|
|
4
|
+
exports.props = {
|
|
5
|
+
title: {
|
|
6
|
+
type: [Number, String],
|
|
7
|
+
},
|
|
8
|
+
icon: {
|
|
9
|
+
type: String,
|
|
10
|
+
},
|
|
11
|
+
desc: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
border: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
iconClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
titleClass: {
|
|
22
|
+
type: String,
|
|
23
|
+
},
|
|
24
|
+
descClass: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
extraClass: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const _ContextComponent: {
|
|
2
|
+
locks: {
|
|
3
|
+
[x: string]: number;
|
|
4
|
+
};
|
|
5
|
+
zIndex: number;
|
|
6
|
+
touchmoveForbid: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: {
|
|
9
|
+
locks: {
|
|
10
|
+
[x: string]: number;
|
|
11
|
+
};
|
|
12
|
+
zIndex: number;
|
|
13
|
+
touchmoveForbid: boolean;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._ContextComponent = void 0;
|
|
4
|
+
var vue_1 = require("vue");
|
|
5
|
+
var context = {
|
|
6
|
+
locks: {},
|
|
7
|
+
zIndex: 2000,
|
|
8
|
+
touchmoveForbid: true,
|
|
9
|
+
};
|
|
10
|
+
exports._ContextComponent = vue_1.reactive(context);
|
|
11
|
+
exports.default = vue_1.reactive(context);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function resolveLock(): void;
|
|
2
|
+
export declare function addLock(uid: number): void;
|
|
3
|
+
export declare function releaseLock(uid: number): void;
|
|
4
|
+
/**
|
|
5
|
+
* 组件锁操作
|
|
6
|
+
* @param props 组件props
|
|
7
|
+
* @param state 组件props中控制组件加锁的开关对应的key值
|
|
8
|
+
* @param use 组件props中控制组件加锁的开关是否可用对应的key值
|
|
9
|
+
*/
|
|
10
|
+
export declare function useLock(props: any, state: string, use?: string): void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useLock = exports.releaseLock = exports.addLock = exports.resolveLock = void 0;
|
|
7
|
+
var vue_1 = require("vue");
|
|
8
|
+
var _1 = __importDefault(require("."));
|
|
9
|
+
function resolveLock() {
|
|
10
|
+
var lockCounts = Object.keys(_1.default.locks).length;
|
|
11
|
+
lockCounts <= 0 ? document.body.classList.remove('var-site--lock') : document.body.classList.add('var-site--lock');
|
|
12
|
+
}
|
|
13
|
+
exports.resolveLock = resolveLock;
|
|
14
|
+
function addLock(uid) {
|
|
15
|
+
_1.default.locks[uid] = 1;
|
|
16
|
+
resolveLock();
|
|
17
|
+
}
|
|
18
|
+
exports.addLock = addLock;
|
|
19
|
+
function releaseLock(uid) {
|
|
20
|
+
delete _1.default.locks[uid];
|
|
21
|
+
resolveLock();
|
|
22
|
+
}
|
|
23
|
+
exports.releaseLock = releaseLock;
|
|
24
|
+
/**
|
|
25
|
+
* 组件锁操作
|
|
26
|
+
* @param props 组件props
|
|
27
|
+
* @param state 组件props中控制组件加锁的开关对应的key值
|
|
28
|
+
* @param use 组件props中控制组件加锁的开关是否可用对应的key值
|
|
29
|
+
*/
|
|
30
|
+
function useLock(props, state, use) {
|
|
31
|
+
var uid = vue_1.getCurrentInstance().uid;
|
|
32
|
+
if (use) {
|
|
33
|
+
vue_1.watch(function () { return props[use]; }, function (newValue) {
|
|
34
|
+
if (newValue === false) {
|
|
35
|
+
// 改变为禁用状态 组件解锁
|
|
36
|
+
releaseLock(uid);
|
|
37
|
+
}
|
|
38
|
+
else if (newValue === true && props[state] === true) {
|
|
39
|
+
// 改变为启用状态 并且popup处于开启状态 组件加锁
|
|
40
|
+
addLock(uid);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
vue_1.watch(function () { return props[state]; }, function (newValue) {
|
|
45
|
+
if (use && props[use] === false) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (newValue === true) {
|
|
49
|
+
// popup开启 组件加锁
|
|
50
|
+
addLock(uid);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// popup关闭 组件解锁
|
|
54
|
+
releaseLock(uid);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
vue_1.onBeforeMount(function () {
|
|
58
|
+
if (use && props[use] === false) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (props[state] === true) {
|
|
62
|
+
// popup处于开启状态 组件挂载 组件加锁
|
|
63
|
+
addLock(uid);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
vue_1.onUnmounted(function () {
|
|
67
|
+
if (use && props[use] === false) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (props[state] === true) {
|
|
71
|
+
// popup处于开启状态 组件卸载 组件解锁
|
|
72
|
+
releaseLock(uid);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
vue_1.onActivated(function () {
|
|
76
|
+
if (use && props[use] === false) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (props[state] === true) {
|
|
80
|
+
// popup处于开启状态 组件处于keepalive前台 组件加锁
|
|
81
|
+
addLock(uid);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
vue_1.onDeactivated(function () {
|
|
85
|
+
if (use && props[use] === false) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (props[state] === true) {
|
|
89
|
+
// popup处于开启状态 组件处于keepalive后台 组件解锁
|
|
90
|
+
releaseLock(uid);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
exports.useLock = useLock;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useZIndex = void 0;
|
|
7
|
+
var index_1 = __importDefault(require("./index"));
|
|
8
|
+
var vue_1 = require("vue");
|
|
9
|
+
function useZIndex(source, count) {
|
|
10
|
+
var zIndex = vue_1.ref(index_1.default.zIndex);
|
|
11
|
+
vue_1.watch(source, function (newValue) {
|
|
12
|
+
if (newValue) {
|
|
13
|
+
index_1.default.zIndex += count;
|
|
14
|
+
zIndex.value = index_1.default.zIndex;
|
|
15
|
+
}
|
|
16
|
+
}, { immediate: true });
|
|
17
|
+
return { zIndex: zIndex };
|
|
18
|
+
}
|
|
19
|
+
exports.useZIndex = useZIndex;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._IconComponent = void 0;
|
|
7
|
+
var Icon_vue_1 = __importDefault(require("./Icon.vue"));
|
|
8
|
+
Icon_vue_1.default.install = function (app) {
|
|
9
|
+
app.component(Icon_vue_1.default.name, Icon_vue_1.default);
|
|
10
|
+
};
|
|
11
|
+
exports._IconComponent = Icon_vue_1.default;
|
|
12
|
+
exports.default = Icon_vue_1.default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export declare const props: {
|
|
3
|
+
name: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
};
|
|
9
|
+
color: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
namespace: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
transition: {
|
|
17
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
onClick: {
|
|
21
|
+
type: PropType<(event: Event) => void>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = void 0;
|
|
4
|
+
exports.props = {
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
size: {
|
|
9
|
+
type: [Number, String],
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
namespace: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'var-icon',
|
|
17
|
+
},
|
|
18
|
+
transition: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: 0,
|
|
21
|
+
},
|
|
22
|
+
onClick: {
|
|
23
|
+
type: Function,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._LoadingComponent = void 0;
|
|
7
|
+
var Loading_vue_1 = __importDefault(require("./Loading.vue"));
|
|
8
|
+
Loading_vue_1.default.install = function (app) {
|
|
9
|
+
app.component(Loading_vue_1.default.name, Loading_vue_1.default);
|
|
10
|
+
};
|
|
11
|
+
exports._LoadingComponent = Loading_vue_1.default;
|
|
12
|
+
exports.default = Loading_vue_1.default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare type LoadingType = 'circle' | 'wave' | 'cube' | 'rect' | 'disappear';
|
|
3
|
+
declare type LoadingSize = 'normal' | 'mini' | 'small' | 'large';
|
|
4
|
+
export declare function typeValidator(type: string): boolean;
|
|
5
|
+
export declare function sizeValidator(size: string): boolean;
|
|
6
|
+
export declare const props: {
|
|
7
|
+
type: {
|
|
8
|
+
type: PropType<LoadingType>;
|
|
9
|
+
default: string;
|
|
10
|
+
validator: typeof typeValidator;
|
|
11
|
+
};
|
|
12
|
+
radius: {
|
|
13
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<LoadingSize>;
|
|
18
|
+
default: string;
|
|
19
|
+
validator: typeof sizeValidator;
|
|
20
|
+
};
|
|
21
|
+
color: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = exports.sizeValidator = exports.typeValidator = void 0;
|
|
4
|
+
function typeValidator(type) {
|
|
5
|
+
return ['circle', 'wave', 'cube', 'rect', 'disappear'].includes(type);
|
|
6
|
+
}
|
|
7
|
+
exports.typeValidator = typeValidator;
|
|
8
|
+
function sizeValidator(size) {
|
|
9
|
+
return ['normal', 'mini', 'small', 'large'].includes(size);
|
|
10
|
+
}
|
|
11
|
+
exports.sizeValidator = sizeValidator;
|
|
12
|
+
exports.props = {
|
|
13
|
+
// loading类型
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'circle',
|
|
17
|
+
validator: typeValidator,
|
|
18
|
+
},
|
|
19
|
+
radius: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: 15,
|
|
22
|
+
},
|
|
23
|
+
// loading尺寸
|
|
24
|
+
size: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'normal',
|
|
27
|
+
validator: sizeValidator,
|
|
28
|
+
},
|
|
29
|
+
// loading颜色
|
|
30
|
+
color: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'currentColor',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._MenuComponent = void 0;
|
|
7
|
+
var Menu_vue_1 = __importDefault(require("./Menu.vue"));
|
|
8
|
+
Menu_vue_1.default.install = function (app) {
|
|
9
|
+
app.component(Menu_vue_1.default.name, Menu_vue_1.default);
|
|
10
|
+
};
|
|
11
|
+
exports._MenuComponent = Menu_vue_1.default;
|
|
12
|
+
exports.default = Menu_vue_1.default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare function alignmentValidator(alignment: string): boolean;
|
|
3
|
+
export declare const props: {
|
|
4
|
+
show: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
alignment: {
|
|
9
|
+
type: PropType<"top" | "bottom">;
|
|
10
|
+
default: string;
|
|
11
|
+
validator: typeof alignmentValidator;
|
|
12
|
+
};
|
|
13
|
+
offsetX: {
|
|
14
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
offsetY: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
teleport: {
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
onOpen: {
|
|
25
|
+
type: PropType<() => void>;
|
|
26
|
+
};
|
|
27
|
+
onOpened: {
|
|
28
|
+
type: PropType<() => void>;
|
|
29
|
+
};
|
|
30
|
+
onClose: {
|
|
31
|
+
type: PropType<() => void>;
|
|
32
|
+
};
|
|
33
|
+
onClosed: {
|
|
34
|
+
type: PropType<() => void>;
|
|
35
|
+
};
|
|
36
|
+
'onUpdate:show': {
|
|
37
|
+
type: PropType<(show: boolean) => void>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = void 0;
|
|
4
|
+
function alignmentValidator(alignment) {
|
|
5
|
+
return ['top', 'bottom'].includes(alignment);
|
|
6
|
+
}
|
|
7
|
+
exports.props = {
|
|
8
|
+
show: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false,
|
|
11
|
+
},
|
|
12
|
+
alignment: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'top',
|
|
15
|
+
validator: alignmentValidator,
|
|
16
|
+
},
|
|
17
|
+
offsetX: {
|
|
18
|
+
type: [Number, String],
|
|
19
|
+
default: 0,
|
|
20
|
+
},
|
|
21
|
+
offsetY: {
|
|
22
|
+
type: [Number, String],
|
|
23
|
+
default: 0,
|
|
24
|
+
},
|
|
25
|
+
teleport: {
|
|
26
|
+
default: 'body',
|
|
27
|
+
},
|
|
28
|
+
onOpen: {
|
|
29
|
+
type: Function,
|
|
30
|
+
},
|
|
31
|
+
onOpened: {
|
|
32
|
+
type: Function,
|
|
33
|
+
},
|
|
34
|
+
onClose: {
|
|
35
|
+
type: Function,
|
|
36
|
+
},
|
|
37
|
+
onClosed: {
|
|
38
|
+
type: Function,
|
|
39
|
+
},
|
|
40
|
+
'onUpdate:show': {
|
|
41
|
+
type: Function,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._ProgressComponent = void 0;
|
|
7
|
+
var Progress_vue_1 = __importDefault(require("./Progress.vue"));
|
|
8
|
+
Progress_vue_1.default.install = function (app) {
|
|
9
|
+
app.component(Progress_vue_1.default.name, Progress_vue_1.default);
|
|
10
|
+
};
|
|
11
|
+
exports._ProgressComponent = Progress_vue_1.default;
|
|
12
|
+
exports.default = Progress_vue_1.default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare function modeValidator(mode: string): boolean;
|
|
2
|
+
export declare const props: {
|
|
3
|
+
mode: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
validator: typeof modeValidator;
|
|
7
|
+
};
|
|
8
|
+
lineWidth: {
|
|
9
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
color: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
trackColor: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
ripple: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
label: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
rotate: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
track: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = void 0;
|
|
4
|
+
function modeValidator(mode) {
|
|
5
|
+
return ['linear', 'circle'].includes(mode);
|
|
6
|
+
}
|
|
7
|
+
exports.props = {
|
|
8
|
+
// progress 模式
|
|
9
|
+
mode: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'linear',
|
|
12
|
+
validator: modeValidator,
|
|
13
|
+
},
|
|
14
|
+
// progress 线宽
|
|
15
|
+
lineWidth: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 4,
|
|
18
|
+
},
|
|
19
|
+
// progress 颜色
|
|
20
|
+
color: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
// progress 轨道颜色
|
|
24
|
+
trackColor: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
// 是否添加水波纹效果
|
|
28
|
+
ripple: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
// progress 值
|
|
33
|
+
value: {
|
|
34
|
+
type: [Number, String],
|
|
35
|
+
default: 0,
|
|
36
|
+
},
|
|
37
|
+
// 是否显示label
|
|
38
|
+
label: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
// circle 的尺寸
|
|
43
|
+
size: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 40,
|
|
46
|
+
},
|
|
47
|
+
// circle的原点
|
|
48
|
+
rotate: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 0,
|
|
51
|
+
},
|
|
52
|
+
// 是否显示 circle 轨道
|
|
53
|
+
track: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true,
|
|
56
|
+
},
|
|
57
|
+
};
|