Skip to content

Commit

Permalink
Merge pull request #36 from eyunhua/master
Browse files Browse the repository at this point in the history
v0.7.0-dev
  • Loading branch information
eyunhua authored Apr 10, 2018
2 parents b493731 + f0b220a commit 5854789
Show file tree
Hide file tree
Showing 80 changed files with 1,183 additions and 344 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 0.7.0-dev

### 💡 主要变更

* [^] 更新veui demo版本到v1.0.0-alpha.11。

### 🐞 问题修复

* [^] 修改 `Button` 组件small样式的字体大小(#35
* [^] 修改 `Alert` 组件高度及关闭按钮距离右侧大小
* [^] 修改 `Calendar` 组件年份和月份边框被遮住1px问题
* [^] 修改 `Checkbox` 组件按钮和文字之间的距离
* [^] 修改 `Dropdown` 组件ui=link disabled状态样式
* [^] 修改 `Input` Demo以及focus状态样式
* [^] 修改 `Pagnination` 组件下拉选择一页展示数样式
* [^] 修改 `Radio` 组件按钮与文字的距离
* [^] 修改 `Searchbox` 组件样式不清楚的问题
* [^] 修改 `Textarea` 组件的最小高度
* [^] 修改 `Switch` 组件小开关的大小

## 0.6.0-dev

### 💡 主要变更
Expand Down
8 changes: 4 additions & 4 deletions demo/components/Alert.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<article>
<h1><code>&lt;veui-alert&gt;</code></h1>
<p>
<section>
<div>固定提示</div>
<veui-alert type="success" message="恭喜你,你的请求已成功处理" @update:open="close"></veui-alert>
<veui-alert class="limit-width" type="success" message="恭喜你,你的请求已成功处理" @update:open="close"></veui-alert>
Expand All @@ -19,7 +19,7 @@
您关闭了
<template slot="foot"></template>
</veui-dialog>
</p>
</section>
</article>
</template>

Expand Down Expand Up @@ -64,7 +64,7 @@ export default {
</script>

<style scoped>
p {
section {
margin: 30px;
}
Expand All @@ -73,6 +73,6 @@ p {
}
.veui-alert.limit-width {
width: 350px;
width: 340px;
}
</style>
6 changes: 0 additions & 6 deletions demo/components/AlertBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@ export default {
}
}
</script>

<style lang="less">
.alert-box-demo {
}
</style>
31 changes: 19 additions & 12 deletions demo/components/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,42 @@
<h1><code>&lt;veui-breadcrumb&gt;</code></h1>
<p>
<veui-breadcrumb :routes="items" @redirect="handleRedirect">
<template slot-scope="scope"><em>{{ scope.route.text }}</em></template>
<template slot-scope="route"><em>{{ route.label }}</em></template>
<template slot="separator" slot-scope="scope">/</template>
</veui-breadcrumb>
</p>
<p>
<veui-breadcrumb :routes="items" @redirect="handleRedirect"></veui-breadcrumb>
<veui-breadcrumb :routes="items" @redirect="handleRedirect"/>
</p>
<p>
<veui-breadcrumb>
<veui-breadcrumb-item to="/">首页</veui-breadcrumb-item>
<veui-breadcrumb-item to="/breadcrumb">面包屑</veui-breadcrumb-item>
<veui-breadcrumb-item type="text">我在这里</veui-breadcrumb-item>
</veui-breadcrumb>
</p>
</article>
</template>

<script>
import { Breadcrumb, Icon } from 'veui'
import { Breadcrumb, BreadcrumbItem, Icon } from 'veui'
export default {
name: 'breadcrumb-demo',
components: {
'veui-breadcrumb': Breadcrumb,
'veui-breadcrumb-item': BreadcrumbItem,
'veui-icon': Icon
},
data () {
return {
items: [
{ to: 'http://www.baidu.com', text: 'baidu', native: true },
{ to: '/steps', text: '步骤条组件' },
{ text: '监听跳转事件', native: true },
{ to: 'http://www.baidu.com', text: '阻止跳转事件', native: true },
{ to: 'http://www.baidu.com', text: 'replace', replace: true, native: true },
{ to: '/dialog', text: 'Dialog' },
{ to: 'http://jn.baidu.com', text: 'jn' }
{ to: 'http://www.baidu.com', label: 'baidu', native: true },
{ to: '/steps', label: '步骤条组件' },
{ label: '监听跳转事件', native: true },
{ to: 'http://www.baidu.com', label: '阻止跳转事件', native: true },
{ to: 'http://www.baidu.com', label: 'replace', replace: true, native: true },
{ to: '/dialog', label: 'Dialog' },
{ to: 'http://jn.baidu.com', label: 'jn' }
]
}
},
Expand All @@ -46,4 +53,4 @@ export default {
}
}
}
</script>
</script>
124 changes: 124 additions & 0 deletions demo/components/Console.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<template>
<aside :class="{
expanded, 'veui-console': true
}">
<h2 @click="expanded = !expanded">
<icon @click.native.stop="logs = []" name="ban" label="Clear console" flip="horizontal"></icon>
<icon :name="expanded ? 'angle-down' : 'angle-up'" label="Toggle console"></icon>
Console <small>({{logs.length}})</small>
</h2>
<section class="output" ref="logList">
<pre class="log" v-for="(log, index) in logs" :key="`log-${index}`"><template v-if="log != null"><div v-if="(log instanceof String)">{{ log }}</div><div class="line" v-else v-for="(line, index) in log" v-html="format(line)" :key="`line-${index}`"></div></template><template v-else v-html="format(log)"></template></pre>
</section>
</aside>
</template>

