mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
docs(perf): lazy import transliteration (#11893)
This commit is contained in:
@@ -62,13 +62,16 @@ export default {
|
||||
|
||||
syncMobilePos(id) {
|
||||
// Getting the document at this point is to ensure that the target has been fully rendered.
|
||||
if (this.iframeDocument) {
|
||||
const target = this.iframeDocument.getElementById(id);
|
||||
target && target.scrollIntoView(true);
|
||||
} else {
|
||||
if (!this.iframeDocument) {
|
||||
const iframe = document.querySelector('iframe');
|
||||
this.iframeDocument = iframe.contentWindow.document;
|
||||
}
|
||||
if (this.iframeDocument) {
|
||||
const target = this.iframeDocument.getElementById(id);
|
||||
if (target) {
|
||||
target.scrollIntoView(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
copyAction() {
|
||||
|
Reference in New Issue
Block a user