Code Monkey home page Code Monkey logo

Comments (11)

meteorlxy avatar meteorlxy commented on June 15, 2024 2

为了提高容错率可以不只取第一个,多取几个,但是感觉不是个彻底的解决办法

image

from vssue.

meteorlxy avatar meteorlxy commented on June 15, 2024

提供一下Vssue的版本,另外如果在用Vuepress 1.x的话也可能会有各种奇怪的问题。方便的话最好建一个demo仓库帮你看一下。

这个问题我之前遇到过类似的,但是是某种情况下会创建2次,和设置Vuepress页面的key有关。

可以在博文页面,大概是post组件上面,加一个:key="$page.title"试一下

from vssue.

zhhlwd avatar zhhlwd commented on June 15, 2024

谢谢你的帮助,按照你的提示,我已经解决问题了

from vssue.

meteorlxy avatar meteorlxy commented on June 15, 2024

之前 Vssue 监听传入的 title, issueId, options,如果有变化就会重新初始化。

如果没有设置 key,可能导致前一个页面的 Vssue 还没有销毁就监听到了 $page.title 的变化,试图创建新的 Issue。然后后一个页面的 Vssue 创建后,也试图创建新的 Issue。

考虑了一下,监听 props 重新初始化 Vssue 可能不是很必要的功能,准备去掉,只按照最初传入的 props 来加载评论。

from vssue.

kenberkeley avatar kenberkeley commented on June 15, 2024

同样也出现了这个问题,然而却只有个别文章是如此。

https://github.com/kenberkeley/blog/issues

from vssue.

meteorlxy avatar meteorlxy commented on June 15, 2024

@kenberkeley 看起来和这个不像是同一个问题。目前是只有一篇文章如此,还是某篇文章之后的所有文章都这样?

from vssue.

kenberkeley avatar kenberkeley commented on June 15, 2024

只有其中一篇是如此。。。所以我指定 vssue-id 了😂

from vssue.

kenberkeley avatar kenberkeley commented on June 15, 2024

kenberkeley/blog@db0bc49

from vssue.

meteorlxy avatar meteorlxy commented on June 15, 2024

知道问题了……

目前用的是 Github 的搜索 API ,以 issue 标题为搜索条件,只取第一个搜索结果,看标题是否完全相等。

然而你的这篇文章标题,搜出来的结果是第二个。估计是因为“电面篇”多命中了一个“面”字,搜索权重被 Github 提高了…

image

from vssue.

meteorlxy avatar meteorlxy commented on June 15, 2024

还有个办法就是加引号,我试一下
image

from vssue.

kenberkeley avatar kenberkeley commented on June 15, 2024

那暂时还是。。。指定 ID 吧。。。

from vssue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.