Merge pull request #27 from iview/2.0

update
This commit is contained in:
yangdan8 2019-03-18 16:32:30 +08:00 committed by GitHub
commit a0059e4570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 326 additions and 111 deletions

View file

@ -1,48 +1,18 @@
<template>
<Tabs type="card" :animated="true" closable @on-tab-remove="handleTabRemove" :beforeRemove="handleBeforeRemove">
<Wrapper>
<TabPane label="标签一" v-if="tab0">标签一的内容</TabPane>
<TabPane label="标签二" v-if="tab1">标签二的内容</TabPane>
<TabPane label="标签三" v-if="tab2">标签三的内容</TabPane>
</Wrapper>
</Tabs>
<!--<Tabs type="card" :animated="true" closable @on-tab-remove="handleTabRemove" :beforeRemove="handleBeforeRemove">-->
<!--<TabPane label="标签一" v-if="tab0">标签一的内容</TabPane>-->
<!--<TabPane label="标签二" v-if="tab1">标签二的内容</TabPane>-->
<!--<TabPane label="标签三" v-if="tab2">标签三的内容</TabPane>-->
<!--</Tabs>-->
<div>
<Button @click="showSecond = !showSecond">change</Button>
<Tabs value="name1">
<TabPane label="标签一" name="name1" :index="1">标签一的内容</TabPane>
<TabPane label="标签二" name="name2" :index="2" v-if="showSecond">标签二的内容</TabPane>
<TabPane label="标签三" name="name3" :index="3">标签三的内容</TabPane>
</Tabs>
</div>
</template>
<script>
import Wrapper from '../components/wrapper.vue';
export default {
components: { Wrapper },
data () {
return {
tab0: true,
tab1: true,
tab2: true
}
},
methods: {
handleTabRemove (name) {
this['tab' + name] = false;
},
handleBeforeRemove (index) {
console.log(index);
return new Promise((resolve, reject) => {
this.$Modal.confirm({
title: 'Title',
content: '<p>Content of dialog</p><p>Content of dialog</p>',
onOk: () => {
resolve();
},
onCancel: () => {
reject();
}
});
});
showSecond: false
}
}
}

View file

@ -80,6 +80,9 @@
// window.addEventListener('resize', this.handleScroll, false);
on(window, 'scroll', this.handleScroll);
on(window, 'resize', this.handleScroll);
this.$nextTick(() => {
this.handleScroll();
});
},
beforeDestroy () {
// window.removeEventListener('scroll', this.handleScroll, false);

View file

@ -84,9 +84,12 @@
};
},
watch: {
error (val) {
this.validateMessage = val;
this.validateState = val === '' ? '' : 'error';
error: {
handler (val) {
this.validateMessage = val;
this.validateState = val ? 'error' : '';
},
immediate: true
},
validateStatus (val) {
this.validateState = val;

View file

@ -85,7 +85,7 @@
props: {
type: {
validator (value) {
return oneOf(value, ['text', 'textarea', 'password', 'url', 'email', 'date', 'number']);
return oneOf(value, ['text', 'textarea', 'password', 'url', 'email', 'date', 'number', 'tel']);
},
default: 'text'
},

View file

@ -30,6 +30,11 @@
tab: {
type: String
},
// TabPane 使 v-if index
// 0
index: {
type: Number
}
},
data () {
return {

View file

@ -187,6 +187,14 @@
}
});
// TabPane 使 v-if index
TabPanes.sort((a, b) => {
if (a.index && b.index) {
return a.index > b.index ? 1 : -1;
} else {
return 1;
}
});
return TabPanes;
},
updateNav () {

View file

@ -96,6 +96,10 @@
&-no-mask{
pointer-events: none;
.@{drawer-prefix-cls}-drag{
pointer-events: auto;
}
}
&-drag{

View file

@ -0,0 +1,137 @@
import { createVue, destroyVM } from '../util';
describe('Affix.vue', () => {
let vm;
afterEach(() => {
destroyVM(vm);
});
it('should create a Affix component without slot', done => {
vm = createVue('<Affix></Affix>');
const affix = vm.$el.children[0];
expect(affix.tagName).to.equal('DIV');
expect(affix.className).to.equal('');
done();
});
it('should create a Affix component contain slot', done => {
vm = createVue(`
<Affix>
<span class="demo-affix">Fixed at the top</span>
</Affix>
`);
const slot = vm.$el.children[0].children[0];
expect(slot.tagName).to.equal('SPAN');
expect(slot.className).to.equal('demo-affix');
done();
});
it('only set offset-top props', done => {
vm = createVue(`
<div>
<Affix :offset-top="20">
<span class="demo-affix">Fixed at the top</span>
</Affix>
<div style="width: 100%; height: 2000px"></div>
</div>
`, true);
const affix = vm.$el.children[0].children[0];
const fakeBlock = vm.$el.children[0].children[1];
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.top).to.equal('');
expect(fakeBlock.style.display).to.equal('none');
window.scrollTo(0, 10000);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.true;
expect(affix.style.top).to.equal('20px');
expect(fakeBlock.style.display).to.equal('');
done();
}, 100);
});
it('only set offset-bottom props', done => {
vm = createVue(`
<div>
<div style="width: 100%; height: 2000px"></div>
<Affix :offset-bottom="20">
<span class="demo-affix">Fixed at the top</span>
</Affix>
<div style="width: 100%; height: 2000px"></div>
</div>
`, true);
const affix = vm.$el.children[1].children[0];
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.bottom).to.equal('');
// Affix component haven't run handleScroll function when component mounted in real dom.
// use scrollTo() to trigger scroll event.
window.scrollTo(0, 100);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.true;
expect(affix.style.bottom).to.equal('20px');
window.scrollTo(0, 10000);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.bottom).to.equal('');
done();
}, 100);
}, 100);
});
it('both props are set, only offset-bottom is valid', done => {
vm = createVue(`
<div>
<div style="width: 100%; height: 2000px"></div>
<Affix :offset-bottom="20" :offset-top="20">
<span class="demo-affix">Fixed at the top</span>
</Affix>
<div style="width: 100%; height: 2000px"></div>
</div>
`, true);
const affix = vm.$el.children[1].children[0];
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.bottom).to.equal('');
// Affix component haven't run handleScroll function when component mounted in real dom.
// use scrollTo() to trigger scroll event.
window.scrollTo(0, 100);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.true;
expect(affix.style.bottom).to.equal('20px');
window.scrollTo(0, 10000);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.bottom).to.equal('');
done();
}, 100);
}, 100);
});
it('both props are not set, should fixed top and top equal 0px', done => {
vm = createVue(`
<div>
<Affix>
<span class="demo-affix">Fixed at the top</span>
</Affix>
<div style="width: 100%; height: 2000px"></div>
</div>
`, true);
const affix = vm.$el.children[0].children[0];
const fakeBlock = vm.$el.children[0].children[1];
expect(affix.classList.contains('ivu-affix')).to.false;
expect(affix.style.top).to.equal('');
expect(fakeBlock.style.display).to.equal('none');
window.scrollTo(0, 10000);
setTimeout(()=>{
expect(affix.classList.contains('ivu-affix')).to.true;
expect(affix.style.top).to.equal('0px');
expect(fakeBlock.style.display).to.equal('');
done();
}, 100);
});
});

2
types/affix.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/alert.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/anchor.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -72,4 +72,8 @@ export declare interface AutoComplete extends Vue {
*
*/
$emit(eventName: 'on-blur', event: KeyboardEvent): this;
/**
*
*/
$emit(eventName: 'on-clear'): this;
}

6
types/avatar.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -27,4 +27,8 @@ export declare interface Avatar extends Vue {
*
*/
'custom-icon'?: string;
/**
* src
*/
$emit(eventName: 'on-error', event: Event): this;
}

