add docs
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div class="demo">
|
||||
<t-input
|
||||
v-model="maxHeight"
|
||||
class="field"
|
||||
placeholder="最大高度,如 20rem"
|
||||
/>
|
||||
<tiptap-view :content="content" :max-height="maxHeight" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import { TiptapView } from "timi-tdesign-pc";
|
||||
|
||||
const content = `<h2>只读视图</h2>
|
||||
<p>与编辑器共用同一套渲染规则,内容超出 <code>maxHeight</code> 时可滚动查看。</p>
|
||||
<blockquote><p>适合详情页、审批流等只需要阅读的场景。</p></blockquote>`;
|
||||
|
||||
const maxHeight = ref("20rem");
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.demo {
|
||||
.field {
|
||||
width: 16rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user