kui-vue 3.4.8 → 3.5.0
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/LICENSE +1 -1
- package/components/affix/affix.jsx +42 -42
- package/components/alert/alert.jsx +12 -7
- package/components/avatar/AvatarGroup.jsx +8 -5
- package/components/avatar/avatar.jsx +10 -7
- package/components/avatar/demo/base.md +1 -0
- package/components/avatar/demo/info.md +2 -5
- package/components/backtop/backtop.jsx +39 -32
- package/components/badge/badge.jsx +7 -7
- package/components/badge/demo/color.md +0 -1
- package/components/badge/styles/index.less +0 -4
- package/components/base/{collapse.js → collapse.jsx} +2 -7
- package/components/base/drop.jsx +181 -195
- package/components/base/input.jsx +27 -46
- package/components/base/pop.jsx +21 -17
- package/components/base/transition.js +1 -4
- package/components/breadcrumb/breadcrumb.jsx +6 -3
- package/components/breadcrumb/breadcrumbItem.jsx +4 -2
- package/components/breadcrumb/styles/index.less +1 -1
- package/components/button/button.jsx +95 -56
- package/components/button/buttonGroup.jsx +5 -3
- package/components/button/demo/base.md +3 -3
- package/components/button/demo/block.md +1 -1
- package/components/button/demo/color.md +30 -0
- package/components/button/demo/disabled.md +2 -2
- package/components/button/demo/index.vue +4 -4
- package/components/button/demo/light.md +8 -8
- package/components/button/demo/loading.md +10 -7
- package/components/button/demo/outline.md +22 -0
- package/components/button/demo/size.md +3 -4
- package/components/button/demo/with-icon.md +5 -5
- package/components/button/styles/index.less +269 -44
- package/components/card/card.jsx +4 -2
- package/components/carousel/carousel.jsx +143 -97
- package/components/carousel/carouselItem.jsx +13 -14
- package/components/carousel/styles/index.less +1 -1
- package/components/checkbox/checkbox.jsx +6 -4
- package/components/checkbox/demo/disabled.md +1 -3
- package/components/checkbox/group.jsx +6 -3
- package/components/collapse/collapse.jsx +14 -12
- package/components/collapse/demo/{accrodion.md → accordion.md} +2 -2
- package/components/collapse/demo/index.vue +2 -2
- package/components/collapse/panel.jsx +15 -16
- package/components/collapse/styles/index.less +3 -3
- package/components/colorPicker/alpha.jsx +107 -0
- package/components/colorPicker/colorpicker.jsx +177 -384
- package/components/colorPicker/demo/base.md +1 -3
- package/components/colorPicker/demo/customTriggle.md +34 -0
- package/components/colorPicker/demo/disabled.md +22 -0
- package/components/colorPicker/demo/disabledAlpha.md +20 -0
- package/components/colorPicker/demo/index.vue +11 -5
- package/components/colorPicker/demo/mode.md +16 -18
- package/components/colorPicker/demo/placement.md +25 -0
- package/components/colorPicker/demo/{colors.md → presets.md} +2 -2
- package/components/colorPicker/demo/size.md +14 -13
- package/components/colorPicker/hue.jsx +114 -0
- package/components/colorPicker/index.md +11 -11
- package/components/colorPicker/mode.jsx +176 -0
- package/components/colorPicker/paint.jsx +126 -0
- package/components/colorPicker/presets.jsx +69 -0
- package/components/colorPicker/styles/index.less +144 -46
- package/components/components.js +155 -0
- package/components/const/var.js +3 -0
- package/components/datePicker/datecalendar.jsx +34 -34
- package/components/datePicker/datepicker.jsx +24 -23
- package/components/datePicker/styles/calendar.less +3 -3
- package/components/descriptions/descriptions.jsx +12 -8
- package/components/descriptions/descriptionsItem.jsx +5 -2
- package/components/divider/divider.jsx +4 -2
- package/components/drawer/drawer.jsx +74 -69
- package/components/dropdown/dropdown.jsx +5 -2
- package/components/dropdown/styles/index.less +14 -3
- package/components/empty/empty.jsx +5 -5
- package/components/flex/demo/align.md +1 -1
- package/components/flex/demo/size.md +1 -1
- package/components/flex/flex.jsx +12 -4
- package/components/form/demo/length.md +1 -1
- package/components/form/demo/valid.md +1 -1
- package/components/form/form.jsx +9 -8
- package/components/form/formitem.jsx +14 -11
- package/components/grid/col.jsx +5 -2
- package/components/grid/row.jsx +11 -8
- package/components/icon/demo/base.md +8 -7
- package/components/icon/demo/index.vue +3 -1
- package/components/icon/demo/info.md +1 -38
- package/components/icon/demo/search.vue +16 -15
- package/components/icon/demo/use.md +30 -0
- package/components/icon/icon.jsx +5 -2
- package/components/image/group.jsx +4 -2
- package/components/image/image.jsx +16 -13
- package/components/image/index.js +6 -9
- package/components/image/{instance.js → instance.jsx} +6 -6
- package/components/image/preview.jsx +219 -195
- package/components/image/styles/index.less +1 -1
- package/components/index.js +36 -142
- package/components/input/input.jsx +6 -4
- package/components/input/inputGroup.jsx +16 -14
- package/components/input/textarea.jsx +16 -7
- package/components/inputNumber/demo/base.md +16 -8
- package/components/inputNumber/demo/format.md +7 -19
- package/components/inputNumber/demo/size.md +2 -6
- package/components/inputNumber/inputNumber.jsx +112 -104
- package/components/inputNumber/styles/index.less +47 -11
- package/components/layout/demo/base.md +11 -6
- package/components/layout/demo/layout1.md +82 -63
- package/components/layout/demo/layout2.md +93 -56
- package/components/layout/demo/layout3.md +95 -53
- package/components/layout/demo/layout4.md +97 -45
- package/components/layout/demo/layout5.md +81 -80
- package/components/layout/index.js +0 -4
- package/components/layout/layout.jsx +3 -2
- package/components/loading/demo/info.md +3 -3
- package/components/loading/{index.js → index.jsx} +29 -24
- package/components/locale/index.js +27 -69
- package/components/locale/lang/de.js +1 -1
- package/components/locale/lang/el.js +1 -1
- package/components/locale/lang/en.js +1 -1
- package/components/locale/lang/fr.js +2 -2
- package/components/locale/lang/it.js +1 -1
- package/components/locale/lang/ja.js +1 -1
- package/components/locale/lang/ko.js +1 -1
- package/components/locale/lang/ru.js +1 -1
- package/components/locale/lang/th.js +1 -1
- package/components/locale/lang/ua.js +1 -1
- package/components/locale/lang/vi.js +1 -1
- package/components/locale/lang/zh-CN.js +1 -1
- package/components/locale/lang/zh-TW.js +1 -1
- package/components/menu/demo/index.vue +2 -2
- package/components/menu/menu.jsx +6 -3
- package/components/menu/menudivider.jsx +5 -3
- package/components/menu/menugroup.jsx +4 -2
- package/components/menu/menuitem.jsx +6 -4
- package/components/menu/styles/index.less +88 -20
- package/components/menu/submenu.jsx +11 -28
- package/components/message/group.jsx +31 -28
- package/components/message/index.js +2 -2
- package/components/modal/demo/index.vue +2 -3
- package/components/modal/demo/info.md +5 -4
- package/components/modal/index.js +5 -7
- package/components/modal/modal.jsx +116 -121
- package/components/notice/index.js +2 -1
- package/components/page/page.jsx +15 -12
- package/components/page/styles/index.less +4 -4
- package/components/popconfirm/popconfirm.jsx +9 -8
- package/components/popconfirm/styles/index.less +15 -8
- package/components/poptip/poptip.jsx +7 -6
- package/components/poptip/styles/index.less +10 -4
- package/components/progress/progress.jsx +11 -8
- package/components/radio/button.jsx +4 -1
- package/components/radio/demo/button.md +1 -2
- package/components/radio/group.jsx +10 -19
- package/components/radio/radio.jsx +7 -9
- package/components/radio/styles/index.less +1 -1
- package/components/rate/rate.jsx +7 -10
- package/components/select/demo/base.md +5 -2
- package/components/select/demo/info.md +3 -1
- package/components/select/demo/multiple.md +1 -1
- package/components/select/demo/theme.md +0 -5
- package/components/select/index.md +4 -0
- package/components/select/option.jsx +8 -5
- package/components/select/select.jsx +247 -237
- package/components/select/styles/index.less +7 -13
- package/components/skeleton/demo/items.md +3 -3
- package/components/skeleton/skeleton.jsx +6 -2
- package/components/skeleton/skeletonAvatar.jsx +6 -2
- package/components/skeleton/skeletonButton.jsx +6 -2
- package/components/skeleton/skeletonImage.jsx +6 -2
- package/components/skeleton/skeletonText.jsx +6 -2
- package/components/slider/slider.jsx +15 -11
- package/components/slider/thumb.jsx +9 -8
- package/components/space/demo/align.md +5 -6
- package/components/space/demo/size.md +8 -8
- package/components/space/space.jsx +19 -17
- package/components/spin/demo/container.md +10 -10
- package/components/spin/spin.jsx +5 -2
- package/components/styles/color.less +57 -37
- package/components/styles/sys.less +31 -0
- package/components/styles/var.less +40 -11
- package/components/switch/styles/index.less +2 -2
- package/components/switch/switch.jsx +11 -8
- package/components/table/demo/edit.md +4 -4
- package/components/table/demo/expand.md +1 -2
- package/components/table/demo/filter.md +1 -1
- package/components/table/extend.jsx +172 -157
- package/components/table/styles/index.less +2 -1
- package/components/table/table.jsx +8 -6
- package/components/tabs/demo/base.md +6 -6
- package/components/tabs/demo/card.md +6 -6
- package/components/tabs/demo/centered.md +6 -6
- package/components/tabs/demo/closable.md +3 -3
- package/components/tabs/demo/disabled.md +6 -6
- package/components/tabs/demo/extra.md +6 -6
- package/components/tabs/demo/icon.md +4 -4
- package/components/tabs/demo/index.vue +3 -4
- package/components/tabs/demo/sample.md +6 -6
- package/components/tabs/index.js +2 -2
- package/components/tabs/index.md +1 -1
- package/components/tabs/styles/index.less +47 -9
- package/components/tabs/tabpanel.jsx +28 -0
- package/components/tabs/tabs.jsx +198 -151
- package/components/tag/demo/color.md +0 -1
- package/components/tag/styles/index.less +0 -6
- package/components/tag/tag.jsx +6 -3
- package/components/timeline/timeline.jsx +3 -1
- package/components/timeline/timelineitem.jsx +5 -2
- package/components/tooltip/demo/color.md +2 -3
- package/components/tooltip/styles/index.less +15 -26
- package/components/tooltip/tooltip.jsx +8 -6
- package/components/tree/demo/directory.md +3 -3
- package/components/tree/node.jsx +39 -50
- package/components/tree/styles/index.less +3 -3
- package/components/tree/tree.jsx +18 -28
- package/components/treeselect/styles/index.less +1 -1
- package/components/treeselect/treeselect.jsx +21 -22
- package/components/upload/demo/form.md +1 -1
- package/components/upload/upload.jsx +13 -27
- package/components/{_tool → utils}/animate.js +1 -1
- package/components/{_tool → utils}/clone.js +2 -2
- package/components/utils/color.js +5 -0
- package/components/{_tool/utils.js → utils/element.js} +8 -5
- package/components/utils/number.js +81 -0
- package/components/utils/theme.js +62 -0
- package/components/utils/vue.js +7 -0
- package/dist/k-ui.cjs.js +7 -0
- package/dist/k-ui.css +6 -7
- package/dist/k-ui.d.ts +162 -0
- package/dist/k-ui.esm.js +7 -0
- package/dist/k-ui.umd.js +7 -0
- package/dist/locale/de.js +5 -7
- package/dist/locale/el.js +5 -7
- package/dist/locale/en.js +5 -7
- package/dist/locale/fr.js +5 -7
- package/dist/locale/it.js +5 -7
- package/dist/locale/ja.js +5 -7
- package/dist/locale/ko.js +5 -7
- package/dist/locale/ru.js +5 -7
- package/dist/locale/th.js +5 -7
- package/dist/locale/ua.js +5 -7
- package/dist/locale/vi.js +5 -7
- package/dist/locale/zh-CN.js +7 -0
- package/dist/locale/zh-TW.js +7 -0
- package/package.json +53 -20
- package/readme.md +105 -0
- package/test/i18n@8.x.html +65 -0
- package/types/affix/Affix.d.ts +17 -0
- package/types/alert/Alert.d.ts +18 -0
- package/types/anchor/Anchor.d.ts +16 -0
- package/types/anchor/Link.d.ts +15 -0
- package/types/avatar/Avatar.d.ts +17 -0
- package/types/avatar/AvatarGroup.d.ts +15 -0
- package/types/backtop/BackTop.d.ts +16 -0
- package/types/badge/Badge.d.ts +20 -0
- package/types/base/BasePop.d.ts +24 -0
- package/types/base/Collapse.d.ts +15 -0
- package/types/base/Drop.d.ts +27 -0
- package/types/base/baseInput.d.ts +32 -0
- package/types/base/input.d.ts +32 -0
- package/types/base/pop.d.ts +36 -0
- package/types/breadcrumb/Breadcrumb.d.ts +11 -0
- package/types/breadcrumb/BreadcrumbItem.d.ts +17 -0
- package/types/button/Button.d.ts +27 -0
- package/types/button/ButtonGroup.d.ts +15 -0
- package/types/card/Card.d.ts +16 -0
- package/types/carousel/Carousel.d.ts +22 -0
- package/types/carousel/CarouselItem.d.ts +11 -0
- package/types/checkbox/Checkbox.d.ts +19 -0
- package/types/checkbox/CheckboxGroup.d.ts +20 -0
- package/types/collapse/Collapse.d.ts +15 -0
- package/types/collapse/Panel.d.ts +14 -0
- package/types/colorPicker/Alpha.d.ts +13 -0
- package/types/colorPicker/ColorPicker.d.ts +26 -0
- package/types/colorPicker/Hue.d.ts +13 -0
- package/types/colorPicker/Mode.d.ts +15 -0
- package/types/colorPicker/Paint.d.ts +14 -0
- package/types/colorPicker/Presets.d.ts +15 -0
- package/types/datePicker/DateCalendar.d.ts +27 -0
- package/types/datePicker/DatePicker.d.ts +36 -0
- package/types/descriptions/Descriptions.d.ts +21 -0
- package/types/descriptions/DescriptionsItem.d.ts +18 -0
- package/types/divider/Divider.d.ts +18 -0
- package/types/drawer/Drawer.d.ts +35 -0
- package/types/dropdown/Dropdown.d.ts +21 -0
- package/types/empty/Empty.d.ts +15 -0
- package/types/flex/Flex.d.ts +17 -0
- package/types/form/Form.d.ts +25 -0
- package/types/form/FormItem.d.ts +17 -0
- package/types/grid/Col.d.ts +15 -0
- package/types/grid/Row.d.ts +17 -0
- package/types/icon/Icon.d.ts +17 -0
- package/types/image/ImageGroup.d.ts +11 -0
- package/types/image/ImagePreview.d.ts +24 -0
- package/types/image/KImage.d.ts +21 -0
- package/types/image/imageProps.d.ts +19 -0
- package/types/image/instance.d.ts +19 -0
- package/types/index.d.ts +188 -0
- package/types/input/Input.d.ts +31 -0
- package/types/input/InputGroup.d.ts +17 -0
- package/types/input/TextArea.d.ts +16 -0
- package/types/inputNumber/InputNumber.d.ts +33 -0
- package/types/layout/layout.d.ts +13 -0
- package/types/layout/prop.d.ts +13 -0
- package/types/loading/Loading.d.ts +11 -0
- package/types/menu/Menu.d.ts +21 -0
- package/types/menu/MenuDivider.d.ts +11 -0
- package/types/menu/MenuGroup.d.ts +13 -0
- package/types/menu/MenuItem.d.ts +15 -0
- package/types/menu/SubMenu.d.ts +15 -0
- package/types/menu/show.d.ts +15 -0
- package/types/message/group.d.ts +13 -0
- package/types/message/inner.d.ts +24 -0
- package/types/modal/Modal.d.ts +31 -0
- package/types/page/Page.d.ts +26 -0
- package/types/popconfirm/Popconfirm.d.ts +21 -0
- package/types/poptip/Poptip.d.ts +22 -0
- package/types/progress/Progress.d.ts +33 -0
- package/types/radio/Radio.d.ts +19 -0
- package/types/radio/RadioButton.d.ts +18 -0
- package/types/radio/RadioGroup.d.ts +23 -0
- package/types/rate/Rate.d.ts +26 -0
- package/types/rate/Star.d.ts +22 -0
- package/types/select/Option.d.ts +15 -0
- package/types/select/Select.d.ts +38 -0
- package/types/skeleton/Skeleton.d.ts +21 -0
- package/types/skeleton/SkeletonAvatar.d.ts +19 -0
- package/types/skeleton/SkeletonButton.d.ts +20 -0
- package/types/skeleton/SkeletonImage.d.ts +18 -0
- package/types/skeleton/SkeletonText.d.ts +18 -0
- package/types/slider/Slider.d.ts +29 -0
- package/types/slider/thumb.d.ts +24 -0
- package/types/space/Space.d.ts +18 -0
- package/types/spin/Spin.d.ts +20 -0
- package/types/switch/KSwitch.d.ts +20 -0
- package/types/switch/Switch.d.ts +20 -0
- package/types/table/ExtendTable.d.ts +21 -0
- package/types/table/Table.d.ts +24 -0
- package/types/table/extend.d.ts +21 -0
- package/types/tabs/TabPanel.d.ts +17 -0
- package/types/tabs/Tabs.d.ts +18 -0
- package/types/tag/Tag.d.ts +18 -0
- package/types/timeline/TimeLine.d.ts +14 -0
- package/types/timeline/TimeLineItem.d.ts +16 -0
- package/types/tooltip/Tooltip.d.ts +23 -0
- package/types/tree/Tree.d.ts +28 -0
- package/types/tree/TreeNode.d.ts +17 -0
- package/types/treeselect/TreeSelect.d.ts +41 -0
- package/types/upload/Upload.d.ts +39 -0
- package/README.md +0 -106
- package/components/_tool/directives.js +0 -31
- package/components/_tool/number.js +0 -177
- package/components/bin/index.js +0 -3
- package/components/button/demo/normal.md +0 -41
- package/components/button/demo/solid.md +0 -16
- package/components/colorPicker/canvasHelper.js +0 -274
- package/components/colorPicker/demo/shape.md +0 -36
- package/components/tabs/tabpane.jsx +0 -25
- package/dist/k-ui.js +0 -9
- package/dist/locale/zhCN.js +0 -9
- package/dist/locale/zhTW.js +0 -9
- package/test/i18n@6.x.html +0 -52
- /package/components/{_tool → directives}/outsiteclick.js +0 -0
- /package/components/{_tool → directives}/resize.js +0 -0
- /package/components/{_tool → directives}/scroll.js +0 -0
- /package/components/{_tool → directives}/transfer.js +0 -0
- /package/components/menu/demo/{accrodion.md → accordion.md} +0 -0
- /package/components/modal/demo/{confrim.md → confirm.md} +0 -0
- /package/components/{_tool → utils}/docClick.js +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { hasChild, sortHeaderCols, findItem
|
|
2
|
-
import { measureScrollBar } from
|
|
3
|
-
import { Checkbox } from
|
|
4
|
-
import Icon from
|
|
5
|
-
import { CaretUp, CaretDown } from
|
|
1
|
+
import { hasChild, sortHeaderCols, findItem } from "./utils";
|
|
2
|
+
import { measureScrollBar } from "../utils/element";
|
|
3
|
+
import { Checkbox } from "../checkbox";
|
|
4
|
+
import Icon from "../icon";
|
|
5
|
+
import { CaretUp, CaretDown } from "kui-icons";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
name:
|
|
8
|
+
name: "ExtendTable",
|
|
9
9
|
props: {
|
|
10
10
|
body: Array,
|
|
11
11
|
columns: Array,
|
|
@@ -22,132 +22,134 @@ export default {
|
|
|
22
22
|
scrollBarHeight: 0,
|
|
23
23
|
// type: 'left',
|
|
24
24
|
theadSync: false,
|
|
25
|
-
tbodySync: false
|
|
26
|
-
}
|
|
25
|
+
tbodySync: false,
|
|
26
|
+
};
|
|
27
27
|
},
|
|
28
28
|
mounted() {
|
|
29
|
-
let { thead } = this.$refs
|
|
30
|
-
if (thead &&
|
|
29
|
+
let { thead } = this.$refs;
|
|
30
|
+
if (thead && typeof window !== "undefined") {
|
|
31
31
|
// thead.style.marginBottom = `-${thead.offsetHeight - thead.scrollHeight}px`
|
|
32
|
-
let size = measureScrollBar()
|
|
33
|
-
this.scrollBarHeight = size
|
|
32
|
+
let size = measureScrollBar();
|
|
33
|
+
this.scrollBarHeight = size;
|
|
34
34
|
if (this.height && this.width) {
|
|
35
|
-
this.setColWidth()
|
|
35
|
+
this.setColWidth();
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
methods: {
|
|
40
40
|
setColWidth() {
|
|
41
|
-
const cols = this.$refs.colgroup.children//[0].children
|
|
41
|
+
const cols = this.$refs.colgroup.children; //[0].children
|
|
42
42
|
// reset tbody's height
|
|
43
|
-
let col = this.columns2 || this.columns
|
|
43
|
+
let col = this.columns2 || this.columns;
|
|
44
44
|
for (let i = 0; i < cols.length; i++) {
|
|
45
45
|
if (col[i] && !col[i].width) {
|
|
46
|
-
col[i].width = cols[i].getBoundingClientRect().width
|
|
46
|
+
col[i].width = cols[i].getBoundingClientRect().width;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
sorter(item) {
|
|
51
|
-
let { _order, sorter } = item
|
|
51
|
+
let { _order, sorter } = item;
|
|
52
52
|
|
|
53
53
|
if (sorter) {
|
|
54
54
|
if (!_order) {
|
|
55
|
-
_order =
|
|
56
|
-
} else if (_order ==
|
|
57
|
-
_order = null
|
|
55
|
+
_order = "asc";
|
|
56
|
+
} else if (_order == "desc") {
|
|
57
|
+
_order = null;
|
|
58
58
|
} else {
|
|
59
|
-
_order =
|
|
59
|
+
_order = "desc";
|
|
60
60
|
}
|
|
61
61
|
if (hasChild(this.columns)) {
|
|
62
62
|
//有子集的话,原来的数据结构被重新排序了,所以要判断当前的item 是原始数据的item再传回
|
|
63
|
-
item = findItem(item, this.columns)
|
|
63
|
+
item = findItem(item, this.columns);
|
|
64
64
|
}
|
|
65
|
-
this.$set(item,
|
|
66
|
-
this.$emit(
|
|
65
|
+
this.$set(item, "_order", _order);
|
|
66
|
+
this.$emit("sorter", item);
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
renderCol(hasHead) {
|
|
70
|
-
const isFixedHeader = this.height !== undefined
|
|
71
|
-
let cols = []
|
|
72
|
-
let columns = this.columns2 || this.columns
|
|
73
|
-
columns.forEach((col,
|
|
74
|
-
let width = col.width ||
|
|
75
|
-
let hasCheckbox = col.type ==
|
|
70
|
+
const isFixedHeader = this.height !== undefined;
|
|
71
|
+
let cols = [];
|
|
72
|
+
let columns = this.columns2 || this.columns;
|
|
73
|
+
columns.forEach((col,) => {
|
|
74
|
+
let width = col.width || ""; //(isFixedHeader ? 150 : '')
|
|
75
|
+
let hasCheckbox = col.type == "selection";
|
|
76
76
|
|
|
77
77
|
// if (isFixedHeader && i == columns.length - 2 && columns.length > 2) width = ''
|
|
78
78
|
|
|
79
79
|
// set Cols
|
|
80
80
|
let colProps = {
|
|
81
81
|
style: { width: `${width}px` },
|
|
82
|
-
class: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
class: [
|
|
83
|
+
{
|
|
84
|
+
"k-table-selection-col": hasCheckbox,
|
|
85
|
+
// 'k-table-cell-fixed-left': col.fixed == 'left',
|
|
86
|
+
// 'k-table-cell-fixed-right': col.fixed == 'right',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
};
|
|
88
90
|
if (!width) {
|
|
89
|
-
delete colProps.style.width
|
|
91
|
+
delete colProps.style.width;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
if (col.fixed ==
|
|
94
|
+
if (col.fixed == "right") {
|
|
93
95
|
// colProps.style = { width: `${width || 100}px`}
|
|
94
96
|
}
|
|
95
|
-
cols.push(<col {...colProps} />)
|
|
96
|
-
})
|
|
97
|
+
cols.push(<col {...colProps} />);
|
|
98
|
+
});
|
|
97
99
|
if (this.hasExpand) {
|
|
98
|
-
cols.unshift(<col class="k-table-expand-icon-col"></col>)
|
|
100
|
+
cols.unshift(<col class="k-table-expand-icon-col"></col>);
|
|
99
101
|
}
|
|
100
102
|
if (isFixedHeader && hasHead) {
|
|
101
|
-
cols.push(<col style={{ width: this.scrollBarHeight +
|
|
103
|
+
cols.push(<col style={{ width: this.scrollBarHeight + "px" }}></col>);
|
|
102
104
|
}
|
|
103
|
-
return <colgroup ref="colgroup">{cols}</colgroup
|
|
105
|
+
return <colgroup ref="colgroup">{cols}</colgroup>;
|
|
104
106
|
},
|
|
105
107
|
renderSort(col) {
|
|
106
|
-
return
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
return col.sorter ? (
|
|
109
|
+
<span class="k-table-sorter">
|
|
110
|
+
<Icon type={CaretUp} class={{ active: col._order == "asc" }} />
|
|
111
|
+
<Icon type={CaretDown} class={{ active: col._order == "desc" }} />
|
|
112
|
+
</span>
|
|
113
|
+
) : null;
|
|
110
114
|
},
|
|
111
115
|
renderTH(col, left, right) {
|
|
112
|
-
let hasCheckbox = col.type ==
|
|
113
|
-
const hasSort = col.sorter
|
|
116
|
+
let hasCheckbox = col.type == "selection";
|
|
117
|
+
const hasSort = col.sorter;
|
|
114
118
|
let props = {
|
|
115
119
|
class: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
[col.className]: col.className
|
|
120
|
+
"k-table-cell-ellipsis": col.ellipsis,
|
|
121
|
+
"k-table-cell-selection": hasCheckbox,
|
|
122
|
+
"k-table-cell-fixed-left": col.fixed == "left",
|
|
123
|
+
"k-table-cell-fixed-right": col.fixed == "right",
|
|
124
|
+
"k-table-cell-fixed-left-last": col.last,
|
|
125
|
+
"k-table-cell-fixed-right-first": col.first,
|
|
126
|
+
"k-table-cell-sorter": hasSort,
|
|
127
|
+
[col.className]: col.className,
|
|
124
128
|
},
|
|
125
129
|
attrs: {
|
|
126
130
|
key: col.key,
|
|
127
131
|
colSpan: col.colSpan > 1 ? col.colSpan : null,
|
|
128
|
-
rowSpan: col.rowSpan
|
|
132
|
+
rowSpan: col.rowSpan,
|
|
129
133
|
},
|
|
130
134
|
on: {},
|
|
131
|
-
style: {}
|
|
135
|
+
style: {},
|
|
136
|
+
};
|
|
137
|
+
if (col.fixed == "left") {
|
|
138
|
+
props.style.left = left + "px";
|
|
132
139
|
}
|
|
133
|
-
if (col.fixed ==
|
|
134
|
-
props.style.
|
|
135
|
-
}
|
|
136
|
-
if (col.fixed == 'right') {
|
|
137
|
-
props.style.right = right + 'px'
|
|
140
|
+
if (col.fixed == "right") {
|
|
141
|
+
props.style.right = right + "px";
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
if (hasSort) {
|
|
141
|
-
props.on.click = () => this.sorter(col)
|
|
145
|
+
props.on.click = () => this.sorter(col);
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
// if (hasCheckbox) {
|
|
145
149
|
// console.log(this.checkAll, this.indeterminate)
|
|
146
150
|
// }
|
|
147
151
|
|
|
148
|
-
let inner = hasCheckbox && col.checkType !==
|
|
149
|
-
<Checkbox indeterminate={this.indeterminate} checked={this.checkAll} onChange={this.onSelectAll} /> :
|
|
150
|
-
(col.$title || col.title)
|
|
152
|
+
let inner = hasCheckbox && col.checkType !== "radio" ? <Checkbox indeterminate={this.indeterminate} checked={this.checkAll} onChange={this.onSelectAll} /> : col.$title || col.title;
|
|
151
153
|
return (
|
|
152
154
|
<th {...props}>
|
|
153
155
|
<span class="k-table-header-col">
|
|
@@ -155,196 +157,209 @@ export default {
|
|
|
155
157
|
{hasSort ? this.renderSort(col) : null}
|
|
156
158
|
</span>
|
|
157
159
|
</th>
|
|
158
|
-
)
|
|
160
|
+
);
|
|
159
161
|
},
|
|
160
162
|
renderHead() {
|
|
161
|
-
let cols = []
|
|
163
|
+
let cols = [];
|
|
162
164
|
if (hasChild(this.columns)) {
|
|
163
|
-
cols = sortHeaderCols(this.columns)
|
|
165
|
+
cols = sortHeaderCols(this.columns);
|
|
164
166
|
} else {
|
|
165
|
-
cols = this.columns
|
|
167
|
+
cols = this.columns;
|
|
166
168
|
}
|
|
167
169
|
if (!cols || cols.length == 0) return null;
|
|
168
170
|
|
|
169
|
-
let head = [],
|
|
170
|
-
|
|
171
|
+
let head = [],
|
|
172
|
+
ths = [],
|
|
173
|
+
left = 0,
|
|
174
|
+
right =
|
|
175
|
+
cols
|
|
176
|
+
.filter((c) => c.fixed == "right")
|
|
177
|
+
.map((c) => c.width)
|
|
178
|
+
.reduce((a, b) => a + b, 0) + (this.height ? this.scrollBarHeight : 0);
|
|
171
179
|
|
|
172
180
|
cols.forEach((col, i) => {
|
|
173
181
|
if (Array.isArray(col)) {
|
|
174
|
-
let ths = [],
|
|
182
|
+
let ths = [],
|
|
183
|
+
r =
|
|
184
|
+
col
|
|
185
|
+
.filter((c) => c.fixed == "right")
|
|
186
|
+
.map((c) => c.width)
|
|
187
|
+
.reduce((a, b) => a + b, 0) + (this.height ? this.scrollBarHeight : 0);
|
|
175
188
|
|
|
176
189
|
col.forEach((co, j) => {
|
|
177
|
-
if (co.fixed ==
|
|
178
|
-
left += col[j - 1].width
|
|
190
|
+
if (co.fixed == "left" && j > 0) {
|
|
191
|
+
left += col[j - 1].width;
|
|
179
192
|
}
|
|
180
|
-
if (co.fixed ==
|
|
181
|
-
r -= co.width
|
|
193
|
+
if (co.fixed == "right" && i < col.length) {
|
|
194
|
+
r -= co.width;
|
|
182
195
|
}
|
|
183
196
|
|
|
184
|
-
let th = this.renderTH(co, left, r)
|
|
185
|
-
ths.push(th)
|
|
186
|
-
})
|
|
197
|
+
let th = this.renderTH(co, left, r);
|
|
198
|
+
ths.push(th);
|
|
199
|
+
});
|
|
187
200
|
if (i == 0 && this.width) {
|
|
188
|
-
ths.push(<th rowSpan={col.length} class="k-table-cell-fixed-right" style={{ width: this.scrollBarHeight +
|
|
201
|
+
ths.push(<th rowSpan={col.length} class="k-table-cell-fixed-right" style={{ width: this.scrollBarHeight + "px" }}></th>);
|
|
189
202
|
}
|
|
190
|
-
head.push(<tr>{ths}</tr>)
|
|
203
|
+
head.push(<tr>{ths}</tr>);
|
|
191
204
|
} else {
|
|
192
205
|
// set Head
|
|
193
|
-
hasFR = col.fixed == 'right'
|
|
194
206
|
if (col.colSpan !== 0) {
|
|
195
|
-
if (col.fixed ==
|
|
196
|
-
left += cols[i - 1].width
|
|
207
|
+
if (col.fixed == "left" && i > 0) {
|
|
208
|
+
left += cols[i - 1].width;
|
|
197
209
|
}
|
|
198
|
-
if (col.fixed ==
|
|
199
|
-
right -= col.width
|
|
210
|
+
if (col.fixed == "right" && i < cols.length) {
|
|
211
|
+
right -= col.width;
|
|
200
212
|
}
|
|
201
|
-
let th = this.renderTH(col, left, right)
|
|
202
|
-
ths.push(th)
|
|
213
|
+
let th = this.renderTH(col, left, right);
|
|
214
|
+
ths.push(th);
|
|
203
215
|
}
|
|
204
216
|
}
|
|
205
|
-
})
|
|
217
|
+
});
|
|
206
218
|
if (this.hasExpand) {
|
|
207
|
-
ths.unshift(<th></th>)
|
|
219
|
+
ths.unshift(<th></th>);
|
|
208
220
|
}
|
|
209
221
|
if (this.height != undefined) {
|
|
210
|
-
let cls = []
|
|
211
|
-
let hasFR = cols.filter(c => c.fixed ==
|
|
222
|
+
let cls = [];
|
|
223
|
+
let hasFR = cols.filter((c) => c.fixed == "right");
|
|
212
224
|
if (hasFR) {
|
|
213
|
-
cls.push(
|
|
225
|
+
cls.push("k-table-cell-fixed-right");
|
|
214
226
|
}
|
|
215
|
-
ths.push(<th style={{ width: this.scrollBarHeight +
|
|
227
|
+
ths.push(<th style={{ width: this.scrollBarHeight + "px" }} class={cls}></th>);
|
|
216
228
|
}
|
|
217
229
|
if (!head.length) {
|
|
218
|
-
head.push(<tr>{ths}</tr>)
|
|
230
|
+
head.push(<tr>{ths}</tr>);
|
|
219
231
|
}
|
|
220
|
-
let props = { style: {} }
|
|
232
|
+
let props = { style: {} };
|
|
221
233
|
if (!this.height && this.sticky) {
|
|
222
|
-
props.class =
|
|
234
|
+
props.class = "k-table-thead-sticky";
|
|
223
235
|
if (this.sticky > 0) {
|
|
224
|
-
props.style.top = this.sticky +
|
|
236
|
+
props.style.top = this.sticky + "px";
|
|
225
237
|
}
|
|
226
238
|
}
|
|
227
|
-
return
|
|
239
|
+
return (
|
|
240
|
+
<thead ref="head" {...props}>
|
|
241
|
+
{head}
|
|
242
|
+
</thead>
|
|
243
|
+
);
|
|
228
244
|
},
|
|
229
245
|
renderTable(hasHead, body) {
|
|
230
|
-
let props = {}
|
|
231
|
-
props.style = { width: `${this.width}px` }
|
|
246
|
+
let props = {};
|
|
247
|
+
props.style = { width: `${this.width}px` };
|
|
232
248
|
return (
|
|
233
249
|
<table {...props}>
|
|
234
250
|
{this.renderCol(hasHead)}
|
|
235
251
|
{hasHead ? this.renderHead(hasHead) : null}
|
|
236
252
|
{body ? <tbody ref="tbody">{body}</tbody> : null}
|
|
237
253
|
</table>
|
|
238
|
-
)
|
|
254
|
+
);
|
|
239
255
|
},
|
|
240
256
|
onSelectAll(e) {
|
|
241
|
-
this.$emit(
|
|
257
|
+
this.$emit("select-all", e);
|
|
242
258
|
},
|
|
243
259
|
asyncScroll(e, target) {
|
|
244
|
-
let min = 0,
|
|
260
|
+
let min = 0,
|
|
261
|
+
max = e.target.scrollWidth - e.target.offsetWidth,
|
|
245
262
|
scrollLeft = e.target.scrollLeft;
|
|
246
263
|
scrollLeft = Math.round(scrollLeft);
|
|
247
264
|
|
|
248
265
|
if (target) {
|
|
249
|
-
if (target ==
|
|
266
|
+
if (target == "tbody") {
|
|
250
267
|
if (!this.theadSync) {
|
|
251
|
-
this.theadSync = true
|
|
252
|
-
this.$refs[target].scrollLeft = scrollLeft
|
|
268
|
+
this.theadSync = true;
|
|
269
|
+
this.$refs[target].scrollLeft = scrollLeft;
|
|
253
270
|
}
|
|
254
|
-
this.theadSync = false
|
|
271
|
+
this.theadSync = false;
|
|
255
272
|
}
|
|
256
|
-
if (target ==
|
|
273
|
+
if (target == "thead") {
|
|
257
274
|
if (!this.tbodySync) {
|
|
258
|
-
this.tbodySync = true
|
|
259
|
-
this.$refs[target].scrollLeft = scrollLeft
|
|
275
|
+
this.tbodySync = true;
|
|
276
|
+
this.$refs[target].scrollLeft = scrollLeft;
|
|
260
277
|
}
|
|
261
|
-
this.tbodySync = false
|
|
278
|
+
this.tbodySync = false;
|
|
262
279
|
}
|
|
263
280
|
}
|
|
264
|
-
let ping =
|
|
281
|
+
let ping = "left";
|
|
265
282
|
// console.log(min, scrollLeft, max)
|
|
266
283
|
if (scrollLeft > min && scrollLeft < max) {
|
|
267
|
-
ping =
|
|
284
|
+
ping = "middle";
|
|
268
285
|
} else if (scrollLeft == min) {
|
|
269
|
-
ping =
|
|
286
|
+
ping = "left";
|
|
270
287
|
} else if (scrollLeft == max || scrollLeft - this.scrollBarHeight == max) {
|
|
271
|
-
ping =
|
|
288
|
+
ping = "right";
|
|
272
289
|
}
|
|
273
|
-
this.$emit(
|
|
290
|
+
this.$emit("ping", ping);
|
|
274
291
|
// this.$refs.table.setAttribute('class', `k-table11-ping-${ping}`)
|
|
275
|
-
}
|
|
292
|
+
},
|
|
276
293
|
},
|
|
277
294
|
render() {
|
|
278
|
-
let { height, width, body,
|
|
295
|
+
let { height, width, body, sticky } = this;
|
|
279
296
|
let rootProps = {
|
|
280
297
|
// ref: 'table',
|
|
281
|
-
class: [
|
|
298
|
+
class: [
|
|
299
|
+
`k-table-container`,
|
|
282
300
|
// // { [`k-table-ping-${type}`]: width != undefined },
|
|
283
301
|
],
|
|
284
302
|
style: {
|
|
285
|
-
height: body && body.length ?
|
|
303
|
+
height: body && body.length ? "100%" : "auto",
|
|
286
304
|
},
|
|
287
|
-
on: {}
|
|
288
|
-
}
|
|
289
|
-
let has_sticky = sticky !== undefined && sticky > 0
|
|
305
|
+
on: {},
|
|
306
|
+
};
|
|
307
|
+
let has_sticky = sticky !== undefined && sticky > 0;
|
|
290
308
|
if (width && !height && !has_sticky) {
|
|
291
|
-
rootProps.style.overflow =
|
|
292
|
-
rootProps.on.scroll = e => this.asyncScroll(e) //只有左右,没有header scroll
|
|
309
|
+
rootProps.style.overflow = "auto";
|
|
310
|
+
rootProps.on.scroll = (e) => this.asyncScroll(e); //只有左右,没有header scroll
|
|
293
311
|
}
|
|
294
|
-
const content = []
|
|
312
|
+
const content = [];
|
|
295
313
|
if (height || (width && has_sticky)) {
|
|
296
314
|
let headProps = {
|
|
297
|
-
class: [`k-table-thead`, {
|
|
315
|
+
class: [`k-table-thead`, { "k-table-thead-sticky": has_sticky }],
|
|
298
316
|
on: {
|
|
299
|
-
scroll: e => this.asyncScroll(e,
|
|
317
|
+
scroll: (e) => this.asyncScroll(e, "tbody"),
|
|
300
318
|
},
|
|
301
|
-
ref:
|
|
319
|
+
ref: "thead",
|
|
302
320
|
style: {
|
|
303
321
|
// marginBottom: -scrollBarHeight + 'px'
|
|
304
|
-
}
|
|
305
|
-
}
|
|
322
|
+
},
|
|
323
|
+
};
|
|
306
324
|
if (has_sticky) {
|
|
307
|
-
headProps.style.top = sticky +
|
|
325
|
+
headProps.style.top = sticky + "px";
|
|
308
326
|
}
|
|
309
327
|
// if (width && height && !has_sticky) {
|
|
310
|
-
|
|
328
|
+
// headProps.style.marginBottom = -scrollBarHeight + 'px'
|
|
311
329
|
// }
|
|
312
330
|
|
|
313
331
|
// if (has_sticky) {
|
|
314
|
-
|
|
332
|
+
headProps.style.overflow = "hidden";
|
|
315
333
|
// } else if (height) {
|
|
316
|
-
|
|
334
|
+
// headProps.style.overflow = 'auto'
|
|
317
335
|
// }
|
|
318
336
|
if (this.columns && this.columns.length) {
|
|
319
|
-
content.push(<div {...headProps}>{this.renderTable(true, false)}</div>)
|
|
337
|
+
content.push(<div {...headProps}>{this.renderTable(true, false)}</div>);
|
|
320
338
|
}
|
|
321
339
|
const props = {
|
|
322
340
|
class: `k-table-body`,
|
|
323
|
-
style: {
|
|
324
|
-
},
|
|
341
|
+
style: {},
|
|
325
342
|
on: {
|
|
326
|
-
scroll: e => this.asyncScroll(e,
|
|
343
|
+
scroll: (e) => this.asyncScroll(e, "thead"),
|
|
327
344
|
},
|
|
328
|
-
ref: "tbody"
|
|
329
|
-
}
|
|
345
|
+
ref: "tbody",
|
|
346
|
+
};
|
|
330
347
|
if (height) {
|
|
331
348
|
props.style = {
|
|
332
|
-
height: height + (typeof height ===
|
|
333
|
-
overflow:
|
|
334
|
-
}
|
|
349
|
+
height: height + (typeof height === "number" ? "px" : ""),
|
|
350
|
+
overflow: "auto scroll",
|
|
351
|
+
};
|
|
335
352
|
} else if (width || has_sticky) {
|
|
336
353
|
props.style = {
|
|
337
|
-
overflow:
|
|
338
|
-
}
|
|
354
|
+
overflow: "auto hidden",
|
|
355
|
+
};
|
|
339
356
|
}
|
|
340
357
|
if (body && body.length) {
|
|
341
|
-
content.push(<div {...props}>{this.renderTable(false, body)}</div>)
|
|
358
|
+
content.push(<div {...props}>{this.renderTable(false, body)}</div>);
|
|
342
359
|
}
|
|
343
360
|
} else {
|
|
344
|
-
content.push(this.renderTable(true, body))
|
|
361
|
+
content.push(this.renderTable(true, body));
|
|
345
362
|
}
|
|
346
|
-
return
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
}
|
|
363
|
+
return <div {...rootProps}>{content}</div>;
|
|
364
|
+
},
|
|
365
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Empty from '../empty'
|
|
2
|
-
import Icon from '../icon'
|
|
3
2
|
import Spin from '../spin'
|
|
4
3
|
import { Checkbox } from '../checkbox'
|
|
5
4
|
import { Radio } from '../radio'
|
|
6
5
|
import ExtendTable from './extend'
|
|
7
6
|
import { sortFixedCol, hasChild, sortColumnsOnline } from './utils'
|
|
8
7
|
import { Remove, Add } from 'kui-icons'
|
|
9
|
-
|
|
8
|
+
import { withInstall } from '../utils/vue'
|
|
9
|
+
const Table = {
|
|
10
10
|
name: 'Table',
|
|
11
11
|
props: {
|
|
12
12
|
bordered: Boolean,
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
// scrollFocus: 'body',
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
render() {
|
|
34
|
+
render(h) {
|
|
35
35
|
let { $slots, data, $scopedSlots = {}, loading, height, width, sticky } = this
|
|
36
36
|
// bordered = true
|
|
37
37
|
const { header, footer } = $slots
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
let indeterminate = data.filter(x => x._checked).length > 0 && !checkAll;
|
|
71
71
|
//Set Data
|
|
72
72
|
data.forEach((d, i) => {
|
|
73
|
-
let tr = []
|
|
73
|
+
let tr = [];
|
|
74
74
|
// d._checked = d._checked || false
|
|
75
75
|
// d._disabled = d._disabled || false
|
|
76
76
|
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
144
144
|
}
|
|
145
145
|
})
|
|
146
146
|
if (expandNode) {
|
|
147
|
-
tr.unshift(<td class="k-table-row-expand-icon-cell"><Button size="small" onClick={
|
|
147
|
+
tr.unshift(<td class="k-table-row-expand-icon-cell"><Button size="small" onClick={() => this.onExpand(d)} icon={d._expanded ? Remove : Add} /></td>)
|
|
148
148
|
}
|
|
149
149
|
let trProps = {
|
|
150
150
|
class: { 'k-table-row-hover': d._hover },
|
|
@@ -268,4 +268,6 @@ export default {
|
|
|
268
268
|
this.checkAll = checked
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export default withInstall(Table)
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Tabs v-model="current" @change="change">
|
|
9
|
-
<
|
|
9
|
+
<TabPanel key="1" title="Tab 1">
|
|
10
10
|
Content of Tab Pane 1
|
|
11
|
-
</
|
|
12
|
-
<
|
|
11
|
+
</TabPanel>
|
|
12
|
+
<TabPanel key="2" title="Tab 2">
|
|
13
13
|
Content of Tab Pane 2
|
|
14
|
-
</
|
|
15
|
-
<
|
|
14
|
+
</TabPanel>
|
|
15
|
+
<TabPanel key="3" title="Tab 3">
|
|
16
16
|
Content of Tab Pane 3
|
|
17
|
-
</
|
|
17
|
+
</TabPanel>
|
|
18
18
|
</Tabs>
|
|
19
19
|
</template>
|
|
20
20
|
<script>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Tabs v-model="current" card>
|
|
9
|
-
<
|
|
9
|
+
<TabPanel key="1" title="Tab 1">
|
|
10
10
|
Content of Tab Pane 1
|
|
11
|
-
</
|
|
12
|
-
<
|
|
11
|
+
</TabPanel>
|
|
12
|
+
<TabPanel key="2" title="Tab 2">
|
|
13
13
|
Content of Tab Pane 2
|
|
14
|
-
</
|
|
15
|
-
<
|
|
14
|
+
</TabPanel>
|
|
15
|
+
<TabPanel key="3" title="Tab 3">
|
|
16
16
|
Content of Tab Pane 3
|
|
17
|
-
</
|
|
17
|
+
</TabPanel>
|
|
18
18
|
</Tabs>
|
|
19
19
|
</template>
|
|
20
20
|
<script>
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Tabs v-model="current" centered>
|
|
9
|
-
<
|
|
9
|
+
<TabPanel key="1" title="Tab 1">
|
|
10
10
|
Content of Tab Pane 1
|
|
11
|
-
</
|
|
12
|
-
<
|
|
11
|
+
</TabPanel>
|
|
12
|
+
<TabPanel key="2" title="Tab 2">
|
|
13
13
|
Content of Tab Pane 2
|
|
14
|
-
</
|
|
15
|
-
<
|
|
14
|
+
</TabPanel>
|
|
15
|
+
<TabPanel key="3" title="Tab 3">
|
|
16
16
|
Content of Tab Pane 3
|
|
17
|
-
</
|
|
17
|
+
</TabPanel>
|
|
18
18
|
</Tabs>
|
|
19
19
|
</template>
|
|
20
20
|
<script>
|