bkui-vue 2.0.2-beta.46 → 2.0.2-beta.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +7 -3
- package/dist/index.umd.js +1 -1
- package/lib/index.js +1 -1
- package/lib/tab/index.d.ts +12 -0
- package/lib/tab/index.js +11 -5
- package/lib/tab/props.d.ts +3 -0
- package/lib/tab/tab.d.ts +6 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
package/lib/tab/index.d.ts
CHANGED
@@ -45,6 +45,9 @@ declare const BkTab: {
|
|
45
45
|
} & {
|
46
46
|
default: string;
|
47
47
|
};
|
48
|
+
beforeChange: {
|
49
|
+
type: FunctionConstructor;
|
50
|
+
};
|
48
51
|
}>> & {
|
49
52
|
onDrag?: (...args: any[]) => any;
|
50
53
|
onChange?: (...args: any[]) => any;
|
@@ -107,6 +110,9 @@ declare const BkTab: {
|
|
107
110
|
} & {
|
108
111
|
default: string;
|
109
112
|
};
|
113
|
+
beforeChange: {
|
114
|
+
type: FunctionConstructor;
|
115
|
+
};
|
110
116
|
}>> & {
|
111
117
|
onDrag?: (...args: any[]) => any;
|
112
118
|
onChange?: (...args: any[]) => any;
|
@@ -180,6 +186,9 @@ declare const BkTab: {
|
|
180
186
|
} & {
|
181
187
|
default: string;
|
182
188
|
};
|
189
|
+
beforeChange: {
|
190
|
+
type: FunctionConstructor;
|
191
|
+
};
|
183
192
|
}>> & {
|
184
193
|
onDrag?: (...args: any[]) => any;
|
185
194
|
onChange?: (...args: any[]) => any;
|
@@ -259,6 +268,9 @@ declare const BkTab: {
|
|
259
268
|
} & {
|
260
269
|
default: string;
|
261
270
|
};
|
271
|
+
beforeChange: {
|
272
|
+
type: FunctionConstructor;
|
273
|
+
};
|
262
274
|
}>> & {
|
263
275
|
onDrag?: (...args: any[]) => any;
|
264
276
|
onChange?: (...args: any[]) => any;
|
package/lib/tab/index.js
CHANGED
@@ -856,7 +856,10 @@ var tabProps = {
|
|
856
856
|
extCls: shared_namespaceObject.PropTypes.string.def(''),
|
857
857
|
validateActive: shared_namespaceObject.PropTypes.bool.def(true),
|
858
858
|
activeBarSize: shared_namespaceObject.PropTypes.number.def(2),
|
859
|
-
activeBarColor: shared_namespaceObject.PropTypes.string.def('#3a84ff')
|
859
|
+
activeBarColor: shared_namespaceObject.PropTypes.string.def('#3a84ff'),
|
860
|
+
beforeChange: {
|
861
|
+
type: Function
|
862
|
+
}
|
860
863
|
};
|
861
864
|
var tabNavProps = _objectSpread({
|
862
865
|
active: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.string]).def(''),
|
@@ -1999,10 +2002,13 @@ function tab_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1999
2002
|
});
|
2000
2003
|
},
|
2001
2004
|
tabChange: function tabChange(name) {
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2005
|
+
var _props$beforeChange, _props$beforeChange2;
|
2006
|
+
if ((_props$beforeChange = (_props$beforeChange2 = _props.beforeChange) === null || _props$beforeChange2 === void 0 ? void 0 : _props$beforeChange2.call(_props, name)) !== null && _props$beforeChange !== void 0 ? _props$beforeChange : true) {
|
2007
|
+
// emit('xxx') 会调用onXxx函数, 所以不必在主动调用onXxx函数了
|
2008
|
+
emit('change', name);
|
2009
|
+
emit('tab-change', name);
|
2010
|
+
emit('update:active', name);
|
2011
|
+
}
|
2006
2012
|
},
|
2007
2013
|
tabRemove: function tabRemove(index, panel) {
|
2008
2014
|
// emit('xxx') 会调用onXxx函数, 所以不必在主动调用onXxx函数了
|
package/lib/tab/props.d.ts
CHANGED
package/lib/tab/tab.d.ts
CHANGED
@@ -39,6 +39,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
39
39
|
} & {
|
40
40
|
default: string;
|
41
41
|
};
|
42
|
+
beforeChange: {
|
43
|
+
type: FunctionConstructor;
|
44
|
+
};
|
42
45
|
}, {
|
43
46
|
isMounted: import("vue").Ref<boolean>;
|
44
47
|
panels: import("vue").Ref<any[]>;
|
@@ -89,6 +92,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
89
92
|
} & {
|
90
93
|
default: string;
|
91
94
|
};
|
95
|
+
beforeChange: {
|
96
|
+
type: FunctionConstructor;
|
97
|
+
};
|
92
98
|
}>> & {
|
93
99
|
onDrag?: (...args: any[]) => any;
|
94
100
|
onChange?: (...args: any[]) => any;
|