Skip to content

Commit

Permalink
Merge pull request #324 from InsHomePgup/main
Browse files Browse the repository at this point in the history
Resolved #318 #319 #320
  • Loading branch information
recoluan authored Dec 26, 2024
2 parents 5959495 + 592656c commit fe57480
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineComponent({
hideComments: {
type: Boolean,
default: true,
},
}
},
setup(props) {
const { solution, options } = useComment()
Expand Down Expand Up @@ -44,6 +44,7 @@ export default defineComponent({
}
return null
}

return h(componentName, {
options: options.value,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../styles/valine.css'
type TvalineOptions = Record<string, unknown>

type Tprops = {
options: TvalineOptions
options: TvalineOptions,
}

export default defineComponent({
Expand All @@ -33,7 +33,6 @@ export default defineComponent({
onMounted(async () => {
const Valine = (await import('valine')).default
const initValine = async () => {

const valineOptions = {
el: '#valine',
placeholder: 'just go go',
Expand All @@ -45,15 +44,9 @@ export default defineComponent({
path: window.location.pathname,
...options.value
}

valineInstance = new Valine(valineOptions)
}

initValine()

watch(() => route?.path,(toPath) => {
initValine();
},{ immediate: true, deep: true })
})
},

Expand Down

0 comments on commit fe57480

Please sign in to comment.