hy-app 0.1.5 → 0.2.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.
Files changed (166) hide show
  1. package/components/hy-address-picker/hy-address-picker.vue +11 -0
  2. package/components/hy-address-picker/index.scss +1 -1
  3. package/components/hy-avatar/hy-avatar.vue +11 -0
  4. package/components/hy-avatar/index.scss +8 -8
  5. package/components/hy-back-top/hy-back-top.vue +13 -2
  6. package/components/hy-back-top/index.scss +11 -1
  7. package/components/hy-badge/hy-badge.vue +11 -0
  8. package/components/hy-badge/index.scss +18 -40
  9. package/components/hy-button/hy-button.vue +15 -5
  10. package/components/hy-button/index.scss +25 -45
  11. package/components/hy-calendar/header.vue +12 -12
  12. package/components/hy-calendar/hy-calendar.vue +11 -2
  13. package/components/hy-calendar/index.scss +140 -131
  14. package/components/hy-calendar/month.vue +18 -18
  15. package/components/hy-card/hy-card.vue +11 -0
  16. package/components/hy-card/index.scss +12 -12
  17. package/components/hy-card/props.ts +2 -2
  18. package/components/hy-cell/hy-cell.vue +22 -13
  19. package/components/hy-cell/index.scss +55 -28
  20. package/components/hy-cell/props.ts +2 -3
  21. package/components/hy-cell/typing.d.ts +3 -10
  22. package/components/hy-check-button/hy-check-button.vue +13 -2
  23. package/components/hy-check-button/index.scss +0 -5
  24. package/components/hy-checkbox/hy-checkbox.vue +31 -8
  25. package/components/hy-checkbox/index.scss +15 -5
  26. package/components/hy-checkbox/props.ts +1 -2
  27. package/components/hy-checkbox/typing.d.ts +1 -1
  28. package/components/hy-config-provider/hy-config-provider.vue +52 -0
  29. package/components/hy-config-provider/index.scss +21 -0
  30. package/components/hy-config-provider/props.ts +13 -0
  31. package/components/hy-config-provider/typing.d.ts +28 -0
  32. package/components/hy-count-down/hy-count-down.vue +11 -0
  33. package/components/hy-count-down/index.scss +13 -1
  34. package/components/hy-count-to/hy-count-to.vue +12 -1
  35. package/components/hy-count-to/index.scss +14 -1
  36. package/components/hy-count-to/props.ts +1 -1
  37. package/components/hy-datetime-picker/hy-datetime-picker.vue +11 -0
  38. package/components/hy-datetime-picker/index.scss +1 -1
  39. package/components/hy-divider/hy-divider.vue +11 -0
  40. package/components/hy-divider/index.scss +1 -1
  41. package/components/hy-dropdown/hy-dropdown.vue +13 -1
  42. package/components/hy-dropdown/index.scss +4 -1
  43. package/components/hy-dropdown/props.ts +2 -2
  44. package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
  45. package/components/hy-dropdown-item/index.scss +35 -2
  46. package/components/hy-empty/hy-empty.vue +22 -10
  47. package/components/hy-empty/index.scss +17 -3
  48. package/components/hy-empty/props.ts +1 -5
  49. package/components/hy-empty/typing.d.ts +3 -18
  50. package/components/hy-float-button/hy-float-button.vue +11 -0
  51. package/components/hy-float-button/index.scss +13 -2
  52. package/components/hy-float-button/props.ts +3 -3
  53. package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
  54. package/components/hy-folding-panel/index.scss +4 -1
  55. package/components/hy-form/hy-form.vue +25 -9
  56. package/components/hy-form/index.scss +12 -2
  57. package/components/hy-grid/hy-grid.vue +11 -0
  58. package/components/hy-grid/index.scss +1 -1
  59. package/components/hy-icon/hy-icon.vue +12 -1
  60. package/components/hy-icon/index.scss +16 -7
  61. package/components/hy-icon/props.ts +2 -2
  62. package/components/hy-image/hy-image.vue +11 -0
  63. package/components/hy-image/index.scss +4 -3
  64. package/components/hy-input/hy-input.vue +31 -3
  65. package/components/hy-input/index.scss +12 -2
  66. package/components/hy-input/props.ts +1 -1
  67. package/components/hy-input/typing.d.ts +8 -0
  68. package/components/hy-line/hy-line.vue +11 -0
  69. package/components/hy-line/index.scss +4 -1
  70. package/components/hy-line-progress/hy-line-progress.vue +17 -2
  71. package/components/hy-line-progress/index.scss +20 -8
  72. package/components/hy-line-progress/props.ts +4 -4
  73. package/components/hy-line-progress/typing.d.ts +4 -0
  74. package/components/hy-list/hy-list.vue +23 -8
  75. package/components/hy-list/index.scss +1 -4
  76. package/components/hy-loading/hy-loading.vue +11 -0
  77. package/components/hy-loading/index.scss +2 -2
  78. package/components/hy-login/TheUserLogin.vue +63 -106
  79. package/components/hy-login/hy-login.vue +269 -266
  80. package/components/hy-login/props.ts +1 -1
  81. package/components/hy-login/typing.d.ts +5 -0
  82. package/components/hy-modal/hy-modal.vue +15 -7
  83. package/components/hy-modal/index.scss +19 -3
  84. package/components/hy-navbar/hy-navbar.vue +11 -0
  85. package/components/hy-navbar/index.scss +14 -3
  86. package/components/hy-navbar/props.ts +1 -1
  87. package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
  88. package/components/hy-notice-bar/index.scss +35 -35
  89. package/components/hy-number-step/hy-number-step.vue +15 -8
  90. package/components/hy-number-step/index.scss +34 -25
  91. package/components/hy-number-step/props.ts +4 -4
  92. package/components/hy-overlay/index.scss +3 -1
  93. package/components/hy-picker/hy-picker.vue +12 -0
  94. package/components/hy-picker/index.scss +7 -3
  95. package/components/hy-picker/props.ts +1 -1
  96. package/components/hy-popup/hy-popup.vue +11 -0
  97. package/components/hy-popup/index.scss +10 -1
  98. package/components/hy-price/hy-price.vue +11 -0
  99. package/components/hy-price/index.scss +4 -1
  100. package/components/hy-qrcode/hy-qrcode.vue +11 -0
  101. package/components/hy-qrcode/index.scss +4 -1
  102. package/components/hy-radio/hy-radio.vue +19 -3
  103. package/components/hy-radio/index.scss +17 -5
  104. package/components/hy-radio/props.ts +1 -2
  105. package/components/hy-rate/hy-rate.vue +11 -0
  106. package/components/hy-rate/index.scss +6 -6
  107. package/components/hy-read-more/hy-read-more.vue +23 -2
  108. package/components/hy-read-more/index.scss +29 -2
  109. package/components/hy-read-more/props.ts +2 -7
  110. package/components/hy-scroll-list/hy-scroll-list.vue +31 -9
  111. package/components/hy-scroll-list/index.scss +10 -1
  112. package/components/hy-scroll-list/props.ts +2 -2
  113. package/components/hy-search/hy-search.vue +11 -0
  114. package/components/hy-search/index.scss +25 -4
  115. package/components/hy-search/props.ts +2 -2
  116. package/components/hy-slider/hy-slider.vue +11 -0
  117. package/components/hy-slider/index.scss +3 -2
  118. package/components/hy-slider/props.ts +1 -1
  119. package/components/hy-steps/hy-steps.vue +38 -20
  120. package/components/hy-steps/index.scss +57 -17
  121. package/components/hy-steps/props.ts +2 -2
  122. package/components/{hy-submitBar/hy-submitBar.vue → hy-submit-bar/hy-submit-bar.vue} +13 -34
  123. package/components/hy-submit-bar/index.scss +45 -0
  124. package/components/hy-subsection/hy-subsection.vue +12 -0
  125. package/components/hy-subsection/index.scss +28 -8
  126. package/components/hy-subsection/props.ts +3 -3
  127. package/components/hy-swiper/hy-swiper.vue +11 -0
  128. package/components/hy-swiper/index.scss +13 -2
  129. package/components/hy-switch/hy-switch.vue +17 -3
  130. package/components/hy-switch/index.scss +25 -7
  131. package/components/hy-switch/props.ts +1 -2
  132. package/components/hy-switch/typing.d.ts +3 -3
  133. package/components/hy-tabs/hy-tabs.vue +27 -15
  134. package/components/hy-tabs/index.scss +25 -4
  135. package/components/hy-tabs/props.ts +4 -10
  136. package/components/hy-tag/hy-tag.vue +13 -7
  137. package/components/hy-tag/index.scss +27 -115
  138. package/components/hy-text/hy-text.vue +12 -1
  139. package/components/hy-text/index.scss +20 -37
  140. package/components/hy-textarea/hy-textarea.vue +16 -5
  141. package/components/hy-textarea/index.scss +16 -5
  142. package/components/hy-toast/hy-toast.vue +12 -1
  143. package/components/hy-toast/index.scss +26 -26
  144. package/components/hy-tooltip/hy-tooltip.vue +11 -0
  145. package/components/hy-tooltip/index.scss +3 -3
  146. package/components/hy-tooltip/props.ts +1 -1
  147. package/components/hy-upload/hy-upload.vue +11 -0
  148. package/components/hy-upload/index.scss +12 -1
  149. package/components/hy-warn/hy-warn.vue +22 -11
  150. package/components/hy-warn/index.scss +46 -1
  151. package/components/hy-waterfall/hy-waterfall.vue +11 -0
  152. package/components/hy-waterfall/index.scss +1 -1
  153. package/config/icon.ts +4 -0
  154. package/libs/css/common.scss +9 -0
  155. package/libs/css/mixin.scss +78 -0
  156. package/package.json +2 -2
  157. package/public/font/iconfont.css +3 -3
  158. package/store/userInfo.ts +26 -25
  159. package/theme.scss +76 -60
  160. package/typing/modules/common.d.ts +4 -0
  161. package/utils/colorGradient.ts +1 -1
  162. package/utils/inside.ts +3 -0
  163. package/components/hy-submitBar/Index.vue +0 -17
  164. package/components/hy-submitBar/index.scss +0 -9
  165. /package/components/{hy-submitBar → hy-submit-bar}/props.ts +0 -0
  166. /package/components/{hy-submitBar → hy-submit-bar}/typing.d.ts +0 -0
