mirror of
https://github.com/CzBiX/qb-web.git
synced 2026-04-25 03:10:40 +08:00
Sort RSS articles
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
color="primary"
|
||||
>
|
||||
<v-list-item
|
||||
v-for="article in selectItem.articles"
|
||||
v-for="article in sortArticles(selectItem.articles)"
|
||||
:key="article.id"
|
||||
:value="article"
|
||||
>
|
||||
@@ -201,7 +201,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { get, toPath } from 'lodash'
|
||||
import { get, toPath, sortBy } from 'lodash'
|
||||
import { mapActions, mapMutations, mapState } from 'vuex'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch, Emit } from 'vue-property-decorator'
|
||||
@@ -317,6 +317,10 @@ export default class RssDialog extends HasTask {
|
||||
}).join('\\');
|
||||
}
|
||||
|
||||
sortArticles(articles: RssTorrent) {
|
||||
return sortBy(articles, 'date').reverse();
|
||||
}
|
||||
|
||||
isItemLoading(row: any) {
|
||||
const item = row.item.item
|
||||
return item && item.isLoading
|
||||
|
||||
Reference in New Issue
Block a user