2022-08-17 17:46:49 +08:00
|
|
|
<template>
|
2022-09-22 16:16:04 +08:00
|
|
|
<LayoutContent>
|
|
|
|
<el-row :gutter="20">
|
2022-09-26 16:32:40 +08:00
|
|
|
<el-col :span="24">
|
|
|
|
<div style="margin-bottom: 10px">
|
|
|
|
<el-radio-group v-model="activeName">
|
|
|
|
<el-radio-button label="all">
|
|
|
|
{{ $t('app.all') }}
|
|
|
|
</el-radio-button>
|
|
|
|
<el-radio-button label="installed">
|
|
|
|
{{ $t('app.installed') }}
|
|
|
|
</el-radio-button>
|
|
|
|
</el-radio-group>
|
|
|
|
<div style="float: right">
|
|
|
|
<el-button @click="sync">{{ $t('app.sync') }}</el-button>
|
|
|
|
</div>
|
2022-09-22 16:16:04 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2022-09-26 16:32:40 +08:00
|
|
|
<Apps v-if="activeName === 'all'"></Apps>
|
|
|
|
<Installed v-if="activeName === 'installed'"></Installed>
|
2022-09-22 16:16:04 +08:00
|
|
|
</LayoutContent>
|
2022-08-17 17:46:49 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import LayoutContent from '@/layout/layout-content.vue';
|
2022-09-26 16:32:40 +08:00
|
|
|
import { ref } from 'vue';
|
|
|
|
import { SyncApp } from '@/api/modules/app';
|
|
|
|
import Apps from './apps/index.vue';
|
|
|
|
import Installed from './installed/index.vue';
|
|
|
|
const activeName = ref('all');
|
|
|
|
|
|
|
|
const sync = () => {
|
|
|
|
SyncApp().then((res) => {
|
|
|
|
console.log(res);
|
2022-09-22 16:16:04 +08:00
|
|
|
});
|
|
|
|
};
|
2022-08-17 17:46:49 +08:00
|
|
|
</script>
|
2022-09-22 16:16:04 +08:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.header {
|
|
|
|
padding-bottom: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.a-card {
|
|
|
|
height: 100px;
|
|
|
|
margin-top: 10px;
|
|
|
|
cursor: pointer;
|
|
|
|
padding: 1px;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
width: 100%;
|
|
|
|
height: 80%;
|
|
|
|
padding: 10%;
|
|
|
|
margin-top: 5px;
|
|
|
|
.image {
|
|
|
|
width: auto;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.a-detail {
|
|
|
|
margin-top: 10px;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.d-name {
|
|
|
|
height: 20%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-description {
|
|
|
|
overflow: hidden;
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.a-card:hover {
|
|
|
|
transform: scale(1.1);
|
|
|
|
}
|
|
|
|
</style>
|