为什么第一次文档加载完内容后,会自动滚动到文档最底部? #15
Replies: 1 comment 3 replies
-
@shenghui-shan 可通过在文档内容加载完成后调用focus方法解决该问题,如: <template>
<umo-editor ref="editorRef" ... />
</template>
<script setup>
const editorRef = ref()
// 组件初始化完成后设置文档内容
editorRef.value.setContent('很长很长的文档内容...')
editorRef.value.foucs() // 见:https://editor.umodoc.com/cn/docs/methods#focus
</script> |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
文档加载完内容后,会自动滚动到文档最底部,请问怎么禁用这个功能呢?
Beta Was this translation helpful? Give feedback.
All reactions