@@ -1,285 +1,288 @@
1
- <!--<template>-->
2
- <!-- <view class="normal-login-container">-->
3
- <!-- <view class="logo-content align-center flex justify-center">-->
4
- <!-- <image class="image" :src="props.logo" mode="widthFix"></image>-->
5
- <!-- </view>-->
6
- <!-- &lt;!&ndash; 登录 &ndash;&gt;-->
7
- <!-- <view class="login-form-content">-->
8
- <!-- <view class="form-top">-->
9
- <!-- <view-->
10
- <!-- class="top-col"-->
11
- <!-- v-for="(item, i) in tabs"-->
12
- <!-- :key="i"-->
13
- <!-- @tap="currentTab = i"-->
14
- <!-- >-->
15
- <!-- <view class="form-top-title">-->
16
- <!-- {{ item.name }}-->
17
- <!-- </view>-->
18
- <!-- <view-->
19
- <!-- :class="i === currentTab ? 'line' : ''"-->
20
- <!-- :style="'background:' + props.themeColor"-->
21
- <!-- ></view>-->
22
- <!-- </view>-->
23
- <!-- </view>-->
24
- <!-- <TheUserLogin-->
25
- <!-- v-if="'user' === indexCode(currentTab)"-->
26
- <!-- ref="userLoginRef"-->
27
- <!-- :themeColor="props.themeColor"-->
28
- <!-- :prefix="props.prefix"-->
29
- <!-- :isShowPwd="isShowPwd"-->
30
- <!-- :userPlaceholder="userPlaceholder"-->
31
- <!-- :pwdPlaceholder="pwdPlaceholder"-->
32
- <!-- :customUserValidator="props.customUserValidator"-->
33
- <!-- :customPwdValidator="props.customPwdValidator"-->
34
- <!-- :userNumValidator="props.userNumValidator"-->
35
- <!-- :pwdNumValidator="props.pwdNumValidator"-->
36
- <!-- />-->
37
- <!-- <ThePhoneLogin-->
38
- <!-- v-if="'phone' === indexCode(currentTab)"-->
39
- <!-- ref="phoneLoginRef"-->
40
- <!-- :themeColor="props.themeColor"-->
41
- <!-- :customPhoneValidator="props.customPhoneValidator"-->
42
- <!-- />-->
43
- <!-- <view class="action-btn">-->
44
- <!-- <HyButton class="login-btn" :color="props.themeColor" @click="loginFn"-->
45
- <!-- >登录-->
46
- <!-- </HyButton>-->
47
- <!-- </view>-->
48
- <!-- <view class="footer">-->
49
- <!-- <view-->
50
- <!-- class="footer__tips"-->
51
- <!-- v-for="(item, i) in menu"-->
52
- <!-- :key="i"-->
53
- <!-- @click="clickMenuFn(i)"-->
54
- <!-- >{{ item }}</view-->
55
- <!-- >-->
56
- <!-- </view>-->
57
- <!-- </view>-->
58
- <!-- </view>-->
59
- <!--</template>-->
1
+ <template>
2
+ <view class="normal-login-container">
3
+ <view class="logo-content align-center flex justify-center">
4
+ <image class="image" :src="props.logo" mode="widthFix"></image>
5
+ </view>
6
+ <!-- 登录 -->
7
+ <view class="login-form-content">
8
+ <view class="form-top">
9
+ <view
10
+ class="top-col"
11
+ v-for="(item, i) in tabs"
12
+ :key="i"
13
+ @tap="currentTab = i"
14
+ >
15
+ <view class="form-top-title">
16
+ {{ item.name }}
17
+ </view>
18
+ <view
19
+ :class="i === currentTab ? 'line' : ''"
20
+ :style="'background:' + props.themeColor"
21
+ ></view>
22
+ </view>
23
+ </view>
24
+ <TheUserLogin
25
+ v-if="'user' === indexCode(currentTab)"
26
+ ref="userLoginRef"
27
+ :themeColor="props.themeColor"
28
+ :prefix="props.prefix"
29
+ :isShowPwd="isShowPwd"
30
+ :userPlaceholder="userPlaceholder"
31
+ :pwdPlaceholder="pwdPlaceholder"
32
+ :customUserValidator="props.customUserValidator"
33
+ :customPwdValidator="props.customPwdValidator"
34
+ :userNumValidator="props.userNumValidator"
35
+ :pwdNumValidator="props.pwdNumValidator"
36
+ @handleCheckbox="handleCheckbox"
37
+ />
38
+ <ThePhoneLogin
39
+ v-if="'phone' === indexCode(currentTab)"
40
+ ref="phoneLoginRef"
41
+ :themeColor="props.themeColor"
42
+ :customPhoneValidator="props.customPhoneValidator"
43
+ />
44
+ <view class="action-btn">
45
+ <HyButton class="login-btn" :color="props.themeColor" @click="loginFn"
46
+ >登录
47
+ </HyButton>
48
+ </view>
49
+ <view class="footer">
50
+ <view
51
+ class="footer__tips"
52
+ v-for="(item, i) in menu"
53
+ :key="i"
54
+ @click="clickMenuFn(i)"
55
+ >{{ item }}</view
56
+ >
57
+ </view>
58
+ </view>
59
+ </view>
60
+ </template>
60
61
 
