kui-vue 3.2.2 → 3.2.4

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.
Files changed (111) hide show
  1. package/components/affix/affix.jsx +23 -75
  2. package/components/affix/demo/container.md +14 -7
  3. package/components/affix/index.md +7 -5
  4. package/components/alert/styles/index.less +13 -8
  5. package/components/avatar/avatar.jsx +63 -0
  6. package/components/avatar/demo/base.md +24 -0
  7. package/components/avatar/demo/change.md +40 -0
  8. package/components/avatar/demo/index.vue +20 -0
  9. package/components/avatar/demo/info.md +7 -0
  10. package/components/avatar/demo/types.md +23 -0
  11. package/components/avatar/index.js +2 -0
  12. package/components/avatar/index.md +7 -0
  13. package/components/avatar/styles/index.less +61 -0
  14. package/components/badge/styles/index.less +1 -2
  15. package/components/base/pop.jsx +1 -1
  16. package/components/breadcrumb/styles/index.less +2 -2
  17. package/components/button/demo/hollow.md +1 -1
  18. package/components/button/styles/index.less +5 -5
  19. package/components/card/demo/border.md +1 -1
  20. package/components/card/styles/index.less +4 -3
  21. package/components/checkbox/checkbox.jsx +4 -2
  22. package/components/checkbox/styles/index.less +49 -44
  23. package/components/collapse/styles/index.less +3 -10
  24. package/components/colorPicker/styles/index.less +5 -3
  25. package/components/datePicker/styles/calendar.less +6 -5
  26. package/components/datePicker/styles/datepicker.less +3 -3
  27. package/components/divider/styles/index.less +7 -6
  28. package/components/drawer/drawer.jsx +10 -8
  29. package/components/drawer/styles/index.less +2 -1
  30. package/components/dropdown/demo/rightmenu.md +2 -3
  31. package/components/dropdown/styles/index.less +2 -2
  32. package/components/empty/styles/index.less +1 -1
  33. package/components/form/styles/index.less +1 -0
  34. package/components/grid/demo/align.md +3 -3
  35. package/components/grid/demo/fill.md +3 -3
  36. package/components/grid/demo/flex.md +5 -5
  37. package/components/grid/demo/index.vue +0 -1
  38. package/components/icon/demo/search.vue +2 -2
  39. package/components/image/instance.js +1 -1
  40. package/components/image/preview.jsx +50 -20
  41. package/components/image/styles/index.less +7 -5
  42. package/components/index.js +7 -1
  43. package/components/input/styles/index.less +2 -1
  44. package/components/layout/demo/base.md +3 -4
  45. package/components/layout/demo/layout1.md +4 -4
  46. package/components/layout/demo/layout2.md +5 -6
  47. package/components/layout/demo/layout3.md +3 -4
  48. package/components/layout/demo/layout4.md +4 -4
  49. package/components/layout/demo/layout5.md +8 -8
  50. package/components/layout/demo/layout6.md +2 -2
  51. package/components/layout/styles/index.less +2 -3
  52. package/components/loading/styles/index.less +1 -1
  53. package/components/menu/styles/dropmenu.less +7 -6
  54. package/components/menu/styles/index.less +13 -9
  55. package/components/message/styles/index.less +1 -1
  56. package/components/modal/modal.jsx +10 -8
  57. package/components/modal/styles/index.less +7 -6
  58. package/components/notice/styles/index.less +1 -1
  59. package/components/page/styles/index.less +1 -1
  60. package/components/popconfirm/styles/index.less +3 -2
  61. package/components/poptip/styles/index.less +4 -3
  62. package/components/progress/styles/index.less +3 -3
  63. package/components/radio/radio.jsx +3 -5
  64. package/components/radio/styles/index.less +60 -55
  65. package/components/rate/index.md +3 -3
  66. package/components/rate/styles/index.less +1 -1
  67. package/components/select/styles/index.less +8 -7
  68. package/components/slider/demo/base.md +35 -0
  69. package/components/slider/demo/index.vue +18 -0
  70. package/components/slider/demo/info.md +7 -0
  71. package/components/slider/demo/vertical.md +13 -0
  72. package/components/slider/index.md +7 -0
  73. package/components/slider/slider.jsx +58 -0
  74. package/components/slider/styles/index.less +60 -32
  75. package/components/space/demo/align.md +46 -0
  76. package/components/space/demo/base.md +20 -0
  77. package/components/space/demo/custom-size.md +35 -0
  78. package/components/space/demo/index.vue +25 -0
  79. package/components/space/demo/info.md +11 -0
  80. package/components/space/demo/size.md +35 -0
  81. package/components/space/demo/vertical.md +19 -0
  82. package/components/space/index.js +2 -0
  83. package/components/space/index.md +6 -0
  84. package/components/space/space.jsx +57 -0
  85. package/components/space/styles/index.less +23 -0
  86. package/components/spin/demo/container.md +1 -2
  87. package/components/spin/demo/mode.md +1 -2
  88. package/components/spin/styles/index.less +1 -1
  89. package/components/styles/dark.less +70 -0
  90. package/components/styles/global-dark.less +36 -0
  91. package/components/styles/global.less +22 -12
  92. package/components/styles/index.less +8 -10
  93. package/components/switch/styles/index.less +4 -3
  94. package/components/table/demo/base-render.md +1 -1
  95. package/components/table/demo/base.md +5 -2
  96. package/components/table/styles/index.less +11 -7
  97. package/components/table/table.jsx +10 -7
  98. package/components/tabs/demo/sample.md +1 -1
  99. package/components/tabs/styles/index.less +7 -10
  100. package/components/tag/styles/index.less +40 -39
  101. package/components/timeline/styles/index.less +3 -2
  102. package/components/tooltip/styles/index.less +22 -3
  103. package/components/tree/styles/index.less +8 -8
  104. package/dist/k-ui-dark.css +1 -0
  105. package/dist/k-ui.css +1 -7
  106. package/dist/k-ui.js +2 -2
  107. package/package.json +11 -9
  108. package/components/slider/demo/slider.js +0 -5
  109. package/components/slider/slider.vue +0 -21
  110. package/components/slider/sliderButton.vue +0 -76
  111. package/components/styles.js +0 -43
