mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加naiveUI按需引入
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NConfigProvider, zhCN, dateZhCN } from 'naive-ui';
|
||||
import { zhCN, dateZhCN } from 'naive-ui';
|
||||
import { NaiveProvider } from '@/components';
|
||||
import { useThemeStore, subscribeStore } from '@/store';
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, watch, nextTick, onUnmounted } from 'vue';
|
||||
import { NSpin } from 'naive-ui';
|
||||
import { NETWORK_ERROR_MSG } from '@/config';
|
||||
import { SvgEmptyData, SvgNetworkError } from '@/components';
|
||||
import { useBoolean } from '@/hooks';
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { NCheckbox, NButton } from 'naive-ui';
|
||||
|
||||
interface Props {
|
||||
/** 是否勾选 */
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { NTooltip } from 'naive-ui';
|
||||
import type { FollowerPlacement } from 'vueuc';
|
||||
|
||||
interface Props {
|
||||
|
@ -12,7 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NLoadingBarProvider, NDialogProvider, NNotificationProvider, NMessageProvider } from 'naive-ui';
|
||||
import { NaiveProviderContent } from './components';
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -25,7 +25,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NDivider } from 'naive-ui';
|
||||
import { useBoolean } from '@/hooks';
|
||||
import IconClose from '../IconClose/index.vue';
|
||||
import { SvgRadiusBg } from './components';
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { NPopover, NInput, NEmpty } from 'naive-ui';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { useThemeStore } from '@/store';
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { NBreadcrumb, NBreadcrumbItem, NDropdown } from 'naive-ui';
|
||||
import { routePath } from '@/router';
|
||||
import { useThemeStore, useRouteStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
@ -5,7 +5,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { NMenu } from 'naive-ui';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { useRouteStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
@ -8,7 +8,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NDropdown, useDialog } from 'naive-ui';
|
||||
import { HoverContainer } from '@/components';
|
||||
import { useAuthStore } from '@/store';
|
||||
import { iconifyRender } from '@/utils';
|
||||
@ -17,7 +16,6 @@ import avatar from '@/assets/svg/common/avatar01.svg';
|
||||
type DropdownKey = 'user-center' | 'logout';
|
||||
|
||||
const auth = useAuthStore();
|
||||
const dialog = useDialog();
|
||||
|
||||
const options = [
|
||||
{
|
||||
@ -39,7 +37,7 @@ const options = [
|
||||
function handleDropdown(optionKey: string) {
|
||||
const key = optionKey as DropdownKey;
|
||||
if (key === 'logout') {
|
||||
dialog.info({
|
||||
window.$dialog?.info({
|
||||
title: '提示',
|
||||
content: '您确定要退出登录吗?',
|
||||
positiveText: '确定',
|
||||
|
@ -26,7 +26,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, shallowRef, computed, watch, nextTick } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { NModal, NInput, NEmpty } from 'naive-ui';
|
||||
import { useDebounceFn, onKeyStroke } from '@vueuse/core';
|
||||
import { useRouteStore } from '@/store';
|
||||
import type { RouteList } from './types';
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { NScrollbar } from 'naive-ui';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { useThemeStore } from '@/store';
|
||||
import type { RouteList } from './types';
|
||||
|
@ -6,7 +6,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NButton } from 'naive-ui';
|
||||
import { useAppStore } from '@/store';
|
||||
|
||||
const app = useAppStore();
|
||||
|
@ -31,7 +31,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { NScrollbar, NMenu } from 'naive-ui';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { DarkModeContainer } from '@/components';
|
||||
import { useAppStore, useThemeStore } from '@/store';
|
||||
|
@ -23,7 +23,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { NScrollbar } from 'naive-ui';
|
||||
import { DarkModeContainer } from '@/components';
|
||||
import { useAppStore, useThemeStore, useRouteStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
@ -17,7 +17,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { NScrollbar, NMenu } from 'naive-ui';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { useAppStore, useThemeStore, useRouteStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { NDropdown } from 'naive-ui';
|
||||
import type { DropdownOption } from 'naive-ui';
|
||||
import { useAppStore, useTabStore } from '@/store';
|
||||
import { iconifyRender } from '@/utils';
|
||||
|
@ -13,7 +13,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NDivider, NSwitch } from 'naive-ui';
|
||||
import { useThemeStore } from '@/store';
|
||||
|
||||
const theme = useThemeStore();
|
||||
|
@ -11,7 +11,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NButton } from 'naive-ui';
|
||||
import { useAppStore } from '@/store';
|
||||
|
||||
const app = useAppStore();
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { NTooltip } from 'naive-ui';
|
||||
import type { FollowerPlacement } from 'vueuc';
|
||||
import { EnumThemeLayoutMode } from '@/enum';
|
||||
import type { ThemeLayoutMode } from '@/interface';
|
||||
|
@ -13,7 +13,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NDivider, NSpace } from 'naive-ui';
|
||||
import { useThemeStore } from '@/store';
|
||||
import { LayoutCheckbox } from './components';
|
||||
|
||||
|
@ -59,7 +59,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NDivider, NSpace, NSwitch, NSelect, NInputNumber } from 'naive-ui';
|
||||
import { useThemeStore } from '@/store';
|
||||
import SettingMenu from '../SettingMenu/index.vue';
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NDivider, NSpace, NSwitch, NSelect } from 'naive-ui';
|
||||
import { useThemeStore } from '@/store';
|
||||
import SettingMenu from '../SettingMenu/index.vue';
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NModal, NGradientText, NTabs, NTabPane, NGrid, NGridItem } from 'naive-ui';
|
||||
import { traditionColors } from '@/settings';
|
||||
import { useThemeStore } from '@/store';
|
||||
import ColorCheckbox from './ColorCheckbox.vue';
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { NDivider, NGrid, NGridItem, NSpace, NButton, NColorPicker } from 'naive-ui';
|
||||
import { isInTraditionColors } from '@/settings';
|
||||
import { useThemeStore } from '@/store';
|
||||
import { useBoolean } from '@/hooks';
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted, onUnmounted } from 'vue';
|
||||
import { NDivider, NSpace, NButton } from 'naive-ui';
|
||||
import Clipboard from 'clipboard';
|
||||
import { useThemeStore } from '@/store';
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NDrawer, NDrawerContent } from 'naive-ui';
|
||||
import { useAppStore } from '@/store';
|
||||
import { DrawerButton, DarkMode, LayoutMode, ThemeColorSelect, PageFunc, PageView, ThemeConfig } from './components';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createApp } from 'vue';
|
||||
import { setupAssets } from '@/plugins';
|
||||
import { setupAssets, setupNaiveUI } from '@/plugins';
|
||||
import { setupRouter } from '@/router';
|
||||
import { setupStore } from '@/store';
|
||||
import { setupDirectives } from '@/directives';
|
||||
@ -17,6 +17,9 @@ async function setupApp() {
|
||||
// 挂载自定义vue指令
|
||||
setupDirectives(app);
|
||||
|
||||
// 按需引入naiveUI
|
||||
setupNaiveUI(app);
|
||||
|
||||
// 挂载路由
|
||||
await setupRouter(app);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import setupAssets from './assets';
|
||||
import setupNaiveUI from './naive';
|
||||
|
||||
export { setupAssets };
|
||||
export { setupAssets, setupNaiveUI };
|
||||
|
103
src/plugins/naive.ts
Normal file
103
src/plugins/naive.ts
Normal file
@ -0,0 +1,103 @@
|
||||
import type { App } from 'vue';
|
||||
import {
|
||||
create,
|
||||
NBreadcrumb,
|
||||
NBreadcrumbItem,
|
||||
NButton,
|
||||
NCard,
|
||||
NCheckbox,
|
||||
NColorPicker,
|
||||
NConfigProvider,
|
||||
NDataTable,
|
||||
NDescriptions,
|
||||
NDescriptionsItem,
|
||||
NDialogProvider,
|
||||
NDivider,
|
||||
NDrawer,
|
||||
NDrawerContent,
|
||||
NDropdown,
|
||||
NEmpty,
|
||||
NForm,
|
||||
NFormItem,
|
||||
NGradientText,
|
||||
NGrid,
|
||||
NGridItem,
|
||||
NInput,
|
||||
NInputGroup,
|
||||
NInputNumber,
|
||||
NList,
|
||||
NListItem,
|
||||
NLoadingBarProvider,
|
||||
NModal,
|
||||
NMenu,
|
||||
NMessageProvider,
|
||||
NNotificationProvider,
|
||||
NPopover,
|
||||
NScrollbar,
|
||||
NSelect,
|
||||
NSpace,
|
||||
NStatistic,
|
||||
NSwitch,
|
||||
NSpin,
|
||||
NTabs,
|
||||
NTabPane,
|
||||
NTag,
|
||||
NThing,
|
||||
NTimeline,
|
||||
NTimelineItem,
|
||||
NTooltip
|
||||
} from 'naive-ui';
|
||||
|
||||
/** 按需引入naiveUI */
|
||||
export default function setupNaiveUI(app: App) {
|
||||
const naive = create({
|
||||
components: [
|
||||
NBreadcrumb,
|
||||
NBreadcrumbItem,
|
||||
NButton,
|
||||
NCard,
|
||||
NCheckbox,
|
||||
NColorPicker,
|
||||
NConfigProvider,
|
||||
NDataTable,
|
||||
NDescriptions,
|
||||
NDescriptionsItem,
|
||||
NDialogProvider,
|
||||
NDivider,
|
||||
NDrawer,
|
||||
NDrawerContent,
|
||||
NDropdown,
|
||||
NEmpty,
|
||||
NForm,
|
||||
NFormItem,
|
||||
NGradientText,
|
||||
NGrid,
|
||||
NGridItem,
|
||||
NInput,
|
||||
NInputGroup,
|
||||
NInputNumber,
|
||||
NList,
|
||||
NListItem,
|
||||
NLoadingBarProvider,
|
||||
NModal,
|
||||
NMenu,
|
||||
NMessageProvider,
|
||||
NNotificationProvider,
|
||||
NPopover,
|
||||
NScrollbar,
|
||||
NSelect,
|
||||
NSpace,
|
||||
NStatistic,
|
||||
NSwitch,
|
||||
NSpin,
|
||||
NTabs,
|
||||
NTabPane,
|
||||
NTag,
|
||||
NThing,
|
||||
NTimeline,
|
||||
NTimelineItem,
|
||||
NTooltip
|
||||
]
|
||||
});
|
||||
app.use(naive);
|
||||
}
|
@ -9,7 +9,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
||||
import { pkgJson } from '../model';
|
||||
|
||||
const { devDependencies } = pkgJson;
|
||||
|
@ -9,7 +9,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
||||
import { pkgJson } from '../model';
|
||||
|
||||
const { dependencies } = pkgJson;
|
||||
|
@ -18,7 +18,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NDescriptions, NDescriptionsItem, NTag } from 'naive-ui';
|
||||
import { pkgJson } from '../model';
|
||||
|
||||
const { version } = pkgJson;
|
||||
|
@ -7,7 +7,5 @@
|
||||
</n-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard } from 'naive-ui';
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
<style scoped></style>
|
||||
|
@ -8,7 +8,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NSpace } from 'naive-ui';
|
||||
import { ProjectIntroduction, ProjectInfo, ProDependency, DevDependency } from './components';
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -35,7 +35,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NGrid, NGridItem, NSpace, NButton } from 'naive-ui';
|
||||
import type { ButtonProps } from 'naive-ui';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { useLoading } from '@/hooks';
|
||||
|
@ -37,7 +37,5 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NSpace } from 'naive-ui';
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
<style scoped></style>
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { NCard, NSpace, NButton, NDataTable } from 'naive-ui';
|
||||
import type { DataTableColumn } from 'naive-ui';
|
||||
import { LoadingEmptyWrapper } from '@/components';
|
||||
import { useLoadingEmpty } from '@/hooks';
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { h } from 'vue';
|
||||
import { NGrid, NGridItem, NCard, NTimeline, NTimelineItem, NDataTable, NTag } from 'naive-ui';
|
||||
import { NTag } from 'naive-ui';
|
||||
|
||||
interface TimelineData {
|
||||
type: 'default' | 'info' | 'success' | 'warning' | 'error';
|
||||
|
@ -18,7 +18,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NGrid, NGridItem } from 'naive-ui';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { CountTo } from '@/components';
|
||||
import { GradientBg } from './components';
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { NGrid, NGridItem, NCard, NButton } from 'naive-ui';
|
||||
import { Line, Pie } from '@antv/g2plot';
|
||||
import { CountTo } from '@/components';
|
||||
import data from './data.json';
|
||||
|
@ -7,7 +7,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NSpace } from 'naive-ui';
|
||||
import { TopChart, DataCard, BottomPart } from './components';
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -16,7 +16,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NSpace, NStatistic } from 'naive-ui';
|
||||
import { useAuthStore } from '@/store';
|
||||
|
||||
interface StatisticData {
|
||||
|
@ -47,7 +47,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NGrid, NGridItem, NSpace, NCard, NList, NListItem, NThing } from 'naive-ui';
|
||||
import { SvgBanner } from '@/components';
|
||||
import { TechnologyCard, ShortcutsCard } from './components';
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
</n-space>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { NSpace } from 'naive-ui';
|
||||
import { WorkbenchHeader, WorkbenchMain } from './components';
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -4,7 +4,5 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard } from 'naive-ui';
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
<style scoped></style>
|
||||
|
@ -4,7 +4,5 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard } from 'naive-ui';
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
<style scoped></style>
|
||||
|
@ -11,24 +11,22 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NCard, NInputGroup, NInput, NButton, useMessage } from 'naive-ui';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
|
||||
const source = ref('');
|
||||
const message = useMessage();
|
||||
const { copy, isSupported } = useClipboard();
|
||||
|
||||
function handleCopy() {
|
||||
if (!isSupported) {
|
||||
message.error('您的浏览器不支持Clipboard API');
|
||||
window.$message?.error('您的浏览器不支持Clipboard API');
|
||||
return;
|
||||
}
|
||||
if (!source.value) {
|
||||
message.error('请输入要复制的内容');
|
||||
window.$message?.error('请输入要复制的内容');
|
||||
return;
|
||||
}
|
||||
copy(source.value);
|
||||
message.success(`复制成功:${source.value}`);
|
||||
window.$message?.success(`复制成功:${source.value}`);
|
||||
}
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted, onUnmounted } from 'vue';
|
||||
import { NCard } from 'naive-ui';
|
||||
import Vditor from 'vditor';
|
||||
import 'vditor/src/assets/scss/index.scss';
|
||||
import { GithubLink } from '@/components';
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { NCard } from 'naive-ui';
|
||||
import WangEditor from 'wangeditor';
|
||||
import { GithubLink } from '@/components';
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NCard } from 'naive-ui';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { IconSelect, WebSiteLink } from '@/components';
|
||||
import { icons } from './icons';
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Component } from 'vue';
|
||||
import { NCard, NTabs, NTabPane } from 'naive-ui';
|
||||
import { GaodeMap, TencentMap } from './components';
|
||||
|
||||
interface Map {
|
||||
|
@ -11,7 +11,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NCard, NButton } from 'naive-ui';
|
||||
import printJS from 'print-js';
|
||||
import { GithubLink } from '@/components';
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NCard, NSpace } from 'naive-ui';
|
||||
import SwiperCore, { Navigation, Pagination } from 'swiper';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
import type { SwiperOptions } from 'swiper';
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted } from 'vue';
|
||||
import { NCard } from 'naive-ui';
|
||||
import Player from 'xgplayer';
|
||||
|
||||
const domRef = ref<HTMLElement>();
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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>
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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('验证失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user