61
- <!--<script lang="ts" setup>-->
62
- <!--import { ref, computed, watch } from "vue";-->
63
- <!--import { storeToRefs } from "pinia";-->
64
- <!--import { encryptData } from "../../utils";-->
65
- <!--import { useUserInfo } from "../../store";-->
66
- <!--import defaultProps from "./props";-->
67
- <!--import type IProps from "./typing";-->
62
+ <script lang="ts" setup>
63
+ import { ref, computed, watch } from "vue";
64
+ import { storeToRefs } from "pinia";
65
+ import { encryptData } from "../../utils";
66
+ import { useUserInfo } from "../../store";
67
+ import defaultProps from "./props";
68
+ import type IProps from "./typing";
68
69
 
69
- <!--// 组件-->
70
- <!--import TheUserLogin from "./TheUserLogin.vue";-->
71
- <!--import ThePhoneLogin from "./ThePhoneLogin.vue";-->
72
- <!--import HyButton from "../hy-button/hy-button.vue";-->
70
+ // 组件
71
+ import TheUserLogin from "./TheUserLogin.vue";
72
+ import ThePhoneLogin from "./ThePhoneLogin.vue";
73
+ import HyButton from "../hy-button/hy-button.vue";
73
74
 
74
- <!--const props = withDefaults(defineProps<IProps>(), defaultProps);-->
75
- <!--const emit = defineEmits(["login", "handleClickMenu"]);-->
75
+ const props = withDefaults(defineProps<IProps>(), defaultProps);
76
+ const emit = defineEmits(["login", "handleClickMenu"]);
76
77
 
