@flexem/fc-gui 3.0.0-alpha.174 → 3.0.0-alpha.176

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.
@@ -624,31 +624,27 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
624
624
  const dropdownBg = this.model.displaySetting.axisSetting.filterBackgroudColor || fillColor || '#fff';
625
625
  const dropdownWrapper = operationArea.append('div')
626
626
  .style('display', 'inline-block')
627
- .style('position', 'relative')
628
627
  .style('margin-left', this.displayOption.marginLeft + 'px')
629
628
  .style('vertical-align', 'middle');
630
629
  const selectedText = this.timePeriods.find(t => t.key === Number(this.currentTimePeriod));
630
+ const arrowIconUrl = 'url("data:image/svg+xml,'
631
+ + '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height=%225%22 viewBox=%220 0 8 5%22%3E'
632
+ + '%3Cpath d=%22M0 0L4 5L8 0z%22 fill=%22%23666%22/%3E%3C/svg%3E")';
631
633
  const dropdownTrigger = dropdownWrapper.append('div')
632
634
  .attr('class', 'hc-dropdown-trigger')
633
635
  .style('background-color', backgroundColor)
636
+ .style('background-image', arrowIconUrl)
637
+ .style('background-repeat', 'no-repeat')
638
+ .style('background-position', 'right 4px center')
634
639
  .style('font-size', this.displayOption.operationSelectFontSize)
635
640
  .style('cursor', 'pointer')
636
641
  .style('padding', '0 18px 0 4px')
637
642
  .style('border', '1px solid #ccc')
638
643
  .style('border-radius', '2px')
639
- .style('position', 'relative')
640
644
  .style('white-space', 'nowrap')
641
645
  .style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
642
646
  .style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
643
647
  .text(selectedText ? selectedText.name : '');
644
- dropdownTrigger.append('span')
645
- .style('position', 'absolute')
646
- .style('right', '4px')
647
- .style('top', '50%')
648
- .style('transform', 'translateY(-50%)')
649
- .style('font-size', '10px')
650
- .style('pointer-events', 'none')
651
- .text('▼');
652
648
  const dropdownListEl = document.createElement('div');
653
649
  dropdownListEl.style.cssText = 'display:none;position:fixed;background:' + dropdownBg
654
650
  + ';border:1px solid #ccc;border-radius:2px;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,0.15);';
@@ -686,14 +682,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
686
682
  const currentPeriod = this.timePeriods.find(p => p.key === tp.key);
687
683
  const currentName = currentPeriod ? currentPeriod.name : tp.name;
688
684
  dropdownTrigger.text(currentName);
689
- dropdownTrigger.append('span')
690
- .style('position', 'absolute')
691
- .style('right', '4px')
692
- .style('top', '50%')
693
- .style('transform', 'translateY(-50%)')
694
- .style('font-size', '10px')
695
- .style('pointer-events', 'none')
696
- .text('▼');
697
685
  // 更新选中状态
698
686
  dropdownList.selectAll('.hc-dropdown-item')
699
687
  .classed('hc-dropdown-selected', false)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.174",
3
+ "version": "3.0.0-alpha.176",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",