diff --git a/build/bin/build-entry.js b/build/bin/build-entry.js index 997ef8fb7..0e735e9f3 100644 --- a/build/bin/build-entry.js +++ b/build/bin/build-entry.js @@ -114,6 +114,8 @@ ComponentNames.forEach((name) => { 'notification', 'page-header', 'message', + 'timeline', + 'timeline-item', 'input-number', 'step', 'steps', diff --git a/packages/color-picker/src/components/picker-dropdown.vue b/packages/color-picker/src/components/picker-dropdown.vue index d254d3cd6..160cab1c1 100644 --- a/packages/color-picker/src/components/picker-dropdown.vue +++ b/packages/color-picker/src/components/picker-dropdown.vue @@ -6,7 +6,7 @@ ref="hue" :color="color" vertical - style="float: right;" + style="float: right" > diff --git a/packages/timeline/src/item.vue b/packages/timeline-item/TimelineItem.vue similarity index 100% rename from packages/timeline/src/item.vue rename to packages/timeline-item/TimelineItem.vue diff --git a/packages/timeline-item/__tests__/TimelineItem.spec.js b/packages/timeline-item/__tests__/TimelineItem.spec.js new file mode 100644 index 000000000..cac0fabaf --- /dev/null +++ b/packages/timeline-item/__tests__/TimelineItem.spec.js @@ -0,0 +1,19 @@ +import TimelineItem from '../TimelineItem.vue' +import { mount } from '@vue/test-utils' +describe('TimelineItem.vue', () => { + it('should timeline works', () => { + const wrapper = mount(TimelineItem, { + props: { + timestamp: '2018-04-15' + }, + slots: { + default: '吃饭饭' + } + }) + + expect(wrapper.find('.el-timeline-item__timestamp').text()).toBe( + '2018-04-15' + ) + expect(wrapper.find('.el-timeline-item__content').text()).toBe('吃饭饭') + }) +}) diff --git a/packages/timeline-item/index.js b/packages/timeline-item/index.js index 2830b4d7f..79a485f02 100644 --- a/packages/timeline-item/index.js +++ b/packages/timeline-item/index.js @@ -1,4 +1,4 @@ -import ElTimelineItem from '../timeline/src/item' +import ElTimelineItem from './TimelineItem' /* istanbul ignore next */ ElTimelineItem.install = function (app) { diff --git a/packages/timeline/src/main.vue b/packages/timeline/Timeline.vue similarity index 53% rename from packages/timeline/src/main.vue rename to packages/timeline/Timeline.vue index e0018285a..f80b6bde5 100644 --- a/packages/timeline/src/main.vue +++ b/packages/timeline/Timeline.vue @@ -1,4 +1,5 @@