Skip to content

Commit

Permalink
fix(pro-layout): sider z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Apr 18, 2022
1 parent 71a1f94 commit be6a8a2
Show file tree
Hide file tree
Showing 8 changed files with 582 additions and 1,087 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@
"tangjinzhou <[email protected]>"
],
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.0",
"@rushstack/eslint-patch": "^1.1.3",
"@types/jsdom": "^16.2.14",
"@types/node": "^16.11.24",
"@vitejs/plugin-vue": "^2.2.0",
"@vitejs/plugin-vue-jsx": "^1.3.7",
"@types/node": "^16.11.27",
"@vitejs/plugin-vue": "^2.3.1",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/test-utils": "^2.0.0-rc.18",
"@vue/test-utils": "^2.0.0-rc.20",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.9.0",
"eslint-plugin-vue": "^8.4.1",
"eslint": "^8.13.0",
"eslint-plugin-vue": "^8.6.0",
"jsdom": "^19.0.0",
"prettier": "^2.5.1",
"prettier": "^2.6.2",
"typescript": "~4.5.5",
"vite": "^2.8.6",
"vitest": "^0.5.8",
"vue-tsc": "^0.31.4"
"vite": "^2.9.5",
"vitest": "^0.5.9",
"vue-tsc": "^0.34.7"
},
"lint-staged": {
"*.{js,ts,vue,json}": [
Expand Down
9 changes: 4 additions & 5 deletions packages/pro-layout/examples/App.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<script setup lang="ts">
import { RouterView } from 'vue-router';
import { ConfigProvider as AConfigProvider } from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue';
const getPopupContainer = (triggerNode: HTMLElement): HTMLElement => {
const getPopupContainer = (triggerNode?: HTMLElement): HTMLElement => {
// if (dialogContext) {
// return dialogContext.getDialogWrap()
// }
console.log('getPopupContainer', triggerNode);
return document.body;
};
</script>

<template>
<a-config-provider :get-popup-container="getPopupContainer">
<ConfigProvider :get-popup-container="getPopupContainer">
<RouterView />
</a-config-provider>
</ConfigProvider>
</template>

<style>
Expand Down
11 changes: 5 additions & 6 deletions packages/pro-layout/examples/layouts/BasicLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
v-bind="state"
:loading="loading"
:breadcrumb="{ routes: breadcrumb }"
disable-content-margin
style="height: 100vh"
style="min-height: 100vh"
iconfont-url="//at.alicdn.com/t/font_2804900_nzigh7z84gc.js"
>
<template #menuHeaderRender>
Expand Down Expand Up @@ -110,12 +109,12 @@ export default defineComponent({
const state = reactive({
menuData,
splitMenus: true,
splitMenus: false,
// title: 'ProLayout',
// logo: 'https://alicdn.antdv.com/v2/assets/logo.1ef800a8.svg',
navTheme: 'dark',
layout: 'side',
fixSiderbar: true,
navTheme: 'light',
layout: 'top',
fixSiderbar: false,
fixedHeader: true,
});
const breadcrumb = computed(() =>
Expand Down
5 changes: 5 additions & 0 deletions packages/pro-layout/examples/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import App from './App.vue';
import router from './router';
import icons from './icons';

// functional
import 'ant-design-vue/es/result/style';
import 'ant-design-vue/es/button/style';
import 'ant-design-vue/es/message/style';

const app = createApp(App);

app.use(router);
Expand Down
3 changes: 0 additions & 3 deletions packages/pro-layout/examples/views/Hello.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

<script lang="ts" setup>
import { Result as AResult, Button as AButton, message } from 'ant-design-vue';
import 'ant-design-vue/es/result/style';
import 'ant-design-vue/es/button/style';
import 'ant-design-vue/es/message/style';
const handleClick = () => {
console.log('info');
Expand Down
32 changes: 16 additions & 16 deletions packages/pro-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@
"./dist/style.less": "./dist/style.less"
},
"dependencies": {
"@ant-design/icons-vue": "^6.0.1",
"ant-design-vue": "^3.1.0",
"@ant-design/icons-vue": "^6.1.0",
"ant-design-vue": "^3.1.1",
"omit.js": "^2.0.2",
"vue": "^3.2.31",
"vue-router": "^4.0.12"
"vue": "^3.2.33",
"vue-router": "^4.0.14"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.0",
"@rushstack/eslint-patch": "^1.1.0",
"@rollup/plugin-typescript": "^8.3.2",
"@rushstack/eslint-patch": "^1.1.3",
"@shared/vite-plugin-less-copy": "workspace:^0.0.0",
"@types/jsdom": "^16.2.14",
"@types/node": "^16.11.26",
"@vitejs/plugin-vue": "^2.2.2",
"@vitejs/plugin-vue-jsx": "^1.3.8",
"@types/node": "^16.11.27",
"@vitejs/plugin-vue": "^2.3.1",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/test-utils": "^2.0.0-rc.18",
"@vue/test-utils": "^2.0.0-rc.20",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.5.0",
"eslint": "^8.13.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.2.0",
"eslint-plugin-vue": "^8.6.0",
"jsdom": "^19.0.0",
"less": "^4.1.2",
"prettier": "^2.5.1",
"prettier": "^2.6.2",
"typescript": "~4.5.5",
"vite": "^2.8.6",
"vitest": "^0.5.0",
"vue-tsc": "^0.31.4"
"vite": "^2.9.5",
"vitest": "^0.5.9",
"vue-tsc": "^0.34.7"
},
"contributors": [
"tangjinzhou <[email protected]>",
Expand Down
2 changes: 2 additions & 0 deletions packages/pro-layout/src/components/SiderMenu/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
position: relative;
background-color: @layout-sider-background;
border-right: 0;
// FIXME: 临时修正(可能不会做兼容)
z-index: 20;

// 这里关掉了动画,不然使用无法兼容
.@{ant-prefix}-menu {
Expand Down
Loading

0 comments on commit be6a8a2

Please sign in to comment.