Skip to content

Commit

Permalink
fix(anchor): [anchor] fixed the bug that querySelect cannot select sp…
Browse files Browse the repository at this point in the history
…ecial id (#2620)
  • Loading branch information
zzcr authored and kagol committed Dec 11, 2024
1 parent 74570cc commit 53219a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/renderless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-renderless",
"version": "3.20.2",
"version": "3.20.3",
"private": true,
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/renderless/src/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { IAnchorRenderlessParams, IAnchorLinkItem } from '@/types'
import { addClass, removeClass } from '../common/deps/dom'

const getEleMentBySelect = (parent, selector) =>
selector?.startsWith('#') ? document.getElementById('selector') : parent.querySelector(selector)
selector?.startsWith('#') ? document.getElementById(selector.slice(1)) : parent.querySelector(selector)

export const setFixAnchor =
({ vm, props }: Pick<IAnchorRenderlessParams, 'vm' | 'props'>) =>
Expand Down

0 comments on commit 53219a1

Please sign in to comment.