签入版本

This commit is contained in:
2026-10-08 17:50:29 +08:00
parent 809750b47e
commit e213a9b31d
444 changed files with 39366 additions and 37533 deletions
@@ -28,8 +28,8 @@ const [registerForm] = useForm({
component: 'Select',
componentProps: {
options: [
{ label: '启用', value: 1 },
{ label: '禁用', value: 0 },
{ label: '在用', value: 1 },
{ label: '停用', value: 2 },
],
},
},
@@ -38,6 +38,10 @@ const [registerForm] = useForm({
</script>
```
:::tip 前端校验与后端 FormRequest 的关系
`schemas` 的 `required`/校验规则是**体验层**(即时提示);后端 `Http/Requests/*.php` 的 `rules()` 才是**最终防线**。两边规则应保持一致(如 max 长度、in 枚举值),以后端为准。
:::
## Modal 弹窗组件
```vue
@@ -73,10 +77,14 @@ const handleSubmit = async () => {
<script setup>
import { BasicUpload } from '@/components/Upload';
const uploadUrl = '/api/upload/uploadFile';
const uploadUrl = '/api/upload/uploadFile'; // 需认证 + sys:upload:file 权限
</script>
```
:::tip 上传字段值
绑定值建议存 `filePath`(相对路径),Service 的 `fileFields` 归一化入库、读取时自动补全域名。详见 [7.1 文件上传全流程](/zh/tools/upload.html)。
:::
## Editor 富文本编辑器
```vue
@@ -89,6 +97,8 @@ import Editor from '@/components/Editor/index.vue';
</script>
```
(后端需在 Service 配置 `contentFields` 启用 `[IMG_URL]` 占位处理,见 [7.3 富文本处理](/zh/tools/rich-text.html)。)
## Password 密码强度组件
```vue
@@ -101,6 +111,8 @@ import { Password } from '@/components/Password';
</script>
```
(后端密码策略为 bcrypt 双重加盐,`BCRYPT_ROUNDS=12`,见 [5.6 密码加密服务](/zh/core/password.html)。)
## ChinaArea 行政区划组件
```vue
@@ -111,4 +123,6 @@ import { Password } from '@/components/Password';
<script setup>
import ChinaArea from '@/components/ChinaArea/index.vue';
</script>
```
```
(数据来自后端 `/api/city/*` 级联接口,`city` 值为四层数组 `[省,市,区,街道]`,见 [6.9 行政区划管理](/zh/modules/city.html)。)