fixed some bugs
fixed some bugs
This commit is contained in:
parent
8a3bad748c
commit
4b7138b97f
6 changed files with 28 additions and 27 deletions
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
import Modal from './modal.vue';
|
||||
import Icon from '../icon/icon.vue';
|
||||
import Button from '../button/button.vue';
|
||||
import iButton from '../button/button.vue';
|
||||
import { camelcaseToHyphen } from '../../utils/assist';
|
||||
|
||||
const prefixCls = 'ivu-modal-confirm';
|
||||
|
@ -26,8 +26,8 @@ Modal.newInstance = properties => {
|
|||
{{{ body }}}
|
||||
</div>
|
||||
<div class="${prefixCls}-footer">
|
||||
<Button type="ghost" size="large" v-if="showCancel" @click="cancel">{{ cancelText }}</Button>
|
||||
<Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button>
|
||||
<i-button type="ghost" size="large" v-if="showCancel" @click="cancel">{{ cancelText }}</i-button>
|
||||
<i-button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</i-button>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
|
@ -36,7 +36,7 @@ Modal.newInstance = properties => {
|
|||
|
||||
const modal = new Vue({
|
||||
el: div,
|
||||
components: { Modal, Button, Icon },
|
||||
components: { Modal, iButton, Icon },
|
||||
data: Object.assign(_props, {
|
||||
visible: false,
|
||||
width: 416,
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<div :class="[prefixCls + '-body']"><slot></slot></div>
|
||||
<div :class="[prefixCls + '-footer']" v-if="!footerHide">
|
||||
<slot name="footer">
|
||||
<Button type="ghost" size="large" @click="cancel">{{ cancelText }}</Button>
|
||||
<Button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</Button>
|
||||
<i-button type="ghost" size="large" @click="cancel">{{ cancelText }}</i-button>
|
||||
<i-button type="primary" size="large" :loading="buttonLoading" @click="ok">{{ okText }}</i-button>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,13 +22,13 @@
|
|||
</template>
|
||||
<script>
|
||||
import Icon from '../icon';
|
||||
import Button from '../button';
|
||||
import iButton from '../button/button.vue';
|
||||
import { getScrollBarSize } from '../../utils/assist';
|
||||
|
||||
const prefixCls = 'ivu-modal';
|
||||
|
||||
export default {
|
||||
components: { Icon, Button },
|
||||
components: { Icon, iButton },
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import Popper from '../base/popper';
|
||||
import Button from '../button/button.vue';
|
||||
import iButton from '../button/button.vue';
|
||||
import clickoutside from '../../directives/clickoutside';
|
||||
import { oneOf } from '../../utils/assist';
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
export default {
|
||||
mixins: [Popper],
|
||||
directives: { clickoutside },
|
||||
components: { iButton: Button },
|
||||
components: { iButton },
|
||||
props: {
|
||||
trigger: {
|
||||
validator (value) {
|
||||
|
@ -92,9 +92,9 @@
|
|||
computed: {
|
||||
classes () {
|
||||
return [
|
||||
prefixCls + '',
|
||||
`${prefixCls}`,
|
||||
{
|
||||
[prefixCls + '-confirm']: this.confirm
|
||||
[`${prefixCls}-confirm`]: this.confirm
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -102,7 +102,7 @@
|
|||
let style = {};
|
||||
|
||||
if (!!this.width) {
|
||||
style.width = '${this.width}px';
|
||||
style.width = `${this.width}px`;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
|
|
@ -100,14 +100,14 @@
|
|||
computed: {
|
||||
classes () {
|
||||
return [
|
||||
prefixCls + '',
|
||||
`${prefixCls}`,
|
||||
{
|
||||
[prefixCls + '-visible']: this.visible,
|
||||
[prefixCls + '-disabled']: this.disabled,
|
||||
[prefixCls + '-multiple']: this.multiple,
|
||||
[prefixCls + '-single']: !this.multiple,
|
||||
[prefixCls + '-show-clear']: this.showCloseIcon,
|
||||
[prefixCls + '-${this.size}']: !!this.size
|
||||
[`${prefixCls}-visible`]: this.visible,
|
||||
[`${prefixCls}-disabled`]: this.disabled,
|
||||
[`${prefixCls}-multiple`]: this.multiple,
|
||||
[`${prefixCls}-single`]: !this.multiple,
|
||||
[`${prefixCls}-show-clear`]: this.showCloseIcon,
|
||||
[`${prefixCls}-${this.size}`]: !!this.size
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -136,7 +136,7 @@
|
|||
if (this.showPlaceholder) {
|
||||
style.width = '100%';
|
||||
} else {
|
||||
style.width = '${this.inputLength}px';
|
||||
style.width = `${this.inputLength}px`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div :class="[prefix]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper">
|
||||
<div :class="[prefix + '-rel']" v-el:reference>
|
||||
<div :class="[prefixCls]" @mouseenter="handleShowPopper" @mouseleave="handleClosePopper">
|
||||
<div :class="[prefixCls + '-rel']" v-el:reference>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div :class="[prefix + '-popper']" transition="fade" v-el:popper v-show="!disabled && visible">
|
||||
<div :class="[prefix + '-content']">
|
||||
<div :class="[prefix + '-arrow']"></div>
|
||||
<div :class="[prefix + '-inner']"><slot name="content">{{ content }}</slot></div>
|
||||
<div :class="[prefixCls + '-popper']" transition="fade" v-el:popper v-show="!disabled && visible">
|
||||
<div :class="[prefixCls + '-content']">
|
||||
<div :class="[prefixCls + '-arrow']"></div>
|
||||
<div :class="[prefixCls + '-inner']"><slot name="content">{{ content }}</slot></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,6 +31,7 @@ import Slider from './components/slider';
|
|||
|
||||
const iview = {
|
||||
Button,
|
||||
iButton: Button,
|
||||
ButtonGroup: Button.Group,
|
||||
Icon,
|
||||
Input,
|
||||
|
|
Loading…
Add table
Reference in a new issue