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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss",
3
- "version": "0.1.0-alpha.49",
3
+ "version": "0.1.0-alpha.50",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss.common.js",
6
6
  "sideEffects": [
@@ -205,14 +205,14 @@ export default {
205
205
  return this.size || elementSize || '';
206
206
  },
207
207
  _text() {
208
- return ((this.button || {}).text) || this.text;
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 ((this.button || {}).icon) || this.icon;
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 ? this.$el.querySelector('.es-dropdown-selfdefine') : null;
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
- this._bindEvent(
550
- this.splitButton ? this.triggerElm : container,
551
- 'click',
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
- const padding = options.padding || 10;
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
- props.style = { width: (columnWidth - 1) + 'px' };
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);
package/src/index.js CHANGED
@@ -270,7 +270,7 @@ if (typeof window !== 'undefined' && window.Vue) {
270
270
  }
271
271
 
272
272
  export default {
273
- version: '0.1.0-alpha.49',
273
+ version: '0.1.0-alpha.50',
274
274
  install,
275
275
  CollapseTransition,
276
276
  Loading,