mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 08:13:07 +02:00
refactor(client): refactor my-antennas/index to use Composition API (#8679)
This commit is contained in:
parent
95eea58d7c
commit
7d08b936c6
1 changed files with 15 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<MkSpacer :content-max="700">
|
<MkSpacer :content-max="700">
|
||||||
<div class="ieepwinx">
|
<div class="ieepwinx">
|
||||||
<MkButton :link="true" to="/my/antennas/create" primary class="add"><i class="fas fa-plus"></i> {{ $ts.add }}</MkButton>
|
<MkButton :link="true" to="/my/antennas/create" primary class="add"><i class="fas fa-plus"></i> {{ i18n.ts.add }}</MkButton>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
|
||||||
|
@ -14,36 +14,25 @@
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts" setup>
|
||||||
import { defineComponent } from 'vue';
|
import { } from 'vue';
|
||||||
import MkPagination from '@/components/ui/pagination.vue';
|
import MkPagination from '@/components/ui/pagination.vue';
|
||||||
import MkButton from '@/components/ui/button.vue';
|
import MkButton from '@/components/ui/button.vue';
|
||||||
import * as symbols from '@/symbols';
|
import * as symbols from '@/symbols';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
const pagination = {
|
||||||
components: {
|
|
||||||
MkPagination,
|
|
||||||
MkButton,
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
[symbols.PAGE_INFO]: {
|
|
||||||
title: this.$ts.manageAntennas,
|
|
||||||
icon: 'fas fa-satellite',
|
|
||||||
bg: 'var(--bg)',
|
|
||||||
action: {
|
|
||||||
icon: 'fas fa-plus',
|
|
||||||
handler: this.create
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pagination: {
|
|
||||||
endpoint: 'antennas/list' as const,
|
endpoint: 'antennas/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
};
|
||||||
};
|
|
||||||
},
|
defineExpose({
|
||||||
});
|
[symbols.PAGE_INFO]: {
|
||||||
|
title: i18n.ts.manageAntennas,
|
||||||
|
icon: 'fas fa-satellite',
|
||||||
|
bg: 'var(--bg)'
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in a new issue