refactor: 升级框架补充
This commit is contained in:
1 parent
258c0e2934
commit
cb726c6172
88 files changed
+31053
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<script lang="ts" setup>
|
||||
import type { DocAlertProps } from './types';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { isDocAlertEnable } from '@vben/hooks';
|
||||
|
||||
import { VbenIcon } from '@vben-core/shadcn-ui';
|
||||
import { openWindow } from '@vben-core/shared/utils';
|
||||
|
||||
defineOptions({
|
||||
name: 'DocAlert',
|
||||
});
|
||||
|
||||
const props = defineProps<DocAlertProps>();
|
||||
|
||||
/** 控制组件显示状态 */
|
||||
const isVisible = ref(true);
|
||||
|
||||
function goToUrl() {
|
||||
openWindow(props.url);
|
||||
}
|
||||
|
||||
function close() {
|
||||
isVisible.value = false;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
role="alert"
|
||||
v-if="isDocAlertEnable() && isVisible"
|
||||
class="border-primary bg-primary/10 relative my-2 flex h-8 w-full items-center gap-2 rounded-md border p-2"
|
||||
>
|
||||
<span class="grid shrink-0 place-items-center">
|
||||
<VbenIcon icon="mdi:information-outline" class="text-primary size-5" />
|
||||
</span>
|
||||
<div class="text-primary min-w-0 flex-1 font-sans text-sm leading-none">
|
||||
<span class="inline-block">【{{ title }}】</span>
|
||||
<a
|
||||
class="hover:text-success cursor-pointer break-all"
|
||||
@click="goToUrl"
|
||||
:title="url"
|
||||
>
|
||||
文档地址:{{ url }}
|
||||
</a>
|
||||
</div>
|
||||
<span class="grid shrink-0 cursor-pointer place-items-center">
|
||||
<VbenIcon
|
||||
icon="mdi:close"
|
||||
class="text-primary size-5 hover:text-red-500"
|
||||
@click="close"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
export { default as DocAlert } from './doc-alert.vue';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface DocAlertProps {
|
||||
title: string;
|
||||
url: string;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: 'DocLink',
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full sm:mx-auto md:max-w-md">
|
||||
<div class="mt-4 flex items-center justify-between">
|
||||
<span class="border-input w-[35%] border-b dark:border-gray-600"></span>
|
||||
<span class="text-muted-foreground text-center text-xs uppercase">
|
||||
萌新必读
|
||||
</span>
|
||||
<span class="border-input w-[35%] border-b dark:border-gray-600"></span>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 flex w-full justify-between">
|
||||
<a
|
||||
href="https://doc.iocoder.cn/"
|
||||
target="_blank"
|
||||
class="text-primary hover:text-primary/80 text-sm"
|
||||
>
|
||||
📚 开发指南
|
||||
</a>
|
||||
<a
|
||||
href="https://doc.iocoder.cn/video/"
|
||||
target="_blank"
|
||||
class="text-primary hover:text-primary/80 text-sm"
|
||||
>
|
||||
🔥 视频教程
|
||||
</a>
|
||||
<a
|
||||
href="https://www.iocoder.cn/Interview/good-collection/"
|
||||
target="_blank"
|
||||
class="text-primary hover:text-primary/80 text-sm"
|
||||
>
|
||||
⚡ 面试手册
|
||||
</a>
|
||||
<a
|
||||
href="http://static.yudao.iocoder.cn/mp/xinyu370.jpeg"
|
||||
target="_blank"
|
||||
class="text-primary hover:text-primary/80 text-sm"
|
||||
>
|
||||
🤝 外包咨询
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,104 @@
|
||||
<script lang="ts" setup>
|
||||
import { $t } from '@vben/locales';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import { useVbenModal } from '@vben-core/popup-ui';
|
||||
import { Badge, VbenButton, VbenButtonGroup } from '@vben-core/shadcn-ui';
|
||||
|
||||
import { useMagicKeys, whenever } from '@vueuse/core';
|
||||
|
||||
defineOptions({
|
||||
name: 'Help',
|
||||
});
|
||||
|
||||
const keys = useMagicKeys();
|
||||
whenever(keys['Alt+KeyH']!, () => {
|
||||
modalApi.open();
|
||||
});
|
||||
|
||||
const [Modal, modalApi] = useVbenModal({
|
||||
draggable: true,
|
||||
overlayBlur: 5,
|
||||
footer: false,
|
||||
onCancel() {
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<Modal class="w-1/3" :title="$t('ui.widgets.qa')">
|
||||
<div class="mt-2 flex flex-col">
|
||||
<div class="mt-2 flex flex-col">
|
||||
<VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
|
||||
<p class="w-24 p-2">项目地址:</p>
|
||||
<VbenButton
|
||||
variant="link"
|
||||
@click="
|
||||
openWindow('https://gitee.com/yudaocode/yudao-ui-admin-vben')
|
||||
"
|
||||
>
|
||||
Gitee
|
||||
</VbenButton>
|
||||
<VbenButton
|
||||
variant="link"
|
||||
@click="
|
||||
openWindow('https://github.com/yudaocode/yudao-ui-admin-vben')
|
||||
"
|
||||
>
|
||||
Github
|
||||
</VbenButton>
|
||||
</VbenButtonGroup>
|
||||
|
||||
<VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
|
||||
<p class="w-24 p-2">issues:</p>
|
||||
<VbenButton
|
||||
variant="link"
|
||||
@click="
|
||||
openWindow(
|
||||
'https://gitee.com/yudaocode/yudao-ui-admin-vben/issues',
|
||||
)
|
||||
"
|
||||
>
|
||||
Gitee
|
||||
</VbenButton>
|
||||
<VbenButton
|
||||
variant="link"
|
||||
@click="
|
||||
openWindow(
|
||||
'https://github.com/yudaocode/yudao-ui-admin-vben/issues',
|
||||
)
|
||||
"
|
||||
>
|
||||
Github
|
||||
</VbenButton>
|
||||
</VbenButtonGroup>
|
||||
|
||||
<VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
|
||||
<p class="w-24 p-2">开发文档:</p>
|
||||
<VbenButton
|
||||
variant="link"
|
||||
@click="openWindow('https://doc.iocoder.cn/quick-start/')"
|
||||
>
|
||||
项目文档
|
||||
</VbenButton>
|
||||
<VbenButton variant="link" @click="openWindow('https://antdv.com/')">
|
||||
antdv 文档
|
||||
</VbenButton>
|
||||
</VbenButtonGroup>
|
||||
</div>
|
||||
<div class="mt-2 flex justify-start">
|
||||
<p class="w-24 p-2">软件外包:</p>
|
||||
<img
|
||||
src="/wx-xingyu.png"
|
||||
alt="数舵科技"
|
||||
class="cursor-pointer"
|
||||
@click="openWindow('https://shuduokeji.com')"
|
||||
/>
|
||||
</div>
|
||||
<p class="mt-2 flex justify-center pt-4 text-sm italic">
|
||||
本项目采用 <Badge class="mx-2" variant="destructive">MIT</Badge>
|
||||
开源协议,个人与企业可100% 免费使用。
|
||||
</p>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
@@ -0,0 +1 @@
|
||||
export { default as Help } from './help.vue';
|
||||
@@ -0,0 +1 @@
|
||||
export { default as TenantDropdown } from './tenant-dropdown.vue';
|
||||
@@ -0,0 +1,83 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { IconifyIcon } from '@vben/icons';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import {
|
||||
Button,
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from '@vben-core/shadcn-ui';
|
||||
|
||||
interface Tenant {
|
||||
id?: number;
|
||||
name: string;
|
||||
packageId: number;
|
||||
contactName: string;
|
||||
contactMobile: string;
|
||||
accountCount: number;
|
||||
expireTime: Date;
|
||||
website: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'TenantDropdown',
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
tenantList?: Tenant[];
|
||||
visitTenantId?: null | number;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
// 租户列表
|
||||
const tenants = computed(() => props.tenantList ?? []);
|
||||
|
||||
async function handleChange(id: number | undefined) {
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
const tenant = tenants.value.find((item) => item.id === id);
|
||||
|
||||
emit('success', tenant);
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger>
|
||||
<Button
|
||||
variant="outline"
|
||||
class="hover:bg-accent ml-1 mr-2 h-8 w-32 cursor-pointer rounded-full p-1.5"
|
||||
>
|
||||
<IconifyIcon icon="lucide:align-justify" class="mr-4" />
|
||||
{{ $t('page.tenant.placeholder') }}
|
||||
<!-- {{ tenants.find((item) => item.id === visitTenantId)?.name }} -->
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent class="w-40 p-0 pb-1">
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuItem
|
||||
v-for="tenant in tenants"
|
||||
:key="tenant.id"
|
||||
:disabled="tenant.id === visitTenantId"
|
||||
class="mx-1 flex cursor-pointer items-center rounded-sm py-1 leading-8"
|
||||
@click="handleChange(tenant.id)"
|
||||
>
|
||||
<template v-if="tenant.id === visitTenantId">
|
||||
<IconifyIcon icon="lucide:check" class="mr-2" />
|
||||
{{ tenant.name }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ tenant.name }}
|
||||
</template>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</template>
|
||||
@@ -0,0 +1 @@
|
||||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":110000,"name":"北京市","center":[116.405285,39.904989],"centroid":[116.41995,40.18994],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":0,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[117.348611,40.581141],[117.389879,40.561593],[117.429915,40.576141],[117.412669,40.605226],[117.467487,40.649738],[117.467487,40.649738],[117.501364,40.636569],[117.514914,40.660181],[117.493973,40.675161],[117.408973,40.686961],[117.342451,40.673799],[117.319662,40.657911],[117.278394,40.664267],[117.208177,40.694675],[117.117018,40.70012],[117.11209,40.707379],[117.012308,40.693767],[116.964881,40.709647],[116.926692,40.745022],[116.924229,40.773581],[116.848468,40.839264],[116.81336,40.848319],[116.759773,40.889954],[116.713577,40.909858],[116.722201,40.927495],[116.677853,40.970888],[116.698795,41.021477],[116.688324,41.044501],[116.647672,41.059394],[116.615643,41.053076],[116.623034,41.021026],[116.598397,40.974503],[116.5676,40.992574],[116.519557,40.98128],[116.519557,40.98128],[116.455499,40.980828],[116.447492,40.953715],[116.477057,40.899907],[116.398216,40.90624],[116.370499,40.94377],[116.339702,40.929303],[116.334159,40.90443],[116.438253,40.81934],[116.46597,40.774487],[116.453651,40.765876],[116.316912,40.772221],[116.311369,40.754996],[116.273181,40.762703],[116.247311,40.791707],[116.22021,40.744115],[116.204812,40.740035],[116.171551,40.695582],[116.162928,40.662451],[116.133979,40.666536],[116.09887,40.630665],[116.005247,40.583868],[115.982457,40.578868],[115.971986,40.6025],[115.907929,40.617493],[115.885139,40.595229],[115.827857,40.587504],[115.819849,40.55932],[115.784741,40.55841],[115.755176,40.540221],[115.736082,40.503372],[115.781045,40.49336],[115.771806,40.443734],[115.864197,40.359422],[115.917784,40.354405],[115.95166,40.281852],[115.968907,40.264045],[115.89869,40.234354],[115.870356,40.185909],[115.855574,40.188652],[115.847567,40.147036],[115.806299,40.15344],[115.773654,40.176307],[115.75456,40.145663],[115.75456,40.145663],[115.599959,40.119583],[115.59072,40.096239],[115.527278,40.076092],[115.485394,40.040364],[115.454597,40.029825],[115.450286,39.992697],[115.428728,39.984443],[115.426264,39.950502],[115.481083,39.935819],[115.522967,39.899099],[115.515575,39.892212],[115.515575,39.892212],[115.526046,39.87568],[115.514344,39.837549],[115.567314,39.816407],[115.552532,39.794799],[115.50572,39.784222],[115.483547,39.798477],[115.483547,39.798477],[115.443511,39.785601],[115.439815,39.752022],[115.486626,39.741899],[115.491554,39.670074],[115.478619,39.650723],[115.478619,39.650723],[115.522351,39.640124],[115.518039,39.597252],[115.545756,39.618922],[115.587024,39.589873],[115.633836,39.599557],[115.633836,39.599557],[115.667712,39.615234],[115.698509,39.577881],[115.698509,39.577881],[115.699125,39.570039],[115.699125,39.570039],[115.716988,39.56035],[115.716988,39.56035],[115.718835,39.553891],[115.718835,39.553891],[115.720683,39.551122],[115.720683,39.551122],[115.722531,39.5442],[115.721299,39.543738],[115.722531,39.5442],[115.722531,39.543738],[115.721299,39.543738],[115.722531,39.543738],[115.724995,39.5442],[115.724995,39.5442],[115.738545,39.540046],[115.738545,39.539585],[115.738545,39.540046],[115.738545,39.539585],[115.752712,39.515581],[115.806299,39.510041],[115.806299,39.510041],[115.821081,39.522968],[115.821081,39.522968],[115.828473,39.541431],[115.867893,39.546507],[115.867893,39.546507],[115.91532,39.582955],[115.91532,39.582955],[115.910393,39.600479],[115.910393,39.600479],[115.957204,39.560812],[115.978146,39.595868],[115.995392,39.576958],[116.026189,39.587567],[116.036044,39.571884],[116.09887,39.575113],[116.130283,39.567732],[116.151841,39.583416],[116.198652,39.589412],[116.240536,39.564041],[116.257782,39.500344],[116.307057,39.488337],[116.337854,39.455536],[116.361876,39.455074],[116.361876,39.455074],[116.434557,39.442597],[116.454883,39.453226],[116.444412,39.482332],[116.411767,39.482794],[116.401912,39.528046],[116.443796,39.510041],[116.437637,39.526661],[116.478289,39.535431],[116.473361,39.552968],[116.50847,39.551122],[116.524484,39.596329],[116.592237,39.621227],[116.592237,39.621227],[116.620571,39.601863],[116.664918,39.605552],[116.723432,39.59264],[116.724048,39.59264],[116.723432,39.59264],[116.724048,39.59264],[116.726512,39.595407],[116.726512,39.595407],[116.709266,39.618],[116.748686,39.619844],[116.79057,39.595868],[116.812128,39.615695],[116.8497,39.66777],[116.906366,39.677444],[116.90575,39.688037],[116.889736,39.687576],[116.887272,39.72533],[116.916837,39.731314],[116.902055,39.763523],[116.949482,39.778703],[116.918069,39.84628],[116.907598,39.832494],[116.865714,39.843982],[116.812128,39.889916],[116.78441,39.891294],[116.782563,39.947749],[116.757925,39.967934],[116.781331,40.034866],[116.820135,40.02845],[116.831222,40.051359],[116.867562,40.041739],[116.927924,40.055024],[116.945171,40.Line truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
export { default as MarkdownIt } from 'markdown-it';
|
||||
export { Transformer } from 'markmap-lib';
|
||||
export { Toolbar } from 'markmap-toolbar';
|
||||
|
||||
export * from 'markmap-view';
|
||||
Reference in new issue
Block a user