@@ -0,0 +1,25 @@
1
+ <script>
2
+ import Info from "./info";
3
+ import Base from "./base";
4
+ import Vertical from "./vertical";
5
+ import Align from "./align";
6
+ import Size from "./size";
7
+ import CustomSize from "./custom-size";
8
+
9
+ import CN from "../index.md";
10
+ export default {
11
+ render() {
12
+ return (
13
+ <div class="switch-demo">
14
+ <Info class="typo" />
15
+ <Base />
16
+ <Vertical />
17
+ <Size />
18
+ <Align />
19
+ <CustomSize />
20
+ <CN class="typo" />
21
+ </div>
22
+ );
23
+ },
24
+ };
25
+ </script>
@@ -0,0 +1,11 @@
1
+ # Space 间距
2
+ 设置组件之间的间距。
3
+
4
+ ## 何时使用
5
+
6
+ 避免组件紧贴在一起,拉开统一的空间。
7
+
8
+ - 适合行内元素的水平间距。
9
+ - 可以设置各种水平对齐方式。
10
+
11
+ ## 代码演示
@@ -0,0 +1,35 @@
1
+ <cn>
2
+ #### 间距大小
3
+ 间距预设大、中、小三种大小。
4
+ 通过设置 size 为 large middle 分别把间距设为大、中间距。若不设置 size,则间距为小。
5
+ </cn>
6
+
7
+ ```vue
8
+ <template>
9
+ <div>
10
+ <RadioGroup v-model="size">
11
+ <Radio value="small">Small</Radio>
12
+ <Radio value="middle">Middle</Radio>
13
+ <Radio value="large">Large</Radio>
14
+ </RadioGroup>
15
+ <br/>
16
+ <br/>
17
+ <Space :size="size">
18
+ <Button type="primary">Primary</Button>
19
+ <Button type="danger">Danger</Button>
20
+ <Button>Default</Button>
21
+ <Button type="dashed">Dashed</Button>
22
+ <Button type="link">Link</Button>
23
+ </Space>
24
+ </div>
25
+ </template>
26
+ <script>
27
+ export default {
28
+ data() {
29
+ return {
30
+ size: 'small',
31
+ };
32
+ },
33
+ };
34
+ </script>
35
+ ```
@@ -0,0 +1,19 @@
1
+ <cn>
2
+ #### 垂直间距
3
+ 相邻组件垂直间距。
4
+ </cn>
5
+
6
+ ```vue
7
+ <template>
8
+ <Space direction="vertical">
9
+ <Card title="Card" icon="heart" style="width:256px">
10
+ <p>card content</p>
11
+ <p>card content</p>
12
+ </Card>
13
+ <Card title="Card" icon="heart" style="width:256px">
14
+ <p>card content</p>
15
+ <p>card content</p>
16
+ </Card>
17
+ </Space>
18
+ </template>
19
+ ```
@@ -0,0 +1,2 @@
1
+ import Space from './space'
2
+ export default Space
@@ -0,0 +1,6 @@
1
+ ### Space API
2
+ | 属性 | 说明 | 类型 | 默认值 |
3
+ | --------- | -------- | ----------------------------- | ---------- |
4
+ | align | 对齐方式 | start , end ,center ,baseline | center |
5
+ | direction | 间距方向 | vertical,horizontal | horizontal |
6
+ | size | 间距大小 | small,middle,large,number | small |
@@ -0,0 +1,57 @@
1
+ import { getChild } from '../_tool/utils'
2
+ export default {
3
+ name: 'Space',
4
+ props: {
5
+ align: {
6
+ type: String,
7
+ default: 'center',
8
+ validator(value) {
9
+ return value ? ["start", "end", "center", "baseline"].indexOf(value) >= 0 : true;
10
+ }
11
+ },
12
+ direction: {
13
+ type: String,
14
+ default: 'horizontal',
15
+ validator(value) {
16
+ return ["vertical", "horizontal"].indexOf(value) >= 0;
17
+ }
18
+ },
19
+ size: {
20
+ type: [String, Number],
21
+ default: 'small',
22
+ validator(value) {
23
+ return typeof value == 'number' ? true : ["small", "middle", "large"].indexOf(value) >= 0;
24
+ }
25
+ }
26
+ },
27
+ render() {
28
+ let { align, direction, $slots, size } = this
29
+ const classes = ['k-space', {
30
+ [`k-space-${direction}`]: direction,
31
+ [`k-space-align-${align}`]: align,
32
+ }]
33
+ let mrs = { small: 8, middle: 16, large: 24 }
34
+
35
+ let mr = typeof size == 'number' ? size : mrs[size]
36
+
37
+ const childs = getChild(this.$slots.default)
38
+
39
+ let style = {}
40
+
41
+ if (direction == 'vertical') {
42
+ style.marginBottom = `${mr}px`
43
+ } else {
44
+ style.marginRight = `${mr}px`
45
+ }
46
+
47
+ return (
48
+ <div class={classes}>
49
+ {
50
+ childs.map((child) => {
51
+ return <div class="k-space-item" style={style}>{child}</div>
52
+ })
53
+ }
54
+ </div>
55
+ )
56
+ }
57
+ }
@@ -0,0 +1,23 @@
1
+ .k-space {
2
+ display: inline-flex;
3
+ }
4
+
5
+ .k-space-align-start {
6
+ align-items: flex-start;
7
+ }
8
+
9
+ .k-space-align-end {
10
+ align-items: flex-end;
11
+ }
12
+
13
+ .k-space-align-center {
14
+ align-items: center;
15
+ }
16
+
17
+ .k-space-align-baseline {
18
+ align-items: baseline;
19
+ }
20
+
21
+ .k-space-vertical {
22
+ flex-direction: column;
23
+ }
@@ -7,7 +7,7 @@
7
7
  <template>
