|
@@ -1,6 +1,8 @@
|
|
|
import { defineComponent } from "vue";
|
|
|
import { ElTag } from "element-plus";
|
|
|
-import VirtualList from 'vue-virtual-scroll-v3'
|
|
|
+// import VirtualList from 'vue-virtual-list-v3';
|
|
|
+// import VirtualList from 'vue3-virtual-list'
|
|
|
+import { RecycleScroller } from 'vue-virtual-scroller'
|
|
|
import styles from './index.module.less'
|
|
|
import event, { LIVE_EVENT_MESSAGE } from '/src/components/live-broadcast/event';
|
|
|
import { state } from '/src/state'
|
|
@@ -16,7 +18,7 @@ export default defineComponent({
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- messageList: [] as any[], // 回复学生列表
|
|
|
+ messageList: [{ name: 1, id: 1 }] as any[], // 回复学生列表
|
|
|
loadingMessage: false, // 观看列表状态
|
|
|
}
|
|
|
},
|
|
@@ -57,6 +59,14 @@ export default defineComponent({
|
|
|
},
|
|
|
render() {
|
|
|
return (
|
|
|
+ // <RecycleScroller class="virtual-list"
|
|
|
+ // style="height: 185px"
|
|
|
+ // item-height={85}
|
|
|
+ // items={this.messageList}
|
|
|
+ // key-field="id"
|
|
|
+ // >
|
|
|
+ // <div style={{ color: '#fff' }}>showInfo</div>
|
|
|
+ // </RecycleScroller>
|
|
|
// <VirtualList class="list-dynamic scroll-touch"
|
|
|
// :data-key="'id'"
|
|
|
// :data-sources="items"
|
|
@@ -74,19 +84,19 @@ export default defineComponent({
|
|
|
// </div>
|
|
|
// </template>
|
|
|
// </VirtualList>
|
|
|
-
|
|
|
// <VirtualList class={styles.itemContent}
|
|
|
- // dataKey="id"
|
|
|
- // dataSources={this.messageList}
|
|
|
- // estimateSize="85"
|
|
|
- // itemClass="'itemInfo'"
|
|
|
- // ref="virtualList">
|
|
|
- // <template #default={source}>
|
|
|
- // <div class="item-inner">
|
|
|
- // 111
|
|
|
- // </div>
|
|
|
- // </template>
|
|
|
+ // dataKey="id"
|
|
|
+ // dataSources={this.messageList}
|
|
|
+ // estimateSize="85"
|
|
|
+ // itemClass="'itemInfo'"
|
|
|
+ // ref="virtualList">
|
|
|
+ // <template v-slot={source}>
|
|
|
+ // <div style={{ color: 'red' }}>
|
|
|
+ // { source }
|
|
|
+ // </div>
|
|
|
+ // </template>
|
|
|
// </VirtualList>
|
|
|
+
|
|
|
<div style={{ minHeight: '100%', position: 'relative' }}>
|
|
|
{this.messageList.length > 0 ? this.messageList.map((item : any) => (
|
|
|
<div class={styles.itemContent}>
|
|
@@ -105,4 +115,8 @@ export default defineComponent({
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
-})
|
|
|
+})
|
|
|
+
|
|
|
+function source(source: any) {
|
|
|
+ throw new Error("Function not implemented.");
|
|
|
+}
|