feat: 升级fes-design到0.5.0

This commit is contained in:
wanchun 2022-05-16 15:47:41 +08:00
parent b511b12c7d
commit 2bcd10ccf9
9 changed files with 57 additions and 30 deletions

View File

@ -52,7 +52,7 @@
"@fesjs/plugin-layout": "^4.0.0",
"@fesjs/plugin-model": "^2.0.0",
"@fesjs/plugin-enums": "^2.0.0",
"@fesjs/fes-design": "^0.4.0",
"@fesjs/fes-design": "^0.5.0",
"@fesjs/builder-webpack": "^1.0.0",
"vue": "^3.2.6",
"core-js": "^3.8.3"

View File

@ -31,7 +31,7 @@
},
"peerDependencies": {
"@fesjs/fes": "^2.0.0",
"@fesjs/fes-design": "^0.4.0",
"@fesjs/fes-design": "^0.5.0",
"vue": "^3.0.5",
"vue-router": "^4.0.1"
},

View File

@ -9,19 +9,10 @@
@close="handleCloseTab"
@update:modelValue="switchPage"
>
<FTabPane
v-for="page in pageList"
:key="page.path"
:value="page.path"
:closable="route.path !== page.path"
>
<FTabPane v-for="page in pageList" :key="page.path" :value="page.path" :closable="route.path !== page.path">
<template #tab>
{{ page.title }}
<ReloadOutlined
v-show="route.path === page.path"
class="layout-tabs-close-icon"
@click="reloadPage(page.path)"
/>
<ReloadOutlined v-show="route.path === page.path" class="layout-tabs-close-icon" @click="reloadPage(page.path)" />
</template>
</FTabPane>
<template #suffix>
@ -57,10 +48,10 @@ export default {
FTabPane,
FDropdown,
ReloadOutlined,
MoreOutlined
MoreOutlined,
},
props: {
multiTabs: Boolean
multiTabs: Boolean,
},
setup() {
const createPage = (_route) => {
@ -70,7 +61,7 @@ export default {
route: _route,
name: _route.meta.name,
title: computed(() => transTitle(title)),
key: getKey()
key: getKey(),
};
};
@ -80,15 +71,15 @@ export default {
const actions = [
{
value: 'closeOtherPage',
label: '关闭其他'
label: '关闭其他',
},
{
value: 'reloadPage',
label: '刷新当前页'
}
label: '刷新当前页',
},
];
const findPage = path => pageList.value.find(item => unref(item.path) === unref(path));
const findPage = (path) => pageList.value.find((item) => unref(item.path) === unref(path));
router.beforeEach((to) => {
if (!findPage(to.path)) {
@ -103,7 +94,7 @@ export default {
router.push({
path,
query: selectedPage.route.query,
params: selectedPage.route.params
params: selectedPage.route.params,
});
}
};
@ -168,9 +159,9 @@ export default {
handleCloseTab,
actions,
getComponent,
keepAlivePages
keepAlivePages,
};
}
},
};
</script>
<style lang="less">

View File

@ -32,7 +32,7 @@
},
"peerDependencies": {
"@fesjs/fes": "^2.0.0",
"@fesjs/fes-design": "^0.4.0",
"@fesjs/fes-design": "^0.5.0",
"vue": "^3.0.5"
},
"typings": "./types.d.ts"

View File

@ -46,7 +46,7 @@
"@fesjs/fes": "^2.0.0",
"@fesjs/builder-webpack": "^1.0.0",
"vue": "^3.0.5",
"@fesjs/fes-design": "^0.4.0"
"@fesjs/fes-design": "^0.5.0"
},
"private": true
}

View File

@ -45,7 +45,7 @@
"dependencies": {
"@fesjs/fes": "^2.0.0",
"vue": "^3.0.5",
"@fesjs/fes-design": "^0.4.0"
"@fesjs/fes-design": "^0.5.0"
},
"private": true
}

