mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-10-24 18:57:11 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</a-avatar>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import Unknown from '@/assets/images/avatar/unknown.png'
|
||||
import * as Regexp from '@/utils/regexp'
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</a-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { RouteLocationMatched } from 'vue-router'
|
||||
import { findTree } from 'xe-utils'
|
||||
import { useRouteStore } from '@/stores'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<VCharts ref="chart" :option="option" :autoresize="autoResize" :style="{ width, height }" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { registerMap } from 'echarts/core'
|
||||
import VCharts from 'vue-echarts'
|
||||
import worldMap from './world.json'
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { ShortcutType } from '@arco-design/web-vue'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<script lang="ts">
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
import CronParser from 'cron-parser'
|
||||
import SecondForm from '@/components/GenCron/CronForm/component/second-form.vue'
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<script lang="ts">
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import CronGeneratorInput from '@/components/GenCron/CronForm/index.vue'
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'GiCellAvatar' })
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</a-tag>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'GiCellGender' })
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'GiCellStatus' })
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a-tag v-else :color="dictItem.extend">{{ dictItem.label }}</a-tag>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { LabelValueState } from '@/types/global'
|
||||
import type { GiCellTagType } from '@/components/GiCell/type'
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</a-overflow-list>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'GiCellTags' })
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import CodeMirror from 'vue-codemirror6'
|
||||
import { javascript } from '@codemirror/lang-javascript'
|
||||
import { vue } from '@codemirror/lang-vue'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="gi-footer">{{ appStore.getCopyright() }}{{ appStore.getForRecord() ? ` · ${appStore.getForRecord()}` : '' }}</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
defineOptions({ name: 'GiFooter' })
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</a-overflow-list>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'GiOverFlowTags' })
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -893,6 +893,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -500,6 +500,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -1333,6 +1333,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<GiSvgIcon :name="props.icon" :size="18" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
icon?: string
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import MenuIcon from './MenuIcon.vue'
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useAppStore } from '@/stores'
|
||||
import Logo from '@/layout/components/Logo.vue'
|
||||
import Menu from '@/layout/components/Menu/index.vue'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.gi-more-icon-wrap {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { type EChartsOption, graphic } from 'echarts'
|
||||
import { useChart } from '@/hooks'
|
||||
import { type DashboardChartCommonResp, getAnalysisTimeslot as getData } from '@/apis/common'
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { EChartsOption } from 'echarts'
|
||||
import { useChart } from '@/hooks'
|
||||
import { type DashboardChartCommonResp, getAnalysisBrowser as getData } from '@/apis/common'
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useChart } from '@/hooks'
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useChart } from '@/hooks'
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useChart } from '@/hooks'
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useChart } from '@/hooks'
|
||||
import { useAppStore } from '@/stores'
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import Pv from './Pv.vue'
|
||||
import Ip from './Ip.vue'
|
||||
import Demo1 from './Demo1.vue'
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { EChartsOption } from 'echarts'
|
||||
import { getAnalysisGeo as getData } from '@/apis/common/dashboard'
|
||||
import { useChart } from '@/hooks'
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { EChartsOption } from 'echarts'
|
||||
import { useChart } from '@/hooks'
|
||||
import { type DashboardChartCommonResp, getAnalysisModule as getData } from '@/apis/common'
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { EChartsOption } from 'echarts'
|
||||
import { useChart } from '@/hooks'
|
||||
import { type DashboardChartCommonResp, getAnalysisOs as getData } from '@/apis/common'
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-carousel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
const images = [
|
||||
{
|
||||
src: `https://continew.top/qrcode-text.jpg?${new Date().getTime()}`,
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import dayjs from 'dayjs'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import axios, { type AxiosRequestConfig, type AxiosResponse } from 'axios'
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<NoticeDetailModal ref="NoticeDetailModalRef" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { type DashboardNoticeResp, listDashboardNotice } from '@/apis'
|
||||
import { useDict } from '@/hooks/app'
|
||||
import NoticeDetailModal from '@/views/system/notice/NoticeDetailModal.vue'
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
const list = [
|
||||
{
|
||||
alias: 'ContiNew Admin',
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
const router = useRouter()
|
||||
|
||||
const links = [
|
||||
|
||||
@@ -178,11 +178,6 @@ onMounted(() => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.captcha-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-bg {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { type LogDetailResp, getLog } from '@/apis/monitor'
|
||||
|
||||
const dataId = ref('')
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { type AppDetailResp, getApp } from '@/apis/open/app'
|
||||
import { useDict } from '@/hooks/app'
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<VerifyModel ref="verifyModelRef" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { ModeItem } from '../type'
|
||||
import VerifyModel from '../components/VerifyModel.vue'
|
||||
import { useUserStore } from '@/stores'
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { type FileItem, type FormInstance, Message, Modal, type RequestOption } from '@arco-design/web-vue'
|
||||
import {
|
||||
type OptionResp,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { type FormInstance, Message, Modal } from '@arco-design/web-vue'
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</a-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { DictResp } from '@/apis/system'
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</a-row>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { FormInstance } from '@arco-design/web-vue'
|
||||
import type { FileItem } from '@/apis/system'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="videoId"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import Player from 'xgplayer'
|
||||
import type { FileItem } from '@/apis/system'
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis/system'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { useTable } from '@/hooks'
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { type RoleDetailResp, getRole } from '@/apis/system'
|
||||
import { useDept, useDict, useMenu } from '@/hooks/app'
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { type UserDetailResp, getUser } from '@/apis/system/user'
|
||||
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-link v-permission="['system:user:list']" @click="onDetail(record)">详情</a-link>
|
||||
<a-link v-permission="['system:user:update']" @click="onUpdate(record)">修改</a-link>
|
||||
<a-link v-permission="['system:user:list']" title="详情" @click="onDetail(record)">详情</a-link>
|
||||
<a-link v-permission="['system:user:update']" title="修改" @click="onUpdate(record)">修改</a-link>
|
||||
<a-link
|
||||
v-permission="['system:user:delete']"
|
||||
status="danger"
|
||||
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
|
||||
:disabled="record.isSystem"
|
||||
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
|
||||
@click="onDelete(record)"
|
||||
>
|
||||
删除
|
||||
@@ -76,8 +76,8 @@
|
||||
</template>
|
||||
</a-button>
|
||||
<template #content>
|
||||
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
|
||||
<a-doption v-permission="['system:user:updateRole']" @click="onUpdateRole(record)">分配角色</a-doption>
|
||||
<a-doption v-permission="['system:user:resetPwd']" title="重置密码" @click="onResetPwd(record)">重置密码</a-doption>
|
||||
<a-doption v-permission="['system:user:updateRole']" title="分配角色" @click="onUpdateRole(record)">分配角色</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</a-space>
|
||||
|
||||
Reference in New Issue
Block a user