77
- <!--const userInfoStore = useUserInfo();-->
78
- <!--const { userForm, rememberPsw } = storeToRefs(userInfoStore);-->
79
- <!--const indexCode = computed(() => {-->
80
- <!-- return (temp: string | number) => {-->
81
- <!-- switch (Number(props.loginType)) {-->
82
- <!-- case 1:-->
83
- <!-- return "user";-->
84
- <!-- case 2:-->
85
- <!-- return "phone";-->
86
- <!-- default:-->
87
- <!-- if (temp == 0) {-->
88
- <!-- return "user";-->
89
- <!-- } else {-->
90
- <!-- return "phone";-->
91
- <!-- }-->
92
- <!-- }-->
93
- <!-- };-->
94
- <!--});-->
95
- <!--const selectModel = (temp: number) => {-->
96
- <!-- return new Promise((resolve, reject) => {-->
97
- <!-- switch (Number(props.loginType)) {-->
98
- <!-- case 1:-->
99
- <!-- resolve("user");-->
100
- <!-- break;-->
101
- <!-- case 2:-->
102
- <!-- resolve("phone");-->
103
- <!-- break;-->
104
- <!-- default:-->
105
- <!-- if (temp == 0) {-->
106
- <!-- resolve("user");-->
107
- <!-- } else {-->
108
- <!-- resolve("phone");-->
109
- <!-- }-->
110
- <!-- break;-->
111
- <!-- }-->
112
- <!-- });-->
113
- <!--};-->
114
- <!--const tabs = ref([-->
115
- <!-- {-->
116
- <!-- name: "账号登录",-->
117
- <!-- },-->
118
- <!-- {-->
119
- <!-- name: "验证码登录",-->
120
- <!-- },-->
121
- <!--]);-->
122
- <!--const currentTab = ref(0);-->
123
- <!--const userLoginRef = ref<typeof TheUserLogin>(null);-->
124
- <!--const phoneLoginRef = ref<typeof ThePhoneLogin>(null);-->
125
- <!--watch(-->
126
- <!-- () => Number(props.loginType),-->
127
- <!-- (newVal) => {-->
128
- <!-- tabs.value = computed(() => {-->
129
- <!-- switch (newVal) {-->
130
- <!-- case 1:-->
131
- <!-- return [{ name: "账号登录" }];-->
132
- <!-- case 2:-->
133
- <!-- return [{ name: "验证码登录" }];-->
134
- <!-- default:-->
135
- <!-- return [{ name: "账号登录" }, { name: "验证码登录" }];-->
136
- <!-- }-->
137
- <!-- }).value;-->
138
- <!-- },-->
139
- <!-- { immediate: true, deep: true },-->
140
- <!--);-->
78
+ const userInfoStore = useUserInfo();
79
+ const { userForm, rememberPsw } = storeToRefs(userInfoStore);
80
+ const indexCode = computed(() => {
81
+ return (temp: string | number) => {
82
+ switch (Number(props.loginType)) {
83
+ case 1:
84
+ return "user";
85
+ case 2:
86
+ return "phone";
87
+ default:
88
+ if (temp == 0) {
89
+ return "user";
90
+ } else {
91
+ return "phone";
92
+ }
93
+ }
94
+ };
95
+ });
96
+ const selectModel = (temp: number) => {
97
+ return new Promise((resolve, reject) => {
98
+ switch (Number(props.loginType)) {
99
+ case 1:
100
+ resolve("user");
101
+ break;
102
+ case 2:
103
+ resolve("phone");
104
+ break;
105
+ default:
106
+ if (temp == 0) {
107
+ resolve("user");
108
+ } else {
109
+ resolve("phone");
110
+ }
111
+ break;
112
+ }
113
+ });
114
+ };
115
+ const tabs = ref([
116
+ {
117
+ name: "账号登录",
118
+ },
119
+ {
120
+ name: "验证码登录",
121
+ },
122
+ ]);
123
+ const currentTab = ref(0);
124
+ const userLoginRef = ref<InstanceType<typeof TheUserLogin>>();
125
+ const phoneLoginRef = ref<InstanceType<typeof ThePhoneLogin>>();
126
+ watch(
127
+ () => Number(props.loginType),
128
+ (newVal) => {
129
+ tabs.value = computed(() => {
130
+ switch (newVal) {
131
+ case 1:
132
+ return [{ name: "账号登录" }];
133
+ case 2:
134
+ return [{ name: "验证码登录" }];
135
+ default:
136
+ return [{ name: "账号登录" }, { name: "验证码登录" }];
137
+ }
138
+ }).value;
139
+ },
140
+ { immediate: true, deep: true },
141
+ );
141
142
 
