Commit d6342fe1c37b5c6683707c8ba19f8ab61b5cf9fa
1 parent
64bd05f7
fixed ie bug
Showing
12 changed files
with
144 additions
and
128 deletions
Show diff stats
src/components/base/notification/notice.vue
1 | <template> | 1 | <template> |
2 | <div :class="classes" :style="style" :transition="transitionName"> | 2 | <div :class="classes" :style="style" :transition="transitionName"> |
3 | - <div :class="[`${baseClass}-content`]" v-el:content>{{{ content }}}</div> | ||
4 | - <a :class="[`${baseClass}-close`]" @click="close" v-if="closable"> | 3 | + <div :class="[baseClass + '-content']" v-el:content>{{{ content }}}</div> |
4 | + <a :class="[baseClass + '-close]" @click="close" v-if="closable"> | ||
5 | <i class="ivu-icon ivu-icon-ios-close-empty"></i> | 5 | <i class="ivu-icon ivu-icon-ios-close-empty"></i> |
6 | </a> | 6 | </a> |
7 | </div> | 7 | </div> |
@@ -90,4 +90,4 @@ | @@ -90,4 +90,4 @@ | ||
90 | this.clearCloseTimer(); | 90 | this.clearCloseTimer(); |
91 | } | 91 | } |
92 | } | 92 | } |
93 | -</script> | ||
94 | \ No newline at end of file | 93 | \ No newline at end of file |
94 | +</script> |
src/components/button/button.vue
src/components/modal/modal.vue
@@ -2,15 +2,15 @@ | @@ -2,15 +2,15 @@ | ||
2 | <div :class="wrapClasses"> | 2 | <div :class="wrapClasses"> |
3 | <div :class="maskClasses" v-show="visible" @click="mask" transition="fade"></div> | 3 | <div :class="maskClasses" v-show="visible" @click="mask" transition="fade"></div> |
4 | <div :class="classes" :style="styles" v-show="visible" transition="ease"> | 4 | <div :class="classes" :style="styles" v-show="visible" transition="ease"> |
5 | - <div :class="[`${prefixCls}-content`]"> | ||
6 | - <a :class="[`${prefixCls}-close`]" v-if="closable" @click="close"> | 5 | + <div :class="[prefixCls + '-content]"> |
6 | + <a :class="[prefixCls + '-close']" v-if="closable" @click="close"> | ||
7 | <slot name="close"> | 7 | <slot name="close"> |
8 | <Icon type="ios-close-empty"></Icon> | 8 | <Icon type="ios-close-empty"></Icon> |
9 | </slot> | 9 | </slot> |
10 | </a> | 10 | </a> |
11 | - <div :class="[`${prefixCls}-header`]" v-if="showHead" v-el:head><slot name="header"><p>{{ title }}</p></slot></div> | ||
12 | - <div :class="[`${prefixCls}-body`]"><slot></slot></div> | ||
13 | - <div :class="[`${prefixCls}-footer`]" v-if="!footerHide"> | 11 | + <div :class="[prefixCls + '-header']" v-if="showHead" v-el:head><slot name="header"><p>{{ title }}</p></slot></div> |
12 | + <div :class="[prefixCls + '-body']"><slot></slot></div> | ||
13 | + <div :class="[prefixCls + '-footer']" v-if="!footerHide"> | ||
14 | <slot name="footer"> | 14 | <slot name="footer"> |
15 | <Button type="ghost" size="large" @click="cancel">{{ cancelText }}</Button> | 15 | <Button type="ghost" size="large" @click="cancel">{{ cancelText }}</Button> |
16 | <Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button> | 16 | <Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button> |
@@ -202,4 +202,4 @@ | @@ -202,4 +202,4 @@ | ||
202 | } | 202 | } |
203 | } | 203 | } |
204 | } | 204 | } |
205 | -</script> | ||
206 | \ No newline at end of file | 205 | \ No newline at end of file |
206 | +</script> |
src/components/page/page.vue
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | </li> | 24 | </li> |
25 | </ul> | 25 | </ul> |
26 | <ul :class="wrapClasses" v-else> | 26 | <ul :class="wrapClasses" v-else> |
27 | - <span :class="[`${prefixCls}-total`]" v-if="showTotal"> | 27 | + <span :class="[prefixCls + '-total']" v-if="showTotal"> |
28 | <slot>共 {{ total }} 条</slot> | 28 | <slot>共 {{ total }} 条</slot> |
29 | </span> | 29 | </span> |
30 | <li | 30 | <li |
@@ -33,15 +33,15 @@ | @@ -33,15 +33,15 @@ | ||
33 | @click="prev"> | 33 | @click="prev"> |
34 | <a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a> | 34 | <a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a> |
35 | </li> | 35 | </li> |
36 | - <li title="第一页" :class="[`${prefixCls}-item`,{[`${prefixCls}-item-active`]: current == 1}]" @click="changePage(1)"><a>1</a></li> | ||
37 | - <li title="向前 5 页" v-if="current - 3 > 1" :class="[`${prefixCls}-item-jump-prev`]" @click="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a></li> | ||
38 | - <li :title="current - 2" v-if="current - 2 > 1" :class="[`${prefixCls}-item`]" @click="changePage(current - 2)"><a>{{ current - 2 }}</a></li> | ||
39 | - <li :title="current - 1" v-if="current - 1 > 1" :class="[`${prefixCls}-item`]" @click="changePage(current - 1)"><a>{{ current - 1 }}</a></li> | ||
40 | - <li :title="current" v-if="current != 1 && current != allPages" :class="[`${prefixCls}-item`,`${prefixCls}-item-active`]"><a>{{ current }}</a></li> | ||
41 | - <li :title="current + 1" v-if="current + 1 < allPages" :class="[`${prefixCls}-item`]" @click="changePage(current + 1)"><a>{{ current + 1 }}</a></li> | ||
42 | - <li :title="current + 2" v-if="current + 2 < allPages" :class="[`${prefixCls}-item`]" @click="changePage(current + 2)"><a>{{ current + 2 }}</a></li> | ||
43 | - <li title="向后 5 页" v-if="current + 3 < allPages" :class="[`${prefixCls}-item-jump-next`]" @click="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a></li> | ||
44 | - <li :title="'最后一页:' + allPages" v-if="allPages > 1" :class="[`${prefixCls}-item`, {[`${prefixCls}-item-active`]: current == allPages}]" @click="changePage(allPages)"><a>{{ allPages }}</a></li> | 36 | + <li title="第一页" :class="firstPageClasses" @click="changePage(1)"><a>1</a></li> |
37 | + <li title="向前 5 页" v-if="current - 3 > 1" :class="[prefixCls + '-item-jump-prev']" @click="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a></li> | ||
38 | + <li :title="current - 2" v-if="current - 2 > 1" :class="[prefixCls + '-item']" @click="changePage(current - 2)"><a>{{ current - 2 }}</a></li> | ||
39 | + <li :title="current - 1" v-if="current - 1 > 1" :class="[prefixCls + '-item']" @click="changePage(current - 1)"><a>{{ current - 1 }}</a></li> | ||
40 | + <li :title="current" v-if="current != 1 && current != allPages" :class="[prefixCls + '-item',prefixCls + '-item-active']"><a>{{ current }}</a></li> | ||
41 | + <li :title="current + 1" v-if="current + 1 < allPages" :class="[prefixCls + '-item']" @click="changePage(current + 1)"><a>{{ current + 1 }}</a></li> | ||
42 | + <li :title="current + 2" v-if="current + 2 < allPages" :class="[prefixCls + '-item']" @click="changePage(current + 2)"><a>{{ current + 2 }}</a></li> | ||
43 | + <li title="向后 5 页" v-if="current + 3 < allPages" :class="[prefixCls + '-item-jump-next']" @click="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a></li> | ||
44 | + <li :title="'最后一页:' + allPages" v-if="allPages > 1" :class="lastPageClasses" @click="changePage(allPages)"><a>{{ allPages }}</a></li> | ||
45 | <li | 45 | <li |
46 | title="下一页" | 46 | title="下一页" |
47 | :class="nextClasses" | 47 | :class="nextClasses" |
@@ -156,6 +156,22 @@ | @@ -156,6 +156,22 @@ | ||
156 | [`${prefixCls}-disabled`]: this.current == this.allPages | 156 | [`${prefixCls}-disabled`]: this.current == this.allPages |
157 | } | 157 | } |
158 | ] | 158 | ] |
159 | + }, | ||
160 | + firstPageClasses () { | ||
161 | + return [ | ||
162 | + `${prefixCls}-item`, | ||
163 | + { | ||
164 | + [`${prefixCls}-item-active`]: this.current == 1 | ||
165 | + } | ||
166 | + ] | ||
167 | + }, | ||
168 | + lastPageClasses () { | ||
169 | + return [ | ||
170 | + `${prefixCls}-item`, | ||
171 | + { | ||
172 | + [`${prefixCls}-item-active`]: this.current == this.allPages | ||
173 | + } | ||
174 | + ] | ||
159 | } | 175 | } |
160 | }, | 176 | }, |
161 | methods: { | 177 | methods: { |
@@ -235,4 +251,4 @@ | @@ -235,4 +251,4 @@ | ||
235 | } | 251 | } |
236 | } | 252 | } |
237 | } | 253 | } |
238 | -</script> | ||
239 | \ No newline at end of file | 254 | \ No newline at end of file |
255 | +</script> |
src/components/poptip/poptip.vue
@@ -5,30 +5,30 @@ | @@ -5,30 +5,30 @@ | ||
5 | @mouseleave="handleMouseleave" | 5 | @mouseleave="handleMouseleave" |
6 | v-clickoutside="handleClose"> | 6 | v-clickoutside="handleClose"> |
7 | <div | 7 | <div |
8 | - :class="[`${prefixCls}-rel`]" | 8 | + :class="[prefixCls + '-rel']" |
9 | v-el:reference | 9 | v-el:reference |
10 | @click="handleClick" | 10 | @click="handleClick" |
11 | @mousedown="handleFocus" | 11 | @mousedown="handleFocus" |
12 | @mouseup="handleBlur"> | 12 | @mouseup="handleBlur"> |
13 | <slot></slot> | 13 | <slot></slot> |
14 | </div> | 14 | </div> |
15 | - <div :class="[`${prefixCls}-popper`]" :style="styles" transition="fade" v-el:popper v-show="visible"> | ||
16 | - <div :class="[`${prefixCls}-content`]"> | ||
17 | - <div :class="[`${prefixCls}-arrow`]"></div> | ||
18 | - <div :class="[`${prefixCls}-inner`]" v-if="confirm"> | ||
19 | - <div :class="[`${prefixCls}-body`]"> | 15 | + <div :class="[prefixCls + '-popper']" :style="styles" transition="fade" v-el:popper v-show="visible"> |
16 | + <div :class="[prefixCls + '-content']"> | ||
17 | + <div :class="[prefixCls + '-arrow']"></div> | ||
18 | + <div :class="[prefixCls + '-inner']" v-if="confirm"> | ||
19 | + <div :class="[prefixCls + '-body']"> | ||
20 | <i class="ivu-icon ivu-icon-help-circled"></i> | 20 | <i class="ivu-icon ivu-icon-help-circled"></i> |
21 | - <div :class="[`${prefixCls}-body-message`]"><slot name="title">{{ title }}</slot></div> | 21 | + <div :class="[prefixCls + '-body-message']"><slot name="title">{{ title }}</slot></div> |
22 | </div> | 22 | </div> |
23 | - <div :class="[`${prefixCls}-footer`]"> | ||
24 | - <Button type="ghost" size="small" @click="cancel">{{ cancelText }}</Button> | ||
25 | - <Button type="primary" size="small" @click="ok">{{ okText }}</Button> | 23 | + <div :class="[prefixCls + '-footer']"> |
24 | + <i-button type="ghost" size="small" @click="cancel">{{ cancelText }}</i-button> | ||
25 | + <i-button type="primary" size="small" @click="ok">{{ okText }}</i-button> | ||
26 | </div> | 26 | </div> |
27 | </div> | 27 | </div> |
28 | - <div :class="[`${prefixCls}-inner`]" v-if="!confirm"> | ||
29 | - <div :class="[`${prefixCls}-title`]" v-if="showTitle" v-el:title><slot name="title">{{ title }}</slot></div> | ||
30 | - <div :class="[`${prefixCls}-body`]"> | ||
31 | - <div :class="[`${prefixCls}-body-content`]"><slot name="content">{{ content }}</slot></div> | 28 | + <div :class="[prefixCls + '-inner']" v-if="!confirm"> |
29 | + <div :class="[prefixCls + '-title']" v-if="showTitle" v-el:title><slot name="title">{{ title }}</slot></div> | ||
30 | + <div :class="[prefixCls + '-body']"> | ||
31 | + <div :class="[prefixCls + '-body-content']"><slot name="content">{{ content }}</slot></div> | ||
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | export default { | 46 | export default { |
47 | mixins: [Popper], | 47 | mixins: [Popper], |
48 | directives: { clickoutside }, | 48 | directives: { clickoutside }, |
49 | - components: { Button }, | 49 | + components: { iButton: Button }, |
50 | props: { | 50 | props: { |
51 | trigger: { | 51 | trigger: { |
52 | validator (value) { | 52 | validator (value) { |
@@ -92,9 +92,9 @@ | @@ -92,9 +92,9 @@ | ||
92 | computed: { | 92 | computed: { |
93 | classes () { | 93 | classes () { |
94 | return [ | 94 | return [ |
95 | - `${prefixCls}`, | 95 | + prefixCls + '', |
96 | { | 96 | { |
97 | - [`${prefixCls}-confirm`]: this.confirm | 97 | + [prefixCls + '-confirm']: this.confirm |
98 | } | 98 | } |
99 | ] | 99 | ] |
100 | }, | 100 | }, |
@@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
102 | let style = {}; | 102 | let style = {}; |
103 | 103 | ||
104 | if (!!this.width) { | 104 | if (!!this.width) { |
105 | - style.width = `${this.width}px`; | 105 | + style.width = '${this.width}px'; |
106 | } | 106 | } |
107 | return style; | 107 | return style; |
108 | } | 108 | } |
@@ -167,4 +167,4 @@ | @@ -167,4 +167,4 @@ | ||
167 | } | 167 | } |
168 | } | 168 | } |
169 | } | 169 | } |
170 | -</script> | ||
171 | \ No newline at end of file | 170 | \ No newline at end of file |
171 | +</script> |
src/components/select/option-group.vue
1 | <template> | 1 | <template> |
2 | - <li :class="[`${prefixCls}-wrap`]"> | ||
3 | - <div :class="[`${prefixCls}-title`]">{{ label }}</div> | 2 | + <li :class="[prefixCls + '-wrap']"> |
3 | + <div :class="[prefixCls + '-title']">{{ label }}</div> | ||
4 | <ul> | 4 | <ul> |
5 | - <li :class="[`${prefixCls}`]"><slot></slot></li> | 5 | + <li :class="[prefixCls]"><slot></slot></li> |
6 | </ul> | 6 | </ul> |
7 | </li> | 7 | </li> |
8 | </template> | 8 | </template> |
@@ -22,4 +22,4 @@ | @@ -22,4 +22,4 @@ | ||
22 | } | 22 | } |
23 | } | 23 | } |
24 | } | 24 | } |
25 | -</script> | ||
26 | \ No newline at end of file | 25 | \ No newline at end of file |
26 | +</script> |
src/components/select/select.vue
1 | <template> | 1 | <template> |
2 | <div :class="classes" v-clickoutside="handleClose"> | 2 | <div :class="classes" v-clickoutside="handleClose"> |
3 | <div | 3 | <div |
4 | - :class="[`${prefixCls}-selection`]" | 4 | + :class="[prefixCls + '-selection']" |
5 | v-el:reference | 5 | v-el:reference |
6 | @click="toggleMenu"> | 6 | @click="toggleMenu"> |
7 | <div class="ivu-tag" v-for="item in selectedMultiple"> | 7 | <div class="ivu-tag" v-for="item in selectedMultiple"> |
8 | <span class="ivu-tag-text">{{ item.label }}</span> | 8 | <span class="ivu-tag-text">{{ item.label }}</span> |
9 | <Icon type="ios-close-empty" @click.stop="removeTag($index)"></Icon> | 9 | <Icon type="ios-close-empty" @click.stop="removeTag($index)"></Icon> |
10 | </div> | 10 | </div> |
11 | - <span :class="[`${prefixCls}-placeholder`]" v-show="showPlaceholder && !filterable">{{ placeholder }}</span> | ||
12 | - <span :class="[`${prefixCls}-selected-value`]" v-show="!showPlaceholder && !multiple && !filterable">{{ selectedSingle }}</span> | 11 | + <span :class="[prefixCls + '-placeholder']" v-show="showPlaceholder && !filterable">{{ placeholder }}</span> |
12 | + <span :class="[prefixCls + '-selected-value']" v-show="!showPlaceholder && !multiple && !filterable">{{ selectedSingle }}</span> | ||
13 | <input | 13 | <input |
14 | type="text" | 14 | type="text" |
15 | v-if="filterable" | 15 | v-if="filterable" |
16 | v-model="query" | 16 | v-model="query" |
17 | - :class="[`${prefixCls}-input`]" | 17 | + :class="[prefixCls + '-input']" |
18 | :placeholder="showPlaceholder ? placeholder : ''" | 18 | :placeholder="showPlaceholder ? placeholder : ''" |
19 | :style="inputStyle" | 19 | :style="inputStyle" |
20 | @blur="handleBlur" | 20 | @blur="handleBlur" |
21 | @keydown="resetInputState" | 21 | @keydown="resetInputState" |
22 | @keydown.delete="handleInputDelete" | 22 | @keydown.delete="handleInputDelete" |
23 | v-el:input> | 23 | v-el:input> |
24 | - <Icon type="ios-close" :class="[`${prefixCls}-arrow`]" v-show="showCloseIcon" @click.stop="clearSingleSelect"></Icon> | ||
25 | - <Icon type="arrow-down-b" :class="[`${prefixCls}-arrow`]"></Icon> | 24 | + <Icon type="ios-close" :class="[prefixCls + '-arrow']" v-show="showCloseIcon" @click.stop="clearSingleSelect"></Icon> |
25 | + <Icon type="arrow-down-b" :class="[prefixCls + '-arrow']"></Icon> | ||
26 | </div> | 26 | </div> |
27 | <Dropdown v-show="visible" transition="slide-up" v-ref:dropdown> | 27 | <Dropdown v-show="visible" transition="slide-up" v-ref:dropdown> |
28 | - <ul v-show="notFound" :class="[`${prefixCls}-not-found`]"><li>{{ notFoundText }}</li></ul> | ||
29 | - <ul v-else :class="[`${prefixCls}-dropdown-list`]"><slot></slot></ul> | 28 | + <ul v-show="notFound" :class="[prefixCls + '-not-found']"><li>{{ notFoundText }}</li></ul> |
29 | + <ul v-else :class="[prefixCls + '-dropdown-list']"><slot></slot></ul> | ||
30 | </Dropdown> | 30 | </Dropdown> |
31 | </div> | 31 | </div> |
32 | </template> | 32 | </template> |
@@ -100,14 +100,14 @@ | @@ -100,14 +100,14 @@ | ||
100 | computed: { | 100 | computed: { |
101 | classes () { | 101 | classes () { |
102 | return [ | 102 | return [ |
103 | - `${prefixCls}`, | 103 | + prefixCls + '', |
104 | { | 104 | { |
105 | - [`${prefixCls}-visible`]: this.visible, | ||
106 | - [`${prefixCls}-disabled`]: this.disabled, | ||
107 | - [`${prefixCls}-multiple`]: this.multiple, | ||
108 | - [`${prefixCls}-single`]: !this.multiple, | ||
109 | - [`${prefixCls}-show-clear`]: this.showCloseIcon, | ||
110 | - [`${prefixCls}-${this.size}`]: !!this.size | 105 | + [prefixCls + '-visible']: this.visible, |
106 | + [prefixCls + '-disabled']: this.disabled, | ||
107 | + [prefixCls + '-multiple']: this.multiple, | ||
108 | + [prefixCls + '-single']: !this.multiple, | ||
109 | + [prefixCls + '-show-clear']: this.showCloseIcon, | ||
110 | + [prefixCls + '-${this.size}']: !!this.size | ||
111 | } | 111 | } |
112 | ] | 112 | ] |
113 | }, | 113 | }, |
@@ -136,7 +136,7 @@ | @@ -136,7 +136,7 @@ | ||
136 | if (this.showPlaceholder) { | 136 | if (this.showPlaceholder) { |
137 | style.width = '100%'; | 137 | style.width = '100%'; |
138 | } else { | 138 | } else { |
139 | - style.width = `${this.inputLength}px`; | 139 | + style.width = '${this.inputLength}px'; |
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
@@ -508,4 +508,4 @@ | @@ -508,4 +508,4 @@ | ||
508 | } | 508 | } |
509 | } | 509 | } |
510 | } | 510 | } |
511 | -</script> | ||
512 | \ No newline at end of file | 511 | \ No newline at end of file |
512 | +</script> |
src/components/steps/step.vue
1 | <template> | 1 | <template> |
2 | <div :class="wrapClasses" :style="styles"> | 2 | <div :class="wrapClasses" :style="styles"> |
3 | - <div :class="[`${prefixCls}-tail`]"><i></i></div> | ||
4 | - <div :class="[`${prefixCls}-head`]"> | ||
5 | - <div :class="[`${prefixCls}-head-inner`]"> | 3 | + <div :class="[prefixCls + '-tail']"><i></i></div> |
4 | + <div :class="[prefixCls + '-head']"> | ||
5 | + <div :class="[prefixCls + '-head-inner']"> | ||
6 | <span v-if="!icon && status != 'finish' && status != 'error'">{{ stepNumber }}</span> | 6 | <span v-if="!icon && status != 'finish' && status != 'error'">{{ stepNumber }}</span> |
7 | <span v-else :class="iconClasses"></span> | 7 | <span v-else :class="iconClasses"></span> |
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | - <div :class="[`${prefixCls}-main`]"> | ||
11 | - <div :class="[`${prefixCls}-title`]">{{ title }}</div> | ||
12 | - <div v-if="content" :class="[`${prefixCls}-content`]">{{ content }}</div> | 10 | + <div :class="[prefixCls + '-main']"> |
11 | + <div :class="[prefixCls + '-title']">{{ title }}</div> | ||
12 | + <div v-if="content" :class="[prefixCls + '-content']">{{ content }}</div> | ||
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | </template> | 15 | </template> |
@@ -91,4 +91,4 @@ | @@ -91,4 +91,4 @@ | ||
91 | } | 91 | } |
92 | } | 92 | } |
93 | } | 93 | } |
94 | -</script> | ||
95 | \ No newline at end of file | 94 | \ No newline at end of file |
95 | +</script> |
src/components/tooltip/tooltip.vue
1 | <template> | 1 | <template> |
2 | - <div :class="[`${prefixCls}`]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper"> | ||
3 | - <div :class="[`${prefixCls}-rel`]" v-el:reference> | 2 | + <div :class="[prefix]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper"> |
3 | + <div :class="[prefix + '-rel']" v-el:reference> | ||
4 | <slot></slot> | 4 | <slot></slot> |
5 | </div> | 5 | </div> |
6 | - <div :class="[`${prefixCls}-popper`]" transition="fade" v-el:popper v-show="!disabled && visible"> | ||
7 | - <div :class="[`${prefixCls}-content`]"> | ||
8 | - <div :class="[`${prefixCls}-arrow`]"></div> | ||
9 | - <div :class="[`${prefixCls}-inner`]"><slot name="content">{{ content }}</slot></div> | 6 | + <div :class="[prefix + '-popper']" transition="fade" v-el:popper v-show="!disabled && visible"> |
7 | + <div :class="[prefix + '-content']"> | ||
8 | + <div :class="[prefix + '-arrow']"></div> | ||
9 | + <div :class="[prefix + '-inner']"><slot name="content">{{ content }}</slot></div> | ||
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
@@ -56,4 +56,4 @@ | @@ -56,4 +56,4 @@ | ||
56 | } | 56 | } |
57 | } | 57 | } |
58 | } | 58 | } |
59 | -</script> | ||
60 | \ No newline at end of file | 59 | \ No newline at end of file |
60 | +</script> |
test/routers/button.vue
1 | <template> | 1 | <template> |
2 | - <Button>Default</Button> | ||
3 | - <Button type="primary">Primary</Button> | ||
4 | - <Button type="ghost">Ghost</Button> | 2 | + <i-button>Default</i-button> |
3 | + <i-button type="primary">Primary</i-button> | ||
4 | + <i-button type="ghost">Ghost</i-button> | ||
5 | <br><br> | 5 | <br><br> |
6 | - <Button type="primary" size="large">Large</Button> | ||
7 | - <Button type="primary">Default</Button> | ||
8 | - <Button type="primary" size="small">Small</Button> | 6 | + <i-button type="primary" size="large">Large</i-button> |
7 | + <i-button type="primary">Default</i-button> | ||
8 | + <i-button type="primary" size="small">Small</i-button> | ||
9 | <br><br> | 9 | <br><br> |
10 | - <Button>Default</Button> | ||
11 | - <Button disabled>Default(Disabled)</Button> | 10 | + <i-button>Default</i-button> |
11 | + <i-button disabled>Default(Disabled)</i-button> | ||
12 | <br><br> | 12 | <br><br> |
13 | - <Button type="primary">Primary</Button> | ||
14 | - <Button type="primary" disabled>Primary(Disabled)</Button> | 13 | + <i-button type="primary">Primary</i-button> |
14 | + <i-button type="primary" disabled>Primary(Disabled)</i-button> | ||
15 | <br><br> | 15 | <br><br> |
16 | - <Button type="ghost">Ghost</Button> | ||
17 | - <Button type="ghost" disabled>Ghost(Disabled)</Button> | 16 | + <i-button type="ghost">Ghost</i-button> |
17 | + <i-button type="ghost" disabled>Ghost(Disabled)</i-button> | ||
18 | <br><br> | 18 | <br><br> |
19 | - <Button type="primary" shape="circle" icon="ios-search"></Button> | ||
20 | - <Button type="primary" icon="ios-search">搜索</Button> | 19 | + <i-button type="primary" shape="circle" icon="ios-search"></i-button> |
20 | + <i-button type="primary" icon="ios-search">搜索</i-button> | ||
21 | <br><br> | 21 | <br><br> |
22 | - <Button type="ghost" shape="circle"> | 22 | + <i-button type="ghost" shape="circle"> |
23 | <Icon type="search"></Icon> | 23 | <Icon type="search"></Icon> |
24 | - </Button> | ||
25 | - <Button type="ghost"> | 24 | + </i-button> |
25 | + <i-button type="ghost"> | ||
26 | <Icon type="search"></Icon> | 26 | <Icon type="search"></Icon> |
27 | 搜索 | 27 | 搜索 |
28 | - </Button> | ||
29 | - <Button type="ghost" shape="circle" size="large"> | 28 | + </i-button> |
29 | + <i-button type="ghost" shape="circle" size="large"> | ||
30 | <Icon type="search"></Icon> | 30 | <Icon type="search"></Icon> |
31 | - </Button> | ||
32 | - <Button type="ghost" shape="circle" size="small"> | 31 | + </i-button> |
32 | + <i-button type="ghost" shape="circle" size="small"> | ||
33 | <Icon type="search"></Icon> | 33 | <Icon type="search"></Icon> |
34 | - </Button> | 34 | + </i-button> |
35 | <br><br><br> | 35 | <br><br><br> |
36 | - <Button type="primary" loading>Loading...</Button> | ||
37 | - <Button type="primary" loading size="large">Loading...</Button> | ||
38 | - <Button type="primary" loading size="small">Loading...</Button> | ||
39 | - <Button type="primary" :loading="loading" @click="toLoading"> | 36 | + <i-button type="primary" loading>Loading...</i-button> |
37 | + <i-button type="primary" loading size="large">Loading...</i-button> | ||
38 | + <i-button type="primary" loading size="small">Loading...</i-button> | ||
39 | + <i-button type="primary" :loading="loading" @click="toLoading"> | ||
40 | <span v-if="!loading">Click me!</span> | 40 | <span v-if="!loading">Click me!</span> |
41 | <span v-else>Loading...</span> | 41 | <span v-else>Loading...</span> |
42 | - </Button> | ||
43 | - <Button type="primary" :loading="loading2" icon="checkmark-round" @click="toLoading2"> | 42 | + </i-button> |
43 | + <i-button type="primary" :loading="loading2" icon="checkmark-round" @click="toLoading2"> | ||
44 | <span v-if="!loading2">Click me!</span> | 44 | <span v-if="!loading2">Click me!</span> |
45 | <span v-else>Loading...</span> | 45 | <span v-else>Loading...</span> |
46 | - </Button> | 46 | + </i-button> |
47 | <h4>基本</h4> | 47 | <h4>基本</h4> |
48 | <Button-group size="large"> | 48 | <Button-group size="large"> |
49 | - <Button>取消</Button> | ||
50 | - <Button type="primary">确定</Button> | 49 | + <i-button>取消</i-button> |
50 | + <i-button type="primary">确定</i-button> | ||
51 | </Button-group> | 51 | </Button-group> |
52 | <Button-group> | 52 | <Button-group> |
53 | - <Button type="primary">L</Button> | ||
54 | - <Button>M</Button> | ||
55 | - <Button type="ghost">R</Button> | 53 | + <i-button type="primary">L</i-button> |
54 | + <i-button>M</i-button> | ||
55 | + <i-button type="ghost">R</i-button> | ||
56 | </Button-group> | 56 | </Button-group> |
57 | <h4>配合图标</h4> | 57 | <h4>配合图标</h4> |
58 | <Button-group> | 58 | <Button-group> |
59 | - <Button type="primary"> | 59 | + <i-button type="primary"> |
60 | <Icon type="chevron-left"></Icon> | 60 | <Icon type="chevron-left"></Icon> |
61 | 前进 | 61 | 前进 |
62 | - </Button> | ||
63 | - <Button type="primary"> | 62 | + </i-button> |
63 | + <i-button type="primary"> | ||
64 | 后退 | 64 | 后退 |
65 | <Icon type="chevron-right"></Icon> | 65 | <Icon type="chevron-right"></Icon> |
66 | - </Button> | 66 | + </i-button> |
67 | </Button-group> | 67 | </Button-group> |
68 | <Button-group> | 68 | <Button-group> |
69 | - <Button type="primary" icon="cloud"></Button> | ||
70 | - <Button type="primary" icon="upload"></Button> | 69 | + <i-button type="primary" icon="cloud"></i-button> |
70 | + <i-button type="primary" icon="upload"></i-button> | ||
71 | </Button-group> | 71 | </Button-group> |
72 | </template> | 72 | </template> |
73 | <script> | 73 | <script> |
@@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
78 | 78 | ||
79 | export default { | 79 | export default { |
80 | components: { | 80 | components: { |
81 | - Button, | 81 | + iButton: Button, |
82 | ButtonGroup, | 82 | ButtonGroup, |
83 | Icon, | 83 | Icon, |
84 | iInput: Input, | 84 | iInput: Input, |
@@ -93,13 +93,13 @@ | @@ -93,13 +93,13 @@ | ||
93 | Page | 93 | Page |
94 | }, | 94 | }, |
95 | props: { | 95 | props: { |
96 | - | 96 | + |
97 | }, | 97 | }, |
98 | data () { | 98 | data () { |
99 | return { | 99 | return { |
100 | loading: false, | 100 | loading: false, |
101 | loading2: false | 101 | loading2: false |
102 | - } | 102 | + } |
103 | }, | 103 | }, |
104 | methods: { | 104 | methods: { |
105 | toLoading () { | 105 | toLoading () { |
test/routers/notice.vue
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | </div> | 38 | </div> |
39 | </Poptip> | 39 | </Poptip> |
40 | <Poptip placement="right" width="300"> | 40 | <Poptip placement="right" width="300"> |
41 | - <Button type="ghost">click 激活</Button> | 41 | + <i-button type="ghost">click 激活</i-button> |
42 | <div class="api" slot="content"> | 42 | <div class="api" slot="content"> |
43 | <table> | 43 | <table> |
44 | <thead> | 44 | <thead> |
@@ -108,9 +108,9 @@ | @@ -108,9 +108,9 @@ | ||
108 | import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message } from 'iview'; | 108 | import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message } from 'iview'; |
109 | 109 | ||
110 | export default { | 110 | export default { |
111 | - components: { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message }, | 111 | + components: { Tooltip, iButton: Button, Row, iCol, Poptip, iSelect, iOption, Message }, |
112 | props: { | 112 | props: { |
113 | - | 113 | + |
114 | }, | 114 | }, |
115 | data () { | 115 | data () { |
116 | return { | 116 | return { |
@@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
118 | } | 118 | } |
119 | }, | 119 | }, |
120 | computed: { | 120 | computed: { |
121 | - | 121 | + |
122 | }, | 122 | }, |
123 | methods: { | 123 | methods: { |
124 | ok () { | 124 | ok () { |
@@ -129,4 +129,4 @@ | @@ -129,4 +129,4 @@ | ||
129 | } | 129 | } |
130 | } | 130 | } |
131 | } | 131 | } |
132 | -</script> | ||
133 | \ No newline at end of file | 132 | \ No newline at end of file |
133 | +</script> |
test/routers/page.vue
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <Step title="步骤3"></Step> | 41 | <Step title="步骤3"></Step> |
42 | <Step title="步骤4"></Step> | 42 | <Step title="步骤4"></Step> |
43 | </Steps> | 43 | </Steps> |
44 | - <Button type="primary" @click="next">下一步</Button> | 44 | + <i-button type="primary" @click="next">下一步</i-button> |
45 | <br><br> | 45 | <br><br> |
46 | <Steps :current="1" direction="vertical" size="small"> | 46 | <Steps :current="1" direction="vertical" size="small"> |
47 | <Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step> | 47 | <Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step> |
@@ -67,10 +67,10 @@ | @@ -67,10 +67,10 @@ | ||
67 | Page, | 67 | Page, |
68 | Steps, | 68 | Steps, |
69 | Step, | 69 | Step, |
70 | - Button | 70 | + iButton: Button |
71 | }, | 71 | }, |
72 | props: { | 72 | props: { |
73 | - | 73 | + |
74 | }, | 74 | }, |
75 | data () { | 75 | data () { |
76 | return { | 76 | return { |
@@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
79 | } | 79 | } |
80 | }, | 80 | }, |
81 | computed: { | 81 | computed: { |
82 | - | 82 | + |
83 | }, | 83 | }, |
84 | methods: { | 84 | methods: { |
85 | setPage (page) { | 85 | setPage (page) { |
@@ -94,4 +94,4 @@ | @@ -94,4 +94,4 @@ | ||
94 | } | 94 | } |
95 | } | 95 | } |
96 | } | 96 | } |
97 | -</script> | ||
98 | \ No newline at end of file | 97 | \ No newline at end of file |
98 | +</script> |