Skip to content

Commit 2fc4f6a

Browse files
author
CIN
authored
Merge pull request #530 from DaoCloud/release/1.0.5
release 1.0.5
2 parents e6a5c6f + 769af3c commit 2fc4f6a

File tree

18 files changed

+930
-763
lines changed

18 files changed

+930
-763
lines changed

changelogs/v1.0.5.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<a name="1.0.5"></a>
2+
# 1.0.5 (2018-07-27)
3+
4+
5+
## Bug Fixes
6+
7+
- **dao-editable-table:** 修复 editable-table 中 icon 及下拉框没对齐
8+
([5b9e410b](https://github.com/DaoCloud/dao-style-vue/commit/5b9e410b8a4405f05ee5ae26b5253512512d739f))
9+
- **dialog:**
10+
- shrink
11+
([faebf12f](https://github.com/DaoCloud/dao-style-vue/commit/faebf12f0c4cdcb2cabe644f873537330a138719))
12+
- update dialog doc and fix dialog demo
13+
([88ae385f](https://github.com/DaoCloud/dao-style-vue/commit/88ae385f2e9cb2cc96effbc643d325b0e78ac180))
14+
- **select:** 修复 select 在同时有 search 和 tab 时会有两个 scroll bar 的问题
15+
([bcb36de5](https://github.com/DaoCloud/dao-style-vue/commit/bcb36de510ff6fcf5c363c339b2cfc4df1ed17e6))
16+
- **setting-layout:** 修复 v-show 对 setting-layout 不起作用的问题
17+
([13a97ad7](https://github.com/DaoCloud/dao-style-vue/commit/13a97ad7e0d1fe45dcf714d2adeb137ca50cd17e))
18+
19+
20+
## Features
21+
22+
- **dialog:**
23+
- 默认距离顶部 100 px
24+
([88eccb67](https://github.com/DaoCloud/dao-style-vue/commit/88eccb67cf2763e459598d513432c0cda8cf3936))
25+
- 样式调整
26+
([5f1f5a0a](https://github.com/DaoCloud/dao-style-vue/commit/5f1f5a0ae612651e7ce92996f1d4eb05d1f6c4bc))
27+
- add title slot
28+
([02dc278d](https://github.com/DaoCloud/dao-style-vue/commit/02dc278dc3296144a2743d6df03abc37e508d1f6))
29+
- 调整参数默认为点击外部不关闭对话框
30+
([0544e6f9](https://github.com/DaoCloud/dao-style-vue/commit/0544e6f9f8251256d93c311497a76fe51f887339))
31+
- dialog header 支持 string 配置
32+
([6d4bd243](https://github.com/DaoCloud/dao-style-vue/commit/6d4bd243da8d204384d947dfdf3efed96333bde2))
33+
- **info-card-empty-state:** 增加info-card表格对空状态的支持
34+
([f3a6acf0](https://github.com/DaoCloud/dao-style-vue/commit/f3a6acf03a9fad732b1f24c13c648d2eead78735))
35+
36+
37+
## Docs
38+
39+
- **dialog:** default padding bottom
40+
([b85502f6](https://github.com/DaoCloud/dao-style-vue/commit/b85502f6d0c21b4c3c398a697c05a2e6f1160574))
41+

dist/dao-style.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/styles/dao-style.css

+692-697
Large diffs are not rendered by default.

docs/dao-dialog.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ dialog 是一个弹出框组件。代码请参照目录: [src/components/dao-dia
1111
参数名 | 类型 | 说明 | 默认值 | 是否必填
1212
-|-|-|-|-
1313
visible | Boolean | 控制 dao-dialog 是否显示的参数, 与父组件双向绑定 ( 需要加 sync 修饰符 ) | false | 是
14-
header | Object/Boolean | header 配置对象, 具体内容见 [header 对象](#header) (当传入 header slot 时,该配置将不会生效), 当任何时候都不需要 header 时可以传入 false| [header](#header) | 否
14+
header | Object/Boolean/String | header 配置对象, 具体内容见 [header 对象](#header) (当传入 header slot 时,该配置将不会生效), 当任何时候都不需要 header 时可以传入 false| [header](#header) | 否
1515
footer | Object | footer 配置对象, 具体内容见 [footer 对象](#footer) (当传入 footer slot 时,该配置将不会生效), 当任何时候都不需要 footer 时可以传入 false| [footer](#footer) | 否
1616
size | String/Object | 设置 dialog 的大小。 可选 `sm`, `md`, `lg`, 或者传入 { width: *, height: * } 具体指定 | 'md' | 否
1717
containerClass | String | dialog 的容器类名 | - | 否
1818
closeOnClickOutside | Boolean | 设置点击 dialog 外面( 遮罩层 ) 是否隐藏 dialog | true | 否
1919
closeOnPressEscape | Boolean | 设置按键 ESC 时是否隐藏 dialog | true | 否
2020
allowResize | Boolean | 是否可以拖拽调整大小 | false | 否
2121
lockScroll | Boolean | 对话框出现时是否将 body 锁定不滚动 | true | 否
22+
top | String | dao-dialog 的 margin-top | 100px | 否
23+
bottom | String | dao-dialog 的 margin-bottom | 20px | 否
24+
middle | Boolean | dao-dialog 垂直是否居中 | false | 否
25+
2226

2327
#### header 对象 <span id="header"></span>
2428

@@ -51,5 +55,6 @@ cancel | Dialog 点击 取消 时的触发 | -
5155
名称 | 说明
5256
-|-
5357
-- | dialog body 内容
54-
header | dialog header 的内容
58+
header | dialog header 的内容(同时配置的 title slot 将不会生效)
5559
footer | dialog footer 的内容
60+
title | dialog title 的内容

docs/dao-info-card.md

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ info-card 将以表格形式展示
3030
<div slot="title">
3131
TEXT
3232
</div>
33+
<div slot="empty">
34+
表格为空
35+
</div> // 支持当tableValue中的body为空时,展示空状态
3336
</dao-info-card>
3437
```
3538

examples/routers/dialog.vue

+53-9
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
<div class="config-section">锁定 body 滚动: <b>{{config.lockScroll}}</b></div>
1414
<div class="config-section">header: <b>{{config.header}}</b></div>
1515
<div class="config-section">footer: <b>{{config.footer}}</b></div>
16+
<div class="config-section">垂直居中: <b>{{config.middle}}</b></div>
17+
<div class="config-section">top: <b>{{config.top}}</b></div>
18+
<div class="config-section">bottom: <b>{{config.bottom}}</b></div>
1619
</div>
1720
<div slot="content">
18-
<button class="dao-btn blue" @click="config.visible = true">{{config.header.title}}</button>
21+
<button class="dao-btn blue" @click="config.visible = true">{{config.header.title || config.header}}</button>
1922
<dao-dialog
2023
:visible.sync="config.visible"
2124
@before-close="onBeforeClose"
@@ -24,8 +27,11 @@
2427
@opened="onOpened"
2528
@confirm="onConfirm"
2629
@cancel="onCancel"
30+
:middle="config.middle"
2731
:header="config.header"
2832
:footer="config.footer"
33+
:top="config.top"
34+
:bottom="config.bottom"
2935
:allowResize="config.allowResize"
3036
:containerClass="config.containerClass"
3137
:closeOnClickOutside="config.closeOnClickOutside"
@@ -145,9 +151,9 @@
145151
定制 header, 定制 footer
146152
</div>
147153
<div slot="content">
148-
<button class="dao-btn blue" @click="custom.visible = true">打开对话框</button>
154+
<button class="dao-btn blue" @click="customHeaderAndBody.visible = true">打开对话框</button>
149155
<dao-dialog
150-
:visible.sync="custom.visible"
156+
:visible.sync="customHeaderAndBody.visible"
151157
@before-close="onBeforeClose"
152158
@closed="onClosed"
153159
@before-open="onBeforeOpen"
@@ -177,6 +183,28 @@
177183
</dao-dialog>
178184
</div>
179185
</dao-setting-section>
186+
<dao-setting-section >
187+
<div slot="section-title">
188+
定制 header 的 title
189+
</div>
190+
<div slot="content">
191+
<button class="dao-btn blue" @click="customTitle.visible = true">打开对话框</button>
192+
<dao-dialog
193+
:visible.sync="customTitle.visible"
194+
@before-close="onBeforeClose"
195+
@closed="onClosed"
196+
@before-open="onBeforeOpen"
197+
@opened="onOpened"
198+
@confirm="onConfirm"
199+
@cancel="onCancel"
200+
:closeOnClickOutside="true">
201+
<div slot="title"><i>自定义 title</i></div>
202+
<div class="body">
203+
<h1>只是自定义了 title</h1>
204+
</div>
205+
</dao-dialog>
206+
</div>
207+
</dao-setting-section>
180208
</dao-setting-layout>
181209

182210
<!-- 定制化 -->
@@ -222,9 +250,7 @@
222250
configs: [
223251
{
224252
visible: false,
225-
header: {
226-
title: '最简单的默认版本',
227-
},
253+
header: '最简单的默认版本',
228254
},
229255
{
230256
visible: false,
@@ -271,9 +297,9 @@
271297
{
272298
visible: false,
273299
header: {
274-
title: '可以通过 ESC 关闭 Dialog',
300+
title: '不可以通过 ESC 关闭 Dialog',
275301
},
276-
closeOnPressEscape: true,
302+
closeOnPressEscape: false,
277303
},
278304
{
279305
visible: false,
@@ -282,6 +308,21 @@
282308
},
283309
lockScroll: false,
284310
},
311+
{
312+
visible: false,
313+
header: {
314+
title: '垂直居中',
315+
},
316+
middle: true,
317+
},
318+
{
319+
visible: false,
320+
header: {
321+
title: '修改 top 和 bottom',
322+
},
323+
top: '30px',
324+
bottom: '50px',
325+
},
285326
{
286327
visible: false,
287328
header: {
@@ -326,7 +367,10 @@
326367
// showFooter: true,
327368
},
328369
},
329-
custom: {
370+
customHeaderAndBody: {
371+
visible: false,
372+
},
373+
customTitle: {
330374
visible: false,
331375
},
332376
fatherDialog: {

examples/routers/info-card.vue

+27-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@
7878
</dao-dropdown>
7979
</div>
8080
</dao-info-card>
81+
<br>
82+
<dao-info-card size="lg" :tableValue="tablevalue5">
83+
<div slot="title">
84+
TEXT
85+
</div>
86+
<div slot="empty" class="empty-table-body">
87+
表格为空
88+
</div>
89+
</dao-info-card>
8190
</div>
8291
</template>
8392
<script>
@@ -190,15 +199,31 @@ export default {
190199
tnumber: 2000,
191200
}],
192201
},
202+
tablevalue5: {
203+
header: [
204+
'容器端口',
205+
'负载均衡端口',
206+
'协议',
207+
],
208+
body: [],
209+
}
193210
};
194211
},
195212
};
196213
</script>
197214

198-
<style>
215+
<style lang="scss">
216+
@import '../../src/components/dao-color.scss';
199217
.icon-more {
200218
width: 18px;
201219
height: 18px;
202-
fill: #9ba3af;
220+
fill: $grey-dark;
221+
}
222+
.empty-table-body {
223+
padding: 40px;
224+
text-align: center;
225+
color: $grey-dark;
226+
background-color: $white-lighter;
227+
border: 1px dashed $white-dark;
203228
}
204229
</style>

examples/routers/setting-layout.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
33
<button class="dao-btn blue" @click="show = !show">切换 Layout</button>
4-
<dao-setting-layout v-if="show">
4+
<dao-setting-layout v-if="show" class="test-class">
55
<template slot="layout-title">大标题</template>
66
<template slot="layout-title-helper">大标题一定要有,表单必有头</template>
77
<dao-setting-section>
@@ -66,13 +66,15 @@
6666
</template>
6767
<script>
6868
export default {
69-
data () {
69+
data() {
7070
return {
7171
show: true,
7272
};
7373
},
7474
};
7575
</script>
7676
<style lang="scss">
77-
77+
.test-class {
78+
color: red;
79+
}
7880
</style>

src/components/dao-dialog/dao-dialog-footer/dao-dialog-footer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div class="dao-dialog-footer">
33
<slot>
4-
<button class="dao-btn ghost" @click="onCancel">{{configure.cancelText}}</button>
5-
<button class="dao-btn blue" @click="onConfirm"
4+
<button class="dao-btn ghost" @click="onCancel">{{configure.cancelText}}</button><!--
5+
--><button class="dao-btn blue" @click="onConfirm"
66
:disabled="configure.confirmDisabled">{{configure.confirmText}}</button>
77
</slot>
88
</div>

src/components/dao-dialog/dao-dialog-header/dao-dialog-header.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="dao-dialog-header">
33
<slot>
4-
<span :class="{ 'center': !configure.showClose}"> {{configure.title}} </span>
4+
<span :class="{ 'center': !configure.showClose}"> <slot name="title">{{configure.title}}</slot> </span>
55
<div v-if="configure.showClose" class="dao-close" @click="onClose" >
66
<svg preserveAspectRatio="xMidYMid" width="34" height="34" viewBox="0 0 34 34">
77
<path d="M17.000,0.001 C7.612,0.001 0.001,7.612 0.001,17.000 C0.001,26.388 7.612,33.999 17.000,33.999 C26.388,33.999 33.999,26.388 33.999,17.000 C33.999,7.612 26.388,0.001 17.000,0.001 ZM24.166,21.666 C24.166,21.666 21.666,24.166 21.666,24.166 C21.666,24.166 17.000,19.500 17.000,19.500 C17.000,19.500 12.334,24.166 12.334,24.166 C12.334,24.166 9.834,21.666 9.834,21.666 C9.834,21.666 14.500,17.000 14.500,17.000 C14.500,17.000 9.834,12.335 9.834,12.335 C9.834,12.335 12.334,9.834 12.334,9.834 C12.334,9.834 17.000,14.500 17.000,14.500 C17.000,14.500 21.666,9.834 21.666,9.834 C21.666,9.834 24.166,12.335 24.166,12.335 C24.166,12.335 19.500,17.000 19.500,17.000 C19.500,17.000 24.166,21.666 24.166,21.666 Z" id="path-1" fill-rule="evenodd"/>

src/components/dao-dialog/dao-dialog.scss

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
@import '../dao-color.scss';
2-
$font-color: #3d444f;
3-
$dialog-overlay: rgba(31, 33, 38, .3);
4-
$dialog-header-bg-color: #f5f7fa;
5-
$dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,250) 100%);
6-
2+
$dialog-overlay: rgba(31, 33, 38, 0.2);
3+
$dialog-header-bg-color: #F5F7FA;
4+
$dialog-header-bg-img: linear-gradient(0deg, rgb(242, 244, 247) 0%, rgb(245, 247, 250) 100%);
5+
$dialog-border-color: #CCD1D9;
76
.dao-dialog {
87
&-backdrop {
98
position: fixed;
@@ -18,11 +17,13 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
1817
display: flex;
1918
align-items: center;
2019
flex-direction: column;
21-
justify-content: space-between;
20+
&.middle {
21+
justify-content: space-between;
22+
}
2223
}
23-
&-padding-block{
24+
&-padding-block {
2425
width: 100%;
25-
height: 20px;
26+
flex-shrink: 0;
2627
}
2728
&-container {
2829
max-height: 100vh;
@@ -33,7 +34,7 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
3334
width: 600px;
3435
border-radius: 4px;
3536
background-color: $white;
36-
box-shadow: 0 3px 30px 0 rgba(0, 0, 0, .2);
37+
box-shadow: 0 15px 35px 0 rgba(61, 68, 79, 0.10), 0 5px 15px 0 rgba(0, 0, 0, 0.10);
3738
overflow: hidden;
3839
position: relative;
3940
.resizer {
@@ -47,20 +48,20 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
4748
background: url($resizeSvg);
4849
}
4950
.dao-dialog {
50-
&-header{
51+
&-header {
5152
display: flex;
5253
flex: 0 0 auto;
5354
justify-content: space-between;
5455
padding: 10px 20px;
5556
background-color: $dialog-header-bg-color;
5657
background-image: $dialog-header-bg-img;
5758
border-radius: 4px 4px 0 0;
58-
box-shadow: inset 0 -1px 0 #e4e7ed;
59-
color: $font-color;
59+
box-shadow: inset 0 -1px 0 $dialog-border-color;
60+
color: $black-dark;
6061
font-size: 16px;
6162
font-weight: 400;
6263
line-height: 20px;
63-
.center{
64+
.center {
6465
flex: 1;
6566
text-align: center;
6667
padding: 0 30px;
@@ -79,10 +80,10 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
7980
}
8081
}
8182
}
82-
&-body{
83+
&-body {
8384
flex: 1 1 auto;
8485
background-color: white;
85-
color: $font-color;
86+
color: $black-dark;
8687
font-size: 14px;
8788
font-weight: 400;
8889
line-height: 21px;
@@ -92,11 +93,10 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
9293
flex: 0 0 auto;
9394
padding: 10px 20px;
9495
text-align: right;
95-
border-top: 1px solid $white-dark;
96+
border-top: 1px solid $dialog-border-color;
9697
background-color: $dialog-header-bg-color;
9798
background-image: $dialog-header-bg-img;
9899
border-radius: 0 0 4px 4px;
99-
box-shadow: inset 0 -1px 0 #e4e7ed;
100100
user-select: none;
101101
}
102102
}
@@ -121,4 +121,4 @@ $dialog-header-bg-img: linear-gradient(0deg, rgb(242,244,247) 0%, rgb(245,247,25
121121

122122
.dao-dialog-leave-active .dao-dialog-container {
123123
transform: translate(0, 0);
124-
}
124+
}

0 commit comments

Comments
 (0)