142
- <!--/**-->
143
- <!-- * 登录用户名-->
144
- <!-- * */-->
145
- <!--const loginFn = async () => {-->
146
- <!-- const type = await selectModel(currentTab.value);-->
147
- <!-- switch (type) {-->
148
- <!-- case "user":-->
149
- <!-- let user = userForm.value.name;-->
150
- <!-- let pwd = userForm.value.pwd;-->
151
- <!-- await userLoginRef.value.loginFn();-->
152
- <!-- //缓存账号和密码-->
153
- <!-- if (rememberPsw.value == 1) {-->
154
- <!-- uni.setStorageSync(-->
155
- <!-- `${props.prefix}_account`,-->
156
- <!-- encryptData({-->
157
- <!-- rememberPsw: rememberPsw.value,-->
158
- <!-- userName: user,-->
159
- <!-- password: pwd,-->
160
- <!-- }),-->
161
- <!-- );-->
162
- <!-- } else {-->
163
- <!-- // 如果没有选记住密码就移除之前保存的-->
164
- <!-- uni.removeStorageSync(`${props.prefix}_account`);-->
165
- <!-- uni.setStorageSync(-->
166
- <!-- `${props.prefix}_account`,-->
167
- <!-- encryptData({ rememberPsw: rememberPsw.value }),-->
168
- <!-- );-->
169
- <!-- }-->
170
- <!-- emit("login", { user, pwd });-->
171
- <!-- break;-->
172
- <!-- case "phone":-->
173
- <!-- await phoneLoginRef.value.loginFn();-->
174
- <!-- break;-->
175
- <!-- default:-->
176
- <!-- break;-->
177
- <!-- }-->
178
- <!--};-->
143
+ /**
144
+ * 登录用户名
145
+ * */
146
+ const loginFn = async () => {
147
+ const type = await selectModel(currentTab.value);
148
+ switch (type) {
149
+ case "user":
150
+ // let user = userForm.value.userName;
151
+ // let pwd = userForm.value.password;
152
+ await userLoginRef.value?.loginFn();
153
+ //缓存账号和密码
154
+ if (rememberPsw.value) {
155
+ uni.setStorageSync(
156
+ `${props.prefix}_account`,
157
+ encryptData({
158
+ rememberPsw: rememberPsw.value,
159
+ ...userForm.value,
160
+ }),
161
+ );
162
+ } else {
163
+ // 如果没有选记住密码就移除之前保存的
164
+ uni.removeStorageSync(`${props.prefix}_account`);
165
+ uni.setStorageSync(
166
+ `${props.prefix}_account`,
167
+ encryptData({ rememberPsw: rememberPsw.value }),
168
+ );
169
+ }
170
+ emit("login", userForm.value);
171
+ break;
172
+ case "phone":
173
+ await phoneLoginRef.value?.loginFn();
174
+ break;
175
+ default:
176
+ break;
177
+ }
178
+ };
179
179
 
