mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
fix: text wrap bug
This commit is contained in:
parent
a2bf3de99a
commit
eb562af409
@ -1,5 +1,4 @@
|
||||
|
||||
**[在线体验网址](https://design.palxp.cn/)** | **[中文文档](https://xp.palxp.cn/)** | **[项目常见问题](https://xp.palxp.cn/#/articles/1689323321667)** | [架构及目录说明](https://xp.palxp.cn/#/articles/1689321259854)
|
||||
**[在线体验网址](https://design.palxp.cn/)** | **[中文文档](https://xp.palxp.cn/)** | [常见问题](https://xp.palxp.cn/#/articles/1689323321667) | [架构说明](https://xp.palxp.cn/#/articles/1689321259854)
|
||||
|
||||
---
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
const NAME = 'w-text'
|
||||
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
import { fontWithDraw } from '@/utils/widgets/loadFontRule'
|
||||
// import { fontWithDraw } from '@/utils/widgets/loadFontRule'
|
||||
import getGradientOrImg from './getGradientOrImg.ts'
|
||||
|
||||
export default {
|
||||
@ -107,7 +107,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters(['dActiveElement']),
|
||||
isDraw() {
|
||||
return this.$route.name === 'Draw' && fontWithDraw
|
||||
return this.$route.name === 'Draw' // && fontWithDraw
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
@ -121,11 +121,7 @@ export default {
|
||||
const isDone = font.value === this.loadFontDone
|
||||
|
||||
if (font.url && !isDone) {
|
||||
if (font.id && this.isDraw) {
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.loading = !this.isDraw
|
||||
const loadFont = new window.FontFace(font.value, `url(${font.url})`)
|
||||
await loadFont.load()
|
||||
document.fonts.add(loadFont)
|
||||
|
Loading…
x
Reference in New Issue
Block a user