<script>
import bus from './bus'
import Icon from 'veui/components/Icon'
import 'vue-awesome/icons/ban'
import 'veui-theme-one/icons/angle-up'
import 'veui-theme-one/icons/angle-down'
export default {
components: {
Icon
},
data () {
return {
expanded: false,
logs: []
}
},
methods: {
log (...messages) {
console.log(...messages)
this.logs.push(messages)
let el = this.$refs.logList
this.$nextTick(() => {
el.scrollTop = el.scrollHeight
})
},
format (text) {
if (text != null) {
return text
}
return `<span style="color: #ccc">${text === '' ? 'empty' : String(text)}</span>`
}
},
watch: {
expanded (value) {
document.body.classList.toggle('console-expanded', value)
}
},
mounted () {
bus.$on('log', (...messages) => this.log(...messages))
}
}
</script>

<style lang="less">
@import "~less-plugin-est/src/all.less";
@nav-width: 240px;
@light-bg-color: #f6f9ff;
@title-height: 30px;
@console-height: 40vh;
.veui-console {
position: fixed;
right: 0;
bottom: 0;
left: @nav-width;
background-color: #fff;
h2 {
.centered-line(@title-height);
margin: 0;
padding: 0 1em;
background-color: @light-bg-color;
font-size: 12px;
font-weight: 600;
color: #666;
cursor: pointer;
& > * {
margin-right: 5px;
}
.veui-icon {
vertical-align: middle;
}
small {
margin-left: 3px;
}
}
.output {
overflow: hidden;
height: 0;
margin: 0;
line-height: 20px;
font-size: 10px;
transition: height .2s;
.log {
position: relative;
min-height: 20px;
margin: 0;
padding: 0 1em;
border-bottom: 1px solid #f3f3f3;
.line:not(:last-child) {
border-bottom: 1px solid #f3f3f3;
}
&:last-child::before {
content: "";
.absolute(0, _, 0, 0);
width: 2px;
background-color: #369;
}
}
}
small {
color: #999;
}
&.expanded {
.output {
overflow: auto;
height: @console-height;
}
}
}
</style>
4 changes: 3 additions & 1 deletion demo/components/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</section>
<section>
<h2>可清除选择</h2>
<p><veui-date-picker v-model="selected1" clearable></veui-date-picker></p>
<p><veui-date-picker v-model="selected1" ui="micro" clearable></veui-date-picker></p>
</section>
<section>
<h2>范围选择</h2>
Expand All @@ -22,6 +22,8 @@
<section>
<h2>可清除范围选择</h2>
<p><veui-date-picker v-model="selected2" range clearable :panel="3"></veui-date-picker></p>
<p><veui-date-picker v-model="selected2" ui="large" range clearable :panel="3"></veui-date-picker></p>
<p><veui-date-picker v-model="selected2" ui="small" range clearable :panel="3"></veui-date-picker></p>
</section>
<section>
<h2>范围禁用</h2>
Expand Down
19 changes: 14 additions & 5 deletions demo/components/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
</veui-fieldset>
<veui-fieldset label="预期收入:">
<veui-field field="salary" name="salary">
<veui-slider v-model="storeData4.salary" :min="1" :max="10" :step="0.5"></veui-slider>
<veui-slider v-model="storeData2.salary" :min="1" :max="10" :step="0.5"></veui-slider>
</veui-field>
<veui-span>{{storeData4.salary[0].toFixed(1)}}~{{storeData4.salary[1].toFixed(1)}}万</veui-span>
<veui-span>{{storeData2.salary[0].toFixed(1)}}~{{storeData2.salary[1].toFixed(1)}}万</veui-span>
</veui-fieldset>
</veui-form>
</section>
Expand Down Expand Up @@ -299,6 +299,13 @@
<veui-span>万</veui-span>
</veui-fieldset>

