完善页面

This commit is contained in:
wangxiaowei
2025-08-28 18:20:17 +08:00
parent fdaa01f801
commit e1a4f57610
27 changed files with 953 additions and 178 deletions

View File

@ -7,8 +7,9 @@
使用Unibest开发版本号3.8.2
</div>
<div>开发规范</div>
1. 页面或组件添加方法的时候前面加上<b>handle</b>关键字除了插件相关内容如mescroll
### 开发规范
#### 1. 页面或组件添加方法的时候前面加上<b>handle</b>关键字除了插件相关内容如mescroll
```
handleConfirmHour: () => {
if (totalHour.value <= 0) {
toast.info('至少起订N小时')
@ -16,7 +17,9 @@
}
showReservePopup.value = false
},
2. 页面或组件传创建的方法需要以当前文件名称作为对象按照驼峰命名
```
#### 2. 页面或组件传创建的方法需要以当前文件名称作为对象按照驼峰命名
```
const detail = {
handleConfirmHour: () => {
if (totalHour.value <= 0) {
@ -26,7 +29,10 @@
showReservePopup.value = false
}
}
3. 页面或组件传创建的内部方法需要放在函数最下面这种方法前面不需要加上handle
```
#### 3. 页面或组件传创建的内部方法需要放在函数最下面这种方法前面不需要加上handle
```
const detail = {
handleConfirmHour: () => {
if (totalHour.value <= 0) {
@ -48,7 +54,10 @@
return `${year}-${month}-${day} ${hour}:${minute}`
}
}
4. 如果组件名称与定义的对象函数名冲突则对象函数名后面加上s
```
#### 4. 如果组件名称与定义的对象函数名冲突则对象函数名后面加上s
```
import coupon from '@/components/coupon/coupon.vue'
const coupons = {
handleConfirmHour: () => {
@ -70,4 +79,10 @@
return `${year}-${month}-${day} ${hour}:${minute}`
}
}
}
```
#### 5. 组件名称需按照PascalCase来写
```
import UserProfile from './components/UserProfile.vue';
在页面模板中按照 <user-profile></user-profile>来使用
```