eoss 0.1.0-alpha.49 → 0.1.0-alpha.50
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/lib/dropdown.js +5 -3
- package/lib/eoss.common.js +16 -11
- package/lib/index.js +1 -1
- package/lib/table-column.js +5 -2
- package/lib/table.js +5 -2
- package/lib/theme-chalk/dropdown.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/package.json +1 -1
- package/packages/dropdown/src/dropdown.vue +8 -8
- package/packages/table/src/util.js +5 -2
- package/packages/theme-chalk/src/dropdown.scss +1 -6
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -205,14 +205,14 @@ export default {
|
|
|
205
205
|
return this.size || elementSize || '';
|
|
206
206
|
},
|
|
207
207
|
_text() {
|
|
208
|
-
return (
|
|
208
|
+
return (this.button || {}).text || this.text;
|
|
209
209
|
},
|
|
210
210
|
/**
|
|
211
211
|
* 计算下拉箭头图标类名
|
|
212
212
|
* 优先使用 button 配置中的 icon,否则使用 prop 的 icon
|
|
213
213
|
*/
|
|
214
214
|
_icon() {
|
|
215
|
-
return (
|
|
215
|
+
return (this.button || {}).icon || this.icon;
|
|
216
216
|
},
|
|
217
217
|
/**
|
|
218
218
|
* 计算button属性,合并默认值
|
|
@@ -250,7 +250,9 @@ export default {
|
|
|
250
250
|
*/
|
|
251
251
|
focusing(val) {
|
|
252
252
|
try {
|
|
253
|
-
const selfDefine = this.$el
|
|
253
|
+
const selfDefine = this.$el
|
|
254
|
+
? this.$el.querySelector('.es-dropdown-selfdefine')
|
|
255
|
+
: null;
|
|
254
256
|
if (selfDefine && selfDefine.classList) {
|
|
255
257
|
// 使用classList API更安全地操作类名
|
|
256
258
|
if (val) {
|
|
@@ -546,11 +548,9 @@ export default {
|
|
|
546
548
|
}
|
|
547
549
|
};
|
|
548
550
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
handleClick
|
|
553
|
-
);
|
|
551
|
+
// 始终绑在 triggerElm 上:button-group 的 stop 会让 es-button
|
|
552
|
+
// 调用 stopPropagation,若绑在 container 则事件无法冒泡到此处
|
|
553
|
+
this._bindEvent(this.triggerElm, 'click', handleClick);
|
|
554
554
|
}
|
|
555
555
|
} catch (error) {
|
|
556
556
|
console.error('EsDropdown: 初始化事件时发生错误:', error);
|
|
@@ -367,7 +367,8 @@ export function setupOverflowTooltip(props, column, data, content, options = {})
|
|
|
367
367
|
props.class += ' es-tooltip';
|
|
368
368
|
const fontSize = options.fontSize || 14;
|
|
369
369
|
const lineHeight = options.lineHeight || 22;
|
|
370
|
-
|
|
370
|
+
// 与 table.scss 中 .es-table__cell 的左右内边距(8px)保持一致
|
|
371
|
+
const padding = options.padding || 8;
|
|
371
372
|
|
|
372
373
|
let styles = `font-size: ${fontSize}px; line-height: ${lineHeight}px;`;
|
|
373
374
|
|
|
@@ -375,7 +376,9 @@ export function setupOverflowTooltip(props, column, data, content, options = {})
|
|
|
375
376
|
const columnWidth = (data.column && data.column.realWidth) || (data.column && data.column.width) || 0;
|
|
376
377
|
const w = columnWidth > 0 ? columnWidth - 1 - padding * 2 : 0;
|
|
377
378
|
|
|
378
|
-
|
|
379
|
+
// .cell 位于 td 的内容盒内,宽度须扣除 td 左右内边距与 1px 边框,
|
|
380
|
+
// 否则会溢出 padding 区域、省略号位置偏右
|
|
381
|
+
props.style = { width: (columnWidth > 0 ? w : columnWidth - 1) + 'px' };
|
|
379
382
|
|
|
380
383
|
// 多行文本处理
|
|
381
384
|
if (typeof column.showOverflowTooltip === 'number' && column.showOverflowTooltip > 1) {
|
|
@@ -35,11 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&.es-button--default::before {
|
|
38
|
-
background: custom-mix(
|
|
39
|
-
$--button-default-border-color,
|
|
40
|
-
transparent,
|
|
41
|
-
50%
|
|
42
|
-
);
|
|
38
|
+
background: custom-mix($--button-default-border-color, transparent, 50%);
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
&:hover {
|
|
@@ -55,7 +51,6 @@
|
|
|
55
51
|
}
|
|
56
52
|
@include e(icon) {
|
|
57
53
|
font-size: 14px;
|
|
58
|
-
margin: 0 3px;
|
|
59
54
|
transition: transform 0.3s;
|
|
60
55
|
@include when(rotate) {
|
|
61
56
|
transform: rotate(180deg);
|