8
8
  <div>
9
9
  <Spin v-model="spinning">
10
- <div class="deme-spin-container">
10
+ <div class="deme-spin-container demo-back">
11
11
  床前明月光,疑是地上霜。<br>
12
12
  举头望明月,低头思故乡。
13
13
  </div>
@@ -19,7 +19,6 @@
19
19
  <style scoped>
20
20
  .deme-spin-container{
21
21
  padding:100px 50px;
22
- background:#f5f5f5;
23
22
  }
24
23
  </style>
25
24
  <script>
@@ -7,7 +7,7 @@
7
7
  <template>
8
8
  <div>
9
9
  <Spin v-model="spinning" :mode="mode">
10
- <div class="deme-spin-container">
10
+ <div class="deme-spin-container demo-back">
11
11
  床前明月光,疑是地上霜。<br>
12
12
  举头望明月,低头思故乡。
13
13
  </div>
@@ -26,7 +26,6 @@
26
26
  <style scoped>
27
27
  .deme-spin-container{
28
28
  padding:100px 50px;
29
- background:#f5f5f5;
30
29
  }
31
30
  </style>
32
31
  <script>
@@ -1,5 +1,5 @@
1
1
  @import '../../styles/global.less';
2
- @spinColor: rgba(255, 255, 255, 0.7);
2
+ @spinColor: fadeout(@back-color,30%);
3
3
  .k-spin {
4
4
  // min-width: 50px;
5
5
  // min-height: 50px;
@@ -0,0 +1,70 @@
1
+ @import '../alert/styles/index.less';
2
+ @import '../affix/styles/index.less';
3
+ @import '../avatar/styles/index.less';
4
+ @import '../badge/styles/index.less';
5
+ @import '../backtop/styles/index.less';
6
+ @import '../breadcrumb/styles/index.less';
7
+ @import '../button/styles/index.less';
8
+ @import '../card/styles/index.less';
9
+ @import '../colorPicker/styles/index.less';
10
+ @import '../collapse/styles/index.less';
11
+ @import '../carousel/styles/index.less';
12
+ @import '../checkbox/styles/index.less';
13
+ @import '../datePicker/styles/index.less';
14
+ @import '../divider/styles/index.less';
15
+ @import '../drawer/styles/index.less';
16
+ @import '../dropdown/styles/index.less';
17
+ @import '../empty/styles/index.less';
18
+ @import '../form/styles/index.less';
19
+ @import '../grid/styles/index.less';
20
+ @import '../icon/styles/index.less';
21
+ @import '../input/styles/index.less';
22
+ @import '../image/styles/index.less';
23
+ @import '../loading/styles/index.less';
24
+ @import '../layout/styles/index.less';
25
+ @import '../modal/styles/index.less';
26
+ @import '../message/styles/index.less';
27
+ @import '../menu/styles/index.less';
28
+ @import '../notice/styles/index.less';
29
+ @import '../page/styles/index.less';
30
+ @import '../poptip/styles/index.less';
31
+ @import '../popconfirm/styles/index.less';
32
+ @import '../progress/styles/index.less';
33
+ @import '../radio/styles/index.less';
34
+ @import '../rate/styles/index.less';
35
+ @import '../space/styles/index.less';
36
+ @import '../spin/styles/index.less';
37
+ @import '../select/styles/index.less';
38
+ @import '../slider/styles/index.less';
39
+ @import '../switch/styles/index.less';
40
+ @import '../steps/styles/index.less';
41
+ @import '../timeline/styles/index.less';
42
+ @import '../tag/styles/index.less';
43
+ @import '../tooltip/styles/index.less';
44
+ @import '../table/styles/index.less';
45
+ @import '../tree/styles/index.less';
46
+ @import '../tabs/styles/index.less';
47
+ @import './global-dark.less';
48
+ ::-webkit-scrollbar {
49
+ background-color: @back-color;
50
+ width: 12px;
51
+ height: 12px;
52
+ }
53
+ ::-webkit-scrollbar-track{
54
+
55
+ }
56
+ ::-webkit-scrollbar-thumb {
57
+ border-radius: 4px;
58
+ width: 8px;
59
+ height: 8px;
60
+ background-color: @border-color;
61
+ }
62
+ ::-webkit-scrollbar-corner,::-webkit-resizer{
63
+ background-color: transparent !important;
64
+ }
65
+ ::-webkit-scrollbar-track{
66
+ background-color: transparent !important;
67
+ }
68
+ ::selection {
69
+ background-color: @main;
70
+ }
@@ -0,0 +1,36 @@
1
+ @main: #3a95ff;
2
+ @success: #00bb5d;
3
+ @danger: darken(#ff3300,20%);
4
+ @warning: #ffa500;
5
+ @pink: lighten( purple, 45%);
6
+ @red: lighten(red, 5%);
7
+ @yellow: mix(yellow, orange, 50%);
8
+ @orange: lighten(orange, 8%);
9
+ @cyan: darken(cyan, 10%);
10
+ @green: lighten(green, 15%);
11
+ @blue: mix(blue, cyan, 50%);
12
+ @purple: lighten(mix(purple,blue, 60%),30%);
13
+ @geekblue: mix(blue, cyan, 70%); //极客蓝
14
+ @magenta: mix(pink, red, 40%); //洋红
15
+ @volcano: mix(red, orange, 60%); //火红
16
+ @gold: lighten(gold, 10%);
17
+ @lime: mix(green, yellow, 40%); //绿黄色
18
+ @gray: #969696;
19
+ @dark: rgba(0, 0, 0, .75);
20
+ @gray: #969696;
21
+ @dark: rgba(0, 0, 0, .75);
22
+ @color: rgba(255, 255, 255, .75);
23
+ @color-light: rgba(255, 255, 255, .65);
24
+ @title-color: rgba(255, 255, 255, .85);
25
+ @back-color: #1f1f1f;
26
+ @mask-color: rgba(0, 0, 0, .6);
27
+ @icon-color: rgba(255, 255, 255, .4);
28
+ @hover-color:fadeout(@border-color, 60%); //item 的 hover 颜色
29
+ @selected-color:fadeout(@main, 90%); //item 的 hover 颜色
30
+ @radius: ~'2px';
31
+ @border-color: #303030;
32
+ @disable-border: darken(@border-color,5%);
33
+ @disable-back: lighten(@back-color,20%);
34
+ @disable-color: rgba(255, 255, 255, .3);
35
+ @disable-light-color: rgba(255, 255, 255, .3);
36
+ @dark-back: #22303f;
@@ -3,6 +3,7 @@
3
3
  @success: #00bb5d;
4
4
  @danger: #ff3300;
5
5
  @warning: #ffa500;
6
+
6
7
  @pink: lighten( purple, 45%);
7
8
  @red: lighten(red, 5%);
8
9
  @yellow: mix(yellow, orange, 50%);
@@ -17,18 +18,27 @@
17
18
  @gold: lighten(gold, 10%);
18
19
  @lime: mix(green, yellow, 40%); //绿黄色
19
20
  @gray: #969696;
20
- @light: #f5f5f5;
21
21
  @dark: rgba(0, 0, 0, .75);
22
- @color: rgba(0, 0, 0, .75);
22
+
23
+
24
+ @color: rgba(0, 0, 0, .75); //字体
23
25
  @color-light: rgba(255, 255, 255, .65);
24
- @title-color: rgba(0, 0, 0, .85);
25
- @back-color: #fafafa;
26
- @mask-color: rgba(0, 0, 0, .6);
27
- @icon-color: rgba(0, 0, 0, .4);
28
- @radius: ~'2px';
29
- @border-color: #d8d8d8;
30
- @disable-border: #d0d0d0;
31
- @disable-color: rgba(0, 0, 0, .3);
26
+
27
+ @title-color: rgba(0, 0, 0, .85); //标题凸显颜色
28
+
29
+ @back-color: #fff; //组件背景
30
+
31
+ @mask-color: rgba(0, 0, 0, .6); //蒙层背景
32
+ @icon-color: rgba(0, 0, 0, .4); //图标颜色
33
+ @hover-color:fadeout(@border-color, 60%); //item 的 hover 颜色
34
+ @selected-color:fadeout(@main, 90%); //item 的 hover 颜色
35
+
36
+ @radius: ~'2px'; //圆角
37
+ @border-color: #d8d8d8; //边框颜色
38
+ @disable-border: #d0d0d0; //禁用边框颜色
39
+ @disable-back: #f5f5f5;//禁用背景颜色
40
+ @disable-color: rgba(0, 0, 0, .3); //禁用文字颜色
41
+
32
42
  @disable-light-color: rgba(255, 255, 255, .3);
33
- @disable-back: #f3f3f3;
34
- @dark-back: #22303f;
43
+
44
+ @dark-back: #22303f; //组件的暗黑模式背景
@@ -1,5 +1,6 @@
1
1
  @import '../alert/styles/index.less';
2
2
  @import '../affix/styles/index.less';
3
+ @import '../avatar/styles/index.less';
3
4
  @import '../badge/styles/index.less';
4
5
  @import '../backtop/styles/index.less';
5
6
  @import '../breadcrumb/styles/index.less';
@@ -10,21 +11,19 @@
10
11
  @import '../carousel/styles/index.less';
11
12
  @import '../checkbox/styles/index.less';
12
13
  @import '../datePicker/styles/index.less';
13
- @import '../drawer/styles/index.less';
14
14
  @import '../divider/styles/index.less';
15
15
  @import '../drawer/styles/index.less';
16
16
  @import '../dropdown/styles/index.less';
17
- @import '../form/styles/index.less';
18
17
  @import '../empty/styles/index.less';
19
- @import '../icon/styles/index.less';
18
+ @import '../form/styles/index.less';
20
19
  @import '../grid/styles/index.less';
20
+ @import '../icon/styles/index.less';
21
21
  @import '../input/styles/index.less';
22
22
  @import '../image/styles/index.less';
23
- // @import '../loading/styles/index.less';
23
+ @import '../loading/styles/index.less';
24
24
  @import '../layout/styles/index.less';
25
25
  @import '../modal/styles/index.less';
26
26
  @import '../message/styles/index.less';
27
- @import '../message/styles/index.less';
28
27
  @import '../menu/styles/index.less';
29
28
  @import '../notice/styles/index.less';
30
29
  @import '../page/styles/index.less';
@@ -32,17 +31,16 @@
32
31
  @import '../popconfirm/styles/index.less';
33
32
  @import '../progress/styles/index.less';
34
33
  @import '../radio/styles/index.less';
35
- // @import '../scroll/scroll';
34
+ @import '../rate/styles/index.less';
35
+ @import '../space/styles/index.less';
36
36
  @import '../spin/styles/index.less';
37
37
  @import '../select/styles/index.less';
38
+ @import '../slider/styles/index.less';
38
39
  @import '../switch/styles/index.less';
39
- // @import '../slider/slider';
40
40
  @import '../steps/styles/index.less';
41
41
  @import '../timeline/styles/index.less';
42
42
  @import '../tag/styles/index.less';
43
43
  @import '../tooltip/styles/index.less';
44
44
  @import '../table/styles/index.less';
45
45
  @import '../tree/styles/index.less';
46
- // @import '../treeselect/styles/index.less';
47
- @import '../tabs/styles/index.less';
48
- // @import '../upload/styles/index.less';
46
+ @import '../tabs/styles/index.less';
@@ -5,8 +5,8 @@
5
5
  line-height: 22px;
6
6
  border-radius: 24px;
7
7
  vertical-align: middle;
8
- border: 1px solid #ccc;
9
- background-color: #ccc;
8
+ border: 1px solid @border-color;
9
+ background-color: @border-color;
10
10
  font-size: 12px;
11
11
  position: relative;
12
12
  cursor: pointer;
@@ -19,6 +19,7 @@
19
19
  box-sizing: border-box;
20
20
  overflow: hidden;
21
21
  outline: none;
22
+ color: @color;
22
23
  &:focus {
23
24
  // border: 1px solid @main;
24
25
  box-shadow: 0 0 5px fade(@main, 75%);
@@ -31,7 +32,7 @@
31
32
  width: 20px;
32
33
  height: 20px;
33
34
  border-radius: 20px;
34
- background-color: #fff;
35
+ background-color: @back-color;
35
36
  position: absolute;
36
37
  left: 1px;
37
38
  top: 50%;
@@ -5,7 +5,7 @@
5
5
 
6
6
  ```vue
7
7
  <template>
8
- <Table :data="data" :columns="columns" />
8
+ <Table :data="data" :columns="columns"/>
9
9
  </template>
10
10
  <script>
11
11
  export default{
@@ -5,7 +5,7 @@
5
5
 
6
6
  ```vue
7
7
  <template>
8
- <Table :data="data" :columns="columns">
8
+ <Table :data="data" :columns="columns" @row-click="test">
9
9
  <template v-slot:tags="value">
10
10
  <Tag v-for="tag in value" :key="tag" :color="tag=='Python'?'red':'orange'">{{tag}}</Tag>
11
11
  </template>
@@ -13,7 +13,7 @@
13
13
  <Icon :type="value==1?'male':'female'" :color="value==1?'blue':'#f50cff'" size="15" />
14
14
  </template>
15
15
  <template v-slot:action="value,record,col">
16
- <Button size="small" @click="e=>show(record)">more</Button>
16
+ <Button size="small" @click.stop="e=>show(record)">more</Button>
17
17
  </template>
18
18
  </Table>
19
19
  </template>
@@ -43,6 +43,9 @@ export default {
43
43
  title: 'More',
44
44
  content: `Name:${record.name} <br/>Aage:${record.age} <br/>Gender:${record.gender == 0 ? 'boy' : 'gril'} <br/>Address:${record.address}`,
45
45
  })
46
+ },
47
+ test(data){
48
+ this.$Message.info('Test row click:'+data.name)
46
49
  }
47
50
  }
