mirror of
https://gitee.com/nicefold/seewis-soybean-plus.git
synced 2026-10-14 10:02:13 +08:00
chore(projects): release v2.0.0
This commit is contained in:
@@ -1,5 +1,83 @@
|
||||
# 更新日志
|
||||
|
||||
## [v2.0.0](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v1.2.1...v2.0.0) (2025-12-25)
|
||||
|
||||
### 🚀 新功能
|
||||
|
||||
- **components**:
|
||||
- 列设置新增滚动条处理 - by @m-xlsea [<samp>(6696d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/6696da52)
|
||||
- 优化文件上传组件提示内容 - by @m-xlsea [<samp>(7bd11)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7bd115bf)
|
||||
- 新增预设主题支持 - by @m-xlsea [<samp>(c1063)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/c1063e3e)
|
||||
- **docs**:
|
||||
- 新增 GitCode star 徽章 - by @m-xlsea [<samp>(5310d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/5310d352)
|
||||
- **hooks**:
|
||||
- 优化表格响应数据处理 - by @m-xlsea [<samp>(7d7f2)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7d7f28c4)
|
||||
- 完成表格 Hooks 改造 - by @m-xlsea [<samp>(46996)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4699654f)
|
||||
- 优化树形表格 hooks 封装 - by @m-xlsea [<samp>(ccbb7)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ccbb72c0)
|
||||
- **project**:
|
||||
- 优化业务代码语法格式 - by @m-xlsea [<samp>(7f04b)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7f04b119)
|
||||
- **projects**:
|
||||
- 项目适配 Soybean 2.0 - by @m-xlsea
|
||||
- 客户端管理新增状态修改开关 - by @m-xlsea [<samp>(ea6a9)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ea6a92cd)
|
||||
- Iframe 类型菜单传参更改 - by @m-xlsea [<samp>(bf3d5)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/bf3d5cb3)
|
||||
- 新增同步租户参数配置功能 - by @m-xlsea [<samp>(901a6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/901a65ad)
|
||||
- 新增关于页面 - by @m-xlsea [<samp>(7d851)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7d85127c)
|
||||
- 菜单新增布局选择支持 - by @m-xlsea [<samp>(13de6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/13de6fbb)
|
||||
- 优化控制台输出和 sql 导入文件 - by @m-xlsea [<samp>(bfb71)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/bfb7169e)
|
||||
- 登录记住密码加密保存 - by @m-xlsea [<samp>(90c52)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/90c52d97)
|
||||
- 使用 highlight.js 替换 monaco-editor - by @m-xlsea [<samp>(7dd7a)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7dd7a936)
|
||||
- 演示页面新增字段排序 demo - by @m-xlsea [<samp>(41c25)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/41c25dcd)
|
||||
- support pinning and unpinning of tabs - by @PChening [<samp>(b8a76)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b8a767d7)
|
||||
- hybrid layout mode auto select first deepest child menu - by @paynezhuang [<samp>(94019)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/9401925f)
|
||||
|
||||
### 🐞 Bug 修复
|
||||
|
||||
- **hooks**:
|
||||
- 修复 useTable 获取字段列表问题 - by @m-xlsea [<samp>(0f83c)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/0f83cf5f)
|
||||
- update pagination pageSize after data fetch. - by **Azir-11** [<samp>(64226)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/64226d9b)
|
||||
- **projects**:
|
||||
- 修复表单校验问题 - by @m-xlsea [<samp>(62fb9)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/62fb9d90)
|
||||
- 修复登录页面 logo 颜色问题 - by @m-xlsea [<samp>(27cae)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/27cae756)
|
||||
- 修复路由 name 与 path 不一致激活菜单异常问题 - by @m-xlsea [<samp>(789a6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/789a6bb9)
|
||||
- fix the incorrect judgment of home by pin tab. - by **Azir-11** [<samp>(62a43)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/62a43c39)
|
||||
- **project**:
|
||||
- 修复导出时查询参数错误问题 - by @m-xlsea [<samp>(52ad9)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/52ad93b2)
|
||||
- **table**:
|
||||
- 修复分页数据处理逻辑 - by @imtzc [<samp>(a59fd)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a59fdc58)
|
||||
- **template**:
|
||||
- 调整搜索模块的属性定义位置 - by @imtzc [<samp>(bb039)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/bb039eff)
|
||||
|
||||
### 🛠 优化
|
||||
|
||||
- **projects**:
|
||||
- 修复菜单代码质量问题 - by @m-xlsea [<samp>(6f349)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/6f34956e)
|
||||
- 优化注释规范 - by @m-xlsea [<samp>(4139a)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4139a729)
|
||||
- **styles**:
|
||||
- 优化属性表格展开列样式 - by @m-xlsea [<samp>(e40c3)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e40c37a0)
|
||||
|
||||
### 📖 文档
|
||||
|
||||
- **other**:
|
||||
- 优化 sql 插入语句 - by @m-xlsea [<samp>(f7d8d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f7d8d189)
|
||||
- 优化工作流相关菜单 - by @m-xlsea [<samp>(33155)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/3315552d)
|
||||
- 移除 cursor 文件夹 - by @m-xlsea [<samp>(5f950)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/5f950b46)
|
||||
- 修复模板处理工具类内容错误 - by @m-xlsea [<samp>(f6dcd)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f6dcded8)
|
||||
- **projects**:
|
||||
- 更新 cursor 规则 - by @m-xlsea [<samp>(e63fe)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e63fee59)
|
||||
|
||||
### 🏡 杂项
|
||||
|
||||
- **deps**:
|
||||
- update deps - by @soybeanjs [<samp>(ec9f9)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ec9f9af9)
|
||||
- update umo-editor deps - by @m-xlsea [<samp>(39f8d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/39f8d13b)
|
||||
- **styles**:
|
||||
- format code - by @soybeanjs [<samp>(098cd)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/098cd50e)
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/m-xlsea) [](https://github.com/soybeanjs) [](https://github.com/imtzc) [](https://github.com/paynezhuang) [](https://github.com/PChening) [](https://github.com/Azir-11) [](https://github.com/wenyuanw) [](https://github.com/CyberShen) [](https://github.com/Lruihao)
|
||||
[刘璐](mailto:hi.alue@qq.com), [CyberShen123](mailto:s.lijun@qq.com), [whyang](mailto:whyang9701@gmail.com), [HongxuanG](mailto:1359774872@qq.com), [NicholasLD](mailto:878639947@qq.com),
|
||||
|
||||
## [v2.0.0-beta.2](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2025-12-17)
|
||||
|
||||
### 🚀 新功能
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
# 📢 重要通知
|
||||
|
||||
2.0.0-beta2 版本已经正式发布(工作流版本请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议:
|
||||
2.0.0 版本已经正式发布(工作流版本请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议:
|
||||
- 在生产环境使用前进行充分测试
|
||||
- 关注项目更新,及时获取最新版本
|
||||
- 积极反馈问题,帮助我们快速迭代
|
||||
|
||||
Vendored
-1
@@ -212,7 +212,6 @@ function handleExport() {
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
size="small"
|
||||
:indent="64"
|
||||
:flex-height="!appStore.isMobile"
|
||||
:scroll-x="scrollX"
|
||||
:loading="loading"
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
const treeList = ref<Api.Demo.Tree[]>([]);
|
||||
#end
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -152,7 +152,7 @@ const treeOptions = computed(() => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
#set($immediateDictList = [])
|
||||
#foreach($column in $columns)
|
||||
#set($field=$column.javaField)
|
||||
|
||||
Vendored
+2
-2
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||
@@ -61,7 +61,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="$moduleName-${business__name}-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
#set($immediateDictList = [])
|
||||
#foreach($column in $columns)
|
||||
|
||||
+11
-11
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ruoyi-vue-plus",
|
||||
"type": "module",
|
||||
"version": "2.0.0-beta.2",
|
||||
"version": "2.0.0",
|
||||
"description": "结合了 RuoYi-Vue-Plus 的强大后端功能和 Soybean Admin 的现代化前端特性,为开发者提供了完整的企业管理解决方案。",
|
||||
"author": {
|
||||
"name": "xlsea",
|
||||
@@ -80,19 +80,19 @@
|
||||
"pinia": "3.0.4",
|
||||
"streamsaver": "^2.0.6",
|
||||
"tailwind-merge": "3.4.0",
|
||||
"vue": "3.5.25",
|
||||
"vue": "3.5.26",
|
||||
"vue-advanced-cropper": "^2.8.9",
|
||||
"vue-draggable-plus": "0.6.0",
|
||||
"vue-i18n": "11.2.2",
|
||||
"vue-router": "4.6.3"
|
||||
"vue-i18n": "11.2.7",
|
||||
"vue-router": "4.6.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@elegant-router/vue": "0.3.8",
|
||||
"@iconify/json": "2.2.414",
|
||||
"@iconify/json": "2.2.417",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.7.4",
|
||||
"@types/node": "24.10.1",
|
||||
"@types/node": "25.0.3",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@unocss/eslint-config": "66.5.10",
|
||||
"@unocss/preset-icons": "66.5.10",
|
||||
@@ -100,24 +100,24 @@
|
||||
"@unocss/transformer-directives": "66.5.10",
|
||||
"@unocss/transformer-variant-group": "66.5.10",
|
||||
"@unocss/vite": "66.5.10",
|
||||
"@vitejs/plugin-vue": "6.0.2",
|
||||
"@vitejs/plugin-vue": "6.0.3",
|
||||
"@vitejs/plugin-vue-jsx": "5.1.2",
|
||||
"consola": "3.4.2",
|
||||
"eslint": "9.39.1",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-plugin-vue": "10.6.2",
|
||||
"kolorist": "1.8.0",
|
||||
"sass": "1.94.2",
|
||||
"sass": "1.97.1",
|
||||
"simple-git-hooks": "2.13.1",
|
||||
"tsx": "4.21.0",
|
||||
"typescript": "5.9.3",
|
||||
"unplugin-icons": "22.5.0",
|
||||
"unplugin-vue-components": "30.0.0",
|
||||
"vite": "7.2.6",
|
||||
"vite": "7.3.0",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
"vite-plugin-svg-icons": "2.0.1",
|
||||
"vite-plugin-vue-devtools": "8.0.5",
|
||||
"vue-eslint-parser": "10.2.0",
|
||||
"vue-tsc": "3.1.5"
|
||||
"vue-tsc": "3.2.1"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"commit-msg": "pnpm sa git-commit-verify",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/alova",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./fetch": "./src/fetch.ts",
|
||||
@@ -13,8 +13,8 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@alova/mock": "2.0.17",
|
||||
"@alova/mock": "2.0.18",
|
||||
"@sa/utils": "workspace:*",
|
||||
"alova": "3.4.0"
|
||||
"alova": "3.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/axios",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/color",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/hooks",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/materials",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"bin": {
|
||||
"sa": "./bin.ts"
|
||||
},
|
||||
@@ -15,13 +15,13 @@
|
||||
"devDependencies": {
|
||||
"@soybeanjs/changelog": "0.3.25",
|
||||
"bumpp": "10.3.2",
|
||||
"c12": "3.3.2",
|
||||
"c12": "3.3.3",
|
||||
"cac": "6.7.14",
|
||||
"consola": "3.4.2",
|
||||
"enquirer": "2.4.1",
|
||||
"execa": "9.6.1",
|
||||
"kolorist": "1.8.0",
|
||||
"npm-check-updates": "19.1.2",
|
||||
"npm-check-updates": "19.2.0",
|
||||
"picomatch": "4.0.3",
|
||||
"rimraf": "6.1.2"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/uno-preset",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/utils",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
||||
Generated
+799
-1045
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, useAttrs } from 'vue';
|
||||
<script setup lang="tsx">
|
||||
import { computed, defineComponent, useAttrs } from 'vue';
|
||||
import type { UploadFileInfo, UploadProps } from 'naive-ui';
|
||||
import type { JSX } from 'vue/jsx-runtime';
|
||||
import { fetchBatchDeleteOss } from '@/service/api/system/oss';
|
||||
import { getToken } from '@/store/modules/auth/shared';
|
||||
import { getServiceBaseURL } from '@/utils/service';
|
||||
@@ -46,6 +47,53 @@ const fileList = defineModel<UploadFileInfo[]>('fileList', {
|
||||
default: () => []
|
||||
});
|
||||
|
||||
const TooltipContent = defineComponent({
|
||||
setup() {
|
||||
const startTip = <>请上传</>;
|
||||
|
||||
const maxTip = (
|
||||
<>
|
||||
数量不超过
|
||||
<b class="text-info"> {props.max}个</b>,
|
||||
</>
|
||||
);
|
||||
|
||||
const fileSizeTip = (
|
||||
<>
|
||||
大小不超过
|
||||
<b class="text-info"> {props.fileSize}MB</b>,
|
||||
</>
|
||||
);
|
||||
|
||||
const acceptTip = (
|
||||
<>
|
||||
格式为
|
||||
<b class="text-info"> {props.accept?.replaceAll(',', ', ')} </b>
|
||||
</>
|
||||
);
|
||||
|
||||
const tips: JSX.Element[] = [];
|
||||
if (props.max) tips.push(maxTip);
|
||||
if (props.fileSize) tips.push(fileSizeTip);
|
||||
if (props.accept) tips.push(acceptTip);
|
||||
|
||||
const endTip = (
|
||||
<>
|
||||
{tips.length ? '的' : ''}
|
||||
{props.uploadType === 'file' ? '文件' : '图片'}
|
||||
</>
|
||||
);
|
||||
|
||||
return () => (
|
||||
<NP depth={3}>
|
||||
{startTip}
|
||||
{tips.map(tip => tip)}
|
||||
{endTip}
|
||||
</NP>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
const isHttpProxy = import.meta.env.DEV && import.meta.env.VITE_HTTP_PROXY === 'Y';
|
||||
const { baseURL } = getServiceBaseURL(import.meta.env, isHttpProxy);
|
||||
|
||||
@@ -151,32 +199,13 @@ async function handleRemove(file: UploadFileInfo) {
|
||||
<SvgIcon icon="material-symbols:unarchive-outline" class="text-58px color-#d8d8db dark:color-#a1a1a2" />
|
||||
</div>
|
||||
<NText class="text-16px">点击或者拖动文件到该区域来上传</NText>
|
||||
<NP v-if="showTip" depth="3" class="mt-8px text-center">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过
|
||||
<b class="text-red-500">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="accept">
|
||||
,且格式为
|
||||
<b class="text-red-500">{{ accept.replaceAll(',', '/') }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</NP>
|
||||
<TooltipContent v-if="showTip" class="mt-8px text-center" />
|
||||
</NUploadDragger>
|
||||
<NUploadDragger v-else>
|
||||
<SvgIcon icon="material-symbols:image-arrow-up-outline" class="text-58px color-#d8d8db dark:color-#a1a1a2" />
|
||||
</NUploadDragger>
|
||||
</NUpload>
|
||||
<NP v-if="showTip && uploadType === 'image'" depth="3" class="mt-12px">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过
|
||||
<b class="text-red-500">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="accept">
|
||||
,且格式为
|
||||
<b class="text-red-500">{{ accept.replaceAll(',', '/') }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</NP>
|
||||
<TooltipContent v-if="showTip && uploadType === 'image'" class="mt-12px" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -463,7 +463,11 @@ function getColumns<Column extends NaiveUI.TableColumn<any>>(cols: Column[], che
|
||||
}
|
||||
});
|
||||
|
||||
const filteredColumns = checks.filter(item => item.checked).map(check => columnMap.get(check.key) as Column);
|
||||
// Filter out any checks that do not have a corresponding column (can happen when column definitions change).
|
||||
const filteredColumns = checks
|
||||
.filter(item => item.checked)
|
||||
.map(check => columnMap.get(check.key))
|
||||
.filter((col): col is Column => Boolean(col));
|
||||
|
||||
return filteredColumns;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ defineOptions({
|
||||
});
|
||||
|
||||
const { toggleLoginModule } = useRouterPush();
|
||||
const { validate } = useNaiveForm();
|
||||
const { formRef, validate } = useNaiveForm();
|
||||
const { label, isCounting, loading, getCaptcha } = useCaptcha();
|
||||
|
||||
interface FormModel {
|
||||
@@ -44,7 +44,7 @@ async function handleSubmit() {
|
||||
{{ $t('page.login.codeLogin.title') }}
|
||||
</div>
|
||||
<div class="pb-18px text-16px text-#858585">请输入您的手机号,我们将发送验证码到您的手机</div>
|
||||
<NForm :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||
<NFormItem path="phone">
|
||||
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -9,7 +9,7 @@ defineOptions({
|
||||
});
|
||||
|
||||
const { toggleLoginModule } = useRouterPush();
|
||||
const { validate } = useNaiveForm();
|
||||
const { formRef, validate } = useNaiveForm();
|
||||
|
||||
interface FormModel {
|
||||
phone: string;
|
||||
@@ -50,7 +50,7 @@ async function handleSubmit() {
|
||||
{{ $t('page.login.resetPwd.title') }}
|
||||
</div>
|
||||
<div class="pb-18px text-16px text-#858585">请输入您的手机号,我们将发送验证码到您的手机</div>
|
||||
<NForm :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||
<NFormItem path="phone">
|
||||
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -28,7 +28,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -110,7 +110,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem label="部门" path="deptId">
|
||||
<DeptTreeSelect v-model:value="model.deptId" placeholder="请选择部门" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.Demo.DemoSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="demo-demo-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="部门 ID" label-width="auto" path="deptId" class="pr-24px">
|
||||
<DeptTreeSelect v-model:value="model.deptId" placeholder="请选择部门" />
|
||||
|
||||
@@ -212,7 +212,6 @@ function handleExport() {
|
||||
v-model:expanded-row-keys="expandedRowKeys"
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
:indent="64"
|
||||
:flex-height="!appStore.isMobile"
|
||||
:scroll-x="scrollX"
|
||||
:loading="loading"
|
||||
|
||||
@@ -31,7 +31,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
|
||||
const treeList = ref<Api.Demo.Tree[]>([]);
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -131,7 +131,7 @@ const treeOptions = computed(() => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem label="父 ID" path="parentId">
|
||||
<NTreeSelect
|
||||
v-model:value="model.parentId"
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.Demo.TreeSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="demo-tree-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="树节点名" label-width="auto" path="treeName" class="pr-24px">
|
||||
<NInput v-model:value="model.treeName" placeholder="请输入树节点名" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeLoginTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -50,7 +50,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="IP地址" path="ipaddr" class="pr-24px">
|
||||
<NInput v-model:value="model.ipaddr" placeholder="请输入登录IP地址" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.Monitor.OnlineUserSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:8" label="IP地址" path="ipaddr" class="pr-24px">
|
||||
<NInput v-model:value="model.ipaddr" placeholder="请输入IP地址" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeOperTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -50,7 +50,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="系统模块" path="title" class="pr-24px">
|
||||
<NInput v-model:value="model.title" placeholder="请输入系统模块" />
|
||||
|
||||
@@ -28,7 +28,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -133,7 +133,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem v-if="operateType === 'edit'" :label="$t('page.system.client.clientId')" path="clientId">
|
||||
<NInput
|
||||
v-model:value="model.clientId"
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.System.ClientSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="90">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="90">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi
|
||||
span="24 s:12 m:6"
|
||||
|
||||
@@ -28,7 +28,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -106,7 +106,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.config.configName')" path="configName">
|
||||
<NInput v-model:value="model.configName" :placeholder="$t('page.system.config.form.configName.required')" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -53,7 +53,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi
|
||||
span="24 s:12 m:6"
|
||||
|
||||
@@ -49,7 +49,8 @@ const {
|
||||
key: 'deptName',
|
||||
title: $t('page.system.dept.deptName'),
|
||||
align: 'center',
|
||||
minWidth: 180
|
||||
width: 230,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
key: 'deptCategory',
|
||||
@@ -198,7 +199,6 @@ function addInRow(row: Api.System.Dept) {
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
size="small"
|
||||
:indent="64"
|
||||
:flex-height="!appStore.isMobile"
|
||||
:scroll-x="scrollX"
|
||||
:loading="loading"
|
||||
|
||||
@@ -32,7 +32,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule, patternRules } = useFormRules();
|
||||
|
||||
const { loading: deptLoading, startLoading: startDeptLoading, endLoading: endDeptLoading } = useLoading();
|
||||
@@ -188,7 +188,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem v-if="model.parentId !== 0" :label="$t('page.system.dept.parentId')" path="parentId">
|
||||
<NTreeSelect
|
||||
v-model:value="model.parentId"
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const { options: sysNormalDisableOptions } = useDict('sys_normal_disable', false);
|
||||
|
||||
@@ -43,7 +43,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:8" :label="$t('page.system.dept.deptName')" path="deptName" class="pr-24px">
|
||||
<NInput v-model:value="model.deptName" :placeholder="$t('page.system.dept.form.deptName.required')" />
|
||||
|
||||
@@ -31,7 +31,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -152,7 +152,7 @@ function renderTagLabel(option: { label: string; value: string }) {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.dict.dictType')" path="dictType">
|
||||
<NInput
|
||||
v-model:value="model.dictType"
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.System.DictDataSearchParams>('model', { required: true });
|
||||
|
||||
@@ -41,7 +41,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi
|
||||
span="24 s:12 m:12"
|
||||
|
||||
@@ -28,7 +28,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -103,7 +103,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.dict.dictName')" path="dictName">
|
||||
<NInput v-model:value="model.dictName" :placeholder="$t('page.system.dict.form.dictName.required')" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -24,7 +24,7 @@ const menuTreeRef = ref<InstanceType<typeof MenuTree> | null>(null);
|
||||
const menuOptions = ref<Api.System.MenuList>([]);
|
||||
const { loading: menuLoading } = useLoading();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
type Model = {
|
||||
@@ -92,7 +92,7 @@ watch(visible, () => {
|
||||
class="max-w-90% w-500px"
|
||||
@close="closeDrawer"
|
||||
>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :show-label="false" path="menuIds">
|
||||
<MenuTree
|
||||
v-if="visible"
|
||||
|
||||
@@ -43,7 +43,7 @@ const defaultIcon = import.meta.env.VITE_MENU_ICON;
|
||||
|
||||
const layoutType = ref<string>('0');
|
||||
const iconType = ref<Api.System.IconType>('1');
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule, createNumberRequiredRule } = useFormRules();
|
||||
const queryList = ref<{ key: string; value: string }[]>([]);
|
||||
|
||||
@@ -294,7 +294,7 @@ function onCreate() {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" display-directive="show" :width="600" class="max-w-90%">
|
||||
<NDrawerContent :title="drawerTitle" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi :span="24" :label="$t('page.system.menu.parentId')" path="pid">
|
||||
<MenuTreeSelect
|
||||
|
||||
@@ -30,7 +30,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
});
|
||||
|
||||
const umoEditorRef = ref<InstanceType<typeof UmoEditor>>();
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -116,7 +116,7 @@ watch(visible, () => {
|
||||
class="max-w-90%"
|
||||
>
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<div class="grid grid-cols-1 gap-16px md:grid-cols-4">
|
||||
<NFormItem class="col-span-2" label="公告标题" path="noticeTitle">
|
||||
<NInput v-model:value="model.noticeTitle" placeholder="请输入公告标题" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.System.NoticeSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:8" label="公告标题" path="noticeTitle" class="pr-24px">
|
||||
<NInput v-model:value="model.noticeTitle" placeholder="请输入公告标题" />
|
||||
|
||||
@@ -29,7 +29,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -157,7 +157,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NDivider>基本信息</NDivider>
|
||||
<NFormItem label="配置名称" path="configKey">
|
||||
<NInput v-model:value="model.configKey" placeholder="请输入配置名称" />
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const isDefaltOptions = ref<SelectOption[]>([
|
||||
{
|
||||
@@ -52,7 +52,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="配置名称" path="configKey" class="pr-24px">
|
||||
<NInput v-model:value="model.configKey" placeholder="请输入配置名称" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -53,7 +53,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="100">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="100">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="文件名" path="fileName" class="pr-24px">
|
||||
<NInput v-model:value="model.fileName" placeholder="请输入文件名" />
|
||||
|
||||
@@ -53,7 +53,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NModal
|
||||
v-model:show="visible"
|
||||
class="max-h-520px max-w-90% w-600px"
|
||||
class="max-h-520px max-w-90% w-690px"
|
||||
preset="card"
|
||||
:title="`上传${uploadType === 'file' ? '文件' : '图片'}`"
|
||||
size="huge"
|
||||
|
||||
@@ -31,7 +31,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
const { loading: deptLoading, startLoading: startDeptLoading, endLoading: endDeptLoading } = useLoading();
|
||||
const title = computed(() => {
|
||||
@@ -124,7 +124,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem label="归属部门" path="deptId">
|
||||
<NTreeSelect
|
||||
v-model:value="model.deptId"
|
||||
|
||||
@@ -16,7 +16,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.System.PostSearchParams>('model', { required: true });
|
||||
|
||||
@@ -44,7 +44,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="岗位编码" path="postCode" class="pr-24px">
|
||||
<NInput v-model:value="model.postCode" placeholder="请输入岗位编码" />
|
||||
|
||||
@@ -34,7 +34,7 @@ const deptOptions = ref<Api.System.Dept[]>([]);
|
||||
|
||||
const { loading: deptLoading, startLoading: startDeptLoading, endLoading: endDeptLoading } = useLoading();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => '分配数据权限');
|
||||
@@ -113,7 +113,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem label="角色名称" path="roleName">
|
||||
<NInput v-model:value="model.roleName" disabled placeholder="请输入角色名称" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -40,7 +40,7 @@ const menuOptions = ref<Api.System.MenuList>([]);
|
||||
|
||||
const { loading: menuLoading, startLoading: startMenuLoading, endLoading: stopMenuLoading } = useLoading();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -149,7 +149,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem label="角色名称" path="roleName">
|
||||
<NInput v-model:value="model.roleName" placeholder="请输入角色名称" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -56,7 +56,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="角色名称" path="roleName" class="pr-24px">
|
||||
<NInput v-model:value="model.roleName" placeholder="请输入角色名称" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="tsx">
|
||||
import { defineOptions, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { NDivider } from 'naive-ui';
|
||||
import {
|
||||
fetchBatchDeleteTenantPackage,
|
||||
|
||||
@@ -37,7 +37,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -135,7 +135,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.tenantPackage.packageName')" path="packageName">
|
||||
<NInput
|
||||
v-model:value="model.packageName"
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const { options: sysNormalDisableOptions } = useDict('sys_normal_disable', false);
|
||||
|
||||
@@ -43,7 +43,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi
|
||||
span="24 s:12 m:8"
|
||||
|
||||
@@ -30,7 +30,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule, patternRules } = useFormRules();
|
||||
const { loading: packageLoading, startLoading: startPackageLoading, endLoading: endPackageLoading } = useLoading();
|
||||
const title = computed(() => {
|
||||
@@ -203,7 +203,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" :title="title" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NDivider>基本信息</NDivider>
|
||||
<NFormItem label="企业名称" path="companyName">
|
||||
<NInput v-model:value="model.companyName" placeholder="请输入企业名称" />
|
||||
|
||||
@@ -14,7 +14,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.System.TenantSearchParams>('model', { required: true });
|
||||
|
||||
@@ -40,7 +40,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="租户编号" path="tenantId" class="pr-24px">
|
||||
<NInput v-model:value="model.tenantId as string" placeholder="请输入租户编号" />
|
||||
|
||||
@@ -35,7 +35,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
|
||||
const { loading, startLoading, endLoading } = useLoading();
|
||||
const { loading: deptLoading, startLoading: startDeptLoading, endLoading: endDeptLoading } = useLoading();
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { createRequiredRule, patternRules } = useFormRules();
|
||||
|
||||
const title = computed(() => {
|
||||
@@ -173,7 +173,7 @@ watch(visible, () => {
|
||||
<NDrawer v-model:show="visible" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent :title="title" :native-scrollbar="false" closable>
|
||||
<NSpin :show="loading">
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.user.nickName')" path="nickName">
|
||||
<NInput v-model:value="model.nickName" :placeholder="$t('page.system.user.form.nickName.required')" />
|
||||
</NFormItem>
|
||||
|
||||
@@ -25,7 +25,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
default: false
|
||||
});
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
const { patternRules } = useFormRules();
|
||||
|
||||
type Model = Api.System.UserOperateParams & { deptName: string };
|
||||
@@ -82,7 +82,7 @@ watch(visible, () => {
|
||||
<template>
|
||||
<NDrawer v-model:show="visible" display-directive="show" :width="800" class="max-w-90%">
|
||||
<NDrawerContent title="重置密码" :native-scrollbar="false" closable>
|
||||
<NForm :model="model" :rules="rules">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.system.user.nickName')" path="nickName">
|
||||
<NInput v-model:value="model.nickName" disabled />
|
||||
</NFormItem>
|
||||
|
||||
@@ -16,7 +16,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
||||
|
||||
@@ -55,7 +55,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="table-search card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.system.user.userName')" path="userName" class="pr-24px">
|
||||
<NInput v-model:value="model.userName" :placeholder="$t('page.system.user.form.userName.required')" />
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.Tool.GenTableDbSearchParams>('model', { required: true });
|
||||
|
||||
@@ -42,7 +42,7 @@ async function search() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12" label="数据源" label-width="auto" path="dataName" class="pr-24px">
|
||||
<NSelect v-model:value="model.dataName" :options="options" placeholder="请选择数据源" />
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { validate, restoreValidation } = useNaiveForm();
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const model = defineModel<Api.Tool.GenTableSearchParams>('model', { required: true });
|
||||
|
||||
@@ -57,7 +57,7 @@ async function search() {
|
||||
<NCard :bordered="false" size="small" class="card-wrapper">
|
||||
<NCollapse>
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm :model="model" label-placement="left" :label-width="80">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi span="24 s:12 m:6" label="数据源" label-width="auto" path="dataName" class="pr-24px">
|
||||
<NSelect v-model:value="model.dataName" :options="options" placeholder="请选择数据源" />
|
||||
|
||||
Reference in New Issue
Block a user