180
- <!--/**-->
181
- <!-- * 点击下面小菜单-->
182
- <!-- * */-->
183
- <!--const clickMenuFn = (index: number) => {-->
184
- <!-- emit("handleClickMenu", index);-->
185
- <!--};-->
186
- <!--</script>-->
180
+ /**
181
+ * 点击下面小菜单
182
+ * */
183
+ const clickMenuFn = (index: number) => {
184
+ emit("handleClickMenu", index);
185
+ };
187
186
 
188
- <!--<style lang="scss" scoped>-->
189
- <!--.normal-login-container {-->
190
- <!-- width: 100%;-->
191
- <!-- height: 100vh;-->
192
- <!-- padding: 0 60rpx;-->
193
- <!-- /* #ifndef APP-PLUS-NVUE */-->
194
- <!-- box-sizing: border-box;-->
195
- <!-- /* #endif */-->
196
- <!-- display: flex;-->
197
- <!-- justify-content: center;-->
198
- <!-- flex-direction: column;-->
199
- <!-- //align-items: center;-->
187
+ /**
188
+ * @description 记住密码
189
+ * */
190
+ const handleCheckbox = () => {};
191
+ </script>
200
192
 
201
- <!-- /*logo图片展示*/-->
202
- <!-- .logo-content {-->
203
- <!-- width: 300rpx;-->
204
- <!-- display: flex;-->
205
- <!-- justify-content: center;-->
206
- <!-- align-items: center;-->
207
- <!-- /* #ifndef APP-PLUS-NVUE */-->
208
- <!-- margin: 0 auto 100rpx;-->
209
- <!-- box-sizing: border-box;-->
210
- <!-- height: auto;-->
211
- <!-- .image {-->
212
- <!-- width: 100%;-->
213
- <!-- height: auto;-->
214
- <!-- }-->
215
- <!-- /* #endif */-->
216
- <!-- }-->
193
+ <style lang="scss" scoped>
194
+ .normal-login-container {
195
+ width: 100%;
196
+ height: 100vh;
197
+ padding: 0 60rpx;
198
+ /* #ifndef APP-PLUS-NVUE */
199
+ box-sizing: border-box;
200
+ /* #endif */
201
+ display: flex;
202
+ justify-content: center;
203
+ flex-direction: column;
204
+ //align-items: center;
217
205
 
218
- <!-- /*登录模块*/-->
219
- <!-- .login-form-content {-->
220
- <!-- //text-align: center;-->
221
- <!-- box-shadow: 0px 5px 4px 0px rgba(200, 200, 200, 0.5);-->
222
- <!-- border-radius: 10px;-->
223
- <!-- background: #ffffff;-->
224
- <!-- padding: 28rpx 50rpx 50rpx;-->
206
+ /*logo图片展示*/
207
+ .logo-content {
208
+ width: 300rpx;
209
+ display: flex;
210
+ justify-content: center;
211
+ align-items: center;
212
+ /* #ifndef APP-PLUS-NVUE */
213
+ margin: 0 auto 100rpx;
214
+ box-sizing: border-box;
215
+ height: auto;
216
+ .image {
217
+ width: 100%;
218
+ height: auto;
219
+ }
220
+ /* #endif */
221
+ }
225
222
 
226
- <!-- .form-top {-->
227
- <!-- display: flex;-->
228
- <!-- justify-content: space-around;-->
229
- <!-- margin-bottom: 40rpx;-->
223
+ /*登录模块*/
224
+ .login-form-content {
225
+ //text-align: center;
226
+ box-shadow: 0px 5px 4px 0px rgba(200, 200, 200, 0.5);
227
+ border-radius: 10px;
228
+ background: #ffffff;
229
+ padding: 28rpx 50rpx 50rpx;
230
230
 
231
- <!-- .top-col {-->
232
- <!-- display: flex;-->
233
- <!-- flex-direction: column;-->
234
- <!-- justify-content: center;-->
235
- <!-- align-items: center;-->
231
+ .form-top {
232
+ display: flex;
233
+ justify-content: space-around;
234
+ margin-bottom: 40rpx;
236
235
 
237
- <!-- .form-top-title {-->
238
- <!-- font-size: 28rpx;-->
239
- <!-- }-->
236
+ .top-col {
237
+ display: flex;
238
+ flex-direction: column;
239
+ justify-content: center;
240
+ align-items: center;
240
241
 
241
- <!-- .line {-->
242
- <!-- width: 90rpx;-->
243
- <!-- height: 4rpx;-->
244
- <!-- margin-top: 6rpx;-->
245
- <!-- }-->
246
- <!-- }-->
247
- <!-- }-->
242
+ .form-top-title {
243
+ font-size: 28rpx;
244
+ }
248
245
 
249
- <!-- .mui-input-row {-->
250
- <!-- display: flex;-->
251
- <!-- /* #ifndef APP-PLUS-NVUE */-->
252
- <!-- justify-self: start;-->
253
- <!-- /* #endif */-->
254
- <!-- margin-top: 27rpx;-->
255
- <!-- }-->
246
+ .line {
247
+ width: 90rpx;
248
+ height: 4rpx;
249
+ margin-top: 6rpx;
250
+ }
251
+ }
252
+ }
256
253
 
257
- <!-- .action-btn {-->
258
- <!-- margin-top: 30rpx;-->
259
- <!-- }-->
254
+ .mui-input-row {
255
+ display: flex;
256
+ /* #ifndef APP-PLUS-NVUE */
257
+ justify-self: start;
258
+ /* #endif */
259
+ margin-top: 27rpx;
260
+ }
260
261
 
261
- <!-- .footer {-->
262
- <!-- display: flex;-->
263
- <!-- justify-content: space-around;-->
264
- <!-- /* #ifndef APP-PLUS-NVUE */-->
265
- <!-- margin: auto 20%;-->
266
- <!-- /* #endif */-->
262
+ .action-btn {
263
+ margin-top: 30rpx;
264
+ }
267
265
 
268
- <!-- &__tips {-->
269
- <!-- font-size: 12px;-->
270
- <!-- margin-top: 27rpx;-->
271
- <!-- text-align: center;-->
272
- <!-- color: grey;-->
273
- <!-- text-decoration: underline;-->
274
- <!-- }-->
275
- <!-- }-->
266
+ .footer {
267
+ display: flex;
268
+ justify-content: space-around;
269
+ /* #ifndef APP-PLUS-NVUE */
270
+ margin: auto 20%;
271
+ /* #endif */
276
272
 
277
- <!-- .xieyi {-->
278
- <!-- color: #333;-->
279
- <!-- margin-top: 40rpx;-->
280
- <!-- }-->
281
- <!-- }-->
282
- <!--}-->
283
- <!--</style>-->
273
+ &__tips {
274
+ font-size: 12px;
275
+ margin-top: 27rpx;
276
+ text-align: center;
277
+ color: grey;
278
+ text-decoration: underline;
279
+ }
280
+ }
284
281
 
285
- <template>111</template>
282
+ .xieyi {
283
+ color: #333;
284
+ margin-top: 40rpx;
285
+ }
286
+ }
287
+ }
288
+ </style>
@@ -4,7 +4,7 @@ const defaultProps: IProps = {
4
4
  logo: "",
5
5
  loginType: 0,
6
6
  themeColor: "#20D56E",
7
- prefix: "gxh",
7
+ prefix: "hy",
8
8
  isShowPwd: false,
9
9
  userPlaceholder: "输入您的用户名",
10
10
  pwdPlaceholder: "输入您的密码",
@@ -1,3 +1,8 @@
1
+ export interface UserLoginInfoVo {
2
+ userName: string;
3
+ password: string;
4
+ }
5
+
1
6
  export default interface HyLoginProps {
2
7
  /**
3
8
  * @description 登录logo
@@ -70,7 +70,7 @@
70
70
  v-if="showConfirmButton && showCancelButton"
71
71
  ></view>
72
72
  <view
73
- class="hy-modal__button-group__wrapper u-modal__button-group__wrapper--confirm"
73
+ class="hy-modal__button-group__wrapper hy-modal__button-group__wrapper--confirm"
74
74
  :hover-stay-time="150"
75
75
  hover-class="hy-modal__button-group__wrapper--hover"
76
76
  :class="[
@@ -81,14 +81,10 @@
81
81
  v-if="showConfirmButton"
82
82
  @tap="confirmHandler"
83
83
  >
84
- <HyIcon
85
- v-if="loading"
86
- :name="IconConfig.LOADING"
87
- :isRotate="loading"
88
- ></HyIcon>
84
+ <HyLoading v-if="loading"></HyLoading>
89
85
  <text
90
86
  v-else
91
- class="hy-modal__button-group__wrapper__text"
87
+ class="hy-modal__button-group__wrapper__text hy-modal__button-group__wrapper--confirm-text"
92
88
  :style="{
93
89
  color: confirmColor,
94
90
  }"
@@ -101,6 +97,17 @@
101
97
  </HyPopup>
102
98
  </template>
103
99
 
100
+ <script lang="ts">
101
+ export default {
102
+ name: "hy-modal",
103
+ options: {
104
+ addGlobalClass: true,
105
+ virtualHost: true,
106
+ styleIsolation: "shared",
107
+ },
108
+ };
109
+ </script>
110
+
104
111
  <script setup lang="ts">
105
112
  import { ref, toRefs, watch } from "vue";
106
113
  import defaultProps from "./props";
@@ -111,6 +118,7 @@ import { IconConfig } from "../../config";
111
118
  // 组件
112
119
  import HyIcon from "../hy-icon/hy-icon.vue";
113
120
  import HyPopup from "../hy-popup/hy-popup.vue";
121
+ import HyLoading from "../hy-loading/hy-loading.vue";
114
122
 
115
123
  const props = withDefaults(defineProps<IProps>(), defaultProps);
116
124
  const { show, asyncClose, closeOnClickOverlay } = toRefs(props);