Commit 41c71278c2d1884684274b0ddebf6422977b6c49
Committed by
GitHub

Merge pull request #5445 from yangdan8/2.0_tabs和index添加新api
d.ts更新到3.3.1
Showing
2 changed files
with
14 additions
and
2 deletions
Show diff stats
types/input.d.ts
@@ -6,10 +6,10 @@ import Vue, { VNode } from 'vue'; | @@ -6,10 +6,10 @@ import Vue, { VNode } from 'vue'; | ||
6 | 6 | ||
7 | export declare interface Input extends Vue { | 7 | export declare interface Input extends Vue { |
8 | /** | 8 | /** |
9 | - * 输入框类型,可选值为 text、password、textarea、url、email、date | 9 | + * 输入框类型,可选值为 text、password、textarea、url、email、date、number、tel |
10 | * @default text | 10 | * @default text |
11 | */ | 11 | */ |
12 | - type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date'; | 12 | + type?: 'text' | 'password' | 'textarea' | 'url' | 'email' | 'date' | 'number' | 'tel'; |
13 | /** | 13 | /** |
14 | * 绑定的值,可使用 v-model 双向绑定 | 14 | * 绑定的值,可使用 v-model 双向绑定 |
15 | * @default 空 | 15 | * @default 空 |
types/tabs.d.ts
@@ -40,6 +40,10 @@ export declare interface Tabs extends Vue { | @@ -40,6 +40,10 @@ export declare interface Tabs extends Vue { | ||
40 | */ | 40 | */ |
41 | 'before-remove'?: (index: number) => {}; | 41 | 'before-remove'?: (index: number) => {}; |
42 | /** | 42 | /** |
43 | + * 当嵌套使用tabs时,指定name区分层级 | ||
44 | + */ | ||
45 | + name?: string; | ||
46 | + /** | ||
43 | * tab 被点击时触发 | 47 | * tab 被点击时触发 |
44 | */ | 48 | */ |
45 | $emit(eventName: 'on-click', name: string): this; | 49 | $emit(eventName: 'on-click', name: string): this; |
@@ -82,4 +86,12 @@ export declare interface TabPane extends Vue { | @@ -82,4 +86,12 @@ export declare interface TabPane extends Vue { | ||
82 | * @default null | 86 | * @default null |
83 | */ | 87 | */ |
84 | closable?: boolean; | 88 | closable?: boolean; |
89 | + /** | ||
90 | + * 当嵌套使用tabs时,设置该属性指向对应tabs的name字段 | ||
91 | + */ | ||
92 | + tab?: string; | ||
93 | + /** | ||
94 | + * 在tabpane使用v-if时,并不会按照预先的顺序渲染,这时可设置index,并从小到大排序(需大于0) | ||
95 | + */ | ||
96 | + index?: number; | ||
85 | } | 97 | } |