mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加组件名称,调整vue文件里面的类型声明位置
This commit is contained in:
@ -8,9 +8,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'DarkModeContainer' });
|
||||
|
||||
interface Props {
|
||||
inverted?: boolean;
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
inverted: false
|
||||
});
|
||||
|
@ -8,19 +8,21 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
defineOptions({ name: 'DarkModeSwitch' });
|
||||
|
||||
interface Props {
|
||||
/** 暗黑模式 */
|
||||
dark?: boolean;
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:dark', darkMode: boolean): void;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
dark: false
|
||||
});
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:dark', darkMode: boolean): void;
|
||||
}
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const darkMode = computed({
|
||||
|
@ -14,6 +14,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { routeName } from '@/router';
|
||||
|
||||
defineOptions({ name: 'ExceptionBase' });
|
||||
|
||||
type ExceptionType = '403' | '404' | '500';
|
||||
|
||||
interface Props {
|
||||
|
@ -18,6 +18,8 @@
|
||||
import { computed } from 'vue';
|
||||
import type { PopoverPlacement } from 'naive-ui';
|
||||
|
||||
defineOptions({ name: 'HoverContainer' });
|
||||
|
||||
interface Props {
|
||||
/** tooltip显示文本 */
|
||||
tooltipContent?: string;
|
||||
@ -28,6 +30,7 @@ interface Props {
|
||||
/** 反转模式下 */
|
||||
inverted?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
tooltipContent: '',
|
||||
placement: 'bottom',
|
||||
|
@ -15,6 +15,8 @@
|
||||
import { defineComponent, h } from 'vue';
|
||||
import { useLoadingBar, useDialog, useMessage, useNotification } from 'naive-ui';
|
||||
|
||||
defineOptions({ name: 'NaiveProvider' });
|
||||
|
||||
// 挂载naive组件的方法至window, 以便在路由钩子函数和请求函数里面调用
|
||||
function registerNaiveTools() {
|
||||
window.$loadingBar = useLoadingBar();
|
||||
@ -24,6 +26,7 @@ function registerNaiveTools() {
|
||||
}
|
||||
|
||||
const NaiveProviderContent = defineComponent({
|
||||
name: 'NaiveProviderContent',
|
||||
setup() {
|
||||
registerNaiveTools();
|
||||
},
|
||||
|
@ -4,6 +4,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
defineOptions({ name: 'SystemLogo' });
|
||||
|
||||
interface Props {
|
||||
/** logo是否填充 */
|
||||
fill?: boolean;
|
||||
|
Reference in New Issue
Block a user