Open RexHarris opened 3 years ago
template部分 <wxparser :rich-text="graphCodeImg" />
<wxparser :rich-text="graphCodeImg" />
js部分 async getGraphValidationCode() { const res = await this.$api.common.getGraphCode(); this.graphCodeImg = res.data ? res.data.svg : ''; } graphCodeImg为后端返回的字符串类型的svg元素
async getGraphValidationCode() { const res = await this.$api.common.getGraphCode(); this.graphCodeImg = res.data ? res.data.svg : ''; }
template部分
<wxparser :rich-text="graphCodeImg" />
js部分
async getGraphValidationCode() { const res = await this.$api.common.getGraphCode(); this.graphCodeImg = res.data ? res.data.svg : ''; }
graphCodeImg为后端返回的字符串类型的svg元素