Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
commit
d69618e491
@ -7,6 +7,7 @@ import type {
|
||||
} from '@vben/common-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import {
|
||||
AnalysisChartCard,
|
||||
@ -18,11 +19,15 @@ import {
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
||||
// url 也可以是内部路由,在 navTo 方法中识别处理,进行内部跳转
|
||||
// 例如:url: /dashboard/workspace
|
||||
const projectItems: WorkbenchProjectItem[] = [
|
||||
{
|
||||
color: '',
|
||||
@ -31,6 +36,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '开源组',
|
||||
icon: 'carbon:logo-github',
|
||||
title: 'Github',
|
||||
url: 'https://github.com',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
@ -39,6 +45,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '算法组',
|
||||
icon: 'ion:logo-vue',
|
||||
title: 'Vue',
|
||||
url: 'https://vuejs.org',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
@ -47,6 +54,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '上班摸鱼',
|
||||
icon: 'ion:logo-html5',
|
||||
title: 'Html5',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/HTML',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
@ -55,6 +63,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: 'UI',
|
||||
icon: 'ion:logo-angular',
|
||||
title: 'Angular',
|
||||
url: 'https://angular.io',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
@ -63,6 +72,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '技术牛',
|
||||
icon: 'bx:bxl-react',
|
||||
title: 'React',
|
||||
url: 'https://reactjs.org',
|
||||
},
|
||||
{
|
||||
color: '#EBD94E',
|
||||
@ -71,39 +81,47 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '架构组',
|
||||
icon: 'ion:logo-javascript',
|
||||
title: 'Js',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/JavaScript',
|
||||
},
|
||||
];
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: '#1fdaca',
|
||||
icon: 'ion:home-outline',
|
||||
title: '首页',
|
||||
url: '/',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
icon: 'ion:grid-outline',
|
||||
title: '仪表盘',
|
||||
url: '/dashboard',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
icon: 'ion:layers-outline',
|
||||
title: '组件',
|
||||
url: '/demos/features/icons',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
icon: 'ion:settings-outline',
|
||||
title: '系统管理',
|
||||
url: '/demos/features/login-expired', // 这里的 URL 是示例,实际项目中需要根据实际情况进行调整
|
||||
},
|
||||
{
|
||||
color: '#4daf1bc9',
|
||||
icon: 'ion:key-outline',
|
||||
title: '权限管理',
|
||||
url: '/demos/access/page-control',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
icon: 'ion:bar-chart-outline',
|
||||
title: '图表',
|
||||
url: '/analytics',
|
||||
},
|
||||
];
|
||||
|
||||
@ -195,6 +213,24 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
title: 'Vben',
|
||||
},
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
// This is a sample method, adjust according to the actual project requirements
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -210,7 +246,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
|
||||
<div class="mt-5 flex flex-col lg:flex-row">
|
||||
<div class="mr-4 w-full lg:w-3/5">
|
||||
<WorkbenchProject :items="projectItems" title="项目" />
|
||||
<WorkbenchProject :items="projectItems" title="项目" @click="navTo" />
|
||||
<WorkbenchTrends :items="trendItems" class="mt-5" title="最新动态" />
|
||||
</div>
|
||||
<div class="w-full lg:w-2/5">
|
||||
@ -218,6 +254,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
:items="quickNavItems"
|
||||
class="mt-5 lg:mt-0"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<WorkbenchTodo :items="todoItems" class="mt-5" title="待办事项" />
|
||||
<AnalysisChartCard class="mt-5" title="访问来源">
|
||||
|
@ -7,6 +7,7 @@ import type {
|
||||
} from '@vben/common-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import {
|
||||
AnalysisChartCard,
|
||||
@ -18,11 +19,15 @@ import {
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
||||
// url 也可以是内部路由,在 navTo 方法中识别处理,进行内部跳转
|
||||
// 例如:url: /dashboard/workspace
|
||||
const projectItems: WorkbenchProjectItem[] = [
|
||||
{
|
||||
color: '',
|
||||
@ -31,6 +36,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '开源组',
|
||||
icon: 'carbon:logo-github',
|
||||
title: 'Github',
|
||||
url: 'https://github.com',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
@ -39,6 +45,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '算法组',
|
||||
icon: 'ion:logo-vue',
|
||||
title: 'Vue',
|
||||
url: 'https://vuejs.org',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
@ -47,6 +54,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '上班摸鱼',
|
||||
icon: 'ion:logo-html5',
|
||||
title: 'Html5',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/HTML',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
@ -55,6 +63,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: 'UI',
|
||||
icon: 'ion:logo-angular',
|
||||
title: 'Angular',
|
||||
url: 'https://angular.io',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
@ -63,6 +72,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '技术牛',
|
||||
icon: 'bx:bxl-react',
|
||||
title: 'React',
|
||||
url: 'https://reactjs.org',
|
||||
},
|
||||
{
|
||||
color: '#EBD94E',
|
||||
@ -71,39 +81,47 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '架构组',
|
||||
icon: 'ion:logo-javascript',
|
||||
title: 'Js',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/JavaScript',
|
||||
},
|
||||
];
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: '#1fdaca',
|
||||
icon: 'ion:home-outline',
|
||||
title: '首页',
|
||||
url: '/',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
icon: 'ion:grid-outline',
|
||||
title: '仪表盘',
|
||||
url: '/dashboard',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
icon: 'ion:layers-outline',
|
||||
title: '组件',
|
||||
url: '/demos/features/icons',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
icon: 'ion:settings-outline',
|
||||
title: '系统管理',
|
||||
url: '/demos/features/login-expired', // 这里的 URL 是示例,实际项目中需要根据实际情况进行调整
|
||||
},
|
||||
{
|
||||
color: '#4daf1bc9',
|
||||
icon: 'ion:key-outline',
|
||||
title: '权限管理',
|
||||
url: '/demos/access/page-control',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
icon: 'ion:bar-chart-outline',
|
||||
title: '图表',
|
||||
url: '/analytics',
|
||||
},
|
||||
];
|
||||
|
||||
@ -195,6 +213,24 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
title: 'Vben',
|
||||
},
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
// This is a sample method, adjust according to the actual project requirements
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -210,7 +246,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
|
||||
<div class="mt-5 flex flex-col lg:flex-row">
|
||||
<div class="mr-4 w-full lg:w-3/5">
|
||||
<WorkbenchProject :items="projectItems" title="项目" />
|
||||
<WorkbenchProject :items="projectItems" title="项目" @click="navTo" />
|
||||
<WorkbenchTrends :items="trendItems" class="mt-5" title="最新动态" />
|
||||
</div>
|
||||
<div class="w-full lg:w-2/5">
|
||||
@ -218,6 +254,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
:items="quickNavItems"
|
||||
class="mt-5 lg:mt-0"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<WorkbenchTodo :items="todoItems" class="mt-5" title="待办事项" />
|
||||
<AnalysisChartCard class="mt-5" title="访问来源">
|
||||
|
@ -7,6 +7,7 @@ import type {
|
||||
} from '@vben/common-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import {
|
||||
AnalysisChartCard,
|
||||
@ -18,11 +19,15 @@ import {
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
||||
// url 也可以是内部路由,在 navTo 方法中识别处理,进行内部跳转
|
||||
// 例如:url: /dashboard/workspace
|
||||
const projectItems: WorkbenchProjectItem[] = [
|
||||
{
|
||||
color: '',
|
||||
@ -31,6 +36,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '开源组',
|
||||
icon: 'carbon:logo-github',
|
||||
title: 'Github',
|
||||
url: 'https://github.com',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
@ -39,6 +45,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '算法组',
|
||||
icon: 'ion:logo-vue',
|
||||
title: 'Vue',
|
||||
url: 'https://vuejs.org',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
@ -47,6 +54,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '上班摸鱼',
|
||||
icon: 'ion:logo-html5',
|
||||
title: 'Html5',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/HTML',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
@ -55,6 +63,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: 'UI',
|
||||
icon: 'ion:logo-angular',
|
||||
title: 'Angular',
|
||||
url: 'https://angular.io',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
@ -63,6 +72,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '技术牛',
|
||||
icon: 'bx:bxl-react',
|
||||
title: 'React',
|
||||
url: 'https://reactjs.org',
|
||||
},
|
||||
{
|
||||
color: '#EBD94E',
|
||||
@ -71,39 +81,47 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '架构组',
|
||||
icon: 'ion:logo-javascript',
|
||||
title: 'Js',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/JavaScript',
|
||||
},
|
||||
];
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: '#1fdaca',
|
||||
icon: 'ion:home-outline',
|
||||
title: '首页',
|
||||
url: '/',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
icon: 'ion:grid-outline',
|
||||
title: '仪表盘',
|
||||
url: '/dashboard',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
icon: 'ion:layers-outline',
|
||||
title: '组件',
|
||||
url: '/demos/features/icons',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
icon: 'ion:settings-outline',
|
||||
title: '系统管理',
|
||||
url: '/demos/features/login-expired', // 这里的 URL 是示例,实际项目中需要根据实际情况进行调整
|
||||
},
|
||||
{
|
||||
color: '#4daf1bc9',
|
||||
icon: 'ion:key-outline',
|
||||
title: '权限管理',
|
||||
url: '/demos/access/page-control',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
icon: 'ion:bar-chart-outline',
|
||||
title: '图表',
|
||||
url: '/analytics',
|
||||
},
|
||||
];
|
||||
|
||||
@ -195,6 +213,24 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
title: 'Vben',
|
||||
},
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
// This is a sample method, adjust according to the actual project requirements
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -210,7 +246,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
|
||||
<div class="mt-5 flex flex-col lg:flex-row">
|
||||
<div class="mr-4 w-full lg:w-3/5">
|
||||
<WorkbenchProject :items="projectItems" title="项目" />
|
||||
<WorkbenchProject :items="projectItems" title="项目" @click="navTo" />
|
||||
<WorkbenchTrends :items="trendItems" class="mt-5" title="最新动态" />
|
||||
</div>
|
||||
<div class="w-full lg:w-2/5">
|
||||
@ -218,6 +254,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
:items="quickNavItems"
|
||||
class="mt-5 lg:mt-0"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<WorkbenchTodo :items="todoItems" class="mt-5" title="待办事项" />
|
||||
<AnalysisChartCard class="mt-5" title="访问来源">
|
||||
|
@ -62,6 +62,11 @@ export const shared = defineConfig({
|
||||
postcssIsolateStyles({ includeFiles: [/vp-doc\.css/] }),
|
||||
],
|
||||
},
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: 'modern',
|
||||
},
|
||||
},
|
||||
},
|
||||
json: {
|
||||
stringify: true,
|
||||
@ -97,6 +102,7 @@ export const shared = defineConfig({
|
||||
host: true,
|
||||
port: 6173,
|
||||
},
|
||||
|
||||
ssr: {
|
||||
external: ['@vue/repl'],
|
||||
},
|
||||
|
@ -280,6 +280,7 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
|
||||
| 方法名 | 描述 | 类型 |
|
||||
| --- | --- | --- |
|
||||
| submitForm | 提交表单 | `(e:Event)=>Promise<Record<string,any>>` |
|
||||
| validateAndSubmitForm | 提交并校验表单 | `(e:Event)=>Promise<Record<string,any>>` |
|
||||
| resetForm | 重置表单 | `()=>Promise<void>` |
|
||||
| setValues | 设置表单值, 默认会过滤不在schema中定义的field, 可通过filterFields形参关闭过滤 | `(fields: Record<string, any>, filterFields?: boolean, shouldValidate?: boolean) => Promise<void>` |
|
||||
| getValues | 获取表单值 | `(fields:Record<string, any>,shouldValidate: boolean = false)=>Promise<void>` |
|
||||
@ -309,6 +310,7 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
|
||||
| collapsed | 是否折叠,在`是否展开,在showCollapseButton=true`时生效 | `boolean` | `false` |
|
||||
| collapseTriggerResize | 折叠时,触发`resize`事件 | `boolean` | `false` |
|
||||
| collapsedRows | 折叠时保持的行数 | `number` | `1` |
|
||||
| fieldMappingTime | 用于将表单内时间区域的应设成 2 个字段 | `[string, [string, string], string?][]` | - |
|
||||
| commonConfig | 表单项的通用配置,每个配置都会传递到每个表单项,表单项可覆盖 | `FormCommonConfig` | - |
|
||||
| schema | 表单项的每一项配置 | `FormSchema` | - |
|
||||
| submitOnEnter | 按下回车健时提交表单 | `boolean` | false |
|
||||
@ -320,7 +322,7 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
|
||||
```ts
|
||||
export interface ActionButtonOptions {
|
||||
/** 样式 */
|
||||
class?: any;
|
||||
class?: ClassType;
|
||||
/** 是否禁用 */
|
||||
disabled?: boolean;
|
||||
/** 是否加载中 */
|
||||
|
@ -67,7 +67,7 @@ import { SvgTestIcon } from '@vben/icons';
|
||||
</template>
|
||||
```
|
||||
|
||||
## Tailwind CSS 图标 <Badge text="不推荐" type="danger"/>
|
||||
## Tailwind CSS 图标
|
||||
|
||||
### 使用
|
||||
|
||||
|
@ -6,6 +6,7 @@ import path, { relative } from 'node:path';
|
||||
|
||||
import { findMonorepoRoot } from '@vben/node-utils';
|
||||
|
||||
import { NodePackageImporter } from 'sass';
|
||||
import { defineConfig, loadEnv, mergeConfig } from 'vite';
|
||||
|
||||
import { defaultImportmapOptions, getDefaultPwaOptions } from '../options';
|
||||
@ -85,7 +86,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
|
||||
clientFiles: [
|
||||
'./index.html',
|
||||
'./src/bootstrap.ts',
|
||||
'./src/{views,layouts,router,store,api}/*',
|
||||
'./src/{views,layouts,router,store,api,adapter}/*',
|
||||
],
|
||||
},
|
||||
},
|
||||
@ -113,7 +114,8 @@ function createCssOptions(injectGlobalScss = true) {
|
||||
}
|
||||
return content;
|
||||
},
|
||||
api: 'modern-compiler',
|
||||
api: 'modern',
|
||||
importers: [new NodePackageImporter()],
|
||||
},
|
||||
}
|
||||
: {},
|
||||
|
@ -4,35 +4,6 @@ import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import';
|
||||
|
||||
async function viteVxeTableImportsPlugin(): Promise<PluginOption> {
|
||||
return [
|
||||
// {
|
||||
// config() {
|
||||
// return {
|
||||
// optimizeDeps: {
|
||||
// include: [
|
||||
// 'vxe-pc-ui/es/vxe-button/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-checkbox/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-icon/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-input/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-loading/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-modal/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-pager/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-radio-group/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-select/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-tooltip/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-ui/index.js',
|
||||
// 'vxe-pc-ui/es/vxe-upload/index.js',
|
||||
// 'vxe-table/es/vxe-colgroup/index.js',
|
||||
// 'vxe-table/es/vxe-column/index.js',
|
||||
// 'vxe-table/es/vxe-grid/index.js',
|
||||
// 'vxe-table/es/vxe-table/index.js',
|
||||
// 'vxe-table/es/vxe-toolbar/index.js',
|
||||
// 'vxe-table/es/vxe-ui/index.js',
|
||||
// ],
|
||||
// },
|
||||
// };
|
||||
// },
|
||||
// name: 'vxe-table-adapter',
|
||||
// },
|
||||
lazyImport({
|
||||
resolvers: [
|
||||
VxeResolver({
|
||||
|
@ -31,7 +31,7 @@
|
||||
#app,
|
||||
body,
|
||||
html {
|
||||
@apply size-full overscroll-none;
|
||||
@apply size-full;
|
||||
|
||||
/* scrollbar-gutter: stable; */
|
||||
}
|
||||
|
@ -3,19 +3,5 @@ import { defineBuildConfig } from 'unbuild';
|
||||
export default defineBuildConfig({
|
||||
clean: true,
|
||||
declaration: true,
|
||||
entries: [
|
||||
{
|
||||
builder: 'mkdist',
|
||||
input: './src',
|
||||
loaders: ['vue'],
|
||||
pattern: ['**/*.vue'],
|
||||
},
|
||||
{
|
||||
builder: 'mkdist',
|
||||
format: 'esm',
|
||||
input: './src',
|
||||
loaders: ['js'],
|
||||
pattern: ['**/*.ts'],
|
||||
},
|
||||
],
|
||||
entries: ['src/index'],
|
||||
});
|
||||
|
@ -1,10 +1,14 @@
|
||||
export { default as EmptyIcon } from './components/empty.vue';
|
||||
export * from './create-icon';
|
||||
|
||||
export * from './lucide';
|
||||
|
||||
export type { IconifyIcon as IconifyIconStructure } from '@iconify/vue';
|
||||
export { addCollection, addIcon, Icon as IconifyIcon } from '@iconify/vue';
|
||||
export {
|
||||
addCollection,
|
||||
addIcon,
|
||||
Icon as IconifyIcon,
|
||||
listIcons,
|
||||
} from '@iconify/vue';
|
||||
|
||||
/**
|
||||
* 从@iconify/vue/dist/offline'导出的组件为离线ICON 不支持在线
|
||||
|
@ -27,6 +27,7 @@ export {
|
||||
FoldHorizontal,
|
||||
Fullscreen,
|
||||
Github,
|
||||
Grip,
|
||||
Info,
|
||||
InspectionPanel,
|
||||
Languages,
|
||||
|
@ -84,6 +84,7 @@
|
||||
"@types/lodash.get": "catalog:",
|
||||
"@vue/shared": "catalog:",
|
||||
"clsx": "catalog:",
|
||||
"dayjs": "^1.11.13",
|
||||
"defu": "catalog:",
|
||||
"lodash.clonedeep": "catalog:",
|
||||
"lodash.get": "catalog:",
|
||||
|
18
packages/@core/base/shared/src/utils/date.ts
Normal file
18
packages/@core/base/shared/src/utils/date.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export function formatDate(time: number | string, format = 'YYYY-MM-DD') {
|
||||
try {
|
||||
const date = dayjs(time);
|
||||
if (!date.isValid()) {
|
||||
throw new Error('Invalid date');
|
||||
}
|
||||
return date.format(format);
|
||||
} catch (error) {
|
||||
console.error(`Error formatting date: ${error}`);
|
||||
return time;
|
||||
}
|
||||
}
|
||||
|
||||
export function formatDateTime(time: number | string) {
|
||||
return formatDate(time, 'YYYY-MM-DD HH:mm:ss');
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export * from './cn';
|
||||
export * from './date';
|
||||
export * from './diff';
|
||||
export * from './dom';
|
||||
export * from './inference';
|
||||
|
4
packages/@core/base/typings/src/basic.d.ts
vendored
4
packages/@core/base/typings/src/basic.d.ts
vendored
@ -34,4 +34,6 @@ interface BasicUserInfo {
|
||||
username: string;
|
||||
}
|
||||
|
||||
export type { BasicOption, BasicUserInfo, SelectOption, TabOption };
|
||||
type ClassType = Array<object | string> | object | string;
|
||||
|
||||
export type { BasicOption, BasicUserInfo, ClassType, SelectOption, TabOption };
|
||||
|
@ -40,6 +40,7 @@
|
||||
"@vben-core/composables": "workspace:*",
|
||||
"@vben-core/shadcn-ui": "workspace:*",
|
||||
"@vben-core/shared": "workspace:*",
|
||||
"@vben-core/typings": "workspace:*",
|
||||
"@vee-validate/zod": "catalog:",
|
||||
"@vueuse/core": "catalog:",
|
||||
"vee-validate": "catalog:",
|
||||
|
@ -3,7 +3,12 @@ import { computed, toRaw, unref, watch } from 'vue';
|
||||
|
||||
import { useSimpleLocale } from '@vben-core/composables';
|
||||
import { VbenExpandableArrow } from '@vben-core/shadcn-ui';
|
||||
import { cn, isFunction, triggerWindowResize } from '@vben-core/shared/utils';
|
||||
import {
|
||||
cn,
|
||||
formatDate,
|
||||
isFunction,
|
||||
triggerWindowResize,
|
||||
} from '@vben-core/shared/utils';
|
||||
|
||||
import { COMPONENT_MAP } from '../config';
|
||||
import { injectFormProps } from '../use-form-context';
|
||||
@ -52,20 +57,64 @@ async function handleSubmit(e: Event) {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
await unref(rootProps).handleSubmit?.(toRaw(form.values));
|
||||
|
||||
const values = handleRangeTimeValue(toRaw(form.values));
|
||||
await unref(rootProps).handleSubmit?.(values);
|
||||
}
|
||||
|
||||
async function handleReset(e: Event) {
|
||||
e?.preventDefault();
|
||||
e?.stopPropagation();
|
||||
const props = unref(rootProps);
|
||||
|
||||
const values = toRaw(form.values);
|
||||
// 清理时间字段
|
||||
props.fieldMappingTime &&
|
||||
props.fieldMappingTime.forEach(([_, [startTimeKey, endTimeKey]]) => {
|
||||
delete values[startTimeKey];
|
||||
delete values[endTimeKey];
|
||||
});
|
||||
|
||||
if (isFunction(props.handleReset)) {
|
||||
await props.handleReset?.(form.values);
|
||||
await props.handleReset?.(values);
|
||||
} else {
|
||||
form.resetForm();
|
||||
}
|
||||
}
|
||||
|
||||
function handleRangeTimeValue(values: Record<string, any>) {
|
||||
const fieldMappingTime = unref(rootProps).fieldMappingTime;
|
||||
|
||||
if (!fieldMappingTime || !Array.isArray(fieldMappingTime)) {
|
||||
return values;
|
||||
}
|
||||
|
||||
fieldMappingTime.forEach(
|
||||
([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => {
|
||||
if (!values[field]) {
|
||||
delete values[field];
|
||||
return;
|
||||
}
|
||||
|
||||
const [startTime, endTime] = values[field];
|
||||
const [startTimeFormat, endTimeFormat] = Array.isArray(format)
|
||||
? format
|
||||
: [format, format];
|
||||
|
||||
values[startTimeKey] = startTime
|
||||
? formatDate(startTime, startTimeFormat)
|
||||
: undefined;
|
||||
values[endTimeKey] = endTime
|
||||
? formatDate(endTime, endTimeFormat)
|
||||
: undefined;
|
||||
|
||||
delete values[field];
|
||||
},
|
||||
);
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => collapsed.value,
|
||||
() => {
|
||||
|
@ -303,4 +303,13 @@ export class FormApi {
|
||||
}
|
||||
return validateResult;
|
||||
}
|
||||
|
||||
async validateAndSubmitForm() {
|
||||
const form = await this.getForm();
|
||||
const { valid } = await form.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
return await this.submitForm();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import type { VbenButtonProps } from '@vben-core/shadcn-ui';
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type { FieldOptions, FormContext, GenericObject } from 'vee-validate';
|
||||
import type { ZodTypeAny } from 'zod';
|
||||
|
||||
@ -205,6 +206,12 @@ export type HandleResetFn = (
|
||||
values: Record<string, any>,
|
||||
) => Promise<void> | void;
|
||||
|
||||
export type FieldMappingTime = [
|
||||
string,
|
||||
[string, string],
|
||||
([string, string] | string)?,
|
||||
][];
|
||||
|
||||
export interface FormSchema<
|
||||
T extends BaseFormComponentType = BaseFormComponentType,
|
||||
> extends FormCommonConfig {
|
||||
@ -303,7 +310,11 @@ export interface VbenFormProps<
|
||||
/**
|
||||
* 表单操作区域class
|
||||
*/
|
||||
actionWrapperClass?: any;
|
||||
actionWrapperClass?: ClassType;
|
||||
/**
|
||||
* 表单字段映射成时间格式
|
||||
*/
|
||||
fieldMappingTime?: FieldMappingTime;
|
||||
/**
|
||||
* 表单重置回调
|
||||
*/
|
||||
|
@ -41,6 +41,7 @@
|
||||
"@vben-core/icons": "workspace:*",
|
||||
"@vben-core/shadcn-ui": "workspace:*",
|
||||
"@vben-core/shared": "workspace:*",
|
||||
"@vben-core/typings": "workspace:*",
|
||||
"@vueuse/core": "catalog:",
|
||||
"vue": "catalog:"
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
|
||||
import type { DrawerApi } from './drawer-api';
|
||||
|
||||
import type { Component, Ref } from 'vue';
|
||||
@ -7,7 +9,7 @@ export interface DrawerProps {
|
||||
* 取消按钮文字
|
||||
*/
|
||||
cancelText?: string;
|
||||
class?: string;
|
||||
class?: ClassType;
|
||||
/**
|
||||
* 是否显示右上角的关闭按钮
|
||||
* @default true
|
||||
@ -42,6 +44,20 @@ export interface DrawerProps {
|
||||
* @default true
|
||||
*/
|
||||
footer?: boolean;
|
||||
/**
|
||||
* 弹窗底部样式
|
||||
*/
|
||||
footerClass?: ClassType;
|
||||
/**
|
||||
* 是否显示顶栏
|
||||
* @default true
|
||||
*/
|
||||
header?: boolean;
|
||||
/**
|
||||
* 弹窗头部样式
|
||||
*/
|
||||
headerClass?: ClassType;
|
||||
|
||||
/**
|
||||
* 弹窗是否显示
|
||||
* @default false
|
||||
|
@ -56,6 +56,9 @@ const {
|
||||
contentClass,
|
||||
description,
|
||||
footer: showFooter,
|
||||
footerClass,
|
||||
header: showHeader,
|
||||
headerClass,
|
||||
loading: showLoading,
|
||||
modal,
|
||||
openAutoFocus,
|
||||
@ -129,10 +132,15 @@ function handleFocusOutside(e: Event) {
|
||||
@pointer-down-outside="pointerDownOutside"
|
||||
>
|
||||
<SheetHeader
|
||||
v-if="showHeader"
|
||||
:class="
|
||||
cn('!flex flex-row items-center justify-between border-b px-6 py-5', {
|
||||
cn(
|
||||
'!flex flex-row items-center justify-between border-b px-6 py-5',
|
||||
headerClass,
|
||||
{
|
||||
'px-4 py-3': closable,
|
||||
})
|
||||
},
|
||||
)
|
||||
"
|
||||
>
|
||||
<div>
|
||||
@ -171,6 +179,12 @@ function handleFocusOutside(e: Event) {
|
||||
</div>
|
||||
</SheetHeader>
|
||||
|
||||
<template v-else>
|
||||
<VisuallyHidden>
|
||||
<SheetTitle />
|
||||
<SheetDescription />
|
||||
</VisuallyHidden>
|
||||
</template>
|
||||
<div
|
||||
ref="wrapperRef"
|
||||
:class="
|
||||
@ -186,7 +200,12 @@ function handleFocusOutside(e: Event) {
|
||||
|
||||
<SheetFooter
|
||||
v-if="showFooter"
|
||||
class="w-full flex-row items-center justify-end border-t p-2 px-3"
|
||||
:class="
|
||||
cn(
|
||||
'w-full flex-row items-center justify-end border-t p-2 px-3',
|
||||
footerClass,
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot name="prepend-footer"></slot>
|
||||
<slot name="footer">
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type {
|
||||
AvatarFallbackProps,
|
||||
AvatarImageProps,
|
||||
@ -11,9 +12,9 @@ import { Avatar, AvatarFallback, AvatarImage } from '../../ui';
|
||||
|
||||
interface Props extends AvatarRootProps, AvatarFallbackProps, AvatarImageProps {
|
||||
alt?: string;
|
||||
class?: any;
|
||||
class?: ClassType;
|
||||
dot?: boolean;
|
||||
dotClass?: any;
|
||||
dotClass?: ClassType;
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
|
@ -14,6 +14,7 @@ interface Props extends VbenButtonProps {
|
||||
disabled?: boolean;
|
||||
onClick?: () => void;
|
||||
tooltip?: string;
|
||||
tooltipDelayDuration?: number;
|
||||
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
||||
variant?: ButtonVariants;
|
||||
}
|
||||
@ -21,6 +22,7 @@ interface Props extends VbenButtonProps {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
disabled: false,
|
||||
onClick: () => {},
|
||||
tooltipDelayDuration: 200,
|
||||
tooltipSide: 'bottom',
|
||||
variant: 'icon',
|
||||
});
|
||||
@ -42,7 +44,11 @@ const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip);
|
||||
<slot></slot>
|
||||
</VbenButton>
|
||||
|
||||
<VbenTooltip v-else :side="tooltipSide">
|
||||
<VbenTooltip
|
||||
v-else
|
||||
:delay-duration="tooltipDelayDuration"
|
||||
:side="tooltipSide"
|
||||
>
|
||||
<template #trigger>
|
||||
<VbenButton
|
||||
:class="cn('rounded-full', props.class)"
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type {
|
||||
ContextMenuContentProps,
|
||||
ContextMenuRootEmits,
|
||||
@ -22,11 +23,11 @@ import {
|
||||
|
||||
const props = defineProps<
|
||||
{
|
||||
class?: any;
|
||||
contentClass?: any;
|
||||
class?: ClassType;
|
||||
contentClass?: ClassType;
|
||||
contentProps?: ContextMenuContentProps;
|
||||
handlerData?: Record<string, any>;
|
||||
itemClass?: any;
|
||||
itemClass?: ClassType;
|
||||
menus: (data: any) => IContextMenuItem[];
|
||||
} & ContextMenuRootProps
|
||||
>();
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type {
|
||||
HoverCardContentProps,
|
||||
HoverCardRootEmits,
|
||||
@ -12,8 +13,8 @@ import { useForwardPropsEmits } from 'radix-vue';
|
||||
import { HoverCard, HoverCardContent, HoverCardTrigger } from '../../ui';
|
||||
|
||||
interface Props extends HoverCardRootProps {
|
||||
class?: any;
|
||||
contentClass?: any;
|
||||
class?: ClassType;
|
||||
contentClass?: ClassType;
|
||||
contentProps?: HoverCardContentProps;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type {
|
||||
PopoverContentProps,
|
||||
PopoverRootEmits,
|
||||
@ -16,8 +17,8 @@ import {
|
||||
} from '../../ui';
|
||||
|
||||
interface Props extends PopoverRootProps {
|
||||
class?: any;
|
||||
contentClass?: any;
|
||||
class?: ClassType;
|
||||
contentClass?: ClassType;
|
||||
contentProps?: PopoverContentProps;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { cn } from '@vben-core/shared/utils';
|
||||
@ -6,9 +8,9 @@ import { cn } from '@vben-core/shared/utils';
|
||||
import { ScrollArea, ScrollBar } from '../../ui';
|
||||
|
||||
interface Props {
|
||||
class?: any;
|
||||
class?: ClassType;
|
||||
horizontal?: boolean;
|
||||
scrollBarClass?: any;
|
||||
scrollBarClass?: ClassType;
|
||||
shadow?: boolean;
|
||||
shadowBorder?: boolean;
|
||||
shadowBottom?: boolean;
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
import type { TooltipContentProps } from 'radix-vue';
|
||||
|
||||
import type { StyleValue } from 'vue';
|
||||
@ -11,7 +12,7 @@ import {
|
||||
} from '../../ui';
|
||||
|
||||
interface Props {
|
||||
contentClass?: any;
|
||||
contentClass?: ClassType;
|
||||
contentStyle?: StyleValue;
|
||||
delayDuration?: number;
|
||||
side?: TooltipContentProps['side'];
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { ClassType } from '@vben-core/typings';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { cn } from '@vben-core/shared/utils';
|
||||
@ -18,8 +20,8 @@ import DialogOverlay from './DialogOverlay.vue';
|
||||
const props = withDefaults(
|
||||
defineProps<
|
||||
{
|
||||
class?: any;
|
||||
closeClass?: any;
|
||||
class?: ClassType;
|
||||
closeClass?: ClassType;
|
||||
modal?: boolean;
|
||||
open?: boolean;
|
||||
showClose?: boolean;
|
||||
|
@ -32,6 +32,7 @@
|
||||
"@vben-core/shadcn-ui": "workspace:*",
|
||||
"@vben-core/shared": "workspace:*",
|
||||
"@vben/constants": "workspace:*",
|
||||
"@vben/hooks": "workspace:*",
|
||||
"@vben/icons": "workspace:*",
|
||||
"@vben/locales": "workspace:*",
|
||||
"@vben/preferences": "workspace:*",
|
||||
|
@ -1,3 +1,5 @@
|
||||
import type { ClassType } from '@vben/types';
|
||||
|
||||
import type { CSSProperties } from 'vue';
|
||||
|
||||
export interface CaptchaData {
|
||||
@ -72,7 +74,7 @@ export interface PointSelectionCaptchaProps
|
||||
}
|
||||
|
||||
export interface SliderCaptchaProps {
|
||||
class?: any;
|
||||
class?: ClassType;
|
||||
/**
|
||||
* @description 滑块的样式
|
||||
* @default {}
|
||||
|
@ -0,0 +1,166 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, useTemplateRef, watch, watchEffect } from 'vue';
|
||||
|
||||
import { usePagination } from '@vben/hooks';
|
||||
import { EmptyIcon, Grip } from '@vben/icons';
|
||||
import {
|
||||
Button,
|
||||
Pagination,
|
||||
PaginationEllipsis,
|
||||
PaginationFirst,
|
||||
PaginationLast,
|
||||
PaginationList,
|
||||
PaginationListItem,
|
||||
PaginationNext,
|
||||
PaginationPrev,
|
||||
VbenIcon,
|
||||
VbenIconButton,
|
||||
VbenPopover,
|
||||
} from '@vben-core/shadcn-ui';
|
||||
|
||||
interface Props {
|
||||
value?: string;
|
||||
pageSize?: number;
|
||||
/**
|
||||
* 图标列表
|
||||
*/
|
||||
icons?: string[];
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
value: '',
|
||||
pageSize: 36,
|
||||
icons: () => [],
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
change: [string];
|
||||
'update:value': [string];
|
||||
}>();
|
||||
|
||||
const refTrigger = useTemplateRef<HTMLElement>('refTrigger');
|
||||
const currentSelect = ref('');
|
||||
const currentList = ref(props.icons);
|
||||
|
||||
watch(
|
||||
() => props.icons,
|
||||
(newIcons) => {
|
||||
currentList.value = newIcons;
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
const { paginationList, total, setCurrentPage } = usePagination(
|
||||
currentList,
|
||||
props.pageSize,
|
||||
);
|
||||
|
||||
watchEffect(() => {
|
||||
currentSelect.value = props.value;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => currentSelect.value,
|
||||
(v) => {
|
||||
emit('update:value', v);
|
||||
emit('change', v);
|
||||
},
|
||||
);
|
||||
|
||||
const handleClick = (icon: string) => {
|
||||
currentSelect.value = icon;
|
||||
};
|
||||
|
||||
const handlePageChange = (page: number) => {
|
||||
setCurrentPage(page);
|
||||
};
|
||||
|
||||
function changeOpenState() {
|
||||
refTrigger.value?.click?.();
|
||||
}
|
||||
|
||||
defineExpose({ changeOpenState });
|
||||
</script>
|
||||
<template>
|
||||
<VbenPopover
|
||||
:content-props="{ align: 'end', alignOffset: -11, sideOffset: 8 }"
|
||||
content-class="p-0 pt-3"
|
||||
>
|
||||
<template #trigger>
|
||||
<div ref="refTrigger">
|
||||
<VbenIcon :icon="currentSelect || Grip" class="size-5" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="paginationList.length > 0">
|
||||
<div class="grid max-h-[360px] w-full grid-cols-6 justify-items-center">
|
||||
<VbenIconButton
|
||||
v-for="(item, index) in paginationList"
|
||||
:key="index"
|
||||
:tooltip="item"
|
||||
tooltip-side="top"
|
||||
@click="handleClick(item)"
|
||||
>
|
||||
<VbenIcon
|
||||
:class="{
|
||||
'text-primary transition-all': currentSelect === item,
|
||||
}"
|
||||
:icon="item"
|
||||
/>
|
||||
</VbenIconButton>
|
||||
</div>
|
||||
<div
|
||||
v-if="total >= pageSize"
|
||||
class="flex-center flex justify-end overflow-hidden border-t py-2 pr-3"
|
||||
>
|
||||
<Pagination
|
||||
v-slot="{ page }"
|
||||
:items-per-page="36"
|
||||
:sibling-count="1"
|
||||
:total="total"
|
||||
show-edges
|
||||
size="small"
|
||||
@update:page="handlePageChange"
|
||||
>
|
||||
<PaginationList
|
||||
v-slot="{ items }"
|
||||
class="flex w-full items-center gap-1"
|
||||
>
|
||||
<PaginationFirst class="size-5" />
|
||||
<PaginationPrev class="size-5" />
|
||||
<template v-for="(item, index) in items">
|
||||
<PaginationListItem
|
||||
v-if="item.type === 'page'"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
as-child
|
||||
>
|
||||
<Button
|
||||
:variant="item.value === page ? 'default' : 'outline'"
|
||||
class="size-5 p-0 text-sm"
|
||||
>
|
||||
{{ item.value }}
|
||||
</Button>
|
||||
</PaginationListItem>
|
||||
<PaginationEllipsis
|
||||
v-else
|
||||
:key="item.type"
|
||||
:index="index"
|
||||
class="size-5"
|
||||
/>
|
||||
</template>
|
||||
<PaginationNext class="size-5" />
|
||||
<PaginationLast class="size-5" />
|
||||
</PaginationList>
|
||||
</Pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<div class="flex-col-center text-muted-foreground min-h-[150px] w-full">
|
||||
<EmptyIcon class="size-10" />
|
||||
<div class="mt-1 text-sm">{{ $t('common.noData') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</VbenPopover>
|
||||
</template>
|
@ -0,0 +1 @@
|
||||
export { default as IconPicker } from './icon-picker.vue';
|
@ -1,6 +1,7 @@
|
||||
export * from './captcha';
|
||||
export * from './code-mirror';
|
||||
export * from './ellipsis-text';
|
||||
export * from './icon-picker';
|
||||
export * from './json-preview';
|
||||
export * from './markdown';
|
||||
export * from './page';
|
||||
|
@ -15,6 +15,7 @@ interface WorkbenchProjectItem {
|
||||
group: string;
|
||||
icon: Component | string;
|
||||
title: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
interface WorkbenchTrendItem {
|
||||
@ -35,6 +36,7 @@ interface WorkbenchQuickNavItem {
|
||||
color?: string;
|
||||
icon: Component | string;
|
||||
title: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
|
@ -21,6 +21,8 @@ defineOptions({
|
||||
withDefaults(defineProps<Props>(), {
|
||||
items: () => [],
|
||||
});
|
||||
|
||||
defineEmits(['click']);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -43,6 +45,7 @@ withDefaults(defineProps<Props>(), {
|
||||
:color="item.color"
|
||||
:icon="item.icon"
|
||||
class="size-8 transition-all duration-300 group-hover:scale-110"
|
||||
@click="$emit('click', item)"
|
||||
/>
|
||||
<span class="ml-4 text-lg font-medium">{{ item.title }}</span>
|
||||
</div>
|
||||
|
@ -21,6 +21,8 @@ defineOptions({
|
||||
withDefaults(defineProps<Props>(), {
|
||||
items: () => [],
|
||||
});
|
||||
|
||||
defineEmits(['click']);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -37,6 +39,7 @@ withDefaults(defineProps<Props>(), {
|
||||
'border-b-0': index < 3,
|
||||
}"
|
||||
class="flex-col-center border-border group w-1/3 cursor-pointer border-b border-r border-t py-8 hover:shadow-xl"
|
||||
@click="$emit('click', item)"
|
||||
>
|
||||
<VbenIcon
|
||||
:color="item.color"
|
||||
|
@ -1,6 +1,7 @@
|
||||
export * from './use-app-config';
|
||||
export * from './use-content-maximize';
|
||||
export * from './use-design-tokens';
|
||||
export * from './use-pagination';
|
||||
export * from './use-refresh';
|
||||
export * from './use-tabs';
|
||||
export * from './use-watermark';
|
||||
|
57
packages/effects/hooks/src/use-pagination.ts
Normal file
57
packages/effects/hooks/src/use-pagination.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import type { Ref } from 'vue';
|
||||
import { computed, ref, unref } from 'vue';
|
||||
|
||||
/**
|
||||
* Paginates an array of items
|
||||
* @param list The array to paginate
|
||||
* @param pageNo The current page number (1-based)
|
||||
* @param pageSize Number of items per page
|
||||
* @returns Paginated array slice
|
||||
* @throws {Error} If pageNo or pageSize are invalid
|
||||
*/
|
||||
function pagination<T = any>(list: T[], pageNo: number, pageSize: number): T[] {
|
||||
if (pageNo < 1) throw new Error('Page number must be positive');
|
||||
if (pageSize < 1) throw new Error('Page size must be positive');
|
||||
|
||||
const offset = (pageNo - 1) * Number(pageSize);
|
||||
const ret =
|
||||
offset + pageSize >= list.length
|
||||
? list.slice(offset)
|
||||
: list.slice(offset, offset + pageSize);
|
||||
return ret;
|
||||
}
|
||||
|
||||
export function usePagination<T = any>(list: Ref<T[]>, pageSize: number) {
|
||||
const currentPage = ref(1);
|
||||
const pageSizeRef = ref(pageSize);
|
||||
|
||||
const totalPages = computed(() =>
|
||||
Math.ceil(unref(list).length / unref(pageSizeRef)),
|
||||
);
|
||||
|
||||
const paginationList = computed(() => {
|
||||
return pagination(unref(list), unref(currentPage), unref(pageSizeRef));
|
||||
});
|
||||
|
||||
const total = computed(() => {
|
||||
return unref(list).length;
|
||||
});
|
||||
|
||||
function setCurrentPage(page: number) {
|
||||
if (page < 1 || page > unref(totalPages)) {
|
||||
throw new Error('Invalid page number');
|
||||
}
|
||||
currentPage.value = page;
|
||||
}
|
||||
|
||||
function setPageSize(pageSize: number) {
|
||||
if (pageSize < 1) {
|
||||
throw new Error('Page size must be positive');
|
||||
}
|
||||
pageSizeRef.value = pageSize;
|
||||
// Reset to first page to prevent invalid state
|
||||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
return { setCurrentPage, total, setPageSize, paginationList };
|
||||
}
|
@ -37,6 +37,7 @@
|
||||
"@vben/types": "workspace:*",
|
||||
"@vben/utils": "workspace:*",
|
||||
"@vueuse/core": "catalog:",
|
||||
"default-passive-events": "^2.0.0",
|
||||
"vue": "catalog:",
|
||||
"vue-router": "catalog:"
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'default-passive-events';
|
||||
|
||||
export * from './authentication';
|
||||
export * from './basic';
|
||||
export * from './iframe';
|
||||
|
@ -2,9 +2,7 @@ import type { VxeGridProps, VxeUIExport } from 'vxe-table';
|
||||
|
||||
import type { VxeGridApi } from './api';
|
||||
|
||||
import { isFunction } from '@vben/utils';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import { formatDate, formatDateTime, isFunction } from '@vben/utils';
|
||||
|
||||
export function extendProxyOptions(
|
||||
api: VxeGridApi,
|
||||
@ -54,13 +52,13 @@ function extendProxyOption(
|
||||
export function extendsDefaultFormatter(vxeUI: VxeUIExport) {
|
||||
vxeUI.formats.add('formatDate', {
|
||||
tableCellFormatMethod({ cellValue }) {
|
||||
return dayjs(cellValue).format('YYYY-MM-DD');
|
||||
return formatDate(cellValue);
|
||||
},
|
||||
});
|
||||
|
||||
vxeUI.formats.add('formatDateTime', {
|
||||
tableCellFormatMethod({ cellValue }) {
|
||||
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss');
|
||||
return formatDateTime(cellValue);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -87,3 +87,11 @@
|
||||
.vxe-table-custom--checkbox-option:hover {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.vxe-toolbar {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.vxe-tools--operate:not(:has(button)) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { DeepPartial } from '@vben/types';
|
||||
import type { ClassType, DeepPartial } from '@vben/types';
|
||||
import type { VbenFormProps } from '@vben-core/form-ui';
|
||||
import type {
|
||||
VxeGridListeners,
|
||||
@ -30,11 +30,11 @@ export interface VxeGridProps {
|
||||
/**
|
||||
* 组件class
|
||||
*/
|
||||
class?: any;
|
||||
class?: ClassType;
|
||||
/**
|
||||
* vxe-grid class
|
||||
*/
|
||||
gridClass?: any;
|
||||
gridClass?: ClassType;
|
||||
/**
|
||||
* vxe-grid 配置
|
||||
*/
|
||||
|
@ -139,10 +139,6 @@ const options = computed(() => {
|
||||
mergedOptions.proxyConfig.autoLoad = false;
|
||||
}
|
||||
|
||||
if (!showToolbar.value && mergedOptions.toolbarConfig) {
|
||||
mergedOptions.toolbarConfig.enabled = false;
|
||||
}
|
||||
|
||||
if (mergedOptions.pagerConfig) {
|
||||
const mobileLayouts = [
|
||||
'PrevJump',
|
||||
|
@ -1,4 +1,5 @@
|
||||
export * from './iconify/index.js';
|
||||
export * from './iconify-offline/index.js';
|
||||
export { default as EmptyIcon } from './icons/empty-icon.vue';
|
||||
export * from './svg/index.js';
|
||||
export { VbenIcon } from '@vben-core/shadcn-ui';
|
||||
|
@ -7,6 +7,7 @@ import type {
|
||||
} from '@vben/common-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import {
|
||||
AnalysisChartCard,
|
||||
@ -18,11 +19,15 @@ import {
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
||||
// url 也可以是内部路由,在 navTo 方法中识别处理,进行内部跳转
|
||||
// 例如:url: /dashboard/workspace
|
||||
const projectItems: WorkbenchProjectItem[] = [
|
||||
{
|
||||
color: '',
|
||||
@ -31,6 +36,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '开源组',
|
||||
icon: 'carbon:logo-github',
|
||||
title: 'Github',
|
||||
url: 'https://github.com',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
@ -39,6 +45,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '算法组',
|
||||
icon: 'ion:logo-vue',
|
||||
title: 'Vue',
|
||||
url: 'https://vuejs.org',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
@ -47,6 +54,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '上班摸鱼',
|
||||
icon: 'ion:logo-html5',
|
||||
title: 'Html5',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/HTML',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
@ -55,6 +63,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: 'UI',
|
||||
icon: 'ion:logo-angular',
|
||||
title: 'Angular',
|
||||
url: 'https://angular.io',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
@ -63,6 +72,7 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '技术牛',
|
||||
icon: 'bx:bxl-react',
|
||||
title: 'React',
|
||||
url: 'https://reactjs.org',
|
||||
},
|
||||
{
|
||||
color: '#EBD94E',
|
||||
@ -71,39 +81,47 @@ const projectItems: WorkbenchProjectItem[] = [
|
||||
group: '架构组',
|
||||
icon: 'ion:logo-javascript',
|
||||
title: 'Js',
|
||||
url: 'https://developer.mozilla.org/zh-CN/docs/Web/JavaScript',
|
||||
},
|
||||
];
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: '#1fdaca',
|
||||
icon: 'ion:home-outline',
|
||||
title: '首页',
|
||||
url: '/',
|
||||
},
|
||||
{
|
||||
color: '#bf0c2c',
|
||||
icon: 'ion:grid-outline',
|
||||
title: '仪表盘',
|
||||
url: '/dashboard',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
icon: 'ion:layers-outline',
|
||||
title: '组件',
|
||||
url: '/demos/features/icons',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
icon: 'ion:settings-outline',
|
||||
title: '系统管理',
|
||||
url: '/demos/features/login-expired', // 这里的 URL 是示例,实际项目中需要根据实际情况进行调整
|
||||
},
|
||||
{
|
||||
color: '#4daf1bc9',
|
||||
icon: 'ion:key-outline',
|
||||
title: '权限管理',
|
||||
url: '/demos/access/page-control',
|
||||
},
|
||||
{
|
||||
color: '#00d8ff',
|
||||
icon: 'ion:bar-chart-outline',
|
||||
title: '图表',
|
||||
url: '/analytics',
|
||||
},
|
||||
];
|
||||
|
||||
@ -195,6 +213,24 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
title: 'Vben',
|
||||
},
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
// This is a sample method, adjust according to the actual project requirements
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -210,7 +246,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
|
||||
<div class="mt-5 flex flex-col lg:flex-row">
|
||||
<div class="mr-4 w-full lg:w-3/5">
|
||||
<WorkbenchProject :items="projectItems" title="项目" />
|
||||
<WorkbenchProject :items="projectItems" title="项目" @click="navTo" />
|
||||
<WorkbenchTrends :items="trendItems" class="mt-5" title="最新动态" />
|
||||
</div>
|
||||
<div class="w-full lg:w-2/5">
|
||||
@ -218,6 +254,7 @@ const trendItems: WorkbenchTrendItem[] = [
|
||||
:items="quickNavItems"
|
||||
class="mt-5 lg:mt-0"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<WorkbenchTodo :items="todoItems" class="mt-5" title="待办事项" />
|
||||
<AnalysisChartCard class="mt-5" title="访问来源">
|
||||
|
87
playground/src/views/demos/features/icons/icon-picker.vue
Normal file
87
playground/src/views/demos/features/icons/icon-picker.vue
Normal file
@ -0,0 +1,87 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { IconPicker } from '@vben/common-ui';
|
||||
import { listIcons } from '@vben/icons';
|
||||
|
||||
import { Input } from 'ant-design-vue';
|
||||
|
||||
import iconsData from './icons.data';
|
||||
|
||||
export interface Props {
|
||||
allowClear?: boolean;
|
||||
pageSize?: number;
|
||||
/**
|
||||
* 可以通过prefix获取系统中使用的图标集
|
||||
*/
|
||||
prefix?: string;
|
||||
readonly?: boolean;
|
||||
value?: string;
|
||||
width?: string;
|
||||
}
|
||||
|
||||
// Don't inherit FormItem disabled、placeholder...
|
||||
defineOptions({
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
allowClear: true,
|
||||
pageSize: 36,
|
||||
prefix: '',
|
||||
readonly: false,
|
||||
value: '',
|
||||
width: '100%',
|
||||
});
|
||||
|
||||
const refIconPicker = ref();
|
||||
const currentSelect = ref('');
|
||||
|
||||
const currentList = computed(() => {
|
||||
try {
|
||||
if (props.prefix) {
|
||||
const icons = listIcons('', props.prefix);
|
||||
if (icons.length === 0) {
|
||||
console.warn(`No icons found for prefix: ${props.prefix}`);
|
||||
}
|
||||
return icons;
|
||||
} else {
|
||||
const prefix = iconsData.prefix;
|
||||
return iconsData.icons.map((icon) => `${prefix}:${icon}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load icons:', error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
|
||||
const triggerPopover = () => {
|
||||
refIconPicker.value?.changeOpenState?.();
|
||||
};
|
||||
|
||||
const handleChange = (icon: string) => {
|
||||
currentSelect.value = icon;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Input
|
||||
v-model:value="currentSelect"
|
||||
:allow-clear="props.allowClear"
|
||||
:readonly="props.readonly"
|
||||
:style="{ width }"
|
||||
class="cursor-pointer"
|
||||
placeholder="点击选中图标"
|
||||
@click="triggerPopover"
|
||||
>
|
||||
<template #addonAfter>
|
||||
<IconPicker
|
||||
ref="refIconPicker"
|
||||
:icons="currentList"
|
||||
:page-size="pageSize"
|
||||
:value="currentSelect"
|
||||
@change="handleChange"
|
||||
/>
|
||||
</template>
|
||||
</Input>
|
||||
</template>
|
793
playground/src/views/demos/features/icons/icons.data.ts
Normal file
793
playground/src/views/demos/features/icons/icons.data.ts
Normal file
@ -0,0 +1,793 @@
|
||||
export default {
|
||||
icons: [
|
||||
'account-book-filled',
|
||||
'account-book-outlined',
|
||||
'account-book-twotone',
|
||||
'aim-outlined',
|
||||
'alert-filled',
|
||||
'alert-outlined',
|
||||
'alert-twotone',
|
||||
'alibaba-outlined',
|
||||
'align-center-outlined',
|
||||
'align-left-outlined',
|
||||
'align-right-outlined',
|
||||
'alipay-circle-filled',
|
||||
'alipay-circle-outlined',
|
||||
'alipay-outlined',
|
||||
'alipay-square-filled',
|
||||
'aliwangwang-filled',
|
||||
'aliwangwang-outlined',
|
||||
'aliyun-outlined',
|
||||
'amazon-circle-filled',
|
||||
'amazon-outlined',
|
||||
'amazon-square-filled',
|
||||
'android-filled',
|
||||
'android-outlined',
|
||||
'ant-cloud-outlined',
|
||||
'ant-design-outlined',
|
||||
'apartment-outlined',
|
||||
'api-filled',
|
||||
'api-outlined',
|
||||
'api-twotone',
|
||||
'apple-filled',
|
||||
'apple-outlined',
|
||||
'appstore-add-outlined',
|
||||
'appstore-filled',
|
||||
'appstore-outlined',
|
||||
'appstore-twotone',
|
||||
'area-chart-outlined',
|
||||
'arrow-down-outlined',
|
||||
'arrow-left-outlined',
|
||||
'arrow-right-outlined',
|
||||
'arrow-up-outlined',
|
||||
'arrows-alt-outlined',
|
||||
'audio-filled',
|
||||
'audio-muted-outlined',
|
||||
'audio-outlined',
|
||||
'audio-twotone',
|
||||
'audit-outlined',
|
||||
'backward-filled',
|
||||
'backward-outlined',
|
||||
'bank-filled',
|
||||
'bank-outlined',
|
||||
'bank-twotone',
|
||||
'bar-chart-outlined',
|
||||
'barcode-outlined',
|
||||
'bars-outlined',
|
||||
'behance-circle-filled',
|
||||
'behance-outlined',
|
||||
'behance-square-filled',
|
||||
'behance-square-outlined',
|
||||
'bell-filled',
|
||||
'bell-outlined',
|
||||
'bell-twotone',
|
||||
'bg-colors-outlined',
|
||||
'block-outlined',
|
||||
'bold-outlined',
|
||||
'book-filled',
|
||||
'book-outlined',
|
||||
'book-twotone',
|
||||
'border-bottom-outlined',
|
||||
'border-horizontal-outlined',
|
||||
'border-inner-outlined',
|
||||
'border-left-outlined',
|
||||
'border-outer-outlined',
|
||||
'border-outlined',
|
||||
'border-right-outlined',
|
||||
'border-top-outlined',
|
||||
'border-verticle-outlined',
|
||||
'borderless-table-outlined',
|
||||
'box-plot-filled',
|
||||
'box-plot-outlined',
|
||||
'box-plot-twotone',
|
||||
'branches-outlined',
|
||||
'bug-filled',
|
||||
'bug-outlined',
|
||||
'bug-twotone',
|
||||
'build-filled',
|
||||
'build-outlined',
|
||||
'build-twotone',
|
||||
'bulb-filled',
|
||||
'bulb-outlined',
|
||||
'bulb-twotone',
|
||||
'calculator-filled',
|
||||
'calculator-outlined',
|
||||
'calculator-twotone',
|
||||
'calendar-filled',
|
||||
'calendar-outlined',
|
||||
'calendar-twotone',
|
||||
'camera-filled',
|
||||
'camera-outlined',
|
||||
'camera-twotone',
|
||||
'car-filled',
|
||||
'car-outlined',
|
||||
'car-twotone',
|
||||
'caret-down-filled',
|
||||
'caret-down-outlined',
|
||||
'caret-left-filled',
|
||||
'caret-left-outlined',
|
||||
'caret-right-filled',
|
||||
'caret-right-outlined',
|
||||
'caret-up-filled',
|
||||
'caret-up-outlined',
|
||||
'carry-out-filled',
|
||||
'carry-out-outlined',
|
||||
'carry-out-twotone',
|
||||
'check-circle-filled',
|
||||
'check-circle-outlined',
|
||||
'check-circle-twotone',
|
||||
'check-outlined',
|
||||
'check-square-filled',
|
||||
'check-square-outlined',
|
||||
'check-square-twotone',
|
||||
'chrome-filled',
|
||||
'chrome-outlined',
|
||||
'ci-circle-filled',
|
||||
'ci-circle-outlined',
|
||||
'ci-circle-twotone',
|
||||
'ci-outlined',
|
||||
'ci-twotone',
|
||||
'clear-outlined',
|
||||
'clock-circle-filled',
|
||||
'clock-circle-outlined',
|
||||
'clock-circle-twotone',
|
||||
'close-circle-filled',
|
||||
'close-circle-outlined',
|
||||
'close-circle-twotone',
|
||||
'close-outlined',
|
||||
'close-square-filled',
|
||||
'close-square-outlined',
|
||||
'close-square-twotone',
|
||||
'cloud-download-outlined',
|
||||
'cloud-filled',
|
||||
'cloud-outlined',
|
||||
'cloud-server-outlined',
|
||||
'cloud-sync-outlined',
|
||||
'cloud-twotone',
|
||||
'cloud-upload-outlined',
|
||||
'cluster-outlined',
|
||||
'code-filled',
|
||||
'code-outlined',
|
||||
'code-sandbox-circle-filled',
|
||||
'code-sandbox-outlined',
|
||||
'code-sandbox-square-filled',
|
||||
'code-twotone',
|
||||
'codepen-circle-filled',
|
||||
'codepen-circle-outlined',
|
||||
'codepen-outlined',
|
||||
'codepen-square-filled',
|
||||
'coffee-outlined',
|
||||
'column-height-outlined',
|
||||
'column-width-outlined',
|
||||
'comment-outlined',
|
||||
'compass-filled',
|
||||
'compass-outlined',
|
||||
'compass-twotone',
|
||||
'compress-outlined',
|
||||
'console-sql-outlined',
|
||||
'contacts-filled',
|
||||
'contacts-outlined',
|
||||
'contacts-twotone',
|
||||
'container-filled',
|
||||
'container-outlined',
|
||||
'container-twotone',
|
||||
'control-filled',
|
||||
'control-outlined',
|
||||
'control-twotone',
|
||||
'copy-filled',
|
||||
'copy-outlined',
|
||||
'copy-twotone',
|
||||
'copyright-circle-filled',
|
||||
'copyright-circle-outlined',
|
||||
'copyright-circle-twotone',
|
||||
'copyright-outlined',
|
||||
'copyright-twotone',
|
||||
'credit-card-filled',
|
||||
'credit-card-outlined',
|
||||
'credit-card-twotone',
|
||||
'crown-filled',
|
||||
'crown-outlined',
|
||||
'crown-twotone',
|
||||
'customer-service-filled',
|
||||
'customer-service-outlined',
|
||||
'customer-service-twotone',
|
||||
'dash-outlined',
|
||||
'dashboard-filled',
|
||||
'dashboard-outlined',
|
||||
'dashboard-twotone',
|
||||
'database-filled',
|
||||
'database-outlined',
|
||||
'database-twotone',
|
||||
'delete-column-outlined',
|
||||
'delete-filled',
|
||||
'delete-outlined',
|
||||
'delete-row-outlined',
|
||||
'delete-twotone',
|
||||
'delivered-procedure-outlined',
|
||||
'deployment-unit-outlined',
|
||||
'desktop-outlined',
|
||||
'diff-filled',
|
||||
'diff-outlined',
|
||||
'diff-twotone',
|
||||
'dingding-outlined',
|
||||
'dingtalk-circle-filled',
|
||||
'dingtalk-outlined',
|
||||
'dingtalk-square-filled',
|
||||
'disconnect-outlined',
|
||||
'dislike-filled',
|
||||
'dislike-outlined',
|
||||
'dislike-twotone',
|
||||
'dollar-circle-filled',
|
||||
'dollar-circle-outlined',
|
||||
'dollar-circle-twotone',
|
||||
'dollar-outlined',
|
||||
'dollar-twotone',
|
||||
'dot-chart-outlined',
|
||||
'double-left-outlined',
|
||||
'double-right-outlined',
|
||||
'down-circle-filled',
|
||||
'down-circle-outlined',
|
||||
'down-circle-twotone',
|
||||
'down-outlined',
|
||||
'down-square-filled',
|
||||
'down-square-outlined',
|
||||
'down-square-twotone',
|
||||
'download-outlined',
|
||||
'drag-outlined',
|
||||
'dribbble-circle-filled',
|
||||
'dribbble-outlined',
|
||||
'dribbble-square-filled',
|
||||
'dribbble-square-outlined',
|
||||
'dropbox-circle-filled',
|
||||
'dropbox-outlined',
|
||||
'dropbox-square-filled',
|
||||
'edit-filled',
|
||||
'edit-outlined',
|
||||
'edit-twotone',
|
||||
'ellipsis-outlined',
|
||||
'enter-outlined',
|
||||
'environment-filled',
|
||||
'environment-outlined',
|
||||
'environment-twotone',
|
||||
'euro-circle-filled',
|
||||
'euro-circle-outlined',
|
||||
'euro-circle-twotone',
|
||||
'euro-outlined',
|
||||
'euro-twotone',
|
||||
'exception-outlined',
|
||||
'exclamation-circle-filled',
|
||||
'exclamation-circle-outlined',
|
||||
'exclamation-circle-twotone',
|
||||
'exclamation-outlined',
|
||||
'expand-alt-outlined',
|
||||
'expand-outlined',
|
||||
'experiment-filled',
|
||||
'experiment-outlined',
|
||||
'experiment-twotone',
|
||||
'export-outlined',
|
||||
'eye-filled',
|
||||
'eye-invisible-filled',
|
||||
'eye-invisible-outlined',
|
||||
'eye-invisible-twotone',
|
||||
'eye-outlined',
|
||||
'eye-twotone',
|
||||
'facebook-filled',
|
||||
'facebook-outlined',
|
||||
'fall-outlined',
|
||||
'fast-backward-filled',
|
||||
'fast-backward-outlined',
|
||||
'fast-forward-filled',
|
||||
'fast-forward-outlined',
|
||||
'field-binary-outlined',
|
||||
'field-number-outlined',
|
||||
'field-string-outlined',
|
||||
'field-time-outlined',
|
||||
'file-add-filled',
|
||||
'file-add-outlined',
|
||||
'file-add-twotone',
|
||||
'file-done-outlined',
|
||||
'file-excel-filled',
|
||||
'file-excel-outlined',
|
||||
'file-excel-twotone',
|
||||
'file-exclamation-filled',
|
||||
'file-exclamation-outlined',
|
||||
'file-exclamation-twotone',
|
||||
'file-filled',
|
||||
'file-gif-outlined',
|
||||
'file-image-filled',
|
||||
'file-image-outlined',
|
||||
'file-image-twotone',
|
||||
'file-jpg-outlined',
|
||||
'file-markdown-filled',
|
||||
'file-markdown-outlined',
|
||||
'file-markdown-twotone',
|
||||
'file-outlined',
|
||||
'file-pdf-filled',
|
||||
'file-pdf-outlined',
|
||||
'file-pdf-twotone',
|
||||
'file-ppt-filled',
|
||||
'file-ppt-outlined',
|
||||
'file-ppt-twotone',
|
||||
'file-protect-outlined',
|
||||
'file-search-outlined',
|
||||
'file-sync-outlined',
|
||||
'file-text-filled',
|
||||
'file-text-outlined',
|
||||
'file-text-twotone',
|
||||
'file-twotone',
|
||||
'file-unknown-filled',
|
||||
'file-unknown-outlined',
|
||||
'file-unknown-twotone',
|
||||
'file-word-filled',
|
||||
'file-word-outlined',
|
||||
'file-word-twotone',
|
||||
'file-zip-filled',
|
||||
'file-zip-outlined',
|
||||
'file-zip-twotone',
|
||||
'filter-filled',
|
||||
'filter-outlined',
|
||||
'filter-twotone',
|
||||
'fire-filled',
|
||||
'fire-outlined',
|
||||
'fire-twotone',
|
||||
'flag-filled',
|
||||
'flag-outlined',
|
||||
'flag-twotone',
|
||||
'folder-add-filled',
|
||||
'folder-add-outlined',
|
||||
'folder-add-twotone',
|
||||
'folder-filled',
|
||||
'folder-open-filled',
|
||||
'folder-open-outlined',
|
||||
'folder-open-twotone',
|
||||
'folder-outlined',
|
||||
'folder-twotone',
|
||||
'folder-view-outlined',
|
||||
'font-colors-outlined',
|
||||
'font-size-outlined',
|
||||
'fork-outlined',
|
||||
'form-outlined',
|
||||
'format-painter-filled',
|
||||
'format-painter-outlined',
|
||||
'forward-filled',
|
||||
'forward-outlined',
|
||||
'frown-filled',
|
||||
'frown-outlined',
|
||||
'frown-twotone',
|
||||
'fullscreen-exit-outlined',
|
||||
'fullscreen-outlined',
|
||||
'function-outlined',
|
||||
'fund-filled',
|
||||
'fund-outlined',
|
||||
'fund-projection-screen-outlined',
|
||||
'fund-twotone',
|
||||
'fund-view-outlined',
|
||||
'funnel-plot-filled',
|
||||
'funnel-plot-outlined',
|
||||
'funnel-plot-twotone',
|
||||
'gateway-outlined',
|
||||
'gif-outlined',
|
||||
'gift-filled',
|
||||
'gift-outlined',
|
||||
'gift-twotone',
|
||||
'github-filled',
|
||||
'github-outlined',
|
||||
'gitlab-filled',
|
||||
'gitlab-outlined',
|
||||
'global-outlined',
|
||||
'gold-filled',
|
||||
'gold-outlined',
|
||||
'gold-twotone',
|
||||
'golden-filled',
|
||||
'google-circle-filled',
|
||||
'google-outlined',
|
||||
'google-plus-circle-filled',
|
||||
'google-plus-outlined',
|
||||
'google-plus-square-filled',
|
||||
'google-square-filled',
|
||||
'group-outlined',
|
||||
'hdd-filled',
|
||||
'hdd-outlined',
|
||||
'hdd-twotone',
|
||||
'heart-filled',
|
||||
'heart-outlined',
|
||||
'heart-twotone',
|
||||
'heat-map-outlined',
|
||||
'highlight-filled',
|
||||
'highlight-outlined',
|
||||
'highlight-twotone',
|
||||
'history-outlined',
|
||||
'home-filled',
|
||||
'home-outlined',
|
||||
'home-twotone',
|
||||
'hourglass-filled',
|
||||
'hourglass-outlined',
|
||||
'hourglass-twotone',
|
||||
'html5-filled',
|
||||
'html5-outlined',
|
||||
'html5-twotone',
|
||||
'idcard-filled',
|
||||
'idcard-outlined',
|
||||
'idcard-twotone',
|
||||
'ie-circle-filled',
|
||||
'ie-outlined',
|
||||
'ie-square-filled',
|
||||
'import-outlined',
|
||||
'inbox-outlined',
|
||||
'info-circle-filled',
|
||||
'info-circle-outlined',
|
||||
'info-circle-twotone',
|
||||
'info-outlined',
|
||||
'insert-row-above-outlined',
|
||||
'insert-row-below-outlined',
|
||||
'insert-row-left-outlined',
|
||||
'insert-row-right-outlined',
|
||||
'instagram-filled',
|
||||
'instagram-outlined',
|
||||
'insurance-filled',
|
||||
'insurance-outlined',
|
||||
'insurance-twotone',
|
||||
'interaction-filled',
|
||||
'interaction-outlined',
|
||||
'interaction-twotone',
|
||||
'issues-close-outlined',
|
||||
'italic-outlined',
|
||||
'key-outlined',
|
||||
'laptop-outlined',
|
||||
'layout-filled',
|
||||
'layout-outlined',
|
||||
'layout-twotone',
|
||||
'left-circle-filled',
|
||||
'left-circle-outlined',
|
||||
'left-circle-twotone',
|
||||
'left-outlined',
|
||||
'left-square-filled',
|
||||
'left-square-outlined',
|
||||
'left-square-twotone',
|
||||
'like-filled',
|
||||
'like-outlined',
|
||||
'like-twotone',
|
||||
'line-chart-outlined',
|
||||
'line-height-outlined',
|
||||
'line-outlined',
|
||||
'link-outlined',
|
||||
'linkedin-filled',
|
||||
'linkedin-outlined',
|
||||
'loading-3-quarters-outlined',
|
||||
'loading-outlined',
|
||||
'lock-filled',
|
||||
'lock-outlined',
|
||||
'lock-twotone',
|
||||
'login-outlined',
|
||||
'logout-outlined',
|
||||
'mac-command-filled',
|
||||
'mac-command-outlined',
|
||||
'mail-filled',
|
||||
'mail-outlined',
|
||||
'mail-twotone',
|
||||
'man-outlined',
|
||||
'medicine-box-filled',
|
||||
'medicine-box-outlined',
|
||||
'medicine-box-twotone',
|
||||
'medium-circle-filled',
|
||||
'medium-outlined',
|
||||
'medium-square-filled',
|
||||
'medium-workmark-outlined',
|
||||
'meh-filled',
|
||||
'meh-outlined',
|
||||
'meh-twotone',
|
||||
'menu-fold-outlined',
|
||||
'menu-outlined',
|
||||
'menu-unfold-outlined',
|
||||
'merge-cells-outlined',
|
||||
'message-filled',
|
||||
'message-outlined',
|
||||
'message-twotone',
|
||||
'minus-circle-filled',
|
||||
'minus-circle-outlined',
|
||||
'minus-circle-twotone',
|
||||
'minus-outlined',
|
||||
'minus-square-filled',
|
||||
'minus-square-outlined',
|
||||
'minus-square-twotone',
|
||||
'mobile-filled',
|
||||
'mobile-outlined',
|
||||
'mobile-twotone',
|
||||
'money-collect-filled',
|
||||
'money-collect-outlined',
|
||||
'money-collect-twotone',
|
||||
'monitor-outlined',
|
||||
'more-outlined',
|
||||
'node-collapse-outlined',
|
||||
'node-expand-outlined',
|
||||
'node-index-outlined',
|
||||
'notification-filled',
|
||||
'notification-outlined',
|
||||
'notification-twotone',
|
||||
'number-outlined',
|
||||
'one-to-one-outlined',
|
||||
'ordered-list-outlined',
|
||||
'paper-clip-outlined',
|
||||
'partition-outlined',
|
||||
'pause-circle-filled',
|
||||
'pause-circle-outlined',
|
||||
'pause-circle-twotone',
|
||||
'pause-outlined',
|
||||
'pay-circle-filled',
|
||||
'pay-circle-outlined',
|
||||
'percentage-outlined',
|
||||
'phone-filled',
|
||||
'phone-outlined',
|
||||
'phone-twotone',
|
||||
'pic-center-outlined',
|
||||
'pic-left-outlined',
|
||||
'pic-right-outlined',
|
||||
'picture-filled',
|
||||
'picture-outlined',
|
||||
'picture-twotone',
|
||||
'pie-chart-filled',
|
||||
'pie-chart-outlined',
|
||||
'pie-chart-twotone',
|
||||
'play-circle-filled',
|
||||
'play-circle-outlined',
|
||||
'play-circle-twotone',
|
||||
'play-square-filled',
|
||||
'play-square-outlined',
|
||||
'play-square-twotone',
|
||||
'plus-circle-filled',
|
||||
'plus-circle-outlined',
|
||||
'plus-circle-twotone',
|
||||
'plus-outlined',
|
||||
'plus-square-filled',
|
||||
'plus-square-outlined',
|
||||
'plus-square-twotone',
|
||||
'pound-circle-filled',
|
||||
'pound-circle-outlined',
|
||||
'pound-circle-twotone',
|
||||
'pound-outlined',
|
||||
'poweroff-outlined',
|
||||
'printer-filled',
|
||||
'printer-outlined',
|
||||
'printer-twotone',
|
||||
'profile-filled',
|
||||
'profile-outlined',
|
||||
'profile-twotone',
|
||||
'project-filled',
|
||||
'project-outlined',
|
||||
'project-twotone',
|
||||
'property-safety-filled',
|
||||
'property-safety-outlined',
|
||||
'property-safety-twotone',
|
||||
'pull-request-outlined',
|
||||
'pushpin-filled',
|
||||
'pushpin-outlined',
|
||||
'pushpin-twotone',
|
||||
'qq-circle-filled',
|
||||
'qq-outlined',
|
||||
'qq-square-filled',
|
||||
'qrcode-outlined',
|
||||
'question-circle-filled',
|
||||
'question-circle-outlined',
|
||||
'question-circle-twotone',
|
||||
'question-outlined',
|
||||
'radar-chart-outlined',
|
||||
'radius-bottomleft-outlined',
|
||||
'radius-bottomright-outlined',
|
||||
'radius-setting-outlined',
|
||||
'radius-upleft-outlined',
|
||||
'radius-upright-outlined',
|
||||
'read-filled',
|
||||
'read-outlined',
|
||||
'reconciliation-filled',
|
||||
'reconciliation-outlined',
|
||||
'reconciliation-twotone',
|
||||
'red-envelope-filled',
|
||||
'red-envelope-outlined',
|
||||
'red-envelope-twotone',
|
||||
'reddit-circle-filled',
|
||||
'reddit-outlined',
|
||||
'reddit-square-filled',
|
||||
'redo-outlined',
|
||||
'reload-outlined',
|
||||
'rest-filled',
|
||||
'rest-outlined',
|
||||
'rest-twotone',
|
||||
'retweet-outlined',
|
||||
'right-circle-filled',
|
||||
'right-circle-outlined',
|
||||
'right-circle-twotone',
|
||||
'right-outlined',
|
||||
'right-square-filled',
|
||||
'right-square-outlined',
|
||||
'right-square-twotone',
|
||||
'rise-outlined',
|
||||
'robot-filled',
|
||||
'robot-outlined',
|
||||
'rocket-filled',
|
||||
'rocket-outlined',
|
||||
'rocket-twotone',
|
||||
'rollback-outlined',
|
||||
'rotate-left-outlined',
|
||||
'rotate-right-outlined',
|
||||
'safety-certificate-filled',
|
||||
'safety-certificate-outlined',
|
||||
'safety-certificate-twotone',
|
||||
'safety-outlined',
|
||||
'save-filled',
|
||||
'save-outlined',
|
||||
'save-twotone',
|
||||
'scan-outlined',
|
||||
'schedule-filled',
|
||||
'schedule-outlined',
|
||||
'schedule-twotone',
|
||||
'scissor-outlined',
|
||||
'search-outlined',
|
||||
'security-scan-filled',
|
||||
'security-scan-outlined',
|
||||
'security-scan-twotone',
|
||||
'select-outlined',
|
||||
'send-outlined',
|
||||
'setting-filled',
|
||||
'setting-outlined',
|
||||
'setting-twotone',
|
||||
'shake-outlined',
|
||||
'share-alt-outlined',
|
||||
'shop-filled',
|
||||
'shop-outlined',
|
||||
'shop-twotone',
|
||||
'shopping-cart-outlined',
|
||||
'shopping-filled',
|
||||
'shopping-outlined',
|
||||
'shopping-twotone',
|
||||
'shrink-outlined',
|
||||
'signal-filled',
|
||||
'sisternode-outlined',
|
||||
'sketch-circle-filled',
|
||||
'sketch-outlined',
|
||||
'sketch-square-filled',
|
||||
'skin-filled',
|
||||
'skin-outlined',
|
||||
'skin-twotone',
|
||||
'skype-filled',
|
||||
'skype-outlined',
|
||||
'slack-circle-filled',
|
||||
'slack-outlined',
|
||||
'slack-square-filled',
|
||||
'slack-square-outlined',
|
||||
'sliders-filled',
|
||||
'sliders-outlined',
|
||||
'sliders-twotone',
|
||||
'small-dash-outlined',
|
||||
'smile-filled',
|
||||
'smile-outlined',
|
||||
'smile-twotone',
|
||||
'snippets-filled',
|
||||
'snippets-outlined',
|
||||
'snippets-twotone',
|
||||
'solution-outlined',
|
||||
'sort-ascending-outlined',
|
||||
'sort-descending-outlined',
|
||||
'sound-filled',
|
||||
'sound-outlined',
|
||||
'sound-twotone',
|
||||
'split-cells-outlined',
|
||||
'star-filled',
|
||||
'star-outlined',
|
||||
'star-twotone',
|
||||
'step-backward-filled',
|
||||
'step-backward-outlined',
|
||||
'step-forward-filled',
|
||||
'step-forward-outlined',
|
||||
'stock-outlined',
|
||||
'stop-filled',
|
||||
'stop-outlined',
|
||||
'stop-twotone',
|
||||
'strikethrough-outlined',
|
||||
'subnode-outlined',
|
||||
'swap-left-outlined',
|
||||
'swap-outlined',
|
||||
'swap-right-outlined',
|
||||
'switcher-filled',
|
||||
'switcher-outlined',
|
||||
'switcher-twotone',
|
||||
'sync-outlined',
|
||||
'table-outlined',
|
||||
'tablet-filled',
|
||||
'tablet-outlined',
|
||||
'tablet-twotone',
|
||||
'tag-filled',
|
||||
'tag-outlined',
|
||||
'tag-twotone',
|
||||
'tags-filled',
|
||||
'tags-outlined',
|
||||
'tags-twotone',
|
||||
'taobao-circle-filled',
|
||||
'taobao-circle-outlined',
|
||||
'taobao-outlined',
|
||||
'taobao-square-filled',
|
||||
'team-outlined',
|
||||
'thunderbolt-filled',
|
||||
'thunderbolt-outlined',
|
||||
'thunderbolt-twotone',
|
||||
'to-top-outlined',
|
||||
'tool-filled',
|
||||
'tool-outlined',
|
||||
'tool-twotone',
|
||||
'trademark-circle-filled',
|
||||
'trademark-circle-outlined',
|
||||
'trademark-circle-twotone',
|
||||
'trademark-outlined',
|
||||
'transaction-outlined',
|
||||
'translation-outlined',
|
||||
'trophy-filled',
|
||||
'trophy-outlined',
|
||||
'trophy-twotone',
|
||||
'twitter-circle-filled',
|
||||
'twitter-outlined',
|
||||
'twitter-square-filled',
|
||||
'underline-outlined',
|
||||
'undo-outlined',
|
||||
'ungroup-outlined',
|
||||
'unlock-filled',
|
||||
'unlock-outlined',
|
||||
'unlock-twotone',
|
||||
'unordered-list-outlined',
|
||||
'up-circle-filled',
|
||||
'up-circle-outlined',
|
||||
'up-circle-twotone',
|
||||
'up-outlined',
|
||||
'up-square-filled',
|
||||
'up-square-outlined',
|
||||
'up-square-twotone',
|
||||
'upload-outlined',
|
||||
'usb-filled',
|
||||
'usb-outlined',
|
||||
'usb-twotone',
|
||||
'user-add-outlined',
|
||||
'user-delete-outlined',
|
||||
'user-outlined',
|
||||
'user-switch-outlined',
|
||||
'usergroup-add-outlined',
|
||||
'usergroup-delete-outlined',
|
||||
'verified-outlined',
|
||||
'vertical-align-bottom-outlined',
|
||||
'vertical-align-middle-outlined',
|
||||
'vertical-align-top-outlined',
|
||||
'vertical-left-outlined',
|
||||
'vertical-right-outlined',
|
||||
'video-camera-add-outlined',
|
||||
'video-camera-filled',
|
||||
'video-camera-outlined',
|
||||
'video-camera-twotone',
|
||||
'wallet-filled',
|
||||
'wallet-outlined',
|
||||
'wallet-twotone',
|
||||
'warning-filled',
|
||||
'warning-outlined',
|
||||
'warning-twotone',
|
||||
'wechat-filled',
|
||||
'wechat-outlined',
|
||||
'weibo-circle-filled',
|
||||
'weibo-circle-outlined',
|
||||
'weibo-outlined',
|
||||
'weibo-square-filled',
|
||||
'weibo-square-outlined',
|
||||
'whats-app-outlined',
|
||||
'wifi-outlined',
|
||||
'windows-filled',
|
||||
'windows-outlined',
|
||||
'woman-outlined',
|
||||
'yahoo-filled',
|
||||
'yahoo-outlined',
|
||||
'youtube-filled',
|
||||
'youtube-outlined',
|
||||
'yuque-filled',
|
||||
'yuque-outlined',
|
||||
'zhihu-circle-filled',
|
||||
'zhihu-outlined',
|
||||
'zhihu-square-filled',
|
||||
'zoom-in-outlined',
|
||||
'zoom-out-outlined',
|
||||
],
|
||||
prefix: 'ant-design',
|
||||
};
|
@ -17,6 +17,8 @@ import {
|
||||
} from '@vben/icons';
|
||||
|
||||
import { Card } from 'ant-design-vue';
|
||||
|
||||
import IconPicker from './icon-picker.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -45,7 +47,7 @@ import { Card } from 'ant-design-vue';
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card title="Svg Icons">
|
||||
<Card class="mb-5" title="Svg Icons">
|
||||
<div class="flex items-center gap-5">
|
||||
<SvgAvatar1Icon class="size-8" />
|
||||
<SvgAvatar2Icon class="size-8 text-red-500" />
|
||||
@ -57,5 +59,17 @@ import { Card } from 'ant-design-vue';
|
||||
<SvgDownloadIcon class="size-8" />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card class="mb-5" title="图标选择器(Iconify)">
|
||||
<div class="flex items-center gap-5">
|
||||
<IconPicker width="300px" />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card title="图标选择器(Svg)">
|
||||
<div class="flex items-center gap-5">
|
||||
<IconPicker prefix="svg" width="300px" />
|
||||
</div>
|
||||
</Card>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -16,9 +16,10 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
class: 'w-full',
|
||||
},
|
||||
},
|
||||
|
||||
fieldMappingTime: [['rangePicker', ['startTime', 'endTime'], 'YYYY-MM-DD']],
|
||||
// 提交函数
|
||||
handleSubmit: onSubmit,
|
||||
|
||||
// 垂直布局,label和input在不同行,值为vertical
|
||||
// 水平布局,label和input在同一行
|
||||
layout: 'horizontal',
|
||||
|
@ -57,8 +57,8 @@ const [Modal, modalApi] = useVbenModal({
|
||||
modalApi.close();
|
||||
},
|
||||
onConfirm: async () => {
|
||||
await formApi.submitForm();
|
||||
modalApi.close();
|
||||
await formApi.validateAndSubmitForm();
|
||||
// modalApi.close();
|
||||
},
|
||||
onOpenChange(isOpen: boolean) {
|
||||
if (isOpen) {
|
@ -8,7 +8,7 @@ import AutoHeightDemo from './auto-height-demo.vue';
|
||||
import BaseDemo from './base-demo.vue';
|
||||
import DragDemo from './drag-demo.vue';
|
||||
import DynamicDemo from './dynamic-demo.vue';
|
||||
import FormModalDemo from './form-model-demo.vue';
|
||||
import FormModalDemo from './form-modal-demo.vue';
|
||||
import SharedDataDemo from './shared-data-demo.vue';
|
||||
|
||||
const [BaseModal, baseModalApi] = useVbenModal({
|
||||
|
@ -87,7 +87,7 @@ function changeLoading() {
|
||||
<Button class="mr-2" type="primary" @click="changeLoading">
|
||||
显示loading
|
||||
</Button>
|
||||
<Button class="mr-2" type="primary" @click="changeStripe">
|
||||
<Button type="primary" @click="changeStripe">
|
||||
{{ showStripe ? '隐藏' : '显示' }}斑马纹
|
||||
</Button>
|
||||
</template>
|
||||
|
@ -23,7 +23,7 @@ catalog:
|
||||
'@ctrl/tinycolor': ^4.1.0
|
||||
'@eslint/js': ^9.14.0
|
||||
'@faker-js/faker': ^9.2.0
|
||||
'@iconify/json': ^2.2.269
|
||||
'@iconify/json': ^2.2.270
|
||||
'@iconify/tailwind': ^1.1.3
|
||||
'@iconify/vue': ^4.1.2
|
||||
'@intlify/core-base': ^10.0.4
|
||||
@ -51,7 +51,7 @@ catalog:
|
||||
'@types/sortablejs': ^1.15.8
|
||||
'@typescript-eslint/eslint-plugin': ^8.13.0
|
||||
'@typescript-eslint/parser': ^8.13.0
|
||||
'@vee-validate/zod': ^4.14.6
|
||||
'@vee-validate/zod': ^4.14.7
|
||||
'@vite-pwa/vitepress': ^0.5.3
|
||||
'@vitejs/plugin-vue': ^5.1.4
|
||||
'@vitejs/plugin-vue-jsx': ^4.0.1
|
||||
@ -76,8 +76,8 @@ catalog:
|
||||
cross-env: ^7.0.3
|
||||
cspell: ^8.16.0
|
||||
cssnano: ^7.0.6
|
||||
cz-git: ^1.10.1
|
||||
czg: ^1.10.1
|
||||
cz-git: ^1.11.0
|
||||
czg: ^1.11.0
|
||||
dayjs: ^1.11.13
|
||||
defu: ^6.1.4
|
||||
depcheck: ^1.4.7
|
||||
@ -90,7 +90,7 @@ catalog:
|
||||
eslint-plugin-eslint-comments: ^3.2.0
|
||||
eslint-plugin-import-x: ^4.4.0
|
||||
eslint-plugin-jsdoc: ^50.4.3
|
||||
eslint-plugin-jsonc: ^2.16.0
|
||||
eslint-plugin-jsonc: ^2.17.0
|
||||
eslint-plugin-n: ^17.13.1
|
||||
eslint-plugin-no-only-tests: ^3.3.0
|
||||
eslint-plugin-perfectionist: ^3.9.1
|
||||
@ -114,14 +114,14 @@ catalog:
|
||||
lint-staged: ^15.2.10
|
||||
lodash.clonedeep: ^4.5.0
|
||||
lodash.get: ^4.4.2
|
||||
lucide-vue-next: ^0.454.0
|
||||
lucide-vue-next: ^0.456.0
|
||||
medium-zoom: ^1.1.0
|
||||
naive-ui: ^2.40.1
|
||||
nitropack: ^2.10.3
|
||||
nitropack: ^2.10.4
|
||||
nprogress: ^0.2.0
|
||||
ora: ^8.1.1
|
||||
pinia: 2.2.2
|
||||
pinia-plugin-persistedstate: ^4.1.2
|
||||
pinia-plugin-persistedstate: ^4.1.3
|
||||
pkg-types: ^1.2.1
|
||||
playwright: ^1.48.2
|
||||
postcss: ^8.4.47
|
||||
@ -134,7 +134,7 @@ catalog:
|
||||
prettier-plugin-tailwindcss: ^0.6.8
|
||||
publint: ^0.2.12
|
||||
qrcode: ^1.5.4
|
||||
radix-vue: ^1.9.8
|
||||
radix-vue: ^1.9.9
|
||||
resolve.exports: ^2.0.2
|
||||
rimraf: ^6.0.1
|
||||
rollup: ^4.24.4
|
||||
@ -158,7 +158,7 @@ catalog:
|
||||
typescript: ^5.6.3
|
||||
unbuild: ^3.0.0-rc.11
|
||||
unplugin-element-plus: ^0.8.0
|
||||
vee-validate: ^4.14.6
|
||||
vee-validate: ^4.14.7
|
||||
vite: ^5.4.10
|
||||
vite-plugin-compression: ^0.5.1
|
||||
vite-plugin-dts: 4.2.1
|
||||
@ -174,8 +174,8 @@ catalog:
|
||||
vue-i18n: ^10.0.4
|
||||
vue-router: ^4.4.5
|
||||
vue-tsc: ^2.1.10
|
||||
vxe-pc-ui: ^4.2.45
|
||||
vxe-table: ^4.8.2
|
||||
vxe-pc-ui: ^4.2.46
|
||||
vxe-table: ^4.8.8
|
||||
watermark-js-plus: ^1.5.7
|
||||
zod: ^3.23.8
|
||||
zod-defaults: ^0.1.3
|
||||
|
Loading…
Reference in New Issue
Block a user