Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析latex不对的问题 #224

Closed
blfjvkwfn opened this issue Jul 1, 2022 · 3 comments
Closed

解析latex不对的问题 #224

blfjvkwfn opened this issue Jul 1, 2022 · 3 comments

Comments

@blfjvkwfn
Copy link

blfjvkwfn commented Jul 1, 2022

我在解析latex的时候公式显示的不对。
步骤:
1、第一次解析文本“求$x^2$”.
2、第二次解析文本“求$y^2$”.

这个时候第二次显示的还是第一次的结果。感觉是缓存了上一次的解析记录。
第一次请求了http://towxml.vvadd.com/?tex
第二次都没有这个网络请求

@sbfkcel
Copy link
Owner

sbfkcel commented Jul 2, 2022

先看DEMO~~
解析公式没有不正常的

@blfjvkwfn
Copy link
Author

blfjvkwfn commented Jul 2, 2022

公式解析是正常的。
wxml:

下一个

js:
next:function(e) {
console.log('next')
const _ts = this;
let data = '';
if(this.data.index == 1) {
data = '求$x^{2}$.'
_ts.setData({
index:2
})
} else {
data = '求$y^{2}$.'
_ts.setData({
index:1
})
}
console.log(data)
let obj = app.towxml(data,'markdown',{
// theme:'dark',
events:{
tap:e => {
console.log('tap',e);
},
change:e => {
console.log('todo',e);
}
}
});
_ts.setData({
article:obj,
isLoading: false
});
}

@blfjvkwfn
Copy link
Author

非常感谢大佬回复。
已经好了。在设置article之前先清空一下就行了。如下:
_ts.setData({
article:‘’
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants