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-23 21:06:59
* @FilePath : /u-view2.0/uview-ui/libs/config/props/checkbox.js
* @LastAuthor : jry
* @lastTime : 2025-12-19 08:55:21
* @FilePath : /uview-plus/libs/config/props/checkbox.js
*/
export default {
// checkbox组件

View File

@@ -12,7 +12,7 @@
:style="[iconWrapStyle]"
>
<slot name="icon" :elIconSize="elIconSize" :elIconColor="elIconColor">
<u-icon
<up-icon
class="u-checkbox__icon-wrap__icon"
name="checkbox-mark"
:size="elIconSize"
@@ -177,7 +177,7 @@
const style = {}
if (!this.usedAlone) {
if (this.parentData.borderBottom && this.parentData.placement === 'row') {
error('检测到您将borderBottom设置为true需要同时将u-checkbox-group的placement设置为column才有效')
error('检测到您将borderBottom设置为true需要同时将up-checkbox-group的placement设置为column才有效')
}
// 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
if (this.parentData.borderBottom && this.parentData.placement === 'column') {
@@ -197,13 +197,14 @@
// 支付宝小程序不支持provide/inject所以使用这个方法获取整个父组件在created定义避免循环引用
this.updateParentData()
if (!this.parent) {
error('u-checkbox必须搭配u-checkbox-group组件使用')
error('up-checkbox必须搭配up-checkbox-group组件使用')
}
let value = '';
// #ifdef VUE2
const value = this.parentData.value
value = this.parentData.value
// #endif
// #ifdef VUE3
const value = this.parentData.modelValue
value = this.parentData.modelValue
// #endif
// 设置初始化时是否默认选中的状态父组件u-checkbox-group的value可能是array所以额外判断
if (this.checked) {
@@ -248,7 +249,9 @@
}
},
emitEvent() {
this.$emit('change', this.isChecked)
this.$emit('change', this.isChecked, {
name: this.name
})
// 双向绑定
if (this.usedAlone) {
this.$emit('update:checked', this.isChecked)
@@ -281,7 +284,6 @@
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
$u-checkbox-icon-wrap-margin-right:6px !default;
$u-checkbox-icon-wrap-font-size:6px !default;
$u-checkbox-icon-wrap-border-width:1px !default;