@ysgroup/ui 0.1.27 → 0.1.29
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/package.json +1 -1
- package/src/components/YsLoginPage.vue +19 -18
- package/src/components/YsSegmented.vue +3 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<!-- YsLoginPage ——
|
|
1
|
+
<!-- YsLoginPage —— 统一登录页。口令由 @ysgroup/core 密封后提交。 -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { ref } from "vue";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
defineProps<{
|
|
6
6
|
appTitle: string;
|
|
7
7
|
hint?: string;
|
|
8
8
|
logoUrl?: string;
|
|
9
9
|
error?: string;
|
|
10
|
-
otpEnabled?: boolean;
|
|
11
10
|
}>();
|
|
12
|
-
const emit = defineEmits<{
|
|
11
|
+
const emit = defineEmits<{
|
|
12
|
+
login: [username: string, password: string];
|
|
13
|
+
}>();
|
|
13
14
|
|
|
14
15
|
const username = ref("");
|
|
15
16
|
const password = ref("");
|
|
16
|
-
const otp = ref("");
|
|
17
17
|
const loading = ref(false);
|
|
18
18
|
|
|
19
19
|
async function submit() {
|
|
20
20
|
loading.value = true;
|
|
21
21
|
try {
|
|
22
|
-
emit("login", username.value, password.value
|
|
22
|
+
emit("login", username.value, password.value);
|
|
23
23
|
} finally {
|
|
24
24
|
loading.value = false;
|
|
25
25
|
}
|
|
@@ -34,7 +34,12 @@ async function submit() {
|
|
|
34
34
|
<h2 v-else class="ys-login__title">{{ appTitle }}</h2>
|
|
35
35
|
<el-form @submit.prevent="submit">
|
|
36
36
|
<el-form-item>
|
|
37
|
-
<el-input
|
|
37
|
+
<el-input
|
|
38
|
+
v-model="username"
|
|
39
|
+
placeholder="用户名"
|
|
40
|
+
size="large"
|
|
41
|
+
@keyup.enter="submit"
|
|
42
|
+
/>
|
|
38
43
|
</el-form-item>
|
|
39
44
|
<el-form-item>
|
|
40
45
|
<el-input
|
|
@@ -46,17 +51,13 @@ async function submit() {
|
|
|
46
51
|
@keyup.enter="submit"
|
|
47
52
|
/>
|
|
48
53
|
</el-form-item>
|
|
49
|
-
<el-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@keyup.enter="submit"
|
|
57
|
-
/>
|
|
58
|
-
</el-form-item>
|
|
59
|
-
<el-alert v-if="error" :title="error" type="error" :closable="false" show-icon />
|
|
54
|
+
<el-alert
|
|
55
|
+
v-if="error"
|
|
56
|
+
:title="error"
|
|
57
|
+
type="error"
|
|
58
|
+
:closable="false"
|
|
59
|
+
show-icon
|
|
60
|
+
/>
|
|
60
61
|
<el-button
|
|
61
62
|
type="primary"
|
|
62
63
|
size="large"
|
package/src/index.ts
CHANGED
|
@@ -13,5 +13,6 @@ export { default as YsSettingsCenterDialog } from "./components/YsSettingsCenter
|
|
|
13
13
|
export { default as YsPortalGrid } from "./components/YsPortalGrid.vue";
|
|
14
14
|
export { default as YsRoleTag } from "./components/YsRoleTag.vue";
|
|
15
15
|
export { default as YsBoolMark } from "./components/YsBoolMark.vue";
|
|
16
|
+
export { default as YsSegmented } from "./components/YsSegmented.vue";
|
|
16
17
|
export { enumOptions, enumLabel, type EnumOption } from "./tokens-runtime";
|
|
17
18
|
export { registerColumnWidths, columnWidth, type ColumnWidthMap } from "./columnWidths";
|