1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| import { defineComponent } from 'vue'
| import styles from './Content.module.scss'
| export default defineComponent({
| name: '通用Content',
| props: {
| title: {
| type: String,
| default: '标题',
| },
| customStyle: {
| type: String,
| },
| },
| setup(props, { slots }) {
| return () => (
| <div class={styles.container}>
| <div class={styles.title}>{props.title}</div>
| <div class={styles.content} style={props.customStyle}>
| {slots.default?.()}
| </div>
| </div>
| )
| },
| })
|
|