feat(projects): 添加naiveUI按需引入

This commit is contained in:
Soybean
2022-02-17 00:58:55 +08:00
parent 225e7128b6
commit a810ef85b1
69 changed files with 231 additions and 120 deletions

View File

@ -12,7 +12,6 @@
<script lang="ts" setup>
import { computed } from 'vue';
import type { Component } from 'vue';
import { NButton } from 'naive-ui';
import { SvgNoPermission, SvgNotFound, SvgServiceError } from '@/components';
import { routeName } from '@/router';

View File

@ -21,7 +21,6 @@
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NButton } from 'naive-ui';
import type { FormInst } from 'naive-ui';
import { useRouterPush } from '@/composables';
import { useSmsCode } from '@/hooks';

View File

@ -36,7 +36,6 @@
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NButton } from 'naive-ui';
import type { FormInst } from 'naive-ui';
import { ImageVerify } from '@/components';
import { useAuthStore } from '@/store';

View File

@ -9,7 +9,5 @@
</n-space>
</template>
<script lang="ts" setup>
import { NSpace, NDivider, NButton } from 'naive-ui';
</script>
<script lang="ts" setup></script>
<style scoped></style>

View File

@ -37,7 +37,6 @@
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NCheckbox, NButton } from 'naive-ui';
import type { FormInst, FormRules } from 'naive-ui';
import { EnumLoginModule } from '@/enum';
import { useAuthStore } from '@/store';

View File

@ -28,7 +28,6 @@
<script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NButton } from 'naive-ui';
import type { FormInst, FormRules } from 'naive-ui';
import { LoginAgreement } from '@/components';
import { useRouterPush } from '@/composables';

View File

@ -27,13 +27,11 @@
<script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue';
import { NForm, NFormItem, NInput, NSpace, NButton, useMessage } from 'naive-ui';
import type { FormInst, FormRules } from 'naive-ui';
import { useRouterPush } from '@/composables';
import { useSmsCode } from '@/hooks';
import { formRules, getConfirmPwdRule } from '@/utils';
const message = useMessage();
const { toLoginModule } = useRouterPush();
const { label, isCounting, loading: smsLoading, start } = useSmsCode();
@ -61,9 +59,9 @@ function handleSubmit(e: MouseEvent) {
formRef.value.validate(errors => {
if (!errors) {
message.success('验证成功');
window.$message?.success('验证成功');
} else {
message.error('验证失败');
window.$message?.error('验证失败');
}
});
}

View File

@ -30,7 +30,6 @@
<script setup lang="ts">
import { computed } from 'vue';
import type { Component } from 'vue';
import { NCard, NGradientText } from 'naive-ui';
import { EnumLoginModule } from '@/enum';
import { SystemLogo, DarkModeSwitch } from '@/components';
import { useThemeStore } from '@/store';