<script lang="ts" setup>
|
import { openWindow } from '@jnpf/utils';
|
|
import { APP_PREFIX } from '#/utils/constants';
|
|
defineProps({
|
list: {
|
default: () => [],
|
type: Array as any,
|
},
|
});
|
|
function openSystem(enCode) {
|
const url = `${window.location.origin}/${APP_PREFIX + enCode}`;
|
openWindow(url);
|
}
|
</script>
|
<template>
|
<div class="my-app-pane dashboard-pane">
|
<div class="dashboard-header">
|
<div class="dashboard-header-title">我的应用</div>
|
</div>
|
<div class="app-list">
|
<div class="app-item" v-for="item in list" :key="item.id" @click="openSystem(item.enCode)">
|
<div class="item-icon" :style="{ backgroundColor: item.backgroundColor || '#008cff' }">
|
<i :class="item.icon"></i>
|
</div>
|
<p class="app-item-title" :title="item.fullName">{{ item.fullName }}</p>
|
</div>
|
<a-col :span="24" v-if="!list.length">
|
<jnpf-empty />
|
</a-col>
|
</div>
|
</div>
|
</template>
|