-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added settingButtonPosition configuration close #275
- Loading branch information
Showing
25 changed files
with
168 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import windiCSS from 'vite-plugin-windicss'; | ||
|
||
import type { Plugin } from 'vite'; | ||
|
||
export function configWindiCssPlugin(): Plugin[] { | ||
return windiCSS({ | ||
safelist: 'shadow shadow-xl', | ||
preflight: { | ||
enableAll: true, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,80 @@ | ||
<template> | ||
<LayoutLockPage /> | ||
<BackTop v-if="getUseOpenBackTop" :target="getTarget" /> | ||
</template> | ||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | ||
import { defineComponent, computed, unref } from 'vue'; | ||
import { BackTop } from 'ant-design-vue'; | ||
import { useRootSetting } from '/@/hooks/setting/useRootSetting'; | ||
import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting'; | ||
import { useDesign } from '/@/hooks/web/useDesign'; | ||
import { SettingButtonPositionEnum } from '/@/enums/appEnum'; | ||
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | ||
export default defineComponent({ | ||
name: 'LayoutFeatures', | ||
components: { | ||
BackTop, | ||
LayoutLockPage: createAsyncComponent(() => import('/@/views/sys/lock/index.vue')), | ||
SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue')), | ||
}, | ||
setup() { | ||
const { getUseOpenBackTop } = useRootSetting(); | ||
const { | ||
getUseOpenBackTop, | ||
getShowSettingButton, | ||
getSettingButtonPosition, | ||
getFullContent, | ||
} = useRootSetting(); | ||
const { prefixCls } = useDesign('setting-drawer-fearure'); | ||
const { getShowHeader } = useHeaderSetting(); | ||
const getIsFixedSettingDrawer = computed(() => { | ||
if (!unref(getShowSettingButton)) { | ||
return false; | ||
} | ||
const settingButtonPosition = unref(getSettingButtonPosition); | ||
if (settingButtonPosition === SettingButtonPositionEnum.AUTO) { | ||
return !unref(getShowHeader) || unref(getFullContent); | ||
} | ||
return settingButtonPosition === SettingButtonPositionEnum.FIXED; | ||
}); | ||
return { | ||
getTarget: () => document.body, | ||
getUseOpenBackTop, | ||
getIsFixedSettingDrawer, | ||
prefixCls, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<LayoutLockPage /> | ||
<BackTop v-if="getUseOpenBackTop" :target="getTarget" /> | ||
<SettingDrawer v-if="getIsFixedSettingDrawer" :class="prefixCls" /> | ||
</template> | ||
|
||
<style lang="less"> | ||
@prefix-cls: ~'@{namespace}-setting-drawer-fearure'; | ||
.@{prefix-cls} { | ||
position: absolute; | ||
top: 45%; | ||
right: 0; | ||
z-index: 10; | ||
display: flex; | ||
padding: 10px; | ||
color: @white; | ||
cursor: pointer; | ||
background: @primary-color; | ||
border-radius: 6px 0 0 6px; | ||
justify-content: center; | ||
align-items: center; | ||
svg { | ||
width: 1em; | ||
height: 1em; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
loginOutTip: 'Reminder', | ||
loginOutMessage: 'Confirm to exit the system?', | ||
logoutTip: 'Reminder', | ||
logoutMessage: 'Confirm to exit the system?', | ||
menuLoading: 'Menu loading...', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
loginOutTip: '温馨提醒', | ||
loginOutMessage: '是否确认退出系统?', | ||
logoutTip: '温馨提醒', | ||
logoutMessage: '是否确认退出系统?', | ||
menuLoading: '菜单加载中...', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.