codemirror5 设置最小高度,超出不滚动

<style lang="scss" scoped>
::v-deep .CodeMirror-scroll {
  cursor: text;
  min-height: 200px;
}
// ::v-deep .CodeMirror-lines {
//   min-height: 200px;
// }
</style>

<script>

mounted() {
    this.$nextTick(() => {
      this.$refs.cm.codemirror.setSize('100%', 'auto')
    })
  },

</script>

参考链接:https://github.com/codemirror/codemirror5/issues/2835

你可能感兴趣的:(javascript,vue.js,前端)