Merge pull request #30 from iview/2.0

update
This commit is contained in:
yangdan8 2019-05-07 03:52:50 -05:00 committed by GitHub
commit 9837e9af02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 858 additions and 191 deletions

View file

@ -31,7 +31,7 @@ iView
</td> </td>
<td align="center" valign="middle"> <td align="center" valign="middle">
<a href="https://e.coding.net/?utm_source=iview" target="_blank"> <a href="https://e.coding.net/?utm_source=iview" target="_blank">
<img width="300" src="https://file.iviewui.com/asd/asd-coding3.png"> <img width="300" src="https://file.iviewui.com/asd/asd-coding4.png">
</a> </a>
</td> </td>
<td align="center" valign="middle"> <td align="center" valign="middle">

848
dist/iview.js vendored

File diff suppressed because it is too large Load diff

2
dist/iview.js.map vendored

File diff suppressed because one or more lines are too long

6
dist/iview.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/iview.min.js.gz vendored

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
dist/styles/fonts/ionicons.woff2 vendored Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "iview", "name": "iview",
"version": "3.4.0-rc.2", "version": "3.4.1",
"title": "iView", "title": "iView",
"description": "A high quality UI components Library with Vue.js", "description": "A high quality UI components Library with Vue.js",
"homepage": "http://www.iviewui.com", "homepage": "http://www.iviewui.com",

View file

@ -168,7 +168,9 @@ export default {
this.handleScrollTo(); this.handleScrollTo();
this.handleSetInkTop(); this.handleSetInkTop();
this.updateTitleOffset(); this.updateTitleOffset();
this.upperFirstTitle = this.scrollElement.scrollTop < this.titlesOffsetArr[0].offset; if (this.titlesOffsetArr[0]) {
this.upperFirstTitle = this.scrollElement.scrollTop < this.titlesOffsetArr[0].offset;
}
on(this.scrollContainer, 'scroll', this.handleScroll); on(this.scrollContainer, 'scroll', this.handleScroll);
on(window, 'hashchange', this.handleHashChange); on(window, 'hashchange', this.handleHashChange);
}); });

View file

@ -2,7 +2,7 @@
<li :class="classes"> <li :class="classes">
{{ data.label }} {{ data.label }}
<Icon :type="arrowType" :custom="customArrowType" :size="arrowSize" v-if="showArrow" /> <Icon :type="arrowType" :custom="customArrowType" :size="arrowSize" v-if="showArrow" />
<i v-if="showLoading" class="ivu-icon ivu-icon-ios-loading ivu-load-loop"></i> <i v-if="showLoading" class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-cascader-menu-item-loading"></i>
</li> </li>
</template> </template>
<script> <script>

View file

@ -292,7 +292,7 @@
} }
}, },
change (event) { change (event) {
if (event.type == 'change') return; if (event.type == 'change' && this.activeChange) return;
if (event.type == 'input' && !this.activeChange) return; if (event.type == 'input' && !this.activeChange) return;
let val = event.target.value.trim(); let val = event.target.value.trim();

View file

@ -137,6 +137,9 @@
//margin-top: -6px; //margin-top: -6px;
transform: translateY(-50%); transform: translateY(-50%);
} }
&-loading{
margin-top: -6px;
}
&-active{ &-active{
background-color: @background-color-select-hover; background-color: @background-color-select-hover;

View file

@ -49,4 +49,5 @@
@import "anchor"; @import "anchor";
@import "time"; @import "time";
@import "cell"; @import "cell";
@import "drawer"; @import "drawer";
@import "breadcrumb";

View file

@ -7,7 +7,6 @@
@import "close"; @import "close";
@import "checkbox"; @import "checkbox";
@import "input"; @import "input";
@import "breadcrumb";
@import "mask"; @import "mask";
@import "content"; // card、modal @import "content"; // card、modal
@import "tooltip"; @import "tooltip";

View file

@ -57,9 +57,15 @@
.@{col-prefix-cls}@{class}-pull-@{index} { .@{col-prefix-cls}@{class}-pull-@{index} {
right: auto; right: auto;
} }
.@{col-prefix-cls}@{class}-offset-@{index} {
margin-left: 0;
}
.@{col-prefix-cls}@{class}-order-@{index} {
order: 0;
}
} }
.make-grid(@class: ~'') { .make-grid(@class: ~'') {
.float-grid-columns(@class); .float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class); .loop-grid-columns(@grid-columns, @class);
} }