2
types/back-top.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/badge.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/button.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/card.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/carousel.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/cascader.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/cell.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/checkbox.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/circle.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/collapse.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/content.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -111,6 +111,10 @@ export declare interface DatePicker extends Vue {
* @default {}
*/
'time-picker-options'?: object;
/**
*
*/
'separator'?: string;
/**
* 2016-01-01
*/

7
types/divider.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -20,4 +20,9 @@ export declare interface Divider extends Vue {
* @default false
*/
dashed?: boolean;
/**
* small default
* @default default
*/
size?: string;
}

19
types/drawer.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -67,6 +67,15 @@ export declare interface Drawer extends Vue {
* @default false
*/
'inner'?: boolean;
/**
*
* @default false
*/
'draggable'?: boolean;
/**
* Promise
*/
'before-close'?: () => void | PromiseConstructor;
/**
*
*/
@ -75,6 +84,10 @@ export declare interface Drawer extends Vue {
*
*/
$emit(eventName: 'on-visible-change', value: boolean): this;
/**
*
*/
$emit(eventName: 'on-resize-width'): number;
/**
* slot插槽对象
*/
@ -91,5 +104,9 @@ export declare interface Drawer extends Vue {
*
*/
close: VNode[];
/**
*
*/
trigger: VNode[];
};
}

6
types/dropdown.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -28,6 +28,10 @@ export declare interface Dropdown extends Vue {
* @default false
*/
transfer?: boolean;
/**
* transfer class
*/
'transfer-class-name'?: string;
/**
*
*

2
types/footer.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/form.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/grid.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/header.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/icon.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/index.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

6
types/input.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -6,10 +6,10 @@ import Vue, { VNode } from 'vue';
export declare interface Input extends Vue {
/**
* textpasswordtextareaurlemaildate
* textpasswordtextareaurlemaildatenumbertel
* @default text
*/
type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date';
type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date' | 'number' | 'tel';
/**
* 使 v-model
* @default

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

15
types/layout.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -8,11 +8,12 @@ export declare interface Layout extends Vue {
/**
* xs,sm,md,lg,xl或xxl
* {
* xs?: '480px',
* sm?: '768px',
* md?: '992px',
* lg?: '1200px',
* xl?: '1600px'
* xs: '480px',
* sm: '576px',
* md: '768px',
* lg: '992px',
* xl: '1200px',
* xxl: '1600px'
* }
*/
breakpoint?: string;
@ -69,4 +70,4 @@ export declare interface Layout extends Vue {
* methods, Sider展开-
*/
toggleCollapse(): void;
}
}·

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/menu.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/message.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/modal.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/notice.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/page.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/poptip.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

6
types/progress.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -35,6 +35,10 @@ export declare interface Progress extends Vue {
* @default 0
*/
'success-percent'?: number;
/**
*
*/
'stroke-color'?: string;
/**
* slot插槽对象
*/

2
types/radio.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/rate.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/scroll.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

6
types/select.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -88,6 +88,10 @@ export declare interface Select extends Vue {
* id Form
*/
'element-id'?: string;
/**
* transfer class
*/
'transfer-class-name'?: string;
/**
* Option变化时触发 value label label-in-value
*/

2
types/sider.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/slider.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/spin.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/split.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/steps.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/switch.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

18
types/table.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -75,6 +75,16 @@ export declare interface Table extends Vue {
* @default
*/
"no-filtered-data-text"?: string;
/**
* @on-drag-drop 使
* @default false
*/
"draggable"?: boolean;
/**
* 使 tooltip dark light
* @default dark
*/
"tooltip-theme"?: string;
/**
* highlight-row
* currentRow
@ -154,6 +164,12 @@ export declare interface Table extends Vue {
* status
*/
$emit(eventName: "on-expand", row: object, status: string): this;
/**
*
* index1
* index2
*/
$emit(eventName: "on-drag-drop", index1: number, index2: number): this;
/**
*
*/

14
types/tabs.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -39,6 +39,10 @@ export declare interface Tabs extends Vue {
* Promise
*/
'before-remove'?: (index: number) => {};
/**
* 使tabs时name区分层级
*/
name?: string;
/**
* tab
*/
@ -82,4 +86,12 @@ export declare interface TabPane extends Vue {
* @default null
*/
closable?: boolean;
/**
* 使tabs时tabs的name字段
*/
tab?: string;
/**
* tabpane使用v-if时index(0)
*/
index?: number;
}

2
types/tag.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/timeline.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/tooltip.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

2
types/transfer.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git

7
types/tree.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -43,6 +43,11 @@ export declare interface Tree extends Vue {
* @default false
*/
"check-strictly"?: boolean;
/**
* show-checkbox select check
* @default false
*/
"check-directly"?: boolean;
/**
*
* @default

7
types/upload.d.ts vendored
View file

@ -1,4 +1,4 @@
// Type definitions for iview 3.1.0
// Type definitions for iview 3.3.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
@ -24,6 +24,11 @@ export declare interface Upload extends Vue {
* @default false
*/
paste?: boolean;
/**
*
* @default false
*/
disabled?: boolean;
/**
*
*/