Skip to content

Commit 7609048

Browse files
committed
fix: update pro-layout.
- add SettingDrawer default slot render.
1 parent 72c60ec commit 7609048

File tree

4 files changed

+78
-7
lines changed

4 files changed

+78
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"lint:nofix": "vue-cli-service lint --no-fix"
1212
},
1313
"dependencies": {
14-
"@ant-design-vue/pro-layout": "^1.0.1",
14+
"@ant-design-vue/pro-layout": "^1.0.7",
1515
"@antv/data-set": "^0.10.2",
16-
"ant-design-vue": "^1.6.2",
16+
"ant-design-vue": "^1.7.2",
1717
"axios": "^0.19.0",
1818
"core-js": "^3.1.2",
1919
"enquire.js": "^2.1.6",

src/core/lazy_use.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
Result,
4444
Statistic,
4545
Descriptions,
46+
Space,
4647
message,
4748
notification
4849
} from 'ant-design-vue'
@@ -97,6 +98,7 @@ Vue.use(PageHeader)
9798
Vue.use(Result)
9899
Vue.use(Statistic)
99100
Vue.use(Descriptions)
101+
Vue.use(Space)
100102

101103
Vue.prototype.$confirm = Modal.confirm
102104
Vue.prototype.$message = message

src/layouts/BasicLayout.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,26 @@
2525
<h1>{{ title }}</h1>
2626
</div>
2727
</template>
28+
<!-- 1.0.0+ 版本 pro-layout 提供 API,
29+
增加 Header 左侧内容区自定义
30+
-->
31+
<template v-slot:headerContentRender>
32+
<div>
33+
<a-tooltip title="刷新页面">
34+
<a-icon type="reload" style="font-size: 18px;cursor: pointer;" @click="() => { $message.info('只是一个DEMO') }" />
35+
</a-tooltip>
36+
</div>
37+
</template>
2838

29-
<setting-drawer :settings="settings" @change="handleSettingChange" />
39+
<setting-drawer :settings="settings" @change="handleSettingChange">
40+
<div style="margin: 12px 0;">
41+
This is SettingDrawer custom footer content.
42+
</div>
43+
</setting-drawer>
3044
<template v-slot:rightContentRender>
3145
<right-content :top-menu="settings.layout === 'topmenu'" :is-mobile="isMobile" :theme="settings.theme" />
3246
</template>
47+
<!-- custom footer / 自定义Footer -->
3348
<template v-slot:footerRender>
3449
<global-footer />
3550
</template>

yarn.lock

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# yarn lockfile v1
33

44

5-
"@ant-design-vue/pro-layout@^1.0.1":
6-
version "1.0.6"
7-
resolved "https://registry.yarnpkg.com/@ant-design-vue/pro-layout/-/pro-layout-1.0.6.tgz#ec76632674d7615f7ef7f03a9c19d9172ed14e06"
8-
integrity sha512-8Nkls7o33sH328kHJ1+M7nNpTYUCPJZ7rh1/s7Xw1eDXtC0hc/93wbju+0N7Ok3LrkH/cyYRx/jvDZUXwmF8Dg==
5+
"@ant-design-vue/pro-layout@^1.0.7":
6+
version "1.0.7"
7+
resolved "https://registry.npm.taobao.org/@ant-design-vue/pro-layout/download/@ant-design-vue/pro-layout-1.0.7.tgz#9cf676cab47db6d8183908b1abd4e373ecd7c521"
8+
integrity sha1-nPZ2yrR9ttgYOQixq9Tjc+zXxSE=
99
dependencies:
1010
ant-design-vue "^1.6.2"
1111
classnames "^2.2.6"
@@ -1158,6 +1158,14 @@
11581158
resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
11591159
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=
11601160

