Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into offline-icon

This commit is contained in:
dap 2024-11-08 07:54:57 +08:00
commit c7de008079
8 changed files with 19 additions and 14 deletions

View File

@ -112,7 +112,7 @@ export type * from '@vben/plugins/vxe-table';
## 树形表格
树形表格的数据源为扁平结构,可以指定`treeConfig`配置项,实现树形表格。
树形表格的数据源为扁平结构,可以指定`treeConfig`配置项,实现树形表格。
```typescript
treeConfig: {
@ -224,8 +224,6 @@ useVbenVxeGrid 返回的第二个参数,是一个对象,包含了一些表
| grid | vxe-table grid实例 | `VxeGridInstance` |
| formApi | vbenForm api实例 | `FormApi` |
### Props
## Props
所有属性都可以传入 `useVbenVxeGrid` 的第一个参数中。

View File

@ -72,7 +72,7 @@ const { b, e, is } = useNamespace('menu');
</template>
<style lang="scss" scoped>
// If you use it within the application, this line of code can be omitted as it has already been globally introduced in all applications
@import '@vben/styles/global';
@use '@vben/styles/global' as *;
@include b('menu') {
color: black;

View File

@ -72,7 +72,7 @@ const { b, e, is } = useNamespace('menu');
</template>
<style lang="scss" scoped>
// 如果你在应用内使用,这行代码可以省略,已经在所有的应用内全局引入了
@import '@vben/styles/global';
@use '@vben/styles/global' as *;
@include b('menu') {
color: black;

View File

@ -109,7 +109,7 @@ function createCssOptions(injectGlobalScss = true) {
const relativePath = relative(root, filepath);
// apps下的包注入全局样式
if (relativePath.startsWith(`apps${path.sep}`)) {
return `@import "@vben/styles/global";\n${content}`;
return `@use "@vben/styles/global" as *;\n${content}`;
}
return content;
},

View File

@ -253,6 +253,7 @@ export class FormApi {
}
unmount() {
this.form?.resetForm?.();
// this.state = null;
this.isMounted = false;
this.stateHandler.reset();

View File

@ -11,6 +11,7 @@ import {
computed,
nextTick,
onMounted,
onUnmounted,
toRaw,
useSlots,
useTemplateRef,
@ -261,6 +262,11 @@ onMounted(() => {
props.api?.mount?.(gridRef.value, formApi);
init();
});
onUnmounted(() => {
formApi?.unmount?.();
props.api?.unmount?.();
});
</script>
<template>

View File

@ -1 +1 @@
@import '@vben-core/design/bem';
@use '@vben-core/design/bem' as *;

View File

@ -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.268
'@iconify/json': ^2.2.269
'@iconify/tailwind': ^1.1.3
'@iconify/vue': ^4.1.2
'@intlify/core-base': ^10.0.4
@ -36,7 +36,7 @@ catalog:
'@stylistic/stylelint-plugin': ^3.1.1
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
'@tailwindcss/typography': ^0.5.15
'@tanstack/vue-query': ^5.59.17
'@tanstack/vue-query': ^5.59.20
'@tanstack/vue-store': ^0.5.6
'@types/archiver': ^6.0.3
'@types/eslint': ^9.6.1
@ -74,7 +74,7 @@ catalog:
commitlint-plugin-function-rules: ^4.0.1
consola: ^3.2.3
cross-env: ^7.0.3
cspell: ^8.15.7
cspell: ^8.16.0
cssnano: ^7.0.6
cz-git: ^1.10.1
czg: ^1.10.1
@ -91,7 +91,7 @@ catalog:
eslint-plugin-import-x: ^4.4.0
eslint-plugin-jsdoc: ^50.4.3
eslint-plugin-jsonc: ^2.16.0
eslint-plugin-n: ^17.12.0
eslint-plugin-n: ^17.13.1
eslint-plugin-no-only-tests: ^3.3.0
eslint-plugin-perfectionist: ^3.9.1
eslint-plugin-prettier: ^5.2.1
@ -105,7 +105,7 @@ catalog:
get-port: ^7.1.0
globals: ^15.12.0
h3: ^1.13.0
happy-dom: ^15.10.1
happy-dom: ^15.11.0
html-minifier-terser: ^7.2.0
husky: ^9.1.6
is-ci: ^3.0.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.42
vxe-table: ^4.8.1
vxe-pc-ui: ^4.2.45
vxe-table: ^4.8.2
watermark-js-plus: ^1.5.7
zod: ^3.23.8
zod-defaults: ^0.1.3