48
51
  }
@@ -1,11 +1,12 @@
1
1
  @import '../../styles/global.less';
2
2
  .k-table {
3
- background: #fff;
3
+ background: @back-color;
4
4
  width: 100%;
5
5
  margin: 10px 0;
6
6
  // overflow: auto;
7
7
  box-sizing: border-box;
8
8
  position: relative;
9
+ color: @color;
9
10
  .k-spin {
10
11
  position: absolute;
11
12
  width: 100%;
@@ -17,7 +18,7 @@
17
18
  width: 100%;
18
19
  border-collapse: collapse;
19
20
  border-spacing: 0;
20
- background: #fff;
21
+ background: @back-color;
21
22
  thead {
22
23
  background: fade(@border-color, 10%);
23
24
  border-bottom: 1px solid fade(@border-color, 30%);
@@ -88,10 +89,10 @@
88
89
  // background: #fff;
89
90
  }
90
91
  &:hover {
91
- background: tint(@main, 93%);
92
+ background: fadeout(@border-color, 60%);
92
93
  }
93
94
  &.k-table-row-hover {
94
- background: tint(@main, 93%);
95
+ background: fadeout(@border-color, 60%);
95
96
  }
96
97
  }
97
98
  .k-table-expand-row {
@@ -104,7 +105,7 @@
104
105
  border-bottom: none;
105
106
  }
106
107
  tbody>tr:hover {
107
- background: tint(@main, 93%);
108
+ background: fadeout(@border-color, 60%);
108
109
  }
109
110
  }