1161+
"@simonwep/pickr@~1.7.0":
1162+
version "1.7.4"
1163+
resolved "https://registry.npm.taobao.org/@simonwep/pickr/download/@simonwep/pickr-1.7.4.tgz#b14fcd945890388b870cd6db4d6c78d531f25141"
1164+
integrity sha1-sU/NlFiQOIuHDNbbTWx41THyUUE=
1165+
dependencies:
1166+
core-js "^3.6.5"
1167+
nanopop "^2.1.0"
1168+
11611169
"@soda/friendly-errors-webpack-plugin@^1.7.1":
11621170
version "1.7.1"
11631171
resolved "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz#706f64bcb4a8b9642b48ae3ace444c70334d615d"
@@ -2016,6 +2024,42 @@ ant-design-vue@^1.6.2:
20162024
vue-ref "^2.0.0"
20172025
warning "^4.0.0"
20182026

2027+
ant-design-vue@^1.7.2:
2028+
version "1.7.2"
2029+
resolved "https://registry.npm.taobao.org/ant-design-vue/download/ant-design-vue-1.7.2.tgz?cache=0&sync_timestamp=1607153147064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fant-design-vue%2Fdownload%2Fant-design-vue-1.7.2.tgz#aac7ff802205711631c8698e2a0c7b4e61dfd73e"
2030+
integrity sha1-qsf/gCIFcRYxyGmOKgx7TmHf1z4=
2031+
dependencies:
2032+
"@ant-design/icons" "^2.1.1"
2033+
"@ant-design/icons-vue" "^2.0.0"
2034+
"@simonwep/pickr" "~1.7.0"
2035+
add-dom-event-listener "^1.0.2"
2036+
array-tree-filter "^2.1.0"
2037+
async-validator "^3.0.3"
2038+
babel-helper-vue-jsx-merge-props "^2.0.3"
2039+
babel-runtime "6.x"
2040+
classnames "^2.2.5"
2041+
component-classes "^1.2.6"
2042+
dom-align "^1.10.4"
2043+
dom-closest "^0.2.0"
2044+
dom-scroll-into-view "^2.0.0"
2045+
enquire.js "^2.1.6"
2046+
intersperse "^1.0.0"
2047+
is-mobile "^2.2.1"
2048+
is-negative-zero "^2.0.0"
2049+
ismobilejs "^1.0.0"
2050+
json2mq "^0.2.0"
2051+
lodash "^4.17.5"
2052+
moment "^2.21.0"
2053+
mutationobserver-shim "^0.3.2"
2054+
node-emoji "^1.10.0"
2055+
omit.js "^1.0.0"
2056+
raf "^3.4.0"
2057+
resize-observer-polyfill "^1.5.1"
2058+
shallow-equal "^1.0.0"
2059+
shallowequal "^1.0.2"
2060+
vue-ref "^2.0.0"
2061+
warning "^4.0.0"
2062+
20192063
any-promise@^1.0.0:
20202064
version "1.3.0"
20212065
resolved "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
@@ -3369,6 +3413,11 @@ core-js@^3.1.2, core-js@^3.6.4:
33693413
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
33703414
integrity sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo=
33713415

3416+
core-js@^3.6.5:
3417+
version "3.8.1"
3418+
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.8.1.tgz?cache=0&sync_timestamp=1607215907966&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.1.tgz#f51523668ac8a294d1285c3b9db44025fda66d47"
3419+
integrity sha1-9RUjZorIopTRKFw7nbRAJf2mbUc=
3420+
33723421
[email protected], core-util-is@~1.0.0:
33733422
version "1.0.2"
33743423
resolved "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -7534,6 +7583,11 @@ nanomatch@^1.2.9:
75347583
snapdragon "^0.8.1"
75357584
to-regex "^3.0.1"
75367585

7586+
nanopop@^2.1.0:
7587+
version "2.1.0"
7588+
resolved "https://registry.npm.taobao.org/nanopop/download/nanopop-2.1.0.tgz#23476513cee2405888afd2e8a4b54066b70b9e60"
7589+
integrity sha1-I0dlE87iQFiIr9LopLVAZrcLnmA=
7590+
75377591
natural-compare@^1.4.0:
75387592
version "1.4.0"
75397593
resolved "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"

0 commit comments

Comments
 (0)