diff --git a/components/badge/demo/index.vue b/components/badge/demo/index.vue index 96475effc..b2f0375f7 100644 --- a/components/badge/demo/index.vue +++ b/components/badge/demo/index.vue @@ -109,12 +109,12 @@ export default { this.count = count }, changePlusValue () { - setInterval(() => { - const count = this.count + 1 - this.count = count - }, 300) - // const count = this.count + 1 - // this.count = count + // setInterval(() => { + // const count = this.count + 1 + // this.count = count + // }, 300) + const count = this.count + 1 + this.count = count }, changeShow () { this.isShow = !this.isShow diff --git a/components/breadcrumb/Breadcrumb.vue b/components/breadcrumb/Breadcrumb.vue new file mode 100644 index 000000000..5a57f0851 --- /dev/null +++ b/components/breadcrumb/Breadcrumb.vue @@ -0,0 +1,25 @@ + diff --git a/components/breadcrumb/BreadcrumbItem.vue b/components/breadcrumb/BreadcrumbItem.vue new file mode 100644 index 000000000..ea2d78e71 --- /dev/null +++ b/components/breadcrumb/BreadcrumbItem.vue @@ -0,0 +1,33 @@ + diff --git a/components/breadcrumb/demo/index.vue b/components/breadcrumb/demo/index.vue new file mode 100644 index 000000000..a5c3065da --- /dev/null +++ b/components/breadcrumb/demo/index.vue @@ -0,0 +1,50 @@ + + diff --git a/components/breadcrumb/index.js b/components/breadcrumb/index.js new file mode 100644 index 000000000..0babb609f --- /dev/null +++ b/components/breadcrumb/index.js @@ -0,0 +1,5 @@ +import Breadcrumb from './Breadcrumb' +import BreadcrumbItem from './BreadcrumbItem' + +Breadcrumb.Item = BreadcrumbItem +export default Breadcrumb diff --git a/components/breadcrumb/style/index.js b/components/breadcrumb/style/index.js new file mode 100644 index 000000000..cf31ed80f --- /dev/null +++ b/components/breadcrumb/style/index.js @@ -0,0 +1,2 @@ +import '../../style/index.less' +import './index.less' diff --git a/components/breadcrumb/style/index.less b/components/breadcrumb/style/index.less new file mode 100644 index 000000000..1b56a3472 --- /dev/null +++ b/components/breadcrumb/style/index.less @@ -0,0 +1,40 @@ +@import "../../style/themes/default"; +@import "../../style/mixins/index"; + +@breadcrumb-prefix-cls: ~"@{ant-prefix}-breadcrumb"; + +.@{breadcrumb-prefix-cls} { + .reset-component; + color: @text-color-secondary; + + .@{iconfont-css-prefix} { + font-size: @font-size-sm; + } + + a { + color: @text-color-secondary; + transition: color .3s; + &:hover { + color: @primary-5; + } + } + + & > span:last-child { + color: @text-color; + } + + & > span:last-child &-separator { + display: none; + } + + &-separator { + margin: 0 @padding-xs; + color: @text-color-secondary; + } + + &-link { + > .@{iconfont-css-prefix} + span { + margin-left: 4px; + } + } +} diff --git a/components/index.js b/components/index.js index d430782f9..a349bc1f0 100644 --- a/components/index.js +++ b/components/index.js @@ -27,3 +27,5 @@ export { default as Badge } from './badge' export { default as Tabs } from './tabs' export { default as Input } from './input' + +export { default as Breadcrumb } from './breadcrumb' diff --git a/components/style/mixins/index.less b/components/style/mixins/index.less index c331b159f..2c86242c6 100644 --- a/components/style/mixins/index.less +++ b/components/style/mixins/index.less @@ -6,3 +6,4 @@ @import "clearfix"; @import "iconfont"; @import "motion"; +@import "reset"; diff --git a/components/style/mixins/reset.less b/components/style/mixins/reset.less new file mode 100644 index 000000000..0ddb408e9 --- /dev/null +++ b/components/style/mixins/reset.less @@ -0,0 +1,12 @@ +@import '../themes/default'; + +.reset-component() { + font-family: @font-family; + font-size: @font-size-base; + line-height: @line-height-base; + color: @text-color; + box-sizing: border-box; + margin: 0; + padding: 0; + list-style: none; +} diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 3179e6806..e68c83ebd 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -44,10 +44,21 @@ @text-color-secondary-dark: fade(#fff, 67%); @font-size-base : 12px; @font-size-lg : @font-size-base + 2px; +@font-size-sm : 12px; @line-height-base : 1.5; @border-radius-base : 4px; @border-radius-sm : 2px; +// vertical paddings +@padding-lg : 24px; // containers +@padding-md : 16px; // small containers and buttons +@padding-sm : 12px; // Form controls and items +@padding-xs : 8px; // small items + +// vertical padding for all form controls +@control-padding-horizontal: @padding-sm; +@control-padding-horizontal-sm: @padding-xs; + // The background colors for active and hover states for things like // list items or table cells. @item-active-bg : @primary-1; diff --git a/contributors.md b/contributors.md index 01194ee13..031d1dac8 100644 --- a/contributors.md +++ b/contributors.md @@ -39,11 +39,11 @@ Tree TreeSelect ##王 -Rate -Pagination -Avatar -Badge -Breadcrumb +Rate | done +Pagination | done|select完成后补全 +Avatar | done +Badge | done +Breadcrumb | done Card Collapse LocaleProvider diff --git a/package.json b/package.json index bd41b9c3a..118cbff8f 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "dependencies": { "add-dom-event-listener": "^1.0.2", "css-animation": "^1.4.1", + "dom-align": "^1.6.7", "dom-scroll-into-view": "^1.2.1", "eslint-plugin-vue": "^3.13.0", "lodash.clonedeep": "^4.5.0",