web-component-gallery 2.0.29 → 2.0.30

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.
@@ -229,6 +229,7 @@ export default {
229
229
 
230
230
  // 搜索事件处理
231
231
  handleSearch(value) {
232
+ this.isInput && (this.innerValue = value)
232
233
  this.searchValue = value
233
234
  this.pagination.current = 1
234
235
 
@@ -1,7 +1,7 @@
1
1
  // 布局
2
2
  .layout(@w: 100%, @h: 100%) {
3
- width: @w;
4
- height: @h;
3
+ width: @w;
4
+ height: @h;
5
5
  }
6
6
 
7
7
  // 正方体盒子
@@ -17,69 +17,82 @@
17
17
 
18
18
  // 提示文字样式
19
19
  .placeholder(@color: @input-placeholder-color) {
20
+
20
21
  // Firefox
21
22
  &::-moz-placeholder {
22
23
  color: @color;
23
24
  opacity: 1;
24
25
  }
26
+
25
27
  // Internet Explorer 10+
26
28
  &:-ms-input-placeholder {
27
29
  color: @color;
28
30
  }
31
+
29
32
  // Safari and Chrome
30
33
  &::-webkit-input-placeholder {
31
34
  color: @color;
32
- }
35
+ }
33
36
 
34
37
  &:placeholder-shown {
35
38
  text-overflow: ellipsis;
36
- }
37
- }
39
+ }
40
+ }
38
41
 
39
42
  // 滚动条样式
40
- .scrollbarStyle(@w: 6px, @h: 6px, @color1: @primary-color, @color2: transparent) {
41
- &::-webkit-scrollbar-track {
42
- border-radius: 0;
43
- background-color: transparent;
44
- }
45
- &::-webkit-scrollbar-thumb {
46
- border-radius: 0;
47
- border-radius: 5px;
48
- background-image: -webkit-linear-gradient(270deg, @color1 0%, @color2 100%);
49
- -webkit-transition: all 0.2s;
50
- transition: all 0.2s;
51
- }
52
- &::-webkit-scrollbar-corner {
53
- background-color: transparent;
54
- }
55
- &::-webkit-scrollbar {
56
- width: @w;
57
- height: @h;
58
- }
43
+ .scrollbarStyle(@w: 6px, @h: 6px, @color1: @primary-color, @color2: transparent) {
44
+ overflow-y: hidden; /* 默认隐藏滚动条 */
45
+ scrollbar-gutter: stable; /* 预留滚动条空间 */
46
+
47
+ &:hover {
48
+ overflow-y: auto; /* 鼠标悬停时显示滚动条 */
49
+ }
50
+
51
+ &::-webkit-scrollbar-track {
52
+ border-radius: 0;
53
+ background-color: transparent;
54
+ }
55
+
56
+ &::-webkit-scrollbar-thumb {
57
+ border-radius: 0;
58
+ border-radius: 5px;
59
+ background-image: -webkit-linear-gradient(270deg, @color1 0%, @color2 100%);
60
+ -webkit-transition: all 0.2s;
61
+ transition: all 0.2s;
62
+ }
63
+
64
+ &::-webkit-scrollbar-corner {
65
+ background-color: transparent;
66
+ }
67
+
68
+ &::-webkit-scrollbar {
69
+ width: @w;
70
+ height: @h;
71
+ }
59
72
  }
60
73
 
61
74
  // 文字换行省略(默认1行)
62
75
  .ellipsis(@row: 1) {
63
- text-overflow: -o-ellipsis-lastline;
64
- overflow: hidden;
65
- text-overflow: ellipsis;
66
- display: -webkit-box;
67
- -webkit-line-clamp: @row;
68
- line-clamp: @row;
69
- -webkit-box-orient: vertical;
70
- }
76
+ text-overflow: -o-ellipsis-lastline;
77
+ overflow: hidden;
78
+ text-overflow: ellipsis;
79
+ display: -webkit-box;
80
+ -webkit-line-clamp: @row;
81
+ line-clamp: @row;
82
+ -webkit-box-orient: vertical;
83
+ }
71
84
 
72
85
  // flex布局
73
86
  .flex-layout(@flexDirection: row, @flexGap: 0) {
74
- display: flex;
75
- gap: @flexGap;
76
- flex-direction: @flexDirection;
87
+ display: flex;
88
+ gap: @flexGap;
89
+ flex-direction: @flexDirection;
77
90
  }
78
91
 
79
92
  // flex排版
80
- .flex-mixins(@direction: row, @align: center, @justify: center, @gap: 0 ) {
81
- .flex-layout(@direction, @gap);
82
- flex-wrap: wrap;
83
- align-items: @align;
84
- justify-content: @justify;
93
+ .flex-mixins(@direction: row, @align: center, @justify: center, @gap: 0) {
94
+ .flex-layout(@direction, @gap);
95
+ flex-wrap: wrap;
96
+ align-items: @align;
97
+ justify-content: @justify;
85
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
package/utils/Tree.js CHANGED
@@ -42,7 +42,6 @@ export function getTreeKey(
42
42
  * @param {string} hasField 过滤包含属性(默认为children)
43
43
  * @param {string} searchField 查找属性(默认为id)
44
44
  */
45
-
46
45
  export function findCheckNodes(dataSource, nodeIds, searchField = 'id', hasField = 'children') {
47
46
  const nodeMap = new Map() // 用于去重的Map
48
47