bkui-vue 0.0.1-beta.355 → 0.0.1-beta.357
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 +26 -26
- package/dist/index.esm.js +50 -9
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -0
- package/lib/date-picker/index.js +1 -1
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +6 -9
- package/lib/tab/index.d.ts +22 -22
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +21 -6
- package/lib/tab/tab-nav.d.ts +5 -5
- package/lib/tab/tab.css +63 -11
- package/lib/tab/tab.d.ts +10 -10
- package/lib/tab/tab.less +67 -13
- package/lib/tab/tab.variable.css +63 -11
- package/package.json +2 -1
package/lib/tab/index.d.ts
CHANGED
@@ -4,12 +4,12 @@ declare const BkTab: {
|
|
4
4
|
$: import("vue").ComponentInternalInstance;
|
5
5
|
$data: {};
|
6
6
|
$props: Partial<{
|
7
|
-
type: "card" | "border-card" | "unborder-card";
|
7
|
+
type: "card" | "border-card" | "unborder-card" | "card-tab";
|
8
8
|
extCls: string;
|
9
9
|
active: string | number;
|
10
10
|
closable: boolean;
|
11
11
|
showHeader: boolean;
|
12
|
-
sortType: "
|
12
|
+
sortType: "replace" | "insert";
|
13
13
|
tabPosition: "top" | "right" | "left";
|
14
14
|
addable: boolean;
|
15
15
|
sortable: boolean;
|
@@ -22,8 +22,8 @@ declare const BkTab: {
|
|
22
22
|
active: import("vue-types").VueTypeDef<string | number> & {
|
23
23
|
default: string | number;
|
24
24
|
};
|
25
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
26
|
-
default: "card" | "border-card" | "unborder-card";
|
25
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
26
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
27
27
|
};
|
28
28
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
29
29
|
default: "top" | "right" | "left";
|
@@ -31,8 +31,8 @@ declare const BkTab: {
|
|
31
31
|
closable: BooleanConstructor;
|
32
32
|
addable: BooleanConstructor;
|
33
33
|
sortable: BooleanConstructor;
|
34
|
-
sortType: import("vue-types").VueTypeDef<"
|
35
|
-
default: "
|
34
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
35
|
+
default: "replace" | "insert";
|
36
36
|
};
|
37
37
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
38
38
|
default: number;
|
@@ -99,8 +99,8 @@ declare const BkTab: {
|
|
99
99
|
active: import("vue-types").VueTypeDef<string | number> & {
|
100
100
|
default: string | number;
|
101
101
|
};
|
102
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
103
|
-
default: "card" | "border-card" | "unborder-card";
|
102
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
103
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
104
104
|
};
|
105
105
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
106
106
|
default: "top" | "right" | "left";
|
@@ -108,8 +108,8 @@ declare const BkTab: {
|
|
108
108
|
closable: BooleanConstructor;
|
109
109
|
addable: BooleanConstructor;
|
110
110
|
sortable: BooleanConstructor;
|
111
|
-
sortType: import("vue-types").VueTypeDef<"
|
112
|
-
default: "
|
111
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
112
|
+
default: "replace" | "insert";
|
113
113
|
};
|
114
114
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
115
115
|
default: number;
|
@@ -167,12 +167,12 @@ declare const BkTab: {
|
|
167
167
|
tabSort(dragTabIndex: number, dropTabIndex: number, sortType: string): boolean;
|
168
168
|
tabDrag(dragTabIndex: number, dragEvent: DragEvent): void;
|
169
169
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "drag" | "add" | "remove" | "add-panel" | "tab-change" | "remove-panel" | "sort-change" | "on-drag-tab" | "update:active" | "sort")[], string, {
|
170
|
-
type: "card" | "border-card" | "unborder-card";
|
170
|
+
type: "card" | "border-card" | "unborder-card" | "card-tab";
|
171
171
|
extCls: string;
|
172
172
|
active: string | number;
|
173
173
|
closable: boolean;
|
174
174
|
showHeader: boolean;
|
175
|
-
sortType: "
|
175
|
+
sortType: "replace" | "insert";
|
176
176
|
tabPosition: "top" | "right" | "left";
|
177
177
|
addable: boolean;
|
178
178
|
sortable: boolean;
|
@@ -205,8 +205,8 @@ declare const BkTab: {
|
|
205
205
|
active: import("vue-types").VueTypeDef<string | number> & {
|
206
206
|
default: string | number;
|
207
207
|
};
|
208
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
209
|
-
default: "card" | "border-card" | "unborder-card";
|
208
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
209
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
210
210
|
};
|
211
211
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
212
212
|
default: "top" | "right" | "left";
|
@@ -214,8 +214,8 @@ declare const BkTab: {
|
|
214
214
|
closable: BooleanConstructor;
|
215
215
|
addable: BooleanConstructor;
|
216
216
|
sortable: BooleanConstructor;
|
217
|
-
sortType: import("vue-types").VueTypeDef<"
|
218
|
-
default: "
|
217
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
218
|
+
default: "replace" | "insert";
|
219
219
|
};
|
220
220
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
221
221
|
default: number;
|
@@ -280,8 +280,8 @@ declare const BkTab: {
|
|
280
280
|
active: import("vue-types").VueTypeDef<string | number> & {
|
281
281
|
default: string | number;
|
282
282
|
};
|
283
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
284
|
-
default: "card" | "border-card" | "unborder-card";
|
283
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
284
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
285
285
|
};
|
286
286
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
287
287
|
default: "top" | "right" | "left";
|
@@ -289,8 +289,8 @@ declare const BkTab: {
|
|
289
289
|
closable: BooleanConstructor;
|
290
290
|
addable: BooleanConstructor;
|
291
291
|
sortable: BooleanConstructor;
|
292
|
-
sortType: import("vue-types").VueTypeDef<"
|
293
|
-
default: "
|
292
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
293
|
+
default: "replace" | "insert";
|
294
294
|
};
|
295
295
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
296
296
|
default: number;
|
@@ -348,12 +348,12 @@ declare const BkTab: {
|
|
348
348
|
tabSort(dragTabIndex: number, dropTabIndex: number, sortType: string): boolean;
|
349
349
|
tabDrag(dragTabIndex: number, dragEvent: DragEvent): void;
|
350
350
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "drag" | "add" | "remove" | "add-panel" | "tab-change" | "remove-panel" | "sort-change" | "on-drag-tab" | "update:active" | "sort")[], "change" | "drag" | "sort" | "add" | "remove" | "add-panel" | "tab-change" | "remove-panel" | "sort-change" | "on-drag-tab" | "update:active", {
|
351
|
-
type: "card" | "border-card" | "unborder-card";
|
351
|
+
type: "card" | "border-card" | "unborder-card" | "card-tab";
|
352
352
|
extCls: string;
|
353
353
|
active: string | number;
|
354
354
|
closable: boolean;
|
355
355
|
showHeader: boolean;
|
356
|
-
sortType: "
|
356
|
+
sortType: "replace" | "insert";
|
357
357
|
tabPosition: "top" | "right" | "left";
|
358
358
|
addable: boolean;
|
359
359
|
sortable: boolean;
|
package/lib/tab/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../icon/"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../icon/"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../icon/")):t(e["../shared"],e.vue,e["vue-types"],e["../icon/"]);for(var
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../icon/"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../icon/"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../icon/")):t(e["../shared"],e.vue,e["vue-types"],e["../icon/"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{"use strict";var n={7685:e=>{e.exports=r},4212:t=>{t.exports=e},748:e=>{e.exports=t},210:e=>{e.exports=a}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,s),a.exports}s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{s.r(l),s.d(l,{BkTab:()=>m,BkTabPanel:()=>g,default:()=>T});var e=s(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var a,r,n=s(748),o=s(210);!function(e){e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab"}(a||(a={})),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top"}(r||(r={}));var i,u=(0,o.toType)("position",{}).def(r.TOP);!function(e){e.REPLACE="replace",e.INSERT="insert"}(i||(i={}));var d=(0,o.toType)("sortType",{}).def(i.REPLACE),p={tabAdd:{type:Function,default:function(){return{}}},tabChange:{type:Function,default:function(e){return e}},tabRemove:{type:Function,default:function(e){return e}},tabSort:{type:Function,default:function(){return{}}},tabDrag:{type:Function,default:function(){return{}}}},c={active:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(""),type:(0,o.toType)("type",{}).def(a.BORDER_CARD),tabPosition:u,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d,labelHeight:e.PropTypes.number.def(50),scrollStep:e.PropTypes.number.def(200),extCls:e.PropTypes.string.def(""),validateActive:e.PropTypes.bool.def(!0),showHeader:e.PropTypes.bool.def(!0),changeOnHover:e.PropTypes.bool.def(!1),changeOnHoverDelay:e.PropTypes.number.def(1e3)},b=Object.assign({active:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(""),panels:{type:Array,default:function(){return[]}},tabPosition:u,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d,labelHeight:e.PropTypes.number.def(50),scrollStep:e.PropTypes.number.def(200),validateActive:e.PropTypes.bool.def(!0),changeOnHover:e.PropTypes.bool.def(!1),changeOnHoverDelay:e.PropTypes.number.def(1e3)},p),f={name:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(""),label:e.PropTypes.string||e.PropTypes.func,closable:e.PropTypes.bool,visible:e.PropTypes.bool.def(!0),disabled:e.PropTypes.bool,sortable:e.PropTypes.bool,renderDirective:(0,e.renderDirectiveType)(),panel:e.PropTypes.string||e.PropTypes.func},v=s(7685);const y=(0,n.defineComponent)({name:"TabNav",props:b,setup:function(e){var t=(0,n.computed)((function(){if(!Array.isArray(e.panels)||!e.panels.length)return[];var t=[],a=!1;return e.panels.filter((function(r,o){if(!r.props)return null;var s=r.props,l=s.name,i=s.label,u=s.closable,d=s.visible,p=s.disabled,c=s.sortable;return!!d&&(e.active===l&&(a=!0),t.push({name:l,closable:u,visible:d,disabled:p,sortable:c,tabLabel:function(e){return r.slots.label?(0,n.h)(r.slots.label):[void 0,""].includes(e)?"选项卡".concat(o+1):"string"==typeof e?e:"function"==typeof e?(0,n.h)(e):e}(i)}),!0)})),!a&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),t})),a=(0,n.ref)(-1),r=(0,n.ref)(-1),o=(0,n.ref)(""),s=function(e,t){return e===t},l={handleTabAdd:function(t){e.tabAdd(t)},dragstart:function(t,a){r.value=t,o.value=e.guid,Object.assign(a.dataTransfer,{effectAllowed:"move"}),e.tabDrag(t,a)},dragenter:function(t){s(o.value,e.guid)&&(a.value=t)},dragend:function(){a.value=-1,r.value=-1,o.value=null},drop:function(t,a){if(!s(o.value,e.guid))return!1;e.tabSort(r.value,t,a)},handleTabChange:function(t){e.tabChange(t)},handleTabRemove:function(t,a){e.tabRemove(t,a)}};return Object.assign(Object.assign({},l),{navs:t,dragenterIndex:a,dragStartIndex:r,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render:function(){var t,a,r,o=this,s=this.active,l=this.closable,i=this.addable,u=this.sortable,d=this.sortType,p=this.labelHeight,c=this.dragstart,b=this.dragenter,f=this.dragend,y=this.drop;return(0,n.createVNode)("div",{style:{lineHeight:"".concat(p,"px")},class:(0,e.resolveClassName)("tab-header")},[(0,n.createVNode)("div",{class:(0,e.resolveClassName)("tab-header-nav")},[o.navs.map((function(t,a){if(!t)return null;var r,i=t.name,p=t.disabled,h=t.tabLabel,g=function(e,t){return e||t};return(0,n.createVNode)("div",{key:i,onClick:function(){return o.handleTabChange(i)},draggable:g(t.sortable,u),onDragstart:function(e){return c(a,e)},onDragenter:function(e){e.preventDefault(),b(a)},onDragleave:function(e){e.preventDefault()},onDragover:function(e){e.preventDefault()},onDragend:function(e){e.preventDefault(),f()},onDrop:function(e){e.preventDefault(),y(a,d)},class:(r=[(0,e.resolveClassName)("tab-header-item")],p&&r.push((0,e.resolveClassName)("tab-header--disabled")),s===i&&r.push((0,e.resolveClassName)("tab-header--active")),r.join(" "))},[(0,n.createVNode)("div",null,[h]),g(t.closable,l)&&(0,n.createVNode)(v.Close,{class:(0,e.resolveClassName)("tab-header-item-close"),onClick:function(){return o.handleTabRemove(a,t)}},null)])}))]),(r=[],"function"==typeof o.$slots.add?r.push(null===(a=(t=o.$slots).add)||void 0===a?void 0:a.call(t,n.h)):i&&r.push((0,n.createVNode)("div",{onClick:o.handleTabAdd},[(0,n.createVNode)(v.Plus,{style:"display:flex;",width:26,height:26},null)])),r.length?(0,n.createVNode)("div",{class:(0,e.resolveClassName)("tab-header-operation")},[r.map((function(t,a){return(0,n.createVNode)("div",{class:(0,e.resolveClassName)("tab-header-item"),key:a},[t])}))]):null),"function"==typeof this.$slots.setting&&(0,n.createVNode)("div",{class:(0,e.resolveClassName)("tab-header-setting")},[this.$slots.setting()])])}}),h=(0,n.defineComponent)({name:"Tab",components:{TabNav:y},props:c,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup:function(e,a){var r=a.slots,o=a.emit,s=(0,n.ref)(!1),l=(0,n.ref)([]),u=(0,n.getCurrentInstance)(),d=function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.children;return(r||[]).forEach((function(t){var r=t.type;"TabPanel"===(r=r.name||r)&&t.component?a.push(t.component):r!==n.Fragment&&"template"!==r||e(t,a)})),a},p=function(){if(r.default){var e=u.subTree.children[1].children;if(!e)return;var t=e[0],a=d(t);a.length!==l.value.length&&(l.value=a)}};(0,n.onMounted)((function(){p(),s.value=!0})),(0,n.onUpdated)((function(){p()}));var c={tabAdd:function(e){o("add",{e}),o("add-panel",{e})},tabChange:function(e){o("change",e),o("tab-change",e),o("update:active",e)},tabRemove:function(e,t){o("remove",e,t),o("remove-panel",e,t)},tabSort:function(e,a,r){var n,s=l.value;if(r===i.INSERT)if(e<a)s.splice(a+1,0,l[e]),s.splice(e,1);else{if(!(e>a))return!1;s.splice(a,0,l[e]),s.splice(e+1,1)}else{var u=s[a];s[a]=s[e],s[e]=u}l.value=function(e){if(Array.isArray(e))return t(e)}(n=s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,a){if(e){if("string"==typeof e)return t(e,a);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,a):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o("sort",e,a,r),o("sort-change",e,a,r)},tabDrag:function(e,t){o("drag",e,t),o("on-drag-tab",e,t)}};return Object.assign(Object.assign({},c),{isMounted:s,panels:l})},render:function(){var t,o,s,l,i,u=this;return(0,n.createVNode)("div",{class:(i=[(0,e.resolveClassName)("tab"),u.extCls],u.tabPosition===r.TOP?i.push((0,e.resolveClassName)("tab--".concat(u.tabPosition)),(0,e.resolveClassName)("tab--".concat(u.type))):(i.push((0,e.resolveClassName)("tab--".concat(u.tabPosition))),u.type===a.CARD_TAB&&i.push((0,e.resolveClassName)("tab--vertical-tab"))),i)},[(s=u.panels,l={panels:s,active:u.active,type:u.type,closable:u.closable,addable:u.addable,sortable:u.sortable,sortType:u.sortType,labelHeight:u.labelHeight,scrollStep:u.scrollStep,validateActive:u.validateActive,changeOnHover:u.changeOnHover,changeOnHoverDelay:u.changeOnHoverDelay,tabPosition:u.tabPosition,tabAdd:u.tabAdd,tabChange:u.tabChange,tabRemove:u.tabRemove,tabSort:u.tabSort,tabDrag:u.tabDrag},s&&Array.isArray(s)?(0,n.createVNode)(y,l,u.$slots):null),(0,n.createVNode)("div",{class:(0,e.resolveClassName)("tab-content")},[null===(o=(t=this.$slots).default)||void 0===o?void 0:o.call(t)])])}}),g=(0,n.defineComponent)({name:"TabPanel",props:f,render:function(){var t=this,a=this.name===this.$parent.active;return(0,n.withDirectives)((0,n.createVNode)("div",{ref:"content",class:(0,e.resolveClassName)("tab-panel")},[!t.visible||"if"===t.renderDirective&&!a?null:"function"==typeof t.panel?t.panel(n.h):"function"==typeof t.$slots.default?t.$slots.default(null):"function"==typeof t.$slots.panel?t.$slots.panel(null):null]),[[n.vShow,a]])}});var m=(0,e.withInstallProps)(h,{TabPanel:g});const T=m})(),l})()));
|
package/lib/tab/props.d.ts
CHANGED
@@ -1,4 +1,19 @@
|
|
1
1
|
import { PropType, VNode } from 'vue';
|
2
|
+
export declare enum TabTypeEnum {
|
3
|
+
CARD = "card",
|
4
|
+
BORDER_CARD = "border-card",
|
5
|
+
UNBORDER_CARD = "unborder-card",
|
6
|
+
CARD_TAB = "card-tab"
|
7
|
+
}
|
8
|
+
export declare enum PositionEnum {
|
9
|
+
LEFT = "left",
|
10
|
+
RIGHT = "right",
|
11
|
+
TOP = "top"
|
12
|
+
}
|
13
|
+
export declare enum SortTypeEnum {
|
14
|
+
REPLACE = "replace",
|
15
|
+
INSERT = "insert"
|
16
|
+
}
|
2
17
|
export declare const tabNavEventProps: {
|
3
18
|
tabAdd: {
|
4
19
|
type: FunctionConstructor;
|
@@ -47,8 +62,8 @@ export declare const tabProps: {
|
|
47
62
|
active: import("vue-types").VueTypeDef<string | number> & {
|
48
63
|
default: string | number;
|
49
64
|
};
|
50
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
51
|
-
default: "card" | "border-card" | "unborder-card";
|
65
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
66
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
52
67
|
};
|
53
68
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
54
69
|
default: "top" | "right" | "left";
|
@@ -56,8 +71,8 @@ export declare const tabProps: {
|
|
56
71
|
closable: BooleanConstructor;
|
57
72
|
addable: BooleanConstructor;
|
58
73
|
sortable: BooleanConstructor;
|
59
|
-
sortType: import("vue-types").VueTypeDef<"
|
60
|
-
default: "
|
74
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
75
|
+
default: "replace" | "insert";
|
61
76
|
};
|
62
77
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
63
78
|
default: number;
|
@@ -131,8 +146,8 @@ export declare const tabNavProps: {
|
|
131
146
|
closable: BooleanConstructor;
|
132
147
|
addable: BooleanConstructor;
|
133
148
|
sortable: BooleanConstructor;
|
134
|
-
sortType: import("vue-types").VueTypeDef<"
|
135
|
-
default: "
|
149
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
150
|
+
default: "replace" | "insert";
|
136
151
|
};
|
137
152
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
138
153
|
default: number;
|
package/lib/tab/tab-nav.d.ts
CHANGED
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
34
34
|
closable: BooleanConstructor;
|
35
35
|
addable: BooleanConstructor;
|
36
36
|
sortable: BooleanConstructor;
|
37
|
-
sortType: import("vue-types").VueTypeDef<"
|
38
|
-
default: "
|
37
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
38
|
+
default: "replace" | "insert";
|
39
39
|
};
|
40
40
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
41
41
|
default: number;
|
@@ -117,8 +117,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
117
117
|
closable: BooleanConstructor;
|
118
118
|
addable: BooleanConstructor;
|
119
119
|
sortable: BooleanConstructor;
|
120
|
-
sortType: import("vue-types").VueTypeDef<"
|
121
|
-
default: "
|
120
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
121
|
+
default: "replace" | "insert";
|
122
122
|
};
|
123
123
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
124
124
|
default: number;
|
@@ -148,7 +148,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
148
148
|
}>>, {
|
149
149
|
active: string | number;
|
150
150
|
closable: boolean;
|
151
|
-
sortType: "
|
151
|
+
sortType: "replace" | "insert";
|
152
152
|
tabAdd: Function;
|
153
153
|
tabChange: Function;
|
154
154
|
tabRemove: Function;
|
package/lib/tab/tab.css
CHANGED
@@ -370,13 +370,21 @@
|
|
370
370
|
display: flex;
|
371
371
|
color: var(--default-color);
|
372
372
|
}
|
373
|
+
.bk-tab--card-tab .bk-tab-header,
|
374
|
+
.bk-tab--vertical-tab .bk-tab-header {
|
375
|
+
background: #F0F1F5;
|
376
|
+
}
|
377
|
+
.bk-tab--card-tab .bk-tab-header {
|
378
|
+
border-radius: 4px 4px 0;
|
379
|
+
}
|
373
380
|
.bk-tab-header > div {
|
374
381
|
display: flex;
|
375
382
|
margin-bottom: -1px;
|
376
383
|
flex-wrap: nowrap;
|
377
384
|
}
|
378
385
|
.bk-tab--card .bk-tab-header > div,
|
379
|
-
.bk-tab--border-card .bk-tab-header > div
|
386
|
+
.bk-tab--border-card .bk-tab-header > div,
|
387
|
+
.bk-tab--vertical-card .bk-tab-header > div {
|
380
388
|
border-right: 1px solid var(--disable-color);
|
381
389
|
}
|
382
390
|
.bk-tab-header-navs {
|
@@ -392,7 +400,8 @@
|
|
392
400
|
overflow-y: auto;
|
393
401
|
}
|
394
402
|
.bk-tab--card .bk-tab-header-nav,
|
395
|
-
.bk-tab--border-card .bk-tab-header-nav
|
403
|
+
.bk-tab--border-card .bk-tab-header-nav,
|
404
|
+
.bk-tab--vertical-card .bk-tab-header-nav {
|
396
405
|
border-left: 1px solid var(--disable-color);
|
397
406
|
}
|
398
407
|
.bk-tab-header-nav::-webkit-scrollbar {
|
@@ -428,6 +437,9 @@
|
|
428
437
|
.bk-tab--right .bk-tab-header {
|
429
438
|
border-left: 1px solid var(--disable-color);
|
430
439
|
}
|
440
|
+
.bk-tab--vertical-tab .bk-tab-header {
|
441
|
+
border: 0;
|
442
|
+
}
|
431
443
|
.bk-tab--left .bk-tab-header,
|
432
444
|
.bk-tab--right .bk-tab-header {
|
433
445
|
flex-direction: column;
|
@@ -436,14 +448,17 @@
|
|
436
448
|
.bk-tab--right .bk-tab-header > div {
|
437
449
|
flex-direction: column;
|
438
450
|
}
|
439
|
-
.bk-tab--card .bk-tab-header
|
451
|
+
.bk-tab--card .bk-tab-header,
|
452
|
+
.bk-tab--vertical-card .bk-tab-header {
|
440
453
|
border-bottom: 1px solid var(--disable-color);
|
441
454
|
}
|
442
455
|
.bk-tab--border-card .bk-tab-header {
|
443
|
-
background: #FAFBFD;
|
444
456
|
border: solid var(--disable-color);
|
445
457
|
border-width: 1px 1px 1px 0;
|
446
458
|
}
|
459
|
+
.bk-tab--border-card .bk-tab-header {
|
460
|
+
background: #FAFBFD;
|
461
|
+
}
|
447
462
|
.bk-tab--unborder-card .bk-tab-header {
|
448
463
|
border-bottom: 1px solid var(--disable-color);
|
449
464
|
}
|
@@ -472,18 +487,40 @@
|
|
472
487
|
.bk-tab--left .bk-tab-header-item {
|
473
488
|
text-align: right;
|
474
489
|
}
|
475
|
-
.bk-tab--card .bk-tab-header-item
|
490
|
+
.bk-tab--card .bk-tab-header-item,
|
491
|
+
.bk-tab--vertical-card .bk-tab-header-item {
|
476
492
|
border-top: 1px solid var(--disable-color);
|
477
493
|
}
|
478
494
|
.bk-tab--card .bk-tab-header-item,
|
479
|
-
.bk-tab--border-card .bk-tab-header-item
|
495
|
+
.bk-tab--border-card .bk-tab-header-item,
|
496
|
+
.bk-tab--vertical-card .bk-tab-header-item {
|
480
497
|
border-right: 1px solid var(--disable-color);
|
481
498
|
border-bottom: 1px solid var(--disable-color);
|
482
499
|
}
|
483
500
|
.bk-tab--card .bk-tab-header-item:last-of-type,
|
484
|
-
.bk-tab--border-card .bk-tab-header-item:last-of-type
|
501
|
+
.bk-tab--border-card .bk-tab-header-item:last-of-type,
|
502
|
+
.bk-tab--vertical-card .bk-tab-header-item:last-of-type {
|
485
503
|
border-right: none;
|
486
504
|
}
|
505
|
+
.bk-tab--card-tab .bk-tab-header-item {
|
506
|
+
position: relative;
|
507
|
+
}
|
508
|
+
.bk-tab--card-tab .bk-tab-header-item:not(:first-of-type):before,
|
509
|
+
.bk-tab--card-tab .bk-tab-header-item:last-of-type:after {
|
510
|
+
position: absolute;
|
511
|
+
top: 50%;
|
512
|
+
left: 0;
|
513
|
+
display: block;
|
514
|
+
width: 1px;
|
515
|
+
height: 16px;
|
516
|
+
margin-top: -8px;
|
517
|
+
background: #c4c6cc;
|
518
|
+
content: '';
|
519
|
+
}
|
520
|
+
.bk-tab--card-tab .bk-tab-header-item:last-of-type:after {
|
521
|
+
right: 0;
|
522
|
+
left: initial;
|
523
|
+
}
|
487
524
|
.bk-tab-header-operation .bk-tab-header-item {
|
488
525
|
padding-right: 12px;
|
489
526
|
padding-left: 12px;
|
@@ -497,17 +534,31 @@
|
|
497
534
|
color: var(--primary-color);
|
498
535
|
}
|
499
536
|
.bk-tab--card .bk-tab-header--active,
|
500
|
-
.bk-tab--border-card .bk-tab-header--active
|
537
|
+
.bk-tab--border-card .bk-tab-header--active,
|
538
|
+
.bk-tab--vertical-card .bk-tab-header--active {
|
501
539
|
background: var(--white-color);
|
502
540
|
border-bottom-color: var(--white-color);
|
503
541
|
}
|
504
542
|
.bk-tab--unborder-card .bk-tab-header--active {
|
505
543
|
border-bottom: 2px solid var(--primary-color);
|
506
544
|
}
|
507
|
-
.bk-tab--
|
545
|
+
.bk-tab--card-tab .bk-tab-header--active,
|
546
|
+
.bk-tab--vertical-tab .bk-tab-header--active {
|
547
|
+
background: #fff;
|
548
|
+
}
|
549
|
+
.bk-tab--card-tab .bk-tab-header--active {
|
550
|
+
border-radius: 4px 4px 0 0;
|
551
|
+
}
|
552
|
+
.bk-tab--card-tab .bk-tab-header--active:after,
|
553
|
+
.bk-tab--card-tab .bk-tab-header--active:before,
|
554
|
+
.bk-tab--card-tab .bk-tab-header--active + .bk-tab-header-item:before {
|
555
|
+
/* stylelint-disable-next-line declaration-no-important */
|
556
|
+
display: none !important;
|
557
|
+
}
|
558
|
+
.bk-tab--left:not(.bk-tab--vertical-tab) .bk-tab-header--active {
|
508
559
|
border-right: 2px solid var(--primary-color);
|
509
560
|
}
|
510
|
-
.bk-tab--right .bk-tab-header--active {
|
561
|
+
.bk-tab--right:not(.bk-tab--vertical-tab) .bk-tab-header--active {
|
511
562
|
border-left: 2px solid var(--primary-color);
|
512
563
|
}
|
513
564
|
.bk-tab-header--disabled {
|
@@ -519,7 +570,8 @@
|
|
519
570
|
flex: 1;
|
520
571
|
padding: 10px;
|
521
572
|
}
|
522
|
-
.bk-tab--border-card .bk-tab-content
|
573
|
+
.bk-tab--border-card .bk-tab-content,
|
574
|
+
.bk-tab--vertical-card .bk-tab-content {
|
523
575
|
border: solid var(--disable-color);
|
524
576
|
border-width: 0 1px 1px;
|
525
577
|
}
|
package/lib/tab/tab.d.ts
CHANGED
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
active: import("vue-types").VueTypeDef<string | number> & {
|
3
3
|
default: string | number;
|
4
4
|
};
|
5
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
6
|
-
default: "card" | "border-card" | "unborder-card";
|
5
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
6
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
7
7
|
};
|
8
8
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
9
9
|
default: "top" | "right" | "left";
|
@@ -11,8 +11,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
closable: BooleanConstructor;
|
12
12
|
addable: BooleanConstructor;
|
13
13
|
sortable: BooleanConstructor;
|
14
|
-
sortType: import("vue-types").VueTypeDef<"
|
15
|
-
default: "
|
14
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
15
|
+
default: "replace" | "insert";
|
16
16
|
};
|
17
17
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
18
18
|
default: number;
|
@@ -61,8 +61,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
61
|
active: import("vue-types").VueTypeDef<string | number> & {
|
62
62
|
default: string | number;
|
63
63
|
};
|
64
|
-
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card"> & {
|
65
|
-
default: "card" | "border-card" | "unborder-card";
|
64
|
+
type: import("vue-types").VueTypeDef<"card" | "border-card" | "unborder-card" | "card-tab"> & {
|
65
|
+
default: "card" | "border-card" | "unborder-card" | "card-tab";
|
66
66
|
};
|
67
67
|
tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
|
68
68
|
default: "top" | "right" | "left";
|
@@ -70,8 +70,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
70
70
|
closable: BooleanConstructor;
|
71
71
|
addable: BooleanConstructor;
|
72
72
|
sortable: BooleanConstructor;
|
73
|
-
sortType: import("vue-types").VueTypeDef<"
|
74
|
-
default: "
|
73
|
+
sortType: import("vue-types").VueTypeDef<"replace" | "insert"> & {
|
74
|
+
default: "replace" | "insert";
|
75
75
|
};
|
76
76
|
labelHeight: import("vue-types").VueTypeValidableDef<number> & {
|
77
77
|
default: number;
|
@@ -121,12 +121,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
121
121
|
"onUpdate:active"?: (...args: any[]) => any;
|
122
122
|
onSort?: (...args: any[]) => any;
|
123
123
|
}, {
|
124
|
-
type: "card" | "border-card" | "unborder-card";
|
124
|
+
type: "card" | "border-card" | "unborder-card" | "card-tab";
|
125
125
|
extCls: string;
|
126
126
|
active: string | number;
|
127
127
|
closable: boolean;
|
128
128
|
showHeader: boolean;
|
129
|
-
sortType: "
|
129
|
+
sortType: "replace" | "insert";
|
130
130
|
tabPosition: "top" | "right" | "left";
|
131
131
|
addable: boolean;
|
132
132
|
sortable: boolean;
|
package/lib/tab/tab.less
CHANGED
@@ -6,7 +6,10 @@
|
|
6
6
|
@tab-header-bg: #FAFBFD;
|
7
7
|
@tab-white: @white-color;
|
8
8
|
@tab-gray: @light-gray;
|
9
|
+
@tab-card-tab-bg: #F0F1F5;
|
10
|
+
@tab-card-tab-divider: #c4c6cc;
|
9
11
|
@tab-disable-color: #aaa;
|
12
|
+
|
10
13
|
.@{bk-prefix}-tab {
|
11
14
|
position: relative;
|
12
15
|
display: flex;
|
@@ -25,12 +28,20 @@
|
|
25
28
|
display: flex;
|
26
29
|
color: @tab-color;
|
27
30
|
|
31
|
+
.@{bk-prefix}-tab--card-tab &, .@{bk-prefix}-tab--vertical-tab & {
|
32
|
+
background: @tab-card-tab-bg;
|
33
|
+
}
|
34
|
+
|
35
|
+
.@{bk-prefix}-tab--card-tab & {
|
36
|
+
border-radius: 4px 4px 0;
|
37
|
+
}
|
38
|
+
|
28
39
|
> div {
|
29
40
|
display: flex;
|
30
41
|
margin-bottom: -1px;
|
31
42
|
flex-wrap: nowrap;
|
32
43
|
|
33
|
-
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card & {
|
44
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card &, .@{bk-prefix}-tab--vertical-card & {
|
34
45
|
border-right: 1px solid @tab-border;
|
35
46
|
}
|
36
47
|
}
|
@@ -52,7 +63,7 @@
|
|
52
63
|
}
|
53
64
|
|
54
65
|
|
55
|
-
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card & {
|
66
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card &, .@{bk-prefix}-tab--vertical-card & {
|
56
67
|
border-left: 1px solid @tab-border;
|
57
68
|
}
|
58
69
|
|
@@ -101,6 +112,10 @@
|
|
101
112
|
border-left: 1px solid @tab-border;
|
102
113
|
}
|
103
114
|
|
115
|
+
.@{bk-prefix}-tab--vertical-tab & {
|
116
|
+
border: 0;
|
117
|
+
}
|
118
|
+
|
104
119
|
.@{bk-prefix}-tab--left &, .@{bk-prefix}-tab--right & {
|
105
120
|
flex-direction: column;
|
106
121
|
|
@@ -109,16 +124,19 @@
|
|
109
124
|
}
|
110
125
|
}
|
111
126
|
|
112
|
-
.@{bk-prefix}-tab--card & {
|
127
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--vertical-card & {
|
113
128
|
border-bottom: 1px solid @tab-border;
|
114
129
|
}
|
115
130
|
|
116
131
|
.@{bk-prefix}-tab--border-card & {
|
117
|
-
background: @tab-header-bg;
|
118
132
|
border: solid @tab-border;
|
119
133
|
border-width: 1px 1px 1px 0;
|
120
134
|
}
|
121
135
|
|
136
|
+
.@{bk-prefix}-tab--border-card & {
|
137
|
+
background: @tab-header-bg;
|
138
|
+
}
|
139
|
+
|
122
140
|
.@{bk-prefix}-tab--unborder-card & {
|
123
141
|
border-bottom: 1px solid @tab-border;
|
124
142
|
}
|
@@ -142,11 +160,9 @@
|
|
142
160
|
|
143
161
|
.@{bk-prefix}-tab--top & {
|
144
162
|
padding: 0 20px;
|
145
|
-
//margin: -1px 0;
|
146
163
|
}
|
147
164
|
|
148
165
|
.@{bk-prefix}-tab--left &, .@{bk-prefix}-tab--right & {
|
149
|
-
//margin: 0 -1px;
|
150
166
|
padding: 0 12px;
|
151
167
|
}
|
152
168
|
|
@@ -154,11 +170,11 @@
|
|
154
170
|
text-align: right;
|
155
171
|
}
|
156
172
|
|
157
|
-
.@{bk-prefix}-tab--card & {
|
173
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--vertical-card & {
|
158
174
|
border-top: 1px solid @tab-border;
|
159
175
|
}
|
160
176
|
|
161
|
-
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card & {
|
177
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card &, .@{bk-prefix}-tab--vertical-card & {
|
162
178
|
border-right: 1px solid @tab-border;
|
163
179
|
border-bottom: 1px solid @tab-border;
|
164
180
|
|
@@ -167,6 +183,30 @@
|
|
167
183
|
}
|
168
184
|
}
|
169
185
|
|
186
|
+
.@{bk-prefix}-tab--card-tab & {
|
187
|
+
position: relative;
|
188
|
+
|
189
|
+
&:not(:first-of-type):before,
|
190
|
+
&:last-of-type:after {
|
191
|
+
position: absolute;
|
192
|
+
top: 50%;
|
193
|
+
left: 0;
|
194
|
+
display: block;
|
195
|
+
width: 1px;
|
196
|
+
height: 16px;
|
197
|
+
margin-top: -8px;
|
198
|
+
background: @tab-card-tab-divider;
|
199
|
+
content: '';
|
200
|
+
}
|
201
|
+
|
202
|
+
&:last-of-type:after {
|
203
|
+
right: 0;
|
204
|
+
left: initial;
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
}
|
209
|
+
|
170
210
|
.@{bk-prefix}-tab-header-operation & {
|
171
211
|
padding-right: 12px;
|
172
212
|
padding-left: 12px;
|
@@ -183,8 +223,7 @@
|
|
183
223
|
&--active {
|
184
224
|
color: @tab-active;
|
185
225
|
|
186
|
-
|
187
|
-
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card & {
|
226
|
+
.@{bk-prefix}-tab--card &, .@{bk-prefix}-tab--border-card &, .@{bk-prefix}-tab--vertical-card & {
|
188
227
|
background: @tab-white;
|
189
228
|
border-bottom-color: @tab-white;
|
190
229
|
}
|
@@ -193,11 +232,26 @@
|
|
193
232
|
border-bottom: 2px solid @tab-active;
|
194
233
|
}
|
195
234
|
|
196
|
-
.@{bk-prefix}-tab--
|
235
|
+
.@{bk-prefix}-tab--card-tab &, .@{bk-prefix}-tab--vertical-tab & {
|
236
|
+
background: #fff;
|
237
|
+
}
|
238
|
+
|
239
|
+
.@{bk-prefix}-tab--card-tab & {
|
240
|
+
border-radius: 4px 4px 0 0;
|
241
|
+
|
242
|
+
&:after, &:before, & + .@{bk-prefix}-tab-header-item:before {
|
243
|
+
/* stylelint-disable-next-line declaration-no-important */
|
244
|
+
display: none !important;
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
}
|
249
|
+
|
250
|
+
.@{bk-prefix}-tab--left:not(.@{bk-prefix}-tab--vertical-tab) & {
|
197
251
|
border-right: 2px solid @tab-active;
|
198
252
|
}
|
199
253
|
|
200
|
-
.@{bk-prefix}-tab--right & {
|
254
|
+
.@{bk-prefix}-tab--right:not(.@{bk-prefix}-tab--vertical-tab) & {
|
201
255
|
border-left: 2px solid @tab-active;
|
202
256
|
}
|
203
257
|
|
@@ -214,7 +268,7 @@
|
|
214
268
|
flex: 1;
|
215
269
|
padding: 10px;
|
216
270
|
|
217
|
-
.@{bk-prefix}-tab--border-card & {
|
271
|
+
.@{bk-prefix}-tab--border-card &, .@{bk-prefix}-tab--vertical-card & {
|
218
272
|
border: solid @tab-border;
|
219
273
|
border-width: 0 1px 1px;
|
220
274
|
}
|