Commit 4b7138b97fcbbc2fc33c6e00aea676ca91b60495

Authored by 梁灏
1 parent 8a3bad74

fixed some bugs

fixed some bugs
src/components/modal/confirm.js
1 import Vue from 'vue'; 1 import Vue from 'vue';
2 import Modal from './modal.vue'; 2 import Modal from './modal.vue';
3 import Icon from '../icon/icon.vue'; 3 import Icon from '../icon/icon.vue';
4 -import Button from '../button/button.vue'; 4 +import iButton from '../button/button.vue';
5 import { camelcaseToHyphen } from '../../utils/assist'; 5 import { camelcaseToHyphen } from '../../utils/assist';
6 6
7 const prefixCls = 'ivu-modal-confirm'; 7 const prefixCls = 'ivu-modal-confirm';
@@ -26,8 +26,8 @@ Modal.newInstance = properties => { @@ -26,8 +26,8 @@ Modal.newInstance = properties => {
26 {{{ body }}} 26 {{{ body }}}
27 </div> 27 </div>
28 <div class="${prefixCls}-footer"> 28 <div class="${prefixCls}-footer">
29 - <Button type="ghost" size="large" v-if="showCancel" @click="cancel">{{ cancelText }}</Button>  
30 - <Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button> 29 + <i-button type="ghost" size="large" v-if="showCancel" @click="cancel">{{ cancelText }}</i-button>
  30 + <i-button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</i-button>
31 </div> 31 </div>
32 </div> 32 </div>
33 </Modal> 33 </Modal>
@@ -36,7 +36,7 @@ Modal.newInstance = properties =&gt; { @@ -36,7 +36,7 @@ Modal.newInstance = properties =&gt; {
36 36
37 const modal = new Vue({ 37 const modal = new Vue({
38 el: div, 38 el: div,
39 - components: { Modal, Button, Icon }, 39 + components: { Modal, iButton, Icon },
40 data: Object.assign(_props, { 40 data: Object.assign(_props, {
41 visible: false, 41 visible: false,
42 width: 416, 42 width: 416,
src/components/modal/modal.vue
@@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
12 <div :class="[prefixCls + '-body']"><slot></slot></div> 12 <div :class="[prefixCls + '-body']"><slot></slot></div>
13 <div :class="[prefixCls + '-footer']" v-if="!footerHide"> 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>  
16 - <Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button> 15 + <i-button type="ghost" size="large" @click="cancel">{{ cancelText }}</i-button>
  16 + <i-button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</i-button>
17 </slot> 17 </slot>
18 </div> 18 </div>
19 </div> 19 </div>
@@ -22,13 +22,13 @@ @@ -22,13 +22,13 @@
22 </template> 22 </template>
23 <script> 23 <script>
24 import Icon from '../icon'; 24 import Icon from '../icon';
25 - import Button from '../button'; 25 + import iButton from '../button/button.vue';
26 import { getScrollBarSize } from '../../utils/assist'; 26 import { getScrollBarSize } from '../../utils/assist';
27 27
28 const prefixCls = 'ivu-modal'; 28 const prefixCls = 'ivu-modal';
29 29
30 export default { 30 export default {
31 - components: { Icon, Button }, 31 + components: { Icon, iButton },
32 props: { 32 props: {
33 visible: { 33 visible: {
34 type: Boolean, 34 type: Boolean,
src/components/poptip/poptip.vue
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 </template> 37 </template>
38 <script> 38 <script>
39 import Popper from '../base/popper'; 39 import Popper from '../base/popper';
40 - import Button from '../button/button.vue'; 40 + import iButton from '../button/button.vue';
41 import clickoutside from '../../directives/clickoutside'; 41 import clickoutside from '../../directives/clickoutside';
42 import { oneOf } from '../../utils/assist'; 42 import { oneOf } from '../../utils/assist';
43 43
@@ -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: { iButton: Button }, 49 + components: { iButton },
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 }
src/components/select/select.vue
@@ -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
src/components/tooltip/tooltip.vue
1 <template> 1 <template>
2 - <div :class="[prefix]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper">  
3 - <div :class="[prefix + '-rel']" v-el:reference> 2 + <div :class="[prefixCls]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper">
  3 + <div :class="[prefixCls + '-rel']" v-el:reference>
4 <slot></slot> 4 <slot></slot>
5 </div> 5 </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> 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>
10 </div> 10 </div>
11 </div> 11 </div>
12 </div> 12 </div>
@@ -31,6 +31,7 @@ import Slider from &#39;./components/slider&#39;; @@ -31,6 +31,7 @@ import Slider from &#39;./components/slider&#39;;
31 31
32 const iview = { 32 const iview = {
33 Button, 33 Button,
  34 + iButton: Button,
34 ButtonGroup: Button.Group, 35 ButtonGroup: Button.Group,
35 Icon, 36 Icon,
36 Input, 37 Input,