Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
commit
a814bed79e
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -227,5 +227,6 @@
|
|||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"editor.linkedEditing": true, // 自动同步更改html标签,
|
"editor.linkedEditing": true, // 自动同步更改html标签,
|
||||||
"vscodeCustomCodeColor.highlightValue": "v-access", // v-access显示的颜色
|
"vscodeCustomCodeColor.highlightValue": "v-access", // v-access显示的颜色
|
||||||
"vscodeCustomCodeColor.highlightValueColor": "#CCFFFF"
|
"vscodeCustomCodeColor.highlightValueColor": "#CCFFFF",
|
||||||
|
"oxc.enable": false
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,12 @@
|
|||||||
"lockb",
|
"lockb",
|
||||||
"logininfor",
|
"logininfor",
|
||||||
"lucide",
|
"lucide",
|
||||||
|
"minh",
|
||||||
|
"minw",
|
||||||
"mkdist",
|
"mkdist",
|
||||||
"mockjs",
|
"mockjs",
|
||||||
"vitejs",
|
"naiveui",
|
||||||
|
"nocheck",
|
||||||
"noopener",
|
"noopener",
|
||||||
"noreferrer",
|
"noreferrer",
|
||||||
"nprogress",
|
"nprogress",
|
||||||
@ -51,6 +54,7 @@
|
|||||||
"vben",
|
"vben",
|
||||||
"vbenjs",
|
"vbenjs",
|
||||||
"vite",
|
"vite",
|
||||||
|
"vitejs",
|
||||||
"vitepress",
|
"vitepress",
|
||||||
"vnode",
|
"vnode",
|
||||||
"vueuse",
|
"vueuse",
|
||||||
|
@ -221,9 +221,9 @@ function nav(): DefaultTheme.NavItem[] {
|
|||||||
link: '/commercial/community',
|
link: '/commercial/community',
|
||||||
text: '👨👦👦 Community',
|
text: '👨👦👦 Community',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
link: '/friend-links/',
|
// link: '/friend-links/',
|
||||||
text: '🤝 Friend Links',
|
// text: '🤝 Friend Links',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -282,10 +282,10 @@ function nav(): DefaultTheme.NavItem[] {
|
|||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
link: '/friend-links/',
|
// link: '/friend-links/',
|
||||||
text: '🤝 友情链接',
|
// text: '🤝 友情链接',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
"node": ">=20.10.0",
|
"node": ">=20.10.0",
|
||||||
"pnpm": ">=9.12.0"
|
"pnpm": ">=9.12.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.12.3",
|
"packageManager": "pnpm@9.13.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"peerDependencyRules": {
|
"peerDependencyRules": {
|
||||||
"allowedVersions": {
|
"allowedVersions": {
|
||||||
|
@ -238,6 +238,12 @@ function createComponentProps(slotProps: Record<string, any>) {
|
|||||||
...slotProps.componentField,
|
...slotProps.componentField,
|
||||||
...computedProps.value,
|
...computedProps.value,
|
||||||
...bindEvents,
|
...bindEvents,
|
||||||
|
...(Reflect.has(computedProps.value, 'onChange')
|
||||||
|
? { onChange: computedProps.value.onChange }
|
||||||
|
: {}),
|
||||||
|
...(Reflect.has(computedProps.value, 'onInput')
|
||||||
|
? { onInput: computedProps.value.onInput }
|
||||||
|
: {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
return binds;
|
return binds;
|
||||||
|
@ -5,6 +5,7 @@ export * from './icon-picker';
|
|||||||
export * from './json-preview';
|
export * from './json-preview';
|
||||||
export * from './markdown';
|
export * from './markdown';
|
||||||
export * from './page';
|
export * from './page';
|
||||||
|
export * from './resize';
|
||||||
export * from '@vben-core/form-ui';
|
export * from '@vben-core/form-ui';
|
||||||
export * from '@vben-core/popup-ui';
|
export * from '@vben-core/popup-ui';
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export { default as VResize } from './resize.vue';
|
1122
packages/effects/common-ui/src/components/resize/resize.vue
Normal file
1122
packages/effects/common-ui/src/components/resize/resize.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
|||||||
|
import type { Recordable } from '@vben/types';
|
||||||
import type { VxeGridProps, VxeUIExport } from 'vxe-table';
|
import type { VxeGridProps, VxeUIExport } from 'vxe-table';
|
||||||
|
|
||||||
import type { VxeGridApi } from './api';
|
import type { VxeGridApi } from './api';
|
||||||
@ -7,7 +8,7 @@ import { formatDate, formatDateTime, isFunction } from '@vben/utils';
|
|||||||
export function extendProxyOptions(
|
export function extendProxyOptions(
|
||||||
api: VxeGridApi,
|
api: VxeGridApi,
|
||||||
options: VxeGridProps,
|
options: VxeGridProps,
|
||||||
getFormValues: () => Record<string, any>,
|
getFormValues: () => Recordable<any>,
|
||||||
) {
|
) {
|
||||||
[
|
[
|
||||||
'query',
|
'query',
|
||||||
@ -25,17 +26,28 @@ function extendProxyOption(
|
|||||||
key: string,
|
key: string,
|
||||||
api: VxeGridApi,
|
api: VxeGridApi,
|
||||||
options: VxeGridProps,
|
options: VxeGridProps,
|
||||||
getFormValues: () => Record<string, any>,
|
getFormValues: () => Recordable<any>,
|
||||||
) {
|
) {
|
||||||
const { proxyConfig } = options;
|
const { proxyConfig } = options;
|
||||||
const configFn = (proxyConfig?.ajax as any)?.[key];
|
const configFn = (proxyConfig?.ajax as Recordable<any>)?.[key];
|
||||||
if (!isFunction(configFn)) {
|
if (!isFunction(configFn)) {
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wrapperFn = async (params: any, _formValues: any, ...args: any[]) => {
|
const wrapperFn = async (
|
||||||
|
params: Recordable<any>,
|
||||||
|
customValues: Recordable<any>,
|
||||||
|
...args: Recordable<any>[]
|
||||||
|
) => {
|
||||||
const formValues = getFormValues();
|
const formValues = getFormValues();
|
||||||
const data = await configFn(params, formValues, ...args);
|
const data = await configFn(
|
||||||
|
params,
|
||||||
|
{
|
||||||
|
...customValues,
|
||||||
|
...formValues,
|
||||||
|
},
|
||||||
|
...args,
|
||||||
|
);
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
api.setState({
|
api.setState({
|
||||||
|
@ -81,7 +81,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.vxe-tools--operate {
|
.vxe-tools--operate {
|
||||||
@apply ml-3;
|
margin-right: 0.25rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vxe-table-custom--checkbox-option:hover {
|
.vxe-table-custom--checkbox-option:hover {
|
@ -32,7 +32,7 @@ import { useTableForm } from './init';
|
|||||||
|
|
||||||
import 'vxe-table/styles/cssvar.scss';
|
import 'vxe-table/styles/cssvar.scss';
|
||||||
import 'vxe-pc-ui/styles/cssvar.scss';
|
import 'vxe-pc-ui/styles/cssvar.scss';
|
||||||
import './theme.css';
|
import './style.css';
|
||||||
|
|
||||||
interface Props extends VxeGridProps {
|
interface Props extends VxeGridProps {
|
||||||
api: ExtendedVxeGridApi;
|
api: ExtendedVxeGridApi;
|
||||||
@ -278,7 +278,7 @@ onUnmounted(() => {
|
|||||||
ref="gridRef"
|
ref="gridRef"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'p-2',
|
'p-2 pt-0',
|
||||||
{
|
{
|
||||||
'pt-0': showToolbar && !formOptions,
|
'pt-0': showToolbar && !formOptions,
|
||||||
},
|
},
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
"ellipsis": {
|
"ellipsis": {
|
||||||
"title": "文本省略"
|
"title": "文本省略"
|
||||||
},
|
},
|
||||||
|
"resize": {
|
||||||
|
"title": "拖动调整"
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"title": "表单",
|
"title": "表单",
|
||||||
"basic": "基础表单",
|
"basic": "基础表单",
|
||||||
|
@ -228,6 +228,15 @@ const routes: RouteRecordRaw[] = [
|
|||||||
title: $t('examples.ellipsis.title'),
|
title: $t('examples.ellipsis.title'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'VueResizeDemo',
|
||||||
|
path: '/demos/resize/basic',
|
||||||
|
component: () => import('#/views/examples/resize/basic.vue'),
|
||||||
|
meta: {
|
||||||
|
icon: 'material-symbols:resize',
|
||||||
|
title: $t('examples.resize.title'),
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
44
playground/src/views/examples/resize/basic.vue
Normal file
44
playground/src/views/examples/resize/basic.vue
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { Page, VResize } from '@vben/common-ui';
|
||||||
|
|
||||||
|
const width = ref(200);
|
||||||
|
const height = ref(200);
|
||||||
|
const top = ref(200);
|
||||||
|
const left = ref(200);
|
||||||
|
|
||||||
|
const resize = (newRect: {
|
||||||
|
height: number;
|
||||||
|
left: number;
|
||||||
|
top: number;
|
||||||
|
width: number;
|
||||||
|
}) => {
|
||||||
|
width.value = newRect.width;
|
||||||
|
height.value = newRect.height;
|
||||||
|
top.value = newRect.top;
|
||||||
|
left.value = newRect.left;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Page description="Resize组件基础示例" title="Resize组件">
|
||||||
|
<div class="m-4 bg-blue-500 p-48 text-xl">
|
||||||
|
{{
|
||||||
|
`width: ${width}px, height: ${height}px, top: ${top}px, left: ${left}px`
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<VResize
|
||||||
|
:h="200"
|
||||||
|
:is-active="true"
|
||||||
|
:w="200"
|
||||||
|
:x="200"
|
||||||
|
:y="200"
|
||||||
|
@dragging="resize"
|
||||||
|
@resizing="resize"
|
||||||
|
>
|
||||||
|
<div class="h-full w-full bg-red-500"></div>
|
||||||
|
</VResize>
|
||||||
|
</Page>
|
||||||
|
</template>
|
@ -23,7 +23,7 @@ catalog:
|
|||||||
'@ctrl/tinycolor': ^4.1.0
|
'@ctrl/tinycolor': ^4.1.0
|
||||||
'@eslint/js': ^9.14.0
|
'@eslint/js': ^9.14.0
|
||||||
'@faker-js/faker': ^9.2.0
|
'@faker-js/faker': ^9.2.0
|
||||||
'@iconify/json': ^2.2.270
|
'@iconify/json': ^2.2.271
|
||||||
'@iconify/tailwind': ^1.1.3
|
'@iconify/tailwind': ^1.1.3
|
||||||
'@iconify/vue': ^4.1.2
|
'@iconify/vue': ^4.1.2
|
||||||
'@intlify/core-base': ^10.0.4
|
'@intlify/core-base': ^10.0.4
|
||||||
@ -37,7 +37,7 @@ catalog:
|
|||||||
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
|
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
|
||||||
'@tailwindcss/typography': ^0.5.15
|
'@tailwindcss/typography': ^0.5.15
|
||||||
'@tanstack/vue-query': ^5.59.20
|
'@tanstack/vue-query': ^5.59.20
|
||||||
'@tanstack/vue-store': ^0.5.6
|
'@tanstack/vue-store': ^0.5.7
|
||||||
'@types/archiver': ^6.0.3
|
'@types/archiver': ^6.0.3
|
||||||
'@types/eslint': ^9.6.1
|
'@types/eslint': ^9.6.1
|
||||||
'@types/html-minifier-terser': ^7.0.2
|
'@types/html-minifier-terser': ^7.0.2
|
||||||
@ -53,7 +53,7 @@ catalog:
|
|||||||
'@typescript-eslint/parser': ^8.14.0
|
'@typescript-eslint/parser': ^8.14.0
|
||||||
'@vee-validate/zod': ^4.14.7
|
'@vee-validate/zod': ^4.14.7
|
||||||
'@vite-pwa/vitepress': ^0.5.3
|
'@vite-pwa/vitepress': ^0.5.3
|
||||||
'@vitejs/plugin-vue': ^5.1.5
|
'@vitejs/plugin-vue': ^5.2.0
|
||||||
'@vitejs/plugin-vue-jsx': ^4.1.0
|
'@vitejs/plugin-vue-jsx': ^4.1.0
|
||||||
'@vue/reactivity': ^3.5.12
|
'@vue/reactivity': ^3.5.12
|
||||||
'@vue/shared': ^3.5.12
|
'@vue/shared': ^3.5.12
|
||||||
@ -89,7 +89,7 @@ catalog:
|
|||||||
eslint-plugin-command: ^0.2.6
|
eslint-plugin-command: ^0.2.6
|
||||||
eslint-plugin-eslint-comments: ^3.2.0
|
eslint-plugin-eslint-comments: ^3.2.0
|
||||||
eslint-plugin-import-x: ^4.4.2
|
eslint-plugin-import-x: ^4.4.2
|
||||||
eslint-plugin-jsdoc: ^50.4.3
|
eslint-plugin-jsdoc: ^50.5.0
|
||||||
eslint-plugin-jsonc: ^2.18.1
|
eslint-plugin-jsonc: ^2.18.1
|
||||||
eslint-plugin-n: ^17.13.1
|
eslint-plugin-n: ^17.13.1
|
||||||
eslint-plugin-no-only-tests: ^3.3.0
|
eslint-plugin-no-only-tests: ^3.3.0
|
||||||
@ -105,7 +105,7 @@ catalog:
|
|||||||
get-port: ^7.1.0
|
get-port: ^7.1.0
|
||||||
globals: ^15.12.0
|
globals: ^15.12.0
|
||||||
h3: ^1.13.0
|
h3: ^1.13.0
|
||||||
happy-dom: ^15.11.2
|
happy-dom: ^15.11.4
|
||||||
html-minifier-terser: ^7.2.0
|
html-minifier-terser: ^7.2.0
|
||||||
husky: ^9.1.6
|
husky: ^9.1.6
|
||||||
is-ci: ^3.0.1
|
is-ci: ^3.0.1
|
||||||
@ -137,7 +137,7 @@ catalog:
|
|||||||
radix-vue: ^1.9.9
|
radix-vue: ^1.9.9
|
||||||
resolve.exports: ^2.0.2
|
resolve.exports: ^2.0.2
|
||||||
rimraf: ^6.0.1
|
rimraf: ^6.0.1
|
||||||
rollup: ^4.25.0
|
rollup: ^4.26.0
|
||||||
rollup-plugin-visualizer: ^5.12.0
|
rollup-plugin-visualizer: ^5.12.0
|
||||||
sass: 1.80.6
|
sass: 1.80.6
|
||||||
sortablejs: ^1.15.3
|
sortablejs: ^1.15.3
|
||||||
@ -164,7 +164,7 @@ catalog:
|
|||||||
vite-plugin-dts: 4.2.1
|
vite-plugin-dts: 4.2.1
|
||||||
vite-plugin-html: ^3.2.2
|
vite-plugin-html: ^3.2.2
|
||||||
vite-plugin-lazy-import: ^1.0.7
|
vite-plugin-lazy-import: ^1.0.7
|
||||||
vite-plugin-pwa: ^0.20.5
|
vite-plugin-pwa: ^0.21.0
|
||||||
vite-plugin-vue-devtools: ^7.6.4
|
vite-plugin-vue-devtools: ^7.6.4
|
||||||
vitepress: ^1.5.0
|
vitepress: ^1.5.0
|
||||||
vitepress-plugin-group-icons: ^1.3.0
|
vitepress-plugin-group-icons: ^1.3.0
|
||||||
@ -174,8 +174,8 @@ catalog:
|
|||||||
vue-i18n: ^10.0.4
|
vue-i18n: ^10.0.4
|
||||||
vue-router: ^4.4.5
|
vue-router: ^4.4.5
|
||||||
vue-tsc: ^2.1.10
|
vue-tsc: ^2.1.10
|
||||||
vxe-pc-ui: ^4.2.51
|
vxe-pc-ui: ^4.2.53
|
||||||
vxe-table: ^4.8.10
|
vxe-table: ^4.8.14
|
||||||
watermark-js-plus: ^1.5.7
|
watermark-js-plus: ^1.5.7
|
||||||
zod: ^3.23.8
|
zod: ^3.23.8
|
||||||
zod-defaults: ^0.1.3
|
zod-defaults: ^0.1.3
|
||||||
|
Loading…
Reference in New Issue
Block a user