commit
a0059e4570
68 changed files with 326 additions and 111 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'
|
||||
},
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
tab: {
|
||||
type: String
|
||||
},
|
||||
// 在 TabPane 使用 v-if 时,并不会按照预先的顺序渲染,这时可设置 index,并从小到大排序
|
||||
// 数值需大于 0
|
||||
index: {
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -96,6 +96,10 @@
|
|||
|
||||
&-no-mask{
|
||||
pointer-events: none;
|
||||
|
||||
.@{drawer-prefix-cls}-drag{
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-drag{
|
||||
|
|
137
test/unit/specs/affix.spec.js
Normal file
137
test/unit/specs/affix.spec.js
Normal 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
2
types/affix.d.ts
vendored
|
@ -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
2
types/alert.d.ts
vendored
|
@ -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
2
types/anchor.d.ts
vendored
|
@ -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/auto-complete.d.ts
vendored
6
types/auto-complete.d.ts
vendored
|
@ -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
6
types/avatar.d.ts
vendored
|
@ -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
2
types/back-top.d.ts
vendored
|
@ -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
2
types/badge.d.ts
vendored
|
@ -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/breadcrumb.d.ts
vendored
2
types/breadcrumb.d.ts
vendored
|
@ -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
2
types/button.d.ts
vendored
|
@ -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
2
types/card.d.ts
vendored
|
@ -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
2
types/carousel.d.ts
vendored
|
@ -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
2
types/cascader.d.ts
vendored
|
@ -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
2
types/cell.d.ts
vendored
|
@ -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
2
types/checkbox.d.ts
vendored
|
@ -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
2
types/circle.d.ts
vendored
|
@ -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
2
types/collapse.d.ts
vendored
|
@ -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/color-picker.d.ts
vendored
2
types/color-picker.d.ts
vendored
|
@ -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
2
types/content.d.ts
vendored
|
@ -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/date-picker.d.ts
vendored
6
types/date-picker.d.ts
vendored
|
@ -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
7
types/divider.d.ts
vendored
|
@ -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
19
types/drawer.d.ts
vendored
|
@ -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
6
types/dropdown.d.ts
vendored
|
@ -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
2
types/footer.d.ts
vendored
|
@ -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
2
types/form.d.ts
vendored
|
@ -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
2
types/grid.d.ts
vendored
|
@ -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
2
types/header.d.ts
vendored
|
@ -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
2
types/icon.d.ts
vendored
|
@ -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
2
types/index.d.ts
vendored
|
@ -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/input-number.d.ts
vendored
2
types/input-number.d.ts
vendored
|
@ -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
6
types/input.d.ts
vendored
|
@ -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 {
|
||||
/**
|
||||
* 输入框类型,可选值为 text、password、textarea、url、email、date
|
||||
* 输入框类型,可选值为 text、password、textarea、url、email、date、number、tel
|
||||
* @default text
|
||||
*/
|
||||
type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date';
|
||||
type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date' | 'number' | 'tel';
|
||||
/**
|
||||
* 绑定的值,可使用 v-model 双向绑定
|
||||
* @default 空
|
||||
|
|
2
types/iview.components.d.ts
vendored
2
types/iview.components.d.ts
vendored
|
@ -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
15
types/layout.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
}更多·
|
2
types/loading-bar.d.ts
vendored
2
types/loading-bar.d.ts
vendored
|
@ -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
2
types/menu.d.ts
vendored
|
@ -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
2
types/message.d.ts
vendored
|
@ -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
2
types/modal.d.ts
vendored
|
@ -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
2
types/notice.d.ts
vendored
|
@ -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
2
types/page.d.ts
vendored
|
@ -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
2
types/poptip.d.ts
vendored
|
@ -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
6
types/progress.d.ts
vendored
|
@ -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
2
types/radio.d.ts
vendored
|
@ -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
2
types/rate.d.ts
vendored
|
@ -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
2
types/scroll.d.ts
vendored
|
@ -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
6
types/select.d.ts
vendored
|
@ -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
2
types/sider.d.ts
vendored
|
@ -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
2
types/slider.d.ts
vendored
|
@ -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
2
types/spin.d.ts
vendored
|
@ -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
2
types/split.d.ts
vendored
|
@ -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
2
types/steps.d.ts
vendored
|
@ -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
2
types/switch.d.ts
vendored
|
@ -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
18
types/table.d.ts
vendored
|
@ -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
14
types/tabs.d.ts
vendored
|
@ -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
2
types/tag.d.ts
vendored
|
@ -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/time-picker.d.ts
vendored
2
types/time-picker.d.ts
vendored
|
@ -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
|
||||
|
|
|
@ -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
2
types/timeline.d.ts
vendored
|
@ -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
2
types/tooltip.d.ts
vendored
|
@ -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
2
types/transfer.d.ts
vendored
|
@ -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
7
types/tree.d.ts
vendored
|
@ -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
7
types/upload.d.ts
vendored
|
@ -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;
|
||||
/**
|
||||
* 上传时附带的额外参数
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue