mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-18 01:36:37 +08:00
feat(projects): 添加组件名称,调整vue文件里面的类型声明位置
This commit is contained in:
parent
b60db89801
commit
f64bc91ce2
@ -34,8 +34,8 @@
|
|||||||
"@antv/data-set": "^0.11.8",
|
"@antv/data-set": "^0.11.8",
|
||||||
"@antv/g2": "^4.2.5",
|
"@antv/g2": "^4.2.5",
|
||||||
"@better-scroll/core": "^2.4.2",
|
"@better-scroll/core": "^2.4.2",
|
||||||
"@soybeanjs/vue-admin-layout": "^1.0.4",
|
"@soybeanjs/vue-admin-layout": "^1.0.6",
|
||||||
"@soybeanjs/vue-admin-tab": "^1.0.2",
|
"@soybeanjs/vue-admin-tab": "^1.0.3",
|
||||||
"@vueuse/core": "^8.9.1",
|
"@vueuse/core": "^8.9.1",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
|
@ -26,6 +26,8 @@ import { computed, watch, nextTick, onUnmounted } from 'vue';
|
|||||||
import { NETWORK_ERROR_MSG } from '@/config';
|
import { NETWORK_ERROR_MSG } from '@/config';
|
||||||
import { useBoolean } from '@/hooks';
|
import { useBoolean } from '@/hooks';
|
||||||
|
|
||||||
|
defineOptions({ name: 'LoadingEmptyWrapper' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 是否加载 */
|
/** 是否加载 */
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
|
@ -9,11 +9,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'LoginAgreement' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 是否勾选 */
|
/** 是否勾选 */
|
||||||
value?: boolean;
|
value?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'update:value', value: boolean): void;
|
(e: 'update:value', value: boolean): void;
|
||||||
/** 点击协议 */
|
/** 点击协议 */
|
||||||
@ -22,10 +28,6 @@ interface Emits {
|
|||||||
(e: 'click-policy'): void;
|
(e: 'click-policy'): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const checked = computed({
|
const checked = computed({
|
||||||
|
@ -8,9 +8,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
defineOptions({ name: 'DarkModeContainer' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
inverted?: boolean;
|
inverted?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
withDefaults(defineProps<Props>(), {
|
withDefaults(defineProps<Props>(), {
|
||||||
inverted: false
|
inverted: false
|
||||||
});
|
});
|
||||||
|
@ -8,19 +8,21 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DarkModeSwitch' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 暗黑模式 */
|
/** 暗黑模式 */
|
||||||
dark?: boolean;
|
dark?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'update:dark', darkMode: boolean): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
dark: false
|
dark: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface Emits {
|
||||||
|
(e: 'update:dark', darkMode: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const darkMode = computed({
|
const darkMode = computed({
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { routeName } from '@/router';
|
import { routeName } from '@/router';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ExceptionBase' });
|
||||||
|
|
||||||
type ExceptionType = '403' | '404' | '500';
|
type ExceptionType = '403' | '404' | '500';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import type { PopoverPlacement } from 'naive-ui';
|
import type { PopoverPlacement } from 'naive-ui';
|
||||||
|
|
||||||
|
defineOptions({ name: 'HoverContainer' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** tooltip显示文本 */
|
/** tooltip显示文本 */
|
||||||
tooltipContent?: string;
|
tooltipContent?: string;
|
||||||
@ -28,6 +30,7 @@ interface Props {
|
|||||||
/** 反转模式下 */
|
/** 反转模式下 */
|
||||||
inverted?: boolean;
|
inverted?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
tooltipContent: '',
|
tooltipContent: '',
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
import { defineComponent, h } from 'vue';
|
import { defineComponent, h } from 'vue';
|
||||||
import { useLoadingBar, useDialog, useMessage, useNotification } from 'naive-ui';
|
import { useLoadingBar, useDialog, useMessage, useNotification } from 'naive-ui';
|
||||||
|
|
||||||
|
defineOptions({ name: 'NaiveProvider' });
|
||||||
|
|
||||||
// 挂载naive组件的方法至window, 以便在路由钩子函数和请求函数里面调用
|
// 挂载naive组件的方法至window, 以便在路由钩子函数和请求函数里面调用
|
||||||
function registerNaiveTools() {
|
function registerNaiveTools() {
|
||||||
window.$loadingBar = useLoadingBar();
|
window.$loadingBar = useLoadingBar();
|
||||||
@ -24,6 +26,7 @@ function registerNaiveTools() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const NaiveProviderContent = defineComponent({
|
const NaiveProviderContent = defineComponent({
|
||||||
|
name: 'NaiveProviderContent',
|
||||||
setup() {
|
setup() {
|
||||||
registerNaiveTools();
|
registerNaiveTools();
|
||||||
},
|
},
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
defineOptions({ name: 'SystemLogo' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** logo是否填充 */
|
/** logo是否填充 */
|
||||||
fill?: boolean;
|
fill?: boolean;
|
||||||
|
@ -12,6 +12,8 @@ import { useElementSize } from '@vueuse/core';
|
|||||||
import BScroll from '@better-scroll/core';
|
import BScroll from '@better-scroll/core';
|
||||||
import type { Options } from '@better-scroll/core';
|
import type { Options } from '@better-scroll/core';
|
||||||
|
|
||||||
|
defineOptions({ name: 'BetterScroll' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** better-scroll的配置: https://better-scroll.github.io/docs/zh-CN/guide/base-scroll-options.html */
|
/** better-scroll的配置: https://better-scroll.github.io/docs/zh-CN/guide/base-scroll-options.html */
|
||||||
options: Options;
|
options: Options;
|
||||||
|
@ -6,6 +6,8 @@ import { ref, computed, onMounted, watch, watchEffect } from 'vue';
|
|||||||
import { useTransition, TransitionPresets } from '@vueuse/core';
|
import { useTransition, TransitionPresets } from '@vueuse/core';
|
||||||
import { isNumber } from '@/utils';
|
import { isNumber } from '@/utils';
|
||||||
|
|
||||||
|
defineOptions({ name: 'CountTo' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 初始值 */
|
/** 初始值 */
|
||||||
startValue?: number;
|
startValue?: number;
|
||||||
@ -45,10 +47,12 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
transition: 'linear'
|
transition: 'linear'
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
interface Emits {
|
||||||
(e: 'on-started'): void;
|
(e: 'on-started'): void;
|
||||||
(e: 'on-finished'): void;
|
(e: 'on-finished'): void;
|
||||||
}>();
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const source = ref(props.startValue);
|
const source = ref(props.startValue);
|
||||||
let outputValue = useTransition(source);
|
let outputValue = useTransition(source);
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import WebSiteLink from './WebSiteLink.vue';
|
import WebSiteLink from './WebSiteLink.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GithubLink' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** github链接 */
|
/** github链接 */
|
||||||
link: string;
|
link: string;
|
||||||
|
@ -29,6 +29,8 @@ import { ref, computed } from 'vue';
|
|||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'IconSelect' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 选中的图标 */
|
/** 选中的图标 */
|
||||||
value: string;
|
value: string;
|
||||||
@ -38,14 +40,14 @@ interface Props {
|
|||||||
emptyIcon?: string;
|
emptyIcon?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'update:value', val: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
emptyIcon: 'mdi:apps'
|
emptyIcon: 'mdi:apps'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface Emits {
|
||||||
|
(e: 'update:value', val: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -8,18 +8,20 @@
|
|||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import { useImageVerify } from '@/hooks';
|
import { useImageVerify } from '@/hooks';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ImageVerify' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
code?: string;
|
code?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'update:code', code: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
code: ''
|
code: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface Emits {
|
||||||
|
(e: 'update:code', code: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const { domRef, imgCode, setImgCode, getImgCode } = useImageVerify();
|
const { domRef, imgCode, setImgCode, getImgCode } = useImageVerify();
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SvgIcon' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 前缀 */
|
/** 前缀 */
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
defineOptions({ name: 'WebSiteLink' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 网址名称 */
|
/** 网址名称 */
|
||||||
label: string;
|
label: string;
|
||||||
|
@ -46,6 +46,8 @@ import {
|
|||||||
GlobalBackTop
|
GlobalBackTop
|
||||||
} from '../common';
|
} from '../common';
|
||||||
|
|
||||||
|
defineOptions({ name: 'BasicLayout' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GlobalContent } from '../common';
|
import { GlobalContent } from '../common';
|
||||||
|
|
||||||
|
defineOptions({ name: 'BlankLayout' });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useWindowScroll } from '@vueuse/core';
|
import { useWindowScroll } from '@vueuse/core';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalBackTop' });
|
||||||
|
|
||||||
const { y: scrollY } = useWindowScroll();
|
const { y: scrollY } = useWindowScroll();
|
||||||
|
|
||||||
const show = computed(() => scrollY.value > 180);
|
const show = computed(() => scrollY.value > 180);
|
||||||
|
@ -22,20 +22,22 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore, useThemeStore, useRouteStore } from '@/store';
|
import { useAppStore, useThemeStore, useRouteStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalContent' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 显示padding */
|
/** 显示padding */
|
||||||
showPadding?: boolean;
|
showPadding?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withDefaults(defineProps<Props>(), {
|
||||||
|
showPadding: true
|
||||||
|
});
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
/** 禁止主体溢出 */
|
/** 禁止主体溢出 */
|
||||||
(e: 'hide-main-overflow', hidden: boolean): void;
|
(e: 'hide-main-overflow', hidden: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
withDefaults(defineProps<Props>(), {
|
|
||||||
showPadding: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
</dark-mode-container>
|
</dark-mode-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
defineOptions({ name: 'GlobalFooter' });
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
import { useFullscreen } from '@vueuse/core';
|
import { useFullscreen } from '@vueuse/core';
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'FullScreen' });
|
||||||
|
|
||||||
const { isFullscreen, toggle } = useFullscreen();
|
const { isFullscreen, toggle } = useFullscreen();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GithubSite' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
function handleClickLink() {
|
function handleClickLink() {
|
||||||
window.open('https://github.com/honghuangdc/soybean-admin', '_blank');
|
window.open('https://github.com/honghuangdc/soybean-admin', '_blank');
|
||||||
|
@ -34,6 +34,8 @@ import { useThemeStore, useRouteStore } from '@/store';
|
|||||||
import { useRouterPush } from '@/composables';
|
import { useRouterPush } from '@/composables';
|
||||||
import { getBreadcrumbByRouteKey } from '@/utils';
|
import { getBreadcrumbByRouteKey } from '@/utils';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalBreadcrumb' });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
|
@ -21,6 +21,8 @@ import type { MenuOption } from 'naive-ui';
|
|||||||
import { useRouteStore, useThemeStore } from '@/store';
|
import { useRouteStore, useThemeStore } from '@/store';
|
||||||
import { useRouterPush } from '@/composables';
|
import { useRouterPush } from '@/composables';
|
||||||
|
|
||||||
|
defineOptions({ name: 'HeaderMenu' });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useAppStore, useThemeStore } from '@/store';
|
import { useAppStore, useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'MenuCollapse' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
@ -38,18 +38,20 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'MessageList' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
list?: Message.List[];
|
list?: Message.List[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'read', val: number): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
withDefaults(defineProps<Props>(), {
|
withDefaults(defineProps<Props>(), {
|
||||||
list: () => []
|
list: () => []
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface Emits {
|
||||||
|
(e: 'read', val: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
function handleRead(index: number) {
|
function handleRead(index: number) {
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore, useThemeStore } from '@/store';
|
import { useAppStore, useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SettingButton' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
@ -48,9 +48,13 @@ import { useThemeStore } from '@/store';
|
|||||||
import { useBoolean } from '@/hooks';
|
import { useBoolean } from '@/hooks';
|
||||||
import MessageList from './MessageList.vue';
|
import MessageList from './MessageList.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SystemMessage' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
const { bool: loading, setBool: setLoading } = useBoolean();
|
const { bool: loading, setBool: setLoading } = useBoolean();
|
||||||
|
|
||||||
const currentTab = ref(0);
|
const currentTab = ref(0);
|
||||||
|
|
||||||
const tabData = ref<Message.Tab[]>([
|
const tabData = ref<Message.Tab[]>([
|
||||||
{
|
{
|
||||||
key: 1,
|
key: 1,
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ThemeMode' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,15 +8,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { DropdownOption } from 'naive-ui';
|
||||||
import { useAuthStore, useThemeStore } from '@/store';
|
import { useAuthStore, useThemeStore } from '@/store';
|
||||||
import { iconifyRender } from '@/utils';
|
import { iconifyRender } from '@/utils';
|
||||||
|
|
||||||
type DropdownKey = 'user-center' | 'logout';
|
defineOptions({ name: 'UserAvatar' });
|
||||||
|
|
||||||
const auth = useAuthStore();
|
const auth = useAuthStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
const options = [
|
const options: DropdownOption[] = [
|
||||||
{
|
{
|
||||||
label: '用户中心',
|
label: '用户中心',
|
||||||
key: 'user-center',
|
key: 'user-center',
|
||||||
@ -33,6 +34,8 @@ const options = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
type DropdownKey = 'user-center' | 'logout';
|
||||||
|
|
||||||
function handleDropdown(optionKey: string) {
|
function handleDropdown(optionKey: string) {
|
||||||
const key = optionKey as DropdownKey;
|
const key = optionKey as DropdownKey;
|
||||||
if (key === 'logout') {
|
if (key === 'logout') {
|
||||||
|
@ -34,6 +34,8 @@ import {
|
|||||||
SettingButton
|
SettingButton
|
||||||
} from './components';
|
} from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalHeader' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 显示logo */
|
/** 显示logo */
|
||||||
showLogo: GlobalHeaderProps['showLogo'];
|
showLogo: GlobalHeaderProps['showLogo'];
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
import { routePath } from '@/router';
|
import { routePath } from '@/router';
|
||||||
import { useAppInfo } from '@/composables';
|
import { useAppInfo } from '@/composables';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalLogo' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 显示名字 */
|
/** 显示名字 */
|
||||||
showTitle: boolean;
|
showTitle: boolean;
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
<script lang="ts" setup>
|
||||||
|
defineOptions({ name: 'SearchFooter' });
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.icon {
|
.icon {
|
||||||
|
@ -31,17 +31,19 @@ import { useRouteStore } from '@/store';
|
|||||||
import SearchResult from './SearchResult.vue';
|
import SearchResult from './SearchResult.vue';
|
||||||
import SearchFooter from './SearchFooter.vue';
|
import SearchFooter from './SearchFooter.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SearchModal' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 弹窗显隐 */
|
/** 弹窗显隐 */
|
||||||
value: boolean;
|
value: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const props = defineProps<Props>();
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'update:value', val: boolean): void;
|
(e: 'update:value', val: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -25,18 +25,20 @@ import { computed } from 'vue';
|
|||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SearchResult' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: string;
|
value: string;
|
||||||
options: AuthRoute.Route[];
|
options: AuthRoute.Route[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const props = defineProps<Props>();
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'update:value', val: string): void;
|
(e: 'update:value', val: string): void;
|
||||||
(e: 'enter'): void;
|
(e: 'enter'): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -17,6 +17,8 @@ import { useThemeStore } from '@/store';
|
|||||||
import { useBoolean } from '@/hooks';
|
import { useBoolean } from '@/hooks';
|
||||||
import { SearchModal } from './components';
|
import { SearchModal } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalSearch' });
|
||||||
|
|
||||||
const { bool: show, toggle } = useBoolean();
|
const { bool: show, toggle } = useBoolean();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'MixMenuCollapse' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ import { computed } from 'vue';
|
|||||||
import type { VNodeChild } from 'vue';
|
import type { VNodeChild } from 'vue';
|
||||||
import { useBoolean } from '@/hooks';
|
import { useBoolean } from '@/hooks';
|
||||||
|
|
||||||
|
defineOptions({ name: 'MixMenuDetail' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 路由名称 */
|
/** 路由名称 */
|
||||||
routeName: string;
|
routeName: string;
|
||||||
|
@ -36,6 +36,8 @@ import { useAppStore, useThemeStore } from '@/store';
|
|||||||
import { useAppInfo, useRouterPush } from '@/composables';
|
import { useAppInfo, useRouterPush } from '@/composables';
|
||||||
import { getActiveKeyPathsOfMenus } from '@/utils';
|
import { getActiveKeyPathsOfMenus } from '@/utils';
|
||||||
|
|
||||||
|
defineOptions({ name: 'MixMenuDrawer' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 菜单抽屉可见性 */
|
/** 菜单抽屉可见性 */
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
@ -29,6 +29,8 @@ import { useBoolean } from '@/hooks';
|
|||||||
import { GlobalLogo } from '@/layouts/common';
|
import { GlobalLogo } from '@/layouts/common';
|
||||||
import { MixMenuDetail, MixMenuDrawer, MixMenuCollapse } from './components';
|
import { MixMenuDetail, MixMenuDrawer, MixMenuCollapse } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'VerticalMixSider' });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -23,6 +23,8 @@ import { useAppStore, useThemeStore, useRouteStore } from '@/store';
|
|||||||
import { useRouterPush } from '@/composables';
|
import { useRouterPush } from '@/composables';
|
||||||
import { getActiveKeyPathsOfMenus } from '@/utils';
|
import { getActiveKeyPathsOfMenus } from '@/utils';
|
||||||
|
|
||||||
|
defineOptions({ name: 'VerticalMenu' });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -11,6 +11,8 @@ import { useAppStore, useThemeStore } from '@/store';
|
|||||||
import { GlobalLogo } from '@/layouts/common';
|
import { GlobalLogo } from '@/layouts/common';
|
||||||
import { VerticalMenu } from './components';
|
import { VerticalMenu } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'VerticalSider' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@ import { computed } from 'vue';
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import { VerticalSider, VerticalMixSider } from './components';
|
import { VerticalSider, VerticalMixSider } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalSider' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
const isVerticalMix = computed(() => theme.layout.mode === 'vertical-mix');
|
const isVerticalMix = computed(() => theme.layout.mode === 'vertical-mix');
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import { useLoading } from '@/hooks';
|
import { useLoading } from '@/hooks';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ReloadButton' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const { loading, startLoading, endLoading } = useLoading();
|
const { loading, startLoading, endLoading } = useLoading();
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import type { DropdownOption } from 'naive-ui';
|
|||||||
import { useAppStore, useTabStore } from '@/store';
|
import { useAppStore, useTabStore } from '@/store';
|
||||||
import { iconifyRender } from '@/utils';
|
import { iconifyRender } from '@/utils';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ContextMenu' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 右键菜单可见性 */
|
/** 右键菜单可见性 */
|
||||||
visible?: boolean;
|
visible?: boolean;
|
||||||
@ -27,20 +29,15 @@ interface Props {
|
|||||||
y: number;
|
y: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'update:visible', visible: boolean): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
type DropdownKey = 'reload-current' | 'close-current' | 'close-other' | 'close-left' | 'close-right' | 'close-all';
|
|
||||||
type Option = DropdownOption & {
|
|
||||||
key: DropdownKey;
|
|
||||||
};
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
visible: false,
|
visible: false,
|
||||||
currentPath: ''
|
currentPath: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface Emits {
|
||||||
|
(e: 'update:visible', visible: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
@ -59,6 +56,11 @@ function hide() {
|
|||||||
dropdownVisible.value = false;
|
dropdownVisible.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DropdownKey = 'reload-current' | 'close-current' | 'close-other' | 'close-left' | 'close-right' | 'close-all';
|
||||||
|
type Option = DropdownOption & {
|
||||||
|
key: DropdownKey;
|
||||||
|
};
|
||||||
|
|
||||||
const options = computed<Option[]>(() => [
|
const options = computed<Option[]>(() => [
|
||||||
{
|
{
|
||||||
label: '重新加载',
|
label: '重新加载',
|
||||||
|
@ -32,6 +32,8 @@ import { Icon } from '@iconify/vue';
|
|||||||
import { useThemeStore, useTabStore } from '@/store';
|
import { useThemeStore, useTabStore } from '@/store';
|
||||||
import { ContextMenu } from './components';
|
import { ContextMenu } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'TabDetail' });
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'scroll', clientX: number): void;
|
(e: 'scroll', clientX: number): void;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,8 @@ import { useThemeStore, useTabStore } from '@/store';
|
|||||||
import { useDeviceInfo } from '@/composables';
|
import { useDeviceInfo } from '@/composables';
|
||||||
import { TabDetail, ReloadButton } from './components';
|
import { TabDetail, ReloadButton } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GlobalTab' });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
const tab = useTabStore();
|
const tab = useTabStore();
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import SettingMenu from '../SettingMenu/index.vue';
|
import SettingMenu from '../SettingMenu/index.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DarkMode' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DrawerButton' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ import { computed } from 'vue';
|
|||||||
import type { PopoverPlacement } from 'naive-ui';
|
import type { PopoverPlacement } from 'naive-ui';
|
||||||
import type { EnumThemeLayoutMode } from '@/enum';
|
import type { EnumThemeLayoutMode } from '@/enum';
|
||||||
|
|
||||||
|
defineOptions({ name: 'LayoutCheckbox' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 布局模式 */
|
/** 布局模式 */
|
||||||
mode: EnumType.ThemeLayoutMode;
|
mode: EnumType.ThemeLayoutMode;
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import { LayoutCheckbox } from './components';
|
import { LayoutCheckbox } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'LayoutMode' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -68,6 +68,8 @@
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import SettingMenu from '../SettingMenu/index.vue';
|
import SettingMenu from '../SettingMenu/index.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'PageFunc' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import SettingMenu from '../SettingMenu/index.vue';
|
import SettingMenu from '../SettingMenu/index.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'PageView' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
defineOptions({ name: 'SettingMenu' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 文本 */
|
/** 文本 */
|
||||||
label: string;
|
label: string;
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ColorCheckbox' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 颜色 */
|
/** 颜色 */
|
||||||
color: string;
|
color: string;
|
||||||
|
@ -27,16 +27,18 @@ import { traditionColors } from '@/settings';
|
|||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
import ColorCheckbox from './ColorCheckbox.vue';
|
import ColorCheckbox from './ColorCheckbox.vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ColorModal' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineProps<Props>();
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'close'): void;
|
(e: 'close'): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<Props>();
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
@ -19,6 +19,8 @@ import { useThemeStore } from '@/store';
|
|||||||
import { useBoolean } from '@/hooks';
|
import { useBoolean } from '@/hooks';
|
||||||
import { ColorCheckbox, ColorModal } from './components';
|
import { ColorCheckbox, ColorModal } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ThemeColorSelect' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
const { bool: visible, setTrue: openModal, setFalse: closeModal } = useBoolean();
|
const { bool: visible, setTrue: openModal, setFalse: closeModal } = useBoolean();
|
||||||
|
@ -14,6 +14,8 @@ import { ref, watch, onMounted, onUnmounted } from 'vue';
|
|||||||
import Clipboard from 'clipboard';
|
import Clipboard from 'clipboard';
|
||||||
import { useThemeStore } from '@/store';
|
import { useThemeStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ThemeConfig' });
|
||||||
|
|
||||||
const theme = useThemeStore();
|
const theme = useThemeStore();
|
||||||
|
|
||||||
const copyRef = ref<HTMLElement>();
|
const copyRef = ref<HTMLElement>();
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import { DrawerButton, DarkMode, LayoutMode, ThemeColorSelect, PageFunc, PageView, ThemeConfig } from './components';
|
import { DrawerButton, DarkMode, LayoutMode, ThemeColorSelect, PageFunc, PageView, ThemeConfig } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'SettingDrawer' });
|
||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
|
|
||||||
const showButton = import.meta.env.DEV || import.meta.env.VITE_VERCEL === '1';
|
const showButton = import.meta.env.DEV || import.meta.env.VITE_VERCEL === '1';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { Component } from 'vue';
|
import type { Component } from 'vue';
|
||||||
import { EnumLayoutComponentName } from '@/enum';
|
|
||||||
import { BasicLayout, BlankLayout } from '@/layouts';
|
import { BasicLayout, BlankLayout } from '@/layouts';
|
||||||
import { views } from '@/views';
|
import { views } from '@/views';
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ export function getLayoutComponent(layoutType: EnumType.LayoutComponentName) {
|
|||||||
basic: BasicLayout,
|
basic: BasicLayout,
|
||||||
blank: BlankLayout
|
blank: BlankLayout
|
||||||
};
|
};
|
||||||
return () => setViewComponentName(layoutComponent[layoutType], EnumLayoutComponentName[layoutType]);
|
return layoutComponent[layoutType];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pkgJson } from './model';
|
import { pkgJson } from './model';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DevDependency' });
|
||||||
|
|
||||||
const { devDependencies } = pkgJson;
|
const { devDependencies } = pkgJson;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pkgJson } from './model';
|
import { pkgJson } from './model';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ProDependency' });
|
||||||
|
|
||||||
const { dependencies } = pkgJson;
|
const { dependencies } = pkgJson;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pkgJson } from './model';
|
import { pkgJson } from './model';
|
||||||
|
|
||||||
|
defineOptions({ name: 'ProjectInfo' });
|
||||||
|
|
||||||
const { version } = pkgJson;
|
const { version } = pkgJson;
|
||||||
const latestBuildTime = PROJECT_BUILD_TIME;
|
const latestBuildTime = PROJECT_BUILD_TIME;
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
</n-card>
|
</n-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
defineOptions({ name: 'ProjectIntroduction' });
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
import { NTag } from 'naive-ui';
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardAnalysisBottomPart' });
|
||||||
|
|
||||||
interface TimelineData {
|
interface TimelineData {
|
||||||
type: 'default' | 'info' | 'success' | 'warning' | 'error';
|
type: 'default' | 'info' | 'success' | 'warning' | 'error';
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import { GradientBg } from './components';
|
import { GradientBg } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardAnalysisDataCard' });
|
||||||
|
|
||||||
interface CardData {
|
interface CardData {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useEcharts, type ECOption } from '@/composables';
|
import { useEcharts, type ECOption } from '@/composables';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardAnalysisTopCard' });
|
||||||
|
|
||||||
const lineOptions = ref<ECOption>({
|
const lineOptions = ref<ECOption>({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
@ -18,14 +18,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from '@/store';
|
import { useAuthStore } from '@/store';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardWorkbenchHeader' });
|
||||||
|
|
||||||
|
const auth = useAuthStore();
|
||||||
|
|
||||||
interface StatisticData {
|
interface StatisticData {
|
||||||
id: number;
|
id: number;
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auth = useAuthStore();
|
|
||||||
|
|
||||||
const statisticData: StatisticData[] = [
|
const statisticData: StatisticData[] = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardWorkbenchMainShortcutsCard' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 快捷操作名称 */
|
/** 快捷操作名称 */
|
||||||
label: string;
|
label: string;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardWorkbenchMainTechnologyCard' });
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** 技术名称 */
|
/** 技术名称 */
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -47,6 +47,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { TechnologyCard, ShortcutsCard } from './components';
|
import { TechnologyCard, ShortcutsCard } from './components';
|
||||||
|
|
||||||
|
defineOptions({ name: 'DashboardWorkbenchMain' });
|
||||||
|
|
||||||
interface Technology {
|
interface Technology {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@ -57,19 +59,6 @@ interface Technology {
|
|||||||
iconColor?: string;
|
iconColor?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Activity {
|
|
||||||
id: number;
|
|
||||||
content: string;
|
|
||||||
time: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Shortcuts {
|
|
||||||
id: number;
|
|
||||||
label: string;
|
|
||||||
icon: string;
|
|
||||||
iconColor: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const technology: Technology[] = [
|
const technology: Technology[] = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
@ -124,6 +113,12 @@ const technology: Technology[] = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
interface Activity {
|
||||||
|
id: number;
|
||||||
|
content: string;
|
||||||
|
time: string;
|
||||||
|
}
|
||||||
|
|
||||||
const activity: Activity[] = [
|
const activity: Activity[] = [
|
||||||
{ id: 4, content: 'Soybean 刚才把工作台页面随便写了一些,凑合能看了!', time: '2021-11-07 22:45:32' },
|
{ id: 4, content: 'Soybean 刚才把工作台页面随便写了一些,凑合能看了!', time: '2021-11-07 22:45:32' },
|
||||||
{ id: 3, content: 'Soybean 正在忙于为soybean-admin写项目说明文档!', time: '2021-11-03 20:33:31' },
|
{ id: 3, content: 'Soybean 正在忙于为soybean-admin写项目说明文档!', time: '2021-11-03 20:33:31' },
|
||||||
@ -132,6 +127,13 @@ const activity: Activity[] = [
|
|||||||
{ id: 0, content: 'Soybean 在2021年5月28日创建了开源项目soybean-admin!', time: '2021-05-28 22:22:22' }
|
{ id: 0, content: 'Soybean 在2021年5月28日创建了开源项目soybean-admin!', time: '2021-05-28 22:22:22' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
interface Shortcuts {
|
||||||
|
id: number;
|
||||||
|
label: string;
|
||||||
|
icon: string;
|
||||||
|
iconColor: string;
|
||||||
|
}
|
||||||
|
|
||||||
const shortcuts: Shortcuts[] = [
|
const shortcuts: Shortcuts[] = [
|
||||||
{ id: 0, label: '主控台', icon: 'mdi:desktop-mac-dashboard', iconColor: '#409eff' },
|
{ id: 0, label: '主控台', icon: 'mdi:desktop-mac-dashboard', iconColor: '#409eff' },
|
||||||
{ id: 1, label: '系统管理', icon: 'ic:outline-settings', iconColor: '#7238d1' },
|
{ id: 1, label: '系统管理', icon: 'ic:outline-settings', iconColor: '#7238d1' },
|
||||||
|
@ -7,6 +7,8 @@ import { ref, onMounted } from 'vue';
|
|||||||
import { useScriptTag } from '@vueuse/core';
|
import { useScriptTag } from '@vueuse/core';
|
||||||
import { BAIDU_MAP_SDK_URL } from '@/config';
|
import { BAIDU_MAP_SDK_URL } from '@/config';
|
||||||
|
|
||||||
|
defineOptions({ name: 'BaiduMap' });
|
||||||
|
|
||||||
const { load } = useScriptTag(BAIDU_MAP_SDK_URL);
|
const { load } = useScriptTag(BAIDU_MAP_SDK_URL);
|
||||||
|
|
||||||
const domRef = ref<HTMLDivElement>();
|
const domRef = ref<HTMLDivElement>();
|
||||||
|
@ -7,6 +7,8 @@ import { ref, onMounted } from 'vue';
|
|||||||
import { useScriptTag } from '@vueuse/core';
|
import { useScriptTag } from '@vueuse/core';
|
||||||
import { GAODE_MAP_SDK_URL } from '@/config';
|
import { GAODE_MAP_SDK_URL } from '@/config';
|
||||||
|
|
||||||
|
defineOptions({ name: 'GaodeMap' });
|
||||||
|
|
||||||
const { load } = useScriptTag(GAODE_MAP_SDK_URL);
|
const { load } = useScriptTag(GAODE_MAP_SDK_URL);
|
||||||
|
|
||||||
const domRef = ref<HTMLDivElement>();
|
const domRef = ref<HTMLDivElement>();
|
||||||
|
@ -7,6 +7,8 @@ import { ref, onMounted } from 'vue';
|
|||||||
import { useScriptTag } from '@vueuse/core';
|
import { useScriptTag } from '@vueuse/core';
|
||||||
import { TENCENT_MAP_SDK_URL } from '@/config';
|
import { TENCENT_MAP_SDK_URL } from '@/config';
|
||||||
|
|
||||||
|
defineOptions({ name: 'TencentMap' });
|
||||||
|
|
||||||
const { load } = useScriptTag(TENCENT_MAP_SDK_URL);
|
const { load } = useScriptTag(TENCENT_MAP_SDK_URL);
|
||||||
|
|
||||||
const domRef = ref<HTMLDivElement | null>(null);
|
const domRef = ref<HTMLDivElement | null>(null);
|
||||||
|
@ -41,17 +41,17 @@ interface Props {
|
|||||||
module: EnumType.LoginModuleKey;
|
module: EnumType.LoginModuleKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const props = defineProps<Props>();
|
||||||
|
|
||||||
|
const theme = useThemeStore();
|
||||||
|
const { title } = useAppInfo();
|
||||||
|
|
||||||
interface LoginModule {
|
interface LoginModule {
|
||||||
key: EnumType.LoginModuleKey;
|
key: EnumType.LoginModuleKey;
|
||||||
label: EnumLoginModule;
|
label: EnumLoginModule;
|
||||||
component: Component;
|
component: Component;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
|
||||||
|
|
||||||
const theme = useThemeStore();
|
|
||||||
const { title } = useAppInfo();
|
|
||||||
|
|
||||||
const modules: LoginModule[] = [
|
const modules: LoginModule[] = [
|
||||||
{ key: 'pwd-login', label: EnumLoginModule['pwd-login'], component: PwdLogin },
|
{ key: 'pwd-login', label: EnumLoginModule['pwd-login'], component: PwdLogin },
|
||||||
{ key: 'code-login', label: EnumLoginModule['code-login'], component: CodeLogin },
|
{ key: 'code-login', label: EnumLoginModule['code-login'], component: CodeLogin },
|
||||||
|
Loading…
Reference in New Issue
Block a user