feat:设备使用记录

This commit is contained in:
houjunxiang
2026-03-05 16:54:47 +08:00
parent 749ac7f507
commit 9c88c45d66
357 changed files with 21486 additions and 5845 deletions

View File

@@ -1,11 +1,11 @@
/*
* @Author : LQ
* @Description :
* @version : 1.0
* @version : 3.0
* @Date : 2021-08-20 16:44:21
* @LastAuthor : LQ
* @lastTime : 2021-08-20 17:03:49
* @FilePath : /u-view2.0/uview-ui/libs/config/props/form.js
* @LastAuthor : jry
* @lastTime : 2025-12-19 08:55:21
* @FilePath : /uview-plus/libs/config/props/form.js
*/
export default {
// form 组件

View File

@@ -16,7 +16,7 @@
/**
* Form 表单
* @description 此组件一般用于表单场景可以配置Input输入框Select弹出框进行表单验证等。
* @tutorial https://ijry.github.io/uview-plus/components/form.html
* @tutorial https://uview-plus.jiangruyi.com/components/form.html
* @property {Object} model 当前form的需要验证字段的集合
* @property {Object | Function | Array} rules 验证规则
* @property {String} errorType 错误的提示方式,见上方说明 ( 默认 message )
@@ -25,10 +25,10 @@
* @property {String | Number} labelWidth 提示文字的宽度单位px ( 默认 45
* @property {String} labelAlign lable字体的对齐方式 ( 默认 left'
* @property {Object} labelStyle lable的样式对象形式
* @example <up-formlabelPosition="left" :model="model1" :rules="rules" ref="form1"></up-form>
* @example <up-form labelPosition="left" :model="model1" :rules="rules" ref="form1"></up-form>
*/
export default {
name: "u-form",
name: "up-form",
mixins: [mpMixin, mixin, props],
provide() {
return {
@@ -126,7 +126,7 @@
});
},
// 对部分表单字段进行校验
async validateField(value, callback, event = null) {
async validateField(value, callback, event = null,options) {
// $nextTick是必须的否则model的变更可能会延后于此方法的执行
this.$nextTick(() => {
// 校验错误信息返回给回调方法用于存放所有form-item的错误信息
@@ -191,9 +191,11 @@
errorsRes.push(...errors);
childErrors.push(...errors);
}
child.message =
childErrors[0]?.message ? childErrors[0].message : null;
//没有配置或者配置了showErrorMsg为true时候才修改子组件message默认没有配置
if(!options||options?.showErrorMsg==true){
child.message =
childErrors[0]?.message ? childErrors[0].message : null;
}
if (i == (rules.length - 1)) {
resolve(errorsRes)
}
@@ -217,8 +219,12 @@
});
});
},
// 校验全部数据
validate(callback) {
/**
* 校验全部数据
* @param {Object} options
* @param {Boolean} options.showErrorMsg -是否显示校验信息,
*/
validate(options) {
// 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development' && Object.keys(this.formRules).length === 0) {
error('未设置rules请看文档说明如果已经设置请刷新页面。');
@@ -240,7 +246,7 @@
} else {
resolve(true)
}
});
},null,options);
});
});
},