mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix ComponentDescription.vue
Make the description change in real time based on incoming prop
This commit is contained in:
parent
079dc155fd
commit
8faf1ce9f5
@ -6,7 +6,6 @@
|
||||
import { defineComponent } from 'vue'
|
||||
import type { PropType } from 'vue'
|
||||
import type { ComponentMetadata } from '@/components/types'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
|
||||
import { getDescriptionHTML } from '../description'
|
||||
|
||||
@ -19,12 +18,16 @@ export default defineComponent({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
settings: getComponentSettings(this.componentData),
|
||||
html: '',
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.html = await getDescriptionHTML(this.componentData)
|
||||
watch: {
|
||||
'componentData.description': {
|
||||
async handler() {
|
||||
this.html = await getDescriptionHTML(this.componentData)
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user