110
111
  }
@@ -139,12 +140,15 @@
139
140
  .k-table-fixed-main-thead, .k-table-fixed-right-thead, .k-table-fixed-left-thead {
140
141
  overflow: scroll;
141
142
  margin-bottom: -20px;
142
- background-color: fade(@border-color, 30%);
143
+ // background-color: fade(@border-color, 30%);
143
144
  &::-webkit-scrollbar {
144
- background-color: #fbfbfb; //固定值
145
+ background-color: transparent !important;//fade(@border-color, 30%); //固定值
145
146
  // border-top: 1px solid fade(@border-color, 30%);
146
147
  border-bottom: 1px solid fade(@border-color, 30%);
147
148
  }
149
+ &::-webkit-scrollbar-track{
150
+ background-color: transparent !important;
151
+ }
148
152
  }
149
153
  .k-table-fixed-left-thead {
150
154
  overflow-y: hidden;
@@ -150,15 +150,18 @@ export default {
150
150
  let trProps = {
151
151
  class: { 'k-table-row-hover': d._hover },
152
152
  key: (d.key || i).toString(),
153
+ on: {
154
+ click: () => {
155
+ this.$emit('row-click', d)
156
+ }
157
+ }
153
158
  }
154
159
  if (hasFixed) {
155
- trProps.on = {
156
- mouseenter: () => {
157
- this.$set(d, '_hover', true)
158
- },
159
- mouseleave: () => {
160
- this.$set(d, '_hover', false)
161
- }
160
+ trProps.on.mouseenter = () => {
161
+ this.$set(d, '_hover', true)
162
+ }
163
+ trProps.on.mouseleave = () => {
164
+ this.$set(d, '_hover', false)
162
165
  }
163
166
  }
164
167
  if (tr.length) {
@@ -42,8 +42,8 @@ export default{
42
42
 
43
43
  <style scoped>
44
44
  .demo-tabs-sample{
45
- background:#f2f2f2;
46
45
  padding:10px;
46
+ background-color:rgba(0,0,0,.2);
47
47
  }
48
48
  </style>
49
49
  ```
@@ -17,10 +17,7 @@
17
17
  color: @disable-color;
18
18
  cursor: not-allowed;
19
19
  }
20
-
21
- .k-tabs-extra {
22
-
23
- }
20
+ .k-tabs-extra {}
24
21
  .k-tabs-nav-container {
25
22
  flex: 1;
26
23
  width: 0; // 麻痹,我感觉这是个bug
@@ -132,16 +129,15 @@
132
129
 
133
130
  .k-tabs-card {
134
131
  .k-tabs-bar {
135
- .k-tabs-extra {
136
- }
132
+ .k-tabs-extra {}
137
133
  .k-tabs-tab {
138
134
  margin-right: 2px;
139
135
  border: 1px solid @border-color;
140
- background: @back-color;
136
+ // background: @back-color;
141
137
  padding: 8px 16px;
142
138
  }
143
139
  .k-tabs-tab-active {
144
- background: #fff;
140
+ background: @back-color;
145
141
  border-bottom-color: transparent;
146
142
  &::after {
147
143
  display: none;
@@ -170,7 +166,7 @@
170
166
  padding: 10px 16px;
171
167
  }
172
168
  .k-tabs-tab-active {
173
- background: #fff;
169
+ background: @back-color;
174
170
  &::after {
175
171
  display: none;
176
172
  }
@@ -180,7 +176,8 @@
180
176
  display: block;
181
177
  .k-tabs-tabpane {
182
178
  padding: 16px;
183
- background: #fff;
179
+ // background: #fff;
180
+ background: @back-color;
184
181
  box-sizing: border-box;
185
182
  }
186
183
  .k-tabs-tabpane:not(.k-tabs-tabpane-active) {