View file

@ -27,4 +27,9 @@ export declare interface BreadcrumbItem extends Vue {
* @default _self * @default _self
*/ */
target?: '_blank' | '_self' | '_parent' | '_top'; target?: '_blank' | '_self' | '_parent' | '_top';
/**
* vue-router append
* @default false
*/
append?: boolean;
} }

5
types/button.d.ts vendored
View file

@ -66,6 +66,11 @@ export declare interface Button extends Vue {
* @default _self * @default _self
*/ */
target?: '_blank' | '_self' | '_parent' | '_top'; target?: '_blank' | '_self' | '_parent' | '_top';
/**
* vue-router append
* @default false
*/
append?: boolean;
} }
export declare interface ButtonGroup extends Vue { export declare interface ButtonGroup extends Vue {

5
types/cell.d.ts vendored
View file

@ -45,6 +45,11 @@ export declare interface Cell extends Vue {
* @default _self * @default _self
*/ */
target?: '_blank' | '_self' | '_parent' | '_top'; target?: '_blank' | '_self' | '_parent' | '_top';
/**
* vue-router append
* @default false
*/
append?: boolean;
/** /**
* slot插槽对象 * slot插槽对象
*/ */

View file

@ -131,6 +131,10 @@ export declare interface DatePicker extends Vue {
* confirm clearable = true * confirm clearable = true
*/ */
$emit(eventName: 'on-clear'): this; $emit(eventName: 'on-clear'): this;
/**
*
*/
$emit(eventName: 'on-clickoutside',event: MouseEvent): this;
/** /**
* slot插槽对象 * slot插槽对象
*/ */

5
types/dropdown.d.ts vendored
View file

@ -32,6 +32,11 @@ export declare interface Dropdown extends Vue {
* transfer class * transfer class
*/ */
'transfer-class-name'?: string; 'transfer-class-name'?: string;
/**
* stop-propagation
* @default false
*/
'stop-propagation'?: boolean;
/** /**
* *
* *

4
types/input.d.ts vendored
View file

@ -140,6 +140,10 @@ export declare interface Input extends Vue {
* search * search
*/ */
$emit(eventName: 'on-search', value: string): this; $emit(eventName: 'on-search', value: string): this;
/**
* clearable
*/
$emit(eventName: 'on-clear'): this;
/** /**
* *
*/ */

View file

@ -63,18 +63,74 @@ export { Transfer } from './transfer';
export { Tree, TreeChild } from './tree'; export { Tree, TreeChild } from './tree';
export { Upload } from './upload'; export { Upload } from './upload';
interface IViewGlobalOptions{
size?: string;
transfer?: boolean | string;
select: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
cell: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
menu: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
tree: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
cascader: {
arrow: string;
customArrow: string;
arrowSize: number | string;
itemArrow: string;
customItemArrow: string;
itemArrowSize: number | string;
};
colorPicker: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
datePicker: {
icon: string;
customIcon: string;
iconSize: number | string;
};
timePicker: {
icon: string;
customIcon: string;
iconSize: number | string;
};
tabs: {
closeIcon: string;
customCloseIcon: string;
closeIconSize: number | string;
};
modal: {
maskClosable: boolean | string;
};
}
interface IViewInstallOptions extends IViewGlobalOptions{
locale?: any;
i18n?: any;
}
declare const API: { declare const API: {
version: string; version: string;
locale: (l:any) => void; locale: (l: any) => void;
i18n: (fn:any) => void; i18n: (fn: any) => void;
install: ( install: (
Vue: Vue, Vue: Vue,
opts: { opts: IViewInstallOptions
locale?: any;
i18n?: any;
size?: any;
transfer?: any;
}
) => void; ) => void;
lang: (code: string) => void; lang: (code: string) => void;
}; };
@ -83,9 +139,6 @@ export default API;
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
interface Vue { interface Vue {
$IVIEW: { $IVIEW: IViewGlobalOptions;
size?: string;
transfer?: string;
};
} }
} }

View file

@ -41,11 +41,6 @@ export declare interface LoadingBarConfig {
* @default primary * @default primary
*/ */
color?: string; color?: string;
/**
* , 800ms
* @default 800
*/
duration?: number;
/** /**
* iView * iView
* @default error * @default error
@ -56,6 +51,11 @@ export declare interface LoadingBarConfig {
* @default 2 * @default 2
*/ */
height?: number; height?: number;
/**
* , 800ms
* @default 800
*/
duration?: number;
} }
declare module 'vue/types/vue' { declare module 'vue/types/vue' {

5
types/menu.d.ts vendored
View file

@ -71,6 +71,11 @@ export declare interface MenuItem extends Vue {
* @default _self * @default _self
*/ */
target?: '_blank' | '_self' | '_parent' | '_top'; target?: '_blank' | '_self' | '_parent' | '_top';
/**
* vue-router append
* @default false
*/
append?: boolean;
} }
export declare interface MenuSub extends Vue { export declare interface MenuSub extends Vue {

5
types/poptip.d.ts vendored
View file

@ -37,6 +37,11 @@ export declare interface Poptip extends Vue {
* @default false * @default false
*/ */
confirm?: boolean; confirm?: boolean;
/**
*
* @default false
*/
disabled?: boolean;
/** /**
* confirm * confirm
* @default * @default

21
types/select.d.ts vendored
View file

@ -92,6 +92,18 @@ export declare interface Select extends Vue {
* transfer class * transfer class
*/ */
'transfer-class-name'?: string; 'transfer-class-name'?: string;
/**
* Select
*/
prefix?: string;
/**
* tag
*/
'max-tag-count'?: number;
/**
* tag
*/
'max-tag-placeholder'?: () => any;
/** /**
* Option变化时触发 value label label-in-value * Option变化时触发 value label label-in-value
*/ */
@ -116,6 +128,15 @@ export declare interface Select extends Vue {
* clearable="true" * clearable="true"
*/ */
clearSingleSelect(): void; clearSingleSelect(): void;
/**
* slot插槽对象
*/
$slots: {
/**
* Select
*/
prefix: VNode[];
};
} }
export declare interface Option extends Vue { export declare interface Option extends Vue {

5
types/slider.d.ts vendored
View file

@ -59,6 +59,11 @@ export declare interface Slider extends Vue {
* largesmalldefault或者不填 show-input * largesmalldefault或者不填 show-input
*/ */
'input-size'?: '' | 'large' | 'small' | 'default'; 'input-size'?: '' | 'large' | 'small' | 'default';
/**
* InputNumber active-change
* @default true
*/
'active-change'?: boolean;
/** /**
* *
*/ */

11
types/table.d.ts vendored
View file

@ -40,6 +40,10 @@ export declare interface Table extends Vue {
* px * px
*/ */
height?: number | string; height?: number | string;
/**
* px
*/
'max-height'?: number | string;
/** /**
* *
* @default false * @default false
@ -85,6 +89,11 @@ export declare interface Table extends Vue {
* @default dark * @default dark
*/ */
"tooltip-theme"?: string; "tooltip-theme"?: string;
/**
* 使 row-key
* @default false
*/
"row-key"?: boolean;
/** /**
* highlight-row * highlight-row
* currentRow * currentRow
@ -423,7 +432,7 @@ export declare interface TableExportCsvParams {
/** /**
* *
*/ */
callback?: () => void; callback?: (data?: any) => void;
/** /**
* (,) * (,)
* @default , * @default ,