Skip to content

Commit

Permalink
feat: 根据JQuery建议弃用API
Browse files Browse the repository at this point in the history
  • Loading branch information
derekjqwang committed Aug 3, 2020
1 parent 9e572bb commit 771786b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/use-jquery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getImageDomUrl(
): string {
const res = $(jqCur, jqContainer);

return $.trim(res.attr('src'));
return res.attr('src').trim();
}

/**
Expand All @@ -25,7 +25,7 @@ export function getText(
): string {
const res = $(jqCur, jqContainer);

return $.trim(res.text());
return res.text().trim();
}

/**
Expand All @@ -42,7 +42,7 @@ export function getAttr(
): string {
const res = $(jqCur, jqContainer);

return $.trim(res.attr(name));
return res.attr(name).trim();
}

/**
Expand Down

0 comments on commit 771786b

Please sign in to comment.