View File

@ -40,7 +40,7 @@
},
"peerDependencies": {
"@fesjs/fes": "^2.0.0",
"@fesjs/fes-design": "^0.4.0",
"@fesjs/fes-design": "^0.5.0",
"vue": "^3.0.5"
},
"typings": "./types.d.ts"

View File

@ -58,7 +58,7 @@
"@fesjs/plugin-windicss": "^2.0.0",
"@fesjs/plugin-pinia": "^2.0.0",
"@fesjs/plugin-watermark": "^2.0.0",
"@fesjs/fes-design": "^0.4.0",
"@fesjs/fes-design": "^0.5.0",
"vue": "^3.0.5",
"vuex": "^4.0.0",
"pinia": "^2.0.11"

View File

@ -1496,6 +1496,37 @@
normalize-wheel "^1.0.1"
stickybits "^3.7.9"
"@fesjs/fes-design@^0.5.0":
version "0.5.1"
resolved "https://registry.npmmirror.com/@fesjs/fes-design/-/fes-design-0.5.1.tgz#63ee227f39cf587da056c3cd702705c5fd50af7f"
integrity sha512-tk3DXGLhpO3gTpYbwqa+FuSmFzOxPFrrp1jVYYDPuvUevTY246Zo7Mulpzy5A7h0Z0bAYBemMshvIroNzIoHAw==
dependencies:
"@babel/runtime" "^7.16.3"
"@floating-ui/dom" "^0.4.2"
"@juggle/resize-observer" "^3.3.1"
"@types/lodash-es" "^4.17.5"
"@types/normalize-wheel" "^1.0.0"
"@vue/shared" "^3.2.19"
"@vueuse/core" "^6.7.5"
async-validator "^4.0.1"
csstype "^3.0.10"
date-fns "^2.28.0"
lodash-es "^4.17.21"
normalize-wheel "^1.0.1"
stickybits "^3.7.9"
"@floating-ui/core@^0.6.2":
version "0.6.2"
resolved "https://registry.npmmirror.com/@floating-ui/core/-/core-0.6.2.tgz#f2813f0e5f3d5ed7af5029e1a082203dadf02b7d"
integrity sha512-jktYRmZwmau63adUG3GKOAVCofBXkk55S/zQ94XOorAHhwqFIOFAy1rSp2N0Wp6/tGbe9V3u/ExlGZypyY17rg==
"@floating-ui/dom@^0.4.2":
version "0.4.5"
resolved "https://registry.npmmirror.com/@floating-ui/dom/-/dom-0.4.5.tgz#2e88d16646119cc67d44683f75ee99840475bbfa"
integrity sha512-b+prvQgJt8pieaKYMSJBXHxX/DYwdLsAWxKYqnO5dO2V4oo/TYBZJAUQCVNjTWWsrs6o4VDrNcP9+E70HAhJdw==
dependencies:
"@floating-ui/core" "^0.6.2"
"@hapi/hoek@^9.0.0":
version "9.2.1"
resolved "https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.2.1.tgz#9551142a1980503752536b5050fd99f4a7f13b17"
@ -4433,6 +4464,11 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"
date-fns@^2.28.0:
version "2.28.0"
resolved "https://registry.npmmirror.com/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2"
integrity sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==
dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.npmmirror.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
@ -8854,7 +8890,7 @@ q@^1.5.1:
resolved "https://registry.npmmirror.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==
qiankun@^2.4.4:
qiankun@^2.7.0:
version "2.7.0"
resolved "https://registry.npmmirror.com/qiankun/-/qiankun-2.7.0.tgz#2054e1be05ddfbf1eb7658125075bc9f04afd37e"
integrity sha512-MvsRNsu/2dql9un6qWRz/uNsyrFKa2b21Yxpb6UQpNu1pAl16xFozLDufBqiv/RbaGLI+f37VMwofi8n6WpP3w==