<veui-field label="收入下限:" field="floor" name="floor" :rules="[
{name: 'required', value: true},
{name: 'min', value: 3500, message: '最低收入不小于 3500'}
]">
<veui-number-input v-model="storeData4.floor"></veui-number-input>
</veui-field>

<veui-field field="protocol" name="protocol" :rules="protocolRequiredRule" label="协议:">
<veui-checkbox falseValue="" v-model="storeData4.protocol">我已阅读并同意工作协议</veui-checkbox>
</veui-field>
Expand Down Expand Up @@ -353,7 +360,7 @@ import {
Form, Fieldset, Field, Label, Span, Input,
Button, DatePicker, Uploader, Select,
Checkbox, CheckboxGroup, RadioGroup, Searchbox,
RegionPicker, Radio, Icon, Slider
RegionPicker, Radio, Icon, Slider, NumberInput
} from 'veui'
import moment from 'moment'
import bus from '../bus'
Expand Down Expand Up @@ -2445,6 +2452,7 @@ export default {
components: {
'veui-span': Span,
'veui-input': Input,
'veui-number-input': NumberInput,
'veui-button': Button,
'veui-form': Form,
'veui-fieldset': Fieldset,
Expand Down Expand Up @@ -2530,7 +2538,8 @@ export default {
phoneType,
phoneTypeOptions,
start: null,
end: null
end: null,
salary: [2, 5]
},
storeData3: {
statusSelected: 1,
Expand Down Expand Up @@ -2565,7 +2574,7 @@ export default {
start: null,
end: null,
protocol: '',
salary: [2, 5]
floor: 3499
},
storeData4Options: {
hobbyItems,
Expand Down
8 changes: 2 additions & 6 deletions demo/components/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h1><code>&lt;veui-icon&gt;</code></h1>
<div class="icons">
<div class="icon" v-for="icon in icons" :key="icon">
<div class="svg"><veui-icon :name="icon" /></div>
<div class="svg"><veui-icon :name="icon"/></div>
<div class="name">{{ icon }}</div>
</div>
</div>
Expand All @@ -19,7 +19,7 @@ export default {
name: 'icon-demo',
data () {
return {
icons: Object.keys(Icon.components.Icon.icons).sort((a, b) => a > b ? 1 : -1)
icons: Object.keys(Icon.components.FaIcon.icons).sort((a, b) => a > b ? 1 : -1)
}
},
components: {
Expand All @@ -36,10 +36,6 @@ export default {
</script>

<style lang="less" scoped>
.icons {
}
.icon {
@grid-size: 100px;
Expand Down
Loading

0 comments on commit 5854789

Please sign in to comment.