升级uni-ui到最新版本1.5.7

This commit is contained in:
RuoYi
2025-03-25 16:58:54 +08:00
parent dae8945a43
commit 315832d151
127 changed files with 7327 additions and 5066 deletions

View File

@@ -36,7 +36,7 @@
* @tutorial https://ext.dcloud.net.cn/plugin?id=2773
* @property {Boolean} required 是否必填,左边显示红色"*"号
* @property {String } label 输入框左边的文字提示
* @property {Number } labelWidth label的宽度单位px默认65
* @property {Number } labelWidth label的宽度单位px默认70
* @property {String } labelAlign = [left|center|right] label的文字对齐方式默认left
* @value left label 左侧显示
* @value center label 居中
@@ -56,8 +56,13 @@
export default {
name: 'uniFormsItem',
options: {
virtualHost: true
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
provide() {
return {
@@ -91,7 +96,7 @@
type: String,
default: ''
},
// label的宽度 ,默认 80
// label的宽度
labelWidth: {
type: [String, Number],
default: ''
@@ -128,7 +133,7 @@
errMsg: '',
userRules: null,
localLabelAlign: 'left',
localLabelWidth: '65px',
localLabelWidth: '70px',
localLabelPos: 'left',
border: false,
isFirstBorder: false,
@@ -413,9 +418,9 @@
// const {
// labelWidth
// } = this.form
return this.num2px(this.labelWidth ? this.labelWidth : (labelWidth || (this.label ? 65 : 'auto')))
return this.num2px(this.labelWidth ? this.labelWidth : (labelWidth || (this.label ? 70 : 'auto')))
// }
// return '65px'
// return '70px'
},
// 处理 label 位置
_labelPosition() {

View File

@@ -52,7 +52,7 @@
* @property {String} labelPosition = [top|left] label 位置 默认 left
* @value top 顶部显示 label
* @value left 左侧显示 label
* @property {String} labelWidth label 宽度,默认 65px
* @property {String} labelWidth label 宽度,默认 70px
* @property {String} labelAlign = [left|center|right] label 居中方式 默认 left
* @value left label 左侧显示
* @value center label 居中
@@ -67,8 +67,13 @@
export default {
name: 'uniForms',
emits: ['validate', 'submit'],
options: {
virtualHost: true
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
props: {
// 即将弃用
@@ -180,15 +185,17 @@
}
}
if (!formVm) return console.error('当前 uni-froms 组件缺少 ref 属性');
formVm.setValue(name, value);
if(formVm.model)formVm.model[name] = value
if(formVm.modelValue)formVm.modelValue[name] = value
if(formVm.value)formVm.value[name] = value
}
}
}
// #endif
// 子组件实例数组
this.childrens = []
// TODO 兼容旧版 uni-data-picker ,新版本中无效,只是避免报错
this.childrens = []
// TODO 兼容旧版 uni-data-picker ,新版本中无效,只是避免报错
this.inputChildrens = []
this.setRules(this.rules)
},
@@ -394,4 +401,4 @@
<style lang="scss">
.uni-forms {}
</style>
</style>