Skip to content

Commit

Permalink
fix(typography): lint test. (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
byq1213 committed Jun 14, 2024
1 parent ba8e51f commit 0899857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/typography/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import props from './text-props';
import { TdTextProps } from './type';
import copy from './utils/copy-to-clipboard';
import { CopyIcon } from 'tdesign-icons-vue-next';
import { TdParagraphProps, TooltipProps, TypographyEllipsis } from '..';
import { TooltipProps, TypographyEllipsis } from '..';
import Ellipsis from './ellipsis';
import { useTNodeJSX } from '../hooks/tnode';
export default defineComponent({
Expand Down
7 changes: 3 additions & 4 deletions src/typography/utils/copy-to-clipboard/toggle-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const deselectCurrent = (): (() => void) => {
const selection = document.getSelection();
if (!selection.rangeCount) {
return function () { };
return function () {};
}
let active = document.activeElement as any;

Expand All @@ -12,9 +12,8 @@ const deselectCurrent = (): (() => void) => {
ranges.push(selection.getRangeAt(i));
}

switch (
active.tagName.toUpperCase() // .toUpperCase handles XHTML
) {
const tagName = active.tagName.toUpperCase(); // toUpperCase handles XHTML
switch (tagName) {
case 'INPUT':
case 'TEXTAREA':
active.blur();
Expand Down

0 comments on commit 0899857

Please sign in to comment.