vue-codemirror
vue-codemirror copied to clipboard
how to use api openSearchPanel in vue3-jsx ?
Describe the bug
export default defineComponent({
name: 'log',
title: 'Web IDE example',
url: import.meta.url,
components: {
Codemirror
},
props,
setup(props) {
const editorRef = ref()
const code = shallowRef(props.code)
onMounted(() => {
**_// TODO:i want to use api (openSearchPanel) here,how ???_**
watch(
() => props.code,
(_code) => {
code.value = _code
}
)
})
return {
...
}
},
render() {
const {
...
} = this
return (
<div class={styles['editor']}>
<div class={styles['main']}>
<NButton>openSearch</NButton>
<Codemirror
v-model={code}
extensions={[oneDark, search({ top: true })]}
disabled={config.disabled}
></Codemirror>
</div>
</div>
)
}
})
Reproduction
no
System Info
node 16.0.0
codemirror ^6
Used Package Manager
pnpm
Validations
- [X] Read the the documentation in detail.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
please help me ,thanks!!!!!!!!!!1🧎🏻