123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <div class="versionMessage">
- <div class="title">窍笔撰写辅助软件历史更新记录</div>
- <div class="infinite-list-wrapper">
- <ul
- class="list"
- v-infinite-scroll="load"
- infinite-scroll-disabled="disabled">
- <li v-for="item in versionList" :key="item.id" class="list-item">
- <div class="num">版本号:{{ item.versionNum }}</div>
- <div class="time">更新日期:{{ item.publishTime }}</div>
- <div class="remark">
- <div>更新要点</div>
- <div v-if="item.remark">{{ item.remark }}</div>
- <div v-else class="wu">无</div>
- </div>
- </li>
- </ul>
- <p v-if="loading">加载中...</p>
- <p v-if="noMore">没有更多了</p>
- </div>
- </div>
-
- </template>
- <script>
- export default {
- components: {},
- props: {},
- data () {
- return {
- versionList: [],
- queryParams:{
- current:0,
- size:10,
- status: "3"
- },
- loading: false,
- noMore:false
- }
- },
- watch: {},
- computed: {
- disabled () {
- return this.loading || this.noMore
- }
- },
- mounted() {},
- methods: {
- load () {
- this.loading = true
- this.queryParams.current += 1
- this.$api.getVersionList(this.queryParams).then(response=>{
- if(response.code == 200){
- this.versionList.push(...response.data.records)
- if(this.versionList.length == response.data.total){
- this.noMore = true
- }
- this.loading = false
- }
- }).catch(error=>{
- this.loading = false
- })
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .versionMessage{
- width: 50%;
- height: calc(100% - 30px);
- margin: auto;
- display: flex;
- align-items: center;
- flex-direction: column;
- box-shadow: 0 0 10px rgb(102, 102, 102);
- border-radius: 8px;
- padding: 10px 15px;
- text-align: left;
- .title{
- font-size: 18px;
- font-weight: bold;
- width: 100%;
- }
- .infinite-list-wrapper{
- width: 100%;
- overflow:auto;
- height: calc(100vh - 280px);
- div{
- padding: 5px 0;
- font-weight: bold;
- }
- .num{
- color:red;
- }
- .wu{
- color: rgb(170, 163, 163);
- font-size: 15px;
- font-weight: normal;
- }
- }
- }
- </style>
|