diff --git a/components/checkbox-switch/checkbox-switch.vue b/components/checkbox-switch/checkbox-switch.vue
new file mode 100644
index 0000000..6f10dcf
--- /dev/null
+++ b/components/checkbox-switch/checkbox-switch.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/da-tree/index.vue b/components/da-tree/index.vue
index c264fdc..a4bc692 100644
--- a/components/da-tree/index.vue
+++ b/components/da-tree/index.vue
@@ -49,7 +49,8 @@
class="da-tree-item__label"
:class="'da-tree-item__label--' + item.checkedStatus"
@click="handleLabelClick(item)"
- >{{ item.label }} {{ item.append }}{{ item.label }} {{ item.append }}
@@ -1154,8 +1155,8 @@ export default defineComponent({
flex: 1;
margin-left: 2px;
color: #555;
- display: flex;
- flex-direction: column;
+ display: flex;
+ flex-direction: column;
&--2 {
color: var(--theme-color, #007aff);
diff --git a/components/sample/auncel-select-popup.vue b/components/sample/auncel-select-popup.vue
index 470ceda..42b2e1a 100644
--- a/components/sample/auncel-select-popup.vue
+++ b/components/sample/auncel-select-popup.vue
@@ -86,8 +86,7 @@ const getPageData = () => {
pageNo: 1,
pageSize: 999,
collectDeviceType: 'balance',
- deviceStatus: '0',
- isEnable: '1',
+ deviceStatus: "{\"Enable\":\"1\"}",
deployLocation: deployLocation.value === '全部' ? '' : deployLocation.value
})
.then(res => {
diff --git a/components/zzjc-num-keyboard/zzjc-num-keyboard.vue b/components/zzjc-num-keyboard/zzjc-num-keyboard.vue
index 30ea2f0..93014af 100644
--- a/components/zzjc-num-keyboard/zzjc-num-keyboard.vue
+++ b/components/zzjc-num-keyboard/zzjc-num-keyboard.vue
@@ -125,13 +125,13 @@ const changeNums = (item, index) => {
}
// 检查小数位数限制
- let decimal = props.numKeyboardParam?.decimal ?? -1
- const parts = nums.value.split('.')
- if (parts.length === 2 && decimal !== -1) {
- if (parts[1].length >= decimal) {
- return false
- }
- }
+ // let decimal = props.numKeyboardParam?.decimal ?? -1
+ // const parts = nums.value.split('.')
+ // if (parts.length === 2 && decimal !== -1) {
+ // if (parts[1].length >= decimal) {
+ // return false
+ // }
+ // }
nums.value += inputChar
}
diff --git a/defaultBaseUrl.js b/defaultBaseUrl.js
index e048450..179ca34 100644
--- a/defaultBaseUrl.js
+++ b/defaultBaseUrl.js
@@ -1,14 +1,15 @@
// 在此不用配置接口前缀
const isDev = process.env.NODE_ENV === 'development'
// 正式环境
-const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
-const upgradeBaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
-const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
+// const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
+// const upgradeBaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
+// const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
// 公司测试环境
-// const BaseUrl = isDev ? 'http://192.168.26.253:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
-// const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
-// const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
+const BaseUrl = isDev ? 'http://192.168.26.163:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
+// const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
+const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
+const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const tenantId = '1'
export const clientId = 'zgty_lims'
diff --git a/manifest.json b/manifest.json
index b7336a2..0bc9b69 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,31 +1,31 @@
{
- "name" : "实验室管理系统",
- "appid" : "__UNI__4B3B4B0",
- "description" : "实验室管理系统",
- "versionName" : "1.1.2",
- "versionCode" : 112,
- "transformPx" : false,
- "app-plus" : {
- "usingComponents" : true,
- "nvueCompiler" : "uni-app",
- "compilerVersion" : 3,
- "splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "waiting" : true,
- "autoclose" : true,
- "delay" : 0
+ "name": "实验室管理系统",
+ "appid": "__UNI__4B3B4B0",
+ "description": "实验室管理系统",
+ "versionName": "1.1.6",
+ "versionCode": 116,
+ "transformPx": false,
+ "app-plus": {
+ "usingComponents": true,
+ "nvueCompiler": "uni-app",
+ "compilerVersion": 3,
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "waiting": true,
+ "autoclose": true,
+ "delay": 0
},
- "modules" : {
- "LivePusher" : {},
- "Camera" : {}
+ "modules": {
+ "LivePusher": {},
+ "Camera": {}
},
- "distribute" : {
- "android" : {
- "packagename" : "tech.zzjc.mas.zgtylims",
- "keystore" : "zzjc_android.jks",
- "password" : "zzjc@20190226",
- "aliasname" : "app",
- "permissions" : [
+ "distribute": {
+ "android": {
+ "packagename": "tech.zzjc.mas.zgtylims",
+ "keystore": "zzjc_android.jks",
+ "password": "zzjc@20190226",
+ "aliasname": "app",
+ "permissions": [
"",
"",
"",
@@ -50,155 +50,158 @@
""
]
},
- "ios" : {
- "dSYMs" : false
+ "ios": {
+ "dSYMs": false
},
- "harmony" : {
- "permissions" : [ "ohos.permission.INTERNET", "ohos.permission.GET_NETWORK_INFO" ],
- "package" : "zzjc.test.app",
- "compatibleSdkVersion" : 5
+ "harmony": {
+ "permissions": [
+ "ohos.permission.INTERNET",
+ "ohos.permission.GET_NETWORK_INFO"
+ ],
+ "package": "zzjc.test.app",
+ "compatibleSdkVersion": 5
},
- "sdkConfigs" : {},
- "icons" : {
- "android" : {
- "hdpi" : "unpackage/res/icons/72x72.png",
- "xhdpi" : "unpackage/res/icons/96x96.png",
- "xxhdpi" : "unpackage/res/icons/144x144.png",
- "xxxhdpi" : "unpackage/res/icons/192x192.png"
+ "sdkConfigs": {},
+ "icons": {
+ "android": {
+ "hdpi": "unpackage/res/icons/72x72.png",
+ "xhdpi": "unpackage/res/icons/96x96.png",
+ "xxhdpi": "unpackage/res/icons/144x144.png",
+ "xxxhdpi": "unpackage/res/icons/192x192.png"
},
- "ios" : {
- "appstore" : "unpackage/res/icons/1024x1024.png",
- "ipad" : {
- "app" : "unpackage/res/icons/76x76.png",
- "app@2x" : "unpackage/res/icons/152x152.png",
- "notification" : "unpackage/res/icons/20x20.png",
- "notification@2x" : "unpackage/res/icons/40x40.png",
- "proapp@2x" : "unpackage/res/icons/167x167.png",
- "settings" : "unpackage/res/icons/29x29.png",
- "settings@2x" : "unpackage/res/icons/58x58.png",
- "spotlight" : "unpackage/res/icons/40x40.png",
- "spotlight@2x" : "unpackage/res/icons/80x80.png"
+ "ios": {
+ "appstore": "unpackage/res/icons/1024x1024.png",
+ "ipad": {
+ "app": "unpackage/res/icons/76x76.png",
+ "app@2x": "unpackage/res/icons/152x152.png",
+ "notification": "unpackage/res/icons/20x20.png",
+ "notification@2x": "unpackage/res/icons/40x40.png",
+ "proapp@2x": "unpackage/res/icons/167x167.png",
+ "settings": "unpackage/res/icons/29x29.png",
+ "settings@2x": "unpackage/res/icons/58x58.png",
+ "spotlight": "unpackage/res/icons/40x40.png",
+ "spotlight@2x": "unpackage/res/icons/80x80.png"
},
- "iphone" : {
- "app@2x" : "unpackage/res/icons/120x120.png",
- "app@3x" : "unpackage/res/icons/180x180.png",
- "notification@2x" : "unpackage/res/icons/40x40.png",
- "notification@3x" : "unpackage/res/icons/60x60.png",
- "settings@2x" : "unpackage/res/icons/58x58.png",
- "settings@3x" : "unpackage/res/icons/87x87.png",
- "spotlight@2x" : "unpackage/res/icons/80x80.png",
- "spotlight@3x" : "unpackage/res/icons/120x120.png"
+ "iphone": {
+ "app@2x": "unpackage/res/icons/120x120.png",
+ "app@3x": "unpackage/res/icons/180x180.png",
+ "notification@2x": "unpackage/res/icons/40x40.png",
+ "notification@3x": "unpackage/res/icons/60x60.png",
+ "settings@2x": "unpackage/res/icons/58x58.png",
+ "settings@3x": "unpackage/res/icons/87x87.png",
+ "spotlight@2x": "unpackage/res/icons/80x80.png",
+ "spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
},
/* 可选,JSON对象,应用UserAgent相关配置 **/
- "useragent" : {
+ "useragent": {
/* 可选,字符串类型,设置的默认userAgent值 */
- "value" : "LIMS-PDA/1.1.2",
+ "value": "LIMS-PDA/1.1.6",
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
- "concatenate" : true
+ "concatenate": true
},
/* 可选,JSON对象,Android平台应用UserAgent相关配置,优先级高于useragent配置 */
- "useragent_android" : {
+ "useragent_android": {
/* 可选,字符串类型,设置的默认userAgent值 */
- "value" : "LIMS-PDA/1.1.2",
+ "value": "LIMS-PDA/1.1.6",
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
- "concatenate" : true
+ "concatenate": true
},
/* 可选,JSON对象,iOS平台应用UserAgent相关配置,优先级高于useragent配置 */
- "useragent_ios" : {
+ "useragent_ios": {
/* 可选,字符串类型,设置的默认userAgent值 */
- "value" : "LIMS-PDA/1.1.2",
+ "value": "LIMS-PDA/1.1.6",
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
- "concatenate" : true
+ "concatenate": true
}
},
- "quickapp" : {},
- "mp-weixin" : {
- "appid" : "",
- "setting" : {
- "urlCheck" : false,
- "minified" : false
+ "quickapp": {},
+ "mp-weixin": {
+ "appid": "",
+ "setting": {
+ "urlCheck": false,
+ "minified": false
},
- "optimization" : {
- "subPackages" : true
+ "optimization": {
+ "subPackages": true
},
- "usingComponents" : true,
- "mergeVirtualHostAttributes" : true
+ "usingComponents": true,
+ "mergeVirtualHostAttributes": true
},
- "mp-alipay" : {
- "usingComponents" : true
+ "mp-alipay": {
+ "usingComponents": true
},
- "mp-baidu" : {
- "usingComponents" : true
+ "mp-baidu": {
+ "usingComponents": true
},
- "mp-toutiao" : {
- "usingComponents" : true
+ "mp-toutiao": {
+ "usingComponents": true
},
- "uniStatistics" : {
- "enable" : false
+ "uniStatistics": {
+ "enable": false
},
- "vueVersion" : "3",
- "h5" : {
- "devServer" : {
- "port" : 33888,
- "https" : false,
- "proxy" : {
- "/api" : {
+ "vueVersion": "3",
+ "h5": {
+ "devServer": {
+ "port": 33888,
+ "https": false,
+ "proxy": {
+ "/api": {
// "target" : "http://mas.new.will-way.cn/api/",
//"target" : "http://192.168.31.180:9090/",
- "target" : "http://127.0.0.1:9999/",
- "changeOrigin" : true,
- "ws" : true,
- "pathRewrite" : {
- "^/api" : ""
+ "target": "http://127.0.0.1:9999/",
+ "changeOrigin": true,
+ "ws": true,
+ "pathRewrite": {
+ "^/api": ""
}
},
- "/sys" : {
+ "/sys": {
// "target" : "http://mas.new.will-way.cn/api/",
//"target" : "http://192.168.31.180:9090/",
- "target" : "http://127.0.0.1:9999/sys",
- "changeOrigin" : true,
- "ws" : true,
- "pathRewrite" : {
- "^/api" : ""
+ "target": "http://127.0.0.1:9999/sys",
+ "changeOrigin": true,
+ "ws": true,
+ "pathRewrite": {
+ "^/api": ""
}
},
- "/report" : {
- "target" : "http://127.0.0.1:9999/report/",
- "changeOrigin" : true,
- "ws" : true,
- "pathRewrite" : {
- "^/api" : ""
+ "/report": {
+ "target": "http://127.0.0.1:9999/report/",
+ "changeOrigin": true,
+ "ws": true,
+ "pathRewrite": {
+ "^/api": ""
}
}
}
},
- "optimization" : {
- "treeShaking" : {
- "enable" : true
+ "optimization": {
+ "treeShaking": {
+ "enable": true
}
},
- "router" : {
- "base" : "./"
+ "router": {
+ "base": "./"
},
- "template" : "template.h5.html"
+ "template": "template.h5.html"
},
- "app-harmony" : {
- "distribute" : {
- "bundleName" : "zzjc.test.app",
- "signingConfigs" : {
- "default" : {
- "certpath" : "certs\\DebugCert.cer",
- "keyAlias" : "zzjc-test",
- "keyPassword" : "0000001A62465932FE19E037517BC61FE03A8F9D69CB7892019EEC82A5A07691ECAE824A92BAD8FAEB34",
- "profile" : "certs\\DebugProfileDebug.p7b",
- "signAlg" : "SHA256withECDSA",
- "storeFile" : "certs\\.p12",
- "storePassword" : "0000001ACE8F050DA6F2E36A4D0EC332ECF3A78E16F485E7C0B9DA5919649626428710609023E1DD99FD"
+ "app-harmony": {
+ "distribute": {
+ "bundleName": "zzjc.test.app",
+ "signingConfigs": {
+ "default": {
+ "certpath": "certs\\DebugCert.cer",
+ "keyAlias": "zzjc-test",
+ "keyPassword": "0000001A62465932FE19E037517BC61FE03A8F9D69CB7892019EEC82A5A07691ECAE824A92BAD8FAEB34",
+ "profile": "certs\\DebugProfileDebug.p7b",
+ "signAlg": "SHA256withECDSA",
+ "storeFile": "certs\\.p12",
+ "storePassword": "0000001ACE8F050DA6F2E36A4D0EC332ECF3A78E16F485E7C0B9DA5919649626428710609023E1DD99FD"
}
}
}
}
-}
+}
\ No newline at end of file
diff --git a/nx/api/dailyCheck.js b/nx/api/dailyCheck.js
index 9e37fff..1782565 100644
--- a/nx/api/dailyCheck.js
+++ b/nx/api/dailyCheck.js
@@ -32,7 +32,7 @@ export default {
request({
url: '/qms/resource/device-maintain/getLastDailyCheckOfToday',
method: 'GET',
- params,
+ params
}),
createDailyCheck: data =>
request({
diff --git a/nx/api/deviceInfo.js b/nx/api/deviceInfo.js
index ccb017c..73c6ad3 100644
--- a/nx/api/deviceInfo.js
+++ b/nx/api/deviceInfo.js
@@ -2,21 +2,21 @@ import request from '@/nx/request'
export function getDeviceBusInfoById(id) {
return request({
- url: '/lims/bus/deviceBusInfo/queryById',
+ url: '/qms/resource/device-infomation/get',
method: 'GET',
params: { id }
})
}
export function deviceList(params) {
return request({
- url: '/lims/bus/deviceBusInfo/list',
+ url: '/qms/resource/device-infomation/page',
method: 'GET',
params
})
}
export function treeData(params) {
return request({
- url: '/lims/bus/deviceBusProduct/listTree',
+ url: '/qms/resource/device-product/getProductTreeData',
method: 'GET',
params
})
@@ -74,6 +74,3 @@ export function stopList(params) {
params
})
}
-export default{
- getDeviceBusInfoById
-}
diff --git a/nx/api/material.js b/nx/api/material.js
index 1641864..64422e3 100644
--- a/nx/api/material.js
+++ b/nx/api/material.js
@@ -7,11 +7,79 @@ export default {
method: 'GET',
params
}),
+ // 查询大类
+ queryMaterialCategory: params =>
+ request({
+ url: '/qms/resource/material-product/category-data',
+ method: 'GET',
+ params
+ }),
+ // 查询物料实例
+ queryMaterialInformation: params =>
+ request({
+ url: '/qms/resource/material-infomation/page',
+ method: 'GET',
+ params
+ }),
// 物料出库
execMaterialOut: data =>
request({
url: '/qms/resource/material-inventory-outbound/add',
method: 'POST',
data
+ }),
+ // 新增使用记录
+ addUseRecord: data =>
+ request({
+ url: '/qms/resource/material-use-record/add',
+ method: 'POST',
+ data
+ }),
+ // 删除使用记录
+ deleteUseRecord: params =>
+ request({
+ url: '/qms/resource/material-use-record/delete',
+ method: 'DELETE',
+ params
+ }),
+ getUseRecord: params =>
+ request({
+ url: '/qms/resource/material-use-record/page',
+ method: 'GET',
+ params
+ }),
+ // 使用确认
+ confirmUseRecord: data =>
+ request({
+ url: '/qms/resource/material-use-record/review',
+ method: 'PUT',
+ data
+ }),
+ // 新增危化品配置信息
+ addHazardousMake: data =>
+ request({
+ url: '/qms/resource/material-use-record/hzrd-make',
+ method: 'POST',
+ data
+ }),
+ // 新增用完标记和清洗回收
+ addUseOver: data =>
+ request({
+ url: '/qms/resource/material-use-end-reuse/add',
+ method: 'POST',
+ data
+ }),
+ getMaterialUseEndReuseDetailPage: params =>
+ request({
+ url: `/qms/resource/material-use-end-reuse-detail/page`,
+ method: 'GET',
+ params
+ }),
+ // 试剂瓶回收
+ reuse: data =>
+ request({
+ url: '/qms/resource/material-use-end-reuse/reuse',
+ method: 'PUT',
+ data
})
}
diff --git a/nx/api/sampleWarehouse.js b/nx/api/sampleWarehouse.js
index 91e2135..864cf36 100644
--- a/nx/api/sampleWarehouse.js
+++ b/nx/api/sampleWarehouse.js
@@ -79,9 +79,10 @@ export default {
data
}),
// 根据权限查询样品库
- querySampleLocation: () =>
+ querySampleLocation: params =>
request({
url: '/qms/config-warehouse-location/selectListWithPermission',
- method: 'GET'
+ method: 'GET',
+ params
})
}
diff --git a/nx/api/sys.js b/nx/api/sys.js
index 1dfd3d8..f50c87b 100644
--- a/nx/api/sys.js
+++ b/nx/api/sys.js
@@ -35,5 +35,11 @@ export default {
isTransformResponse: false
}
})
+ },
+ getDataListByCategoryKey: key => {
+ return request({
+ url: `/qms/dictionary-business/getDataListByCategoryKey?key=` + key,
+ method: 'GET'
+ })
}
}
diff --git a/nx/helper/calcAnalysisValue.js b/nx/helper/calcAnalysisValue.js
index fc9145a..77d9990 100644
--- a/nx/helper/calcAnalysisValue.js
+++ b/nx/helper/calcAnalysisValue.js
@@ -327,6 +327,79 @@ export function handleRoundFiveNumber(number, fixed = 0) {
//偶不进,将取值的当前位数,直接截取字符即可
return number.substr(0, indexFixed)
}
+export function handleEfficaciousNumber(number, fixed, effectiveDigit) {
+ // 1. 先将数字补全到 fixed 位小数
+ const numStr = String(number)
+ const dotIndex = numStr.indexOf('.') // dotIndex = 1
+ let actualFixed = fixed // 默认为 fixed
+
+ if (dotIndex !== -1) {
+ const decimalPart = numStr.slice(dotIndex + 1) // decimalPart = "0400"
+ console.log(`小数部分: ${decimalPart}`)
+
+ let nonZeroCount = 0
+ let targetEffectiveDigitPos = -1
+
+ // 2. 循环 "0400",寻找有效数字
+ for (let i = 0; i < decimalPart.length; i++) {
+ // i=0 to 3
+ const char = decimalPart[i]
+ console.log(`检查第 ${i + 1} 位: '${char}', 当前 nonZeroCount: ${nonZeroCount}`)
+
+ if (nonZeroCount === 0) {
+ // 寻找第一个非零数字
+ if (char !== '0') {
+ // i=0, '0' -> false; i=1, '4' -> true
+ nonZeroCount++ // nonZeroCount = 1
+ console.log(` -> 找到第 1 个有效数字: '${char}'`)
+ }
+ } else {
+ // 已经找到第一个非零数字,后续所有数字都算有效
+ if (nonZeroCount < effectiveDigit) {
+ // 1 < 2 -> true
+ nonZeroCount++ // nonZeroCount = 2
+ console.log(` -> 找到第 2 个有效数字: '${char}'`)
+ }
+ }
+
+ if (nonZeroCount === effectiveDigit) {
+ // 2 === 2 -> true when i=2
+ targetEffectiveDigitPos = i + 1 // i=2, so pos is 3
+ console.log(` -> 目标有效数字 (${effectiveDigit}) 已找到,位于第 ${targetEffectiveDigitPos} 位`)
+ break
+ }
+ }
+ console.log(`targetEffectiveDigitPos: ${targetEffectiveDigitPos}`)
+
+ // 3. 判断并设置最终精度
+ if (targetEffectiveDigitPos !== -1 && targetEffectiveDigitPos <= fixed) {
+ // 3 !== -1 and 3 <= 4 -> true
+ actualFixed = targetEffectiveDigitPos // actualFixed = 3
+ }
+ const finalNumber = handleRoundFiveNumber(Number(number), actualFixed)
+ // 获取整数部分
+ const finalIntegerPart = finalNumber.slice(0, dotIndex + 1) // 包含小数点
+ const finalDecimalPart = finalNumber.slice(dotIndex + 1)
+ // 截取指定长度的小数部分
+ let truncatedDecimalPart = ''
+ if (Number(finalDecimalPart) === 0) {
+ truncatedDecimalPart = finalDecimalPart.substring(0, effectiveDigit)
+ }else{
+ truncatedDecimalPart = finalDecimalPart.substring(0, actualFixed)
+ }
+
+
+ // 拼接最终结果
+ let result = finalIntegerPart + truncatedDecimalPart
+
+ // 特殊情况处理:如果截取后小数部分为空,则去掉小数点
+ if (actualFixed === 0) {
+ result = finalIntegerPart.slice(0, -1) // 去掉最后的 "."
+ }
+
+ return result
+ }
+}
/**
** 除法函数,用来得到精确的除法结果
diff --git a/nx/helper/calcAnalysisValue.js.bak b/nx/helper/calcAnalysisValue.js.bak
deleted file mode 100644
index a236161..0000000
--- a/nx/helper/calcAnalysisValue.js.bak
+++ /dev/null
@@ -1,511 +0,0 @@
-import { create, all, number, pow } from 'mathjs'
-import parseSafeArgs from './parseSafeArgs'
-const math = create(all)
-math.config({
- number: 'BigNumber',
- precision: 64
-})
-export { math }
-
-const GetRecoveryRate = function (elementFormulaCode, value) {
- // //读取conRecoveryRateList
- const conRecoveryRateList = uni.getStorageSync('ConRecoveryRateList')
- if (!conRecoveryRateList) return
- let o = conRecoveryRateList.find(i => {
- //console.log("取得的" + i + "回收率:" + i);
- if (value === 0) {
- return i.elementFormulaCode === elementFormulaCode && i.minValue === value
- }
- return i.elementFormulaCode === elementFormulaCode && i.minValue < value && value <= i.maxValue
- })
- // console.log(o);
- const rate = o ? o.rate : 100
- // console.log("取得的" + elementFormulaCode + "回收率:" + rate);
- return rate
- // console.log("执行方法:GetRecoveryRate");
- // return 100;
-}
-/*
- * 根据硫值计算:支持碳、硝酸钾(滇中)
- * 当S%<22%时,需加入淀粉的量=(75-S%*22*M)/12
- * 当 S%>22%时,需加入硝酸钾的量=(S%*22*M-75)/4
- * 当 S%==22%时,硝酸钾为0,淀粉为空
- * sValueKey:硫值对应的dicKey
- * weightKey:重量对应的dicKey
- * percent:计算参数
- *
- * 举例:Get_C_KNO3_bySValue|(|p14|, |p2|, |>|)
- * */
-const Get_C_KNO3_bySValue = function (sValue, weight, operator) {
- //判断sValue是数字
- if (isNaN(sValue) || isNaN(weight)) {
- return ''
- }
- let v = number(sValue)
- const w = number(weight)
- if (w === 0) return ''
- v = v * 0.01
- //当S%<22%时,需加入淀粉的量=(75-S%*22*M)/12
- if (operator === '<' && v < 0.22) {
- // return ( 75 - v * 22 * w )/12;
- return accDiv(accSub(75, accMul(accMul(v, 22), w)), 12)
- }
- //S%>22%时,需加入硝酸钾的量=(S%*22*M-75)/4
- if (operator === '>=' && v >= 0.22) {
- //S%==22%时,硝酸钾为0,淀粉为空
- if (v === 22) return 0
- // return ( v * 22 * w - 75 ) + 44;
- return accDiv(accSub(accMul(v, accMul(22, w)), 75), 4)
- }
-
- return ''
-}
-const Get_C_KNO3 = function (weight, sValue, operator) {
- //判断sValue是数字
- const S = number(sValue)
- const W = number(weight)
- //如果样重为0就不计算
- if (W === 0) {
- return ''
- }
- if (W === 0) return ''
- const V = ((W * S) / 100) * 22 - 75
- if (operator === '<' && V < 0) {
- return math.abs(V / 12)
- }
- if (operator === '>=' && V >= 0) {
- return V / 4
- }
- return ''
-}
-const FORMULA_FUNCTIONS = {
- GetRecoveryRate,
- Get_C_KNO3_bySValue,
- Get_C_KNO3
-}
-/*
- * 计算当前样品分析值*/
-export function calcAnalysisValue(group, externalFormData, taskIngredientsWay) {
- const MAX_ITERATIONS = 5 // 防止无限循环
- let iterations = 0
- let changed = true
- while (changed && iterations < MAX_ITERATIONS) {
- changed = false
- iterations++
- try {
- for (const g of group) {
- for (const ele of g.fields) {
- if (!ele.formula || ele.formula == '' || ele.formula.startsWith('From')) continue
- let formula = ele.formula
- let formulas = formula.split('|')
- let formulaVal = ''
- formulas.forEach(f => {
- let value = ''
- if (f.charAt(0) === 'p') {
- let o = findFieldInGroup(f, group, 'p')
- value = o.value || 0
- } else if (f.charAt(0) === 'e') {
- let o = findFieldInGroup(f, group, 'e')
- value = o.value || 0
- } else if (f.charAt(0) === '<' || f.charAt(0) === '>') {
- value = "'" + f + "'"
- } else {
- value = f
- }
-
- formulaVal += value
- })
-
- let v = ''
- if (formulaVal.startsWith('Get_')) {
- //计算公式为Get开头的,都是执行方法,只有人工配料才执行
- if (taskIngredientsWay !== 'manual') continue
- v = eval(formulaVal)
- } else if (formulaVal.startsWith('GetFrom')) {
- v = evaluateGetFromFormula(formulaVal, false, externalFormData)
- } else {
- v = math.evaluate(formulaVal).toString()
- v = isFinite(v) ? v.toString() : 0
- }
- ele.value = handleRoundFiveNumber(v, ele.decimalPosition, ele.type === 'project')
- changed = true
- }
- }
- } catch (error) {
- console.log(error)
- }
- }
-}
-
-// parse: 是否解析公式
-export function evaluateGetFromFormula(formula, parse, externalFormData, currentColumn, row, dynamicsColumns) {
- let formulaVal = formula
- if (parse) {
- formulaVal = parseFormula(formulaVal, row, dynamicsColumns)
- }
- let relFormulaVal = formulaVal.split(':')[1]
- for (const [key, value] of Object.entries(externalFormData)) {
- if (relFormulaVal.includes(key)) {
- relFormulaVal = relFormulaVal.replace(key, value || 0)
- }
- }
- try {
- let v = math.evaluate(relFormulaVal).toString()
- v = isFinite(v) ? v : 0
- if (parse) {
- return handleRoundFiveNumber(v, currentColumn.decimalPosition, currentColumn.type === 'project')
- }
- return v
- } catch (e) {
- console.warn('GetFrom formula evaluate error:', relFormulaVal, e)
- return 0
- }
-}
-// 解析公式
-function parseFormula(formula, row, dynamicsColumns) {
- let formulas = formula.split('|')
- let formulaVal = ''
- formulas.forEach(f => {
- if (f.charAt(0) === 'p') {
- let o = dynamicsColumns.find(i => 'p' + i.paramNo === f && i.type !== 'project')
- const currentColumnData = row[o.fieldIndex]
- formulaVal += currentColumnData.value ? currentColumnData.value : 0
- } else if (f.charAt(0) === 'e') {
- let o = dynamicsColumns.find(i => 'e' + i.paramNo === f)
- formulaVal += row[o.fieldIndex]?.value ? row[o.fieldIndex].value : 0
- } else {
- formulaVal += f
- }
- })
- return formulaVal
-}
-// 根据样品和配置列计算分析值
-export function calcRowAnalysisValue(row, columnObj, dynamicsColumns, externalFormData, taskIngredientsWay) {
- if (!columnObj.paramNo || !row[columnObj.fieldIndex]) return
-
- for (let i = 0; i < dynamicsColumns.length; i++) {
- let curItem = dynamicsColumns[i]
- if (curItem.fieldIndex === columnObj.fieldIndex) continue
-
- let param = columnObj.fieldIndex.charAt(0) === 'p' ? 'p' + columnObj.paramNo : 'e' + columnObj.paramNo
- if (curItem.formula && curItem.formula.includes(param)) {
- let formula = curItem.formula
- let formulaVal = parseFormula(formula, row, dynamicsColumns)
- let v
- if (formulaVal.startsWith('Get_')) {
- if (taskIngredientsWay !== 'manual') continue
- const match = formulaVal.match(/^([a-zA-Z_]\w*)\((.*)\)$/)
- const funcName = match[1]
- const argsStr = match[2].trim()
- const func = FORMULA_FUNCTIONS[funcName]
- // 安全解析参数(支持数字、字符串)
- const args = parseSafeArgs(argsStr)
- v = func(...args)
- } else if (formulaVal.startsWith('GetFrom')) {
- v = evaluateGetFromFormula(formulaVal, false, externalFormData)
- } else {
- v = math.evaluate(formulaVal).toString()
- v = isFinite(v) ? v : 0
- }
- let rowObj = row[curItem.fieldIndex]
- rowObj.value = handleRoundFiveNumber(Number(v), rowObj.decimalPosition, rowObj.type === 'project')
- calcRowAnalysisValue(row, curItem, dynamicsColumns, externalFormData)
- }
- }
-}
-const findFieldInGroup = function (paramNo, group, p) {
- for (const g of group) {
- for (const f of g.fields) {
- if (p === 'p' && f.type == 'project') continue
- if (p + f.paramNo === paramNo) {
- return f
- }
- }
- }
- return { value: null }
-}
-
-/** 处理数值数据:四舍六入奇进偶不进
- * 1,如果取小数的最后一位为5,5前为奇数进位,为偶不进,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一
- * 2.5后不为0时就入,为0时看5前,奇进偶不进
- * 3.四舍,六入
- * 传入数值和保留位数
- */
-export function handleRoundFiveNumber(number, fixed = 0, useTwoSignificantDigits = false) {
- if (number == null || number === '' || isNaN(number)) return number
- if (fixed === -1) return number
- number = String(number)
- //可以考虑清掉末尾的0,暂时限制了不会有,因为传入数值,末尾0是去掉的
- // 保留2位有效数字:小数点后面大于0的才叫有效数字,从小数点后面查找两位有效数字 ,如果末尾的有效数字的位数大于所设置的精度 以及 如果查找的有效数字没有两位的 ,就按照所设置的精度逻辑来计算,两位有效数字的最后 一位是在第几位,就用这个位数充当精度来按照原来精度的逻辑计算,
- // ===== 新增:按小数点后前两个非零数字确定精度 =====
- let actualFixed = fixed
- if (useTwoSignificantDigits) {
- const numStr = String(number)
- const dotIndex = numStr.indexOf('.')
-
- if (dotIndex !== -1) {
- const decimalPart = numStr.slice(dotIndex + 1)
- let nonZeroCount = 0
- let secondNonZeroPos = -1
-
- for (let i = 0; i < decimalPart.length; i++) {
- if (decimalPart[i] !== '0') {
- nonZeroCount++
- if (nonZeroCount === 2) {
- secondNonZeroPos = i + 1 // 小数点后第几位(从1开始)
- break
- }
- }
- }
-
- // 只有同时满足:
- // 1. 找到两个非零数字
- // 2. 第二个的位置 <= 用户指定的 fixed
- // 才使用该位置作为精度
- if (secondNonZeroPos !== -1 && secondNonZeroPos <= fixed) {
- actualFixed = secondNonZeroPos
- }
- }
- }
- console.log(actualFixed)
- const index = number.indexOf('.')
- if (index == -1) {
- if (actualFixed > 0) {
- number += '.'
- }
- for (let i = 0; i < actualFixed; i++) {
- number += '0'
- }
- //补0返回
- return number
- }
- //取到保留小数位的下一位,5.5555取保留俩位,那就是小数点后第三位
- const indexFixed = index + actualFixed + 1
- if (indexFixed >= number.length) {
- //如果小数位数不够, 补0直接返回
- const zerolen = indexFixed - number.length
- for (let i = 0; i < zerolen; i++) {
- number += '0'
- }
- return number
- }
- //取保留位数的后一位做判断,以下是有5的判断
- const endNumber = number.substr(indexFixed, 1)
- if (endNumber != '5') {
- //如果做判断的数不是五,就按正常的四舍五入,即忽略了5,后面补0的那些由于是数字传进来,0已经去掉,此处不做处理
- return Number(number).toFixed(actualFixed)
- }
- if (indexFixed != number.length - 1) {
- //由于当前判断位不是最后一位,而又去除了0,那么后面后的位数应该直接入位,五后不为0时入,由于会有小于五的,四舍五入肯定不行,那么只能截取到当前保留位数,然后转成数字加上10的负fixed的次方即可
- number = number.substring(0, indexFixed)
- if (number.indexOf('-') != -1) {
- //需要考虑到负数的情况
- return (Number(number) - Number(Math.pow(10, -actualFixed))).toFixed(actualFixed)
- }
- return (Number(number) + Number(Math.pow(10, -actualFixed))).toFixed(actualFixed)
- //return this.accAdd(number,Math.pow(10,-fixed))
- }
- //接下来就时五后没有值也就是0的需要看前面的奇入偶不入了,取当前位的上一位
- let twoNumber = number.substr(indexFixed - 1, 1)
- if (twoNumber == '.') {
- //取到小数点,再取一次,要取到小数点左边第一位
- twoNumber = number.substr(indexFixed - 2, 1)
- }
- if ('13579'.indexOf(twoNumber) != -1) {
- //奇进
- number = number.substring(0, indexFixed)
- if (number.indexOf('-') != -1) {
- //需要考虑到负数的情况
- return (Number(number) - Math.pow(10, -actualFixed)).toFixed(actualFixed)
- }
- return (Number(number) + Math.pow(10, -actualFixed)).toFixed(actualFixed)
- }
- //偶不进,将取值的当前位数,直接截取字符即可
- return number.substr(0, indexFixed)
-}
-
-/**
- ** 除法函数,用来得到精确的除法结果
- ** 说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。
- ** 调用:accDiv(arg1,arg2)
- ** 返回值:arg1除以arg2的精确结果
- **/
-function accDiv(arg1, arg2) {
- var t1 = 0,
- t2 = 0,
- r1,
- r2
- try {
- t1 = arg1.toString().split('.')[1].length
- } catch (e) {}
- try {
- t2 = arg2.toString().split('.')[1].length
- } catch (e) {}
- r1 = Number(arg1.toString().replace('.', ''))
- r2 = Number(arg2.toString().replace('.', ''))
- return (r1 / r2) * pow(10, t2 - t1)
-}
-
-/**
- ** 乘法函数,用来得到精确的乘法结果
- ** 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
- ** 调用:accMul(arg1,arg2)
- ** 返回值:arg1乘以 arg2的精确结果
- **/
-function accMul(arg1, arg2) {
- var m = 0,
- s1 = arg1.toString(),
- s2 = arg2.toString()
- try {
- m += s1.split('.')[1].length
- } catch (e) {}
- try {
- m += s2.split('.')[1].length
- } catch (e) {}
- return (Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) / Math.pow(10, m)
-}
-
-/**
- ** 减法函数,用来得到精确的减法结果
- ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。
- ** 调用:accSub(arg1,arg2)
- ** 返回值:arg1加上arg2的精确结果
- **/
-function accSub(arg1, arg2) {
- var r1, r2, m, n
- try {
- r1 = arg1.toString().split('.')[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split('.')[1].length
- } catch (e) {
- r2 = 0
- }
- m = Math.pow(10, Math.max(r1, r2)) //last modify by deeka //动态控制精度长度
- n = r1 >= r2 ? r1 : r2
- return ((arg1 * m - arg2 * m) / m).toFixed(n)
-}
-
-/**
- ** 加法函数,用来得到精确的加法结果
- ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
- ** 调用:accAdd(arg1,arg2)
- ** 返回值:arg1加上arg2的精确结果
- **/
-function accAdd(arg1, arg2) {
- var r1, r2, m, c
- try {
- r1 = arg1.toString().split('.')[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split('.')[1].length
- } catch (e) {
- r2 = 0
- }
- c = Math.abs(r1 - r2)
- m = Math.pow(10, Math.max(r1, r2))
- if (c > 0) {
- var cm = Math.pow(10, c)
- if (r1 > r2) {
- arg1 = Number(arg1.toString().replace('.', ''))
- arg2 = Number(arg2.toString().replace('.', '')) * cm
- } else {
- arg1 = Number(arg1.toString().replace('.', '')) * cm
- arg2 = Number(arg2.toString().replace('.', ''))
- }
- } else {
- arg1 = Number(arg1.toString().replace('.', ''))
- arg2 = Number(arg2.toString().replace('.', ''))
- }
- return (arg1 + arg2) / m
-}
-
-// 通过配置项分组
-export function groupByField(list, cupNumFieldIndex, groupKey = 'groupDictionaryBusinessKey') {
- const groupMap = new Map()
-
- // 插入“全部”项
- list.unshift({ groupDictionaryBusinessKey: 'all', groupDictionaryBusinessName: '全部' })
-
- for (const item of list) {
- // 赋值杯号 fieldIndex
- if (item.title === '杯号') {
- cupNumFieldIndex.value = item.fieldIndex
- }
-
- let key = item[groupKey]
-
- // 如果没有有效 key,统一归入自定义分组
- if (!key) {
- key = 'customParameter' // 使用固定字符串作为无 key 项的分组标识
- }
-
- // 如果该分组不存在,初始化
- if (!groupMap.has(key)) {
- groupMap.set(key, {
- value: key,
- label: key === 'customParameter' ? '分析项目' : item.groupDictionaryBusinessName || '未知分组',
- fields: []
- })
- }
-
- // 将当前项加入对应分组
- groupMap.get(key).fields.push(item)
- }
-
- return Array.from(groupMap.values())
-}
-
-export function validateElementRange(fieldIndex, row, conRangeElementAnalysisList) {
- if (!conRangeElementAnalysisList?.length) return null
- const rangeElementAnalysis = conRangeElementAnalysisList.find(
- ele => ele.dictionaryProjectId === row[fieldIndex]?.dicId && row[fieldIndex]['type'] === 'project'
- )
-
- if (!rangeElementAnalysis) return null
-
- const val = row[fieldIndex]?.value
-
- if (val == '' || val == null) return null
- const value = Number(val)
-
- let result = { promptType: '', promptMsg: '' }
-
- switch (Number(rangeElementAnalysis.rangeType)) {
- case 1:
- //如果值小于最小警告值或者大于最大警告值,则校验不通过
- if (value < rangeElementAnalysis.minimumWarningValue || value > rangeElementAnalysis.maximumWarningValue) {
- result.promptType = 'warning'
- result.promptMsg = `警告:值超出范围(${rangeElementAnalysis.minimumWarningValue} ~ ${rangeElementAnalysis.maximumWarningValue})`
- }
- break
- case 2:
- //如果值小于最小限制值或者大于最大限制值,则校验不通过
- if (value < rangeElementAnalysis.minimumValue || value > rangeElementAnalysis.maximumValue) {
- result.promptType = 'error'
- result.promptMsg = `错误:值超出范围(${rangeElementAnalysis.minimumValue} ~ ${rangeElementAnalysis.maximumValue})`
- }
- break
- case 3:
- //如果值小于最小限制值或者大于最大限制值,则校验不通过
- if (value < rangeElementAnalysis.minimumValue || value > rangeElementAnalysis.maximumValue) {
- result.promptType = 'error'
- result.promptMsg = `错误:值超出范围(${rangeElementAnalysis.minimumValue} ~ ${rangeElementAnalysis.maximumValue})`
- } else if (
- (rangeElementAnalysis.minimumValue < value && value < rangeElementAnalysis.minimumWarningValue) ||
- (rangeElementAnalysis.maximumWarningValue < value && value <= rangeElementAnalysis.maximumValue)
- ) {
- result.promptType = 'warning'
- result.promptMsg = `警告:值超出范围(${rangeElementAnalysis.minimumWarningValue} ~ ${rangeElementAnalysis.maximumWarningValue})`
- }
- break
- default:
- return null
- }
-
- return result
-}
diff --git a/nx/helper/index.js b/nx/helper/index.js
index 3c43f83..6abb065 100644
--- a/nx/helper/index.js
+++ b/nx/helper/index.js
@@ -1,5 +1,6 @@
import test from './test.js'
import { round } from './digit.js'
+import dayjs from 'dayjs'
/**
* @description 如果value小于min,取min;如果value大于max,取max
* @param {number} min
@@ -741,7 +742,76 @@ function isJsonString(str) {
return false
}
}
+/**
+ * 构造树型结构数据
+ * @param {*} data 数据源
+ * @param {*} id id字段 默认 'id'
+ * @param {*} parentId 父节点字段 默认 'parentId'
+ * @param {*} children 孩子节点字段 默认 'children'
+ */
+const handleTree = (data, id, parentId, children) => {
+ if (!Array.isArray(data)) {
+ console.warn('data must be an array')
+ return []
+ }
+ const config = {
+ id: id || 'id',
+ parentId: parentId || 'parentId',
+ childrenList: children || 'children'
+ }
+ const childrenListMap = {}
+ const nodeIds = {}
+ const tree = []
+
+ for (const d of data) {
+ const parentId = d[config.parentId]
+ if (childrenListMap[parentId] == null) {
+ childrenListMap[parentId] = []
+ }
+ nodeIds[d[config.id]] = d
+ childrenListMap[parentId].push(d)
+ }
+
+ for (const d of data) {
+ const parentId = d[config.parentId]
+ if (nodeIds[parentId] == null) {
+ tree.push(d)
+ }
+ }
+
+ for (const t of tree) {
+ adaptToChildrenList(t)
+ }
+
+ function adaptToChildrenList(o) {
+ if (childrenListMap[o[config.id]] !== null) {
+ o[config.childrenList] = childrenListMap[o[config.id]]
+ }
+ if (o[config.childrenList]) {
+ for (const c of o[config.childrenList]) {
+ adaptToChildrenList(c)
+ }
+ }
+ }
+
+ return tree
+}
+
+function formateToDate(date) {
+ if (date) {
+ return dayjs(date).format('YYYY-MM-DD')
+ } else {
+ return ''
+ }
+}
+function formateToDateTime(date) {
+ if (date) {
+ return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
+ } else {
+ return ''
+ }
+}
export default {
range,
getPx,
@@ -777,5 +847,8 @@ export default {
uuid,
replacer,
reviver,
- isJsonString
+ isJsonString,
+ handleTree,
+ formateToDate,
+ formateToDateTime
}
diff --git a/nx/hooks/usePageListData.js b/nx/hooks/usePageListData.js
index 67a6841..33346d7 100644
--- a/nx/hooks/usePageListData.js
+++ b/nx/hooks/usePageListData.js
@@ -7,7 +7,7 @@ export function useListData({ searchParams, api, needInitListData = false, proce
const loadingData = ref(true)
const pageParams = reactive({
pageNo: 1,
- pageSize: 10
+ pageSize: 15
})
const total = ref(0)
const loadStatus = ref('loadmore')
@@ -16,8 +16,8 @@ export function useListData({ searchParams, api, needInitListData = false, proce
// 模拟获取数据的方法
const getListData = async () => {
const params = {
- ...unref(searchParams),
- ...pageParams
+ ...pageParams,
+ ...unref(searchParams)
}
let { list, total: pageTotal } = await api(params)
total.value = pageTotal
diff --git a/nx/request/index.js b/nx/request/index.js
index 4839155..978cf7a 100644
--- a/nx/request/index.js
+++ b/nx/request/index.js
@@ -74,10 +74,7 @@ http.interceptors.request.use(
LoadingInstance.count === 1 &&
uni.showLoading({
title: config.custom.loadingMsg,
- mask: true,
- fail: () => {
- uni.hideLoading()
- }
+ mask: true
})
}
config.baseURL = getBaseUrl()
diff --git a/nx/utils/call-check-version.js b/nx/utils/call-check-version.js
index 35246d7..f07ae03 100644
--- a/nx/utils/call-check-version.js
+++ b/nx/utils/call-check-version.js
@@ -7,6 +7,10 @@ export default function () {
const osName = plus.os.name
let appId = plus.runtime.appid
appId = clientId
+ uni.showLoading({
+ title: '请求更新中...',
+ mask: true
+ })
uni.request({
url:
getUpgradeBaseUrl() +
@@ -15,6 +19,7 @@ export default function () {
'&updatePlatform=android',
method: 'GET',
success: res => {
+ uni.hideLoading()
console.log(res)
const data = res.data.data
diff --git a/pages.json b/pages.json
index 56f0bf5..ebc3dbb 100644
--- a/pages.json
+++ b/pages.json
@@ -309,6 +309,41 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/material/useRecord/index",
+ "style": {
+ "navigationBarTitleText": "使用记录",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/material/useRecord/useConfirm",
+ "style": {
+ "navigationBarTitleText": "使用确认",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/material/useUpMark/index",
+ "style": {
+ "navigationBarTitleText": "用完标记",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/material/recycle/index",
+ "style": {
+ "navigationBarTitleText": "回收",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/material/wash/index",
+ "style": {
+ "navigationBarTitleText": "清洗",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/setting/UrlConfig",
"style": {
@@ -382,7 +417,10 @@
"navigationBarTextStyle": "white",
"navigationBarTitleText": "lims",
"navigationBarBackgroundColor": "#0055A2",
- "backgroundColor": "#F8F8F8"
+ "backgroundColor": "#F8F8F8",
+ "app-plus": {
+ "bounce": "none" // 关闭所有页面的弹性效果
+ }
},
"tabBar": {
"custom": true,
diff --git a/pages/analysis/auncel/auncel-status.vue b/pages/analysis/auncel/auncel-status.vue
index 28db681..4d3f739 100644
--- a/pages/analysis/auncel/auncel-status.vue
+++ b/pages/analysis/auncel/auncel-status.vue
@@ -99,8 +99,7 @@ function getPageData() {
pageNo: 1,
pageSize: 999,
collectDeviceType: 'balance',
- deviceStatus: '0',
- isEnable: '1',
+ deviceStatus: "{\"Enable\":\"1\"}",
deployLocation: deployLocation.value === '全部' ? '' : deployLocation.value
})
.then(res => {
diff --git a/pages/analysis/sample/sample-work-detail.vue b/pages/analysis/sample/sample-work-detail.vue
index 5f4b722..bbbe53f 100644
--- a/pages/analysis/sample/sample-work-detail.vue
+++ b/pages/analysis/sample/sample-work-detail.vue
@@ -230,6 +230,7 @@ import request from '@/nx/request'
import {
calcAnalysisValue,
handleRoundFiveNumber,
+ handleEfficaciousNumber,
calcRowAnalysisValue,
evaluateGetFromFormula,
math,
@@ -655,6 +656,7 @@ const saveAuncelData = () => {
}, 100)
}
let dynamicFormData = reactive({})
+
const saveDetail = async () => {
//检查杯号
if (!checkBh()) return
@@ -677,7 +679,14 @@ const saveDetail = async () => {
if (item.calcMethod === 'calculateAverageValue') {
item.value = calcAverageValue(sourceKey, currentAssayType.value.tableData)
} else {
- item.value = handleRoundFiveNumber(row[sourceKey].value, row.decimalPosition)
+ const rowObj = row[selectedField.value.fieldIndex]
+ const isProject = rowObj.type === 'project'
+ const flagValue = handleRoundFiveNumber(row[sourceKey].value, row.decimalPosition)
+ if (isProject) {
+ item.value = handleEfficaciousNumber(flagValue, rowObj.decimalPosition, rowObj.effectiveDigit)
+ } else {
+ item.value = flagValue
+ }
}
// 如果处理后的值不为空,重新赋值该字段到其他样品类型下的样品上,并触发每一个样品的计算
for (const col of currentAssayType.value.columns) {
@@ -710,9 +719,16 @@ const saveDetail = async () => {
function calcAverageValue(fieldIndex, tableData) {
const rows = tableData.map(row => row[fieldIndex])
const decimalPosition = rows[0].decimalPosition
+ const isProject = rows[0].type === 'project'
+ const effectiveDigit = rows[0].effectiveDigit
const values = rows.map(row => Number(row.value))
if (values.some(item => item == null)) return null
- return handleRoundFiveNumber(math.mean(values), decimalPosition)
+ const flagValue = handleRoundFiveNumber(math.mean(values), decimalPosition)
+ if (isProject) {
+ return handleEfficaciousNumber(flagValue, decimalPosition, effectiveDigit)
+ } else {
+ return flagValue
+ }
}
// 表格数据更新后重新计算
@@ -1113,12 +1129,19 @@ const listenNumKeyboard = () => {
}
//自动补全小数位数
const decimalPosition = selectedField.value.decimalPosition
+ const isProject = selectedField.value.type === 'project'
+ const effectiveDigit = currentSampleData.value[selectedField.value.fieldIndex]?.effectiveDigit || decimalPosition
let val = res.val
const symbol = res.symbol
if (decimalPosition == null) {
selectedField.value.value = val
} else {
- selectedField.value.value = handleRoundFiveNumber(val, decimalPosition)
+ const flagValue = handleRoundFiveNumber(val, decimalPosition)
+ if (isProject) {
+ selectedField.value.value = handleEfficaciousNumber(flagValue, decimalPosition, effectiveDigit)
+ } else {
+ selectedField.value.value = flagValue
+ }
}
if (symbol) {
selectedField.value.symbol = symbol
diff --git a/pages/analysis/sample/sample-work-detail.vue.bak b/pages/analysis/sample/sample-work-detail.vue.bak
deleted file mode 100644
index f41d47f..0000000
--- a/pages/analysis/sample/sample-work-detail.vue.bak
+++ /dev/null
@@ -1,1515 +0,0 @@
-
-
-
-
- 填写任务单
-
-
-
-
-
-
-
-
-
-
-
- {{ currentSampleData.sampleCode }}
- 数据采集或录入
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ sample.sampleCode }}
-
- {{ sample.sampleName }}
-
-
-
-
-
- 自动配料
- 人工配料
-
-
- 数据上报
- 等待配料
-
-
- 数据上报
-
-
-
-
-
-
-
-
-
- {{ currentAuncel.code }}
- 杯号:{{ currentCupNum }}
-
-
-
- {{ currentAuncel.weightData }}
-
-
- {{ currentAuncel.weightUnit }}
-
-
-
-
- 确认采集
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ fields.label }}
-
-
-
-
-
-
-
- {{
- !field.fillingWay || field.fillingWay == 'calculate'
- ? '计算值'
- : field.fillingWay == 'datetime'
- ? '请选择时间'
- : '请输入'
- }}
- {{ field.symbol }}{{ field.value }}
-
-
-
- {{ field.validation?.promptMsg }}
-
-
-
-
-
-
- 保存样品数据
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/device/calibrationList/calibration.api.js b/pages/device/calibrationList/calibration.api.js
index 357826f..924a5b9 100644
--- a/pages/device/calibrationList/calibration.api.js
+++ b/pages/device/calibrationList/calibration.api.js
@@ -2,7 +2,7 @@ import request from '@/nx/request'
export function list(params) {
return request({
- url: '/lims/bus/deviceBusCalibration/queryPageList',
+ url: '/qms/device-calibration/page',
method: 'GET',
params
})
diff --git a/pages/device/deviceBusInfo/baseInfo.vue b/pages/device/deviceBusInfo/baseInfo.vue
index 0ae952a..3da4748 100644
--- a/pages/device/deviceBusInfo/baseInfo.vue
+++ b/pages/device/deviceBusInfo/baseInfo.vue
@@ -1,7 +1,7 @@
-
+
@@ -77,7 +77,7 @@ function tabClick(e) {
background-color: #f0f2f5;
height: 100%;
.content {
- height: 75vh;
+ // height: 75vh;
}
}
:deep(.u-tabs__wrapper__nav__item__text) {
diff --git a/pages/device/deviceBusInfo/deviceBusInfo.data.js b/pages/device/deviceBusInfo/deviceBusInfo.data.js
index a2c5eb0..4b524f4 100644
--- a/pages/device/deviceBusInfo/deviceBusInfo.data.js
+++ b/pages/device/deviceBusInfo/deviceBusInfo.data.js
@@ -4,14 +4,12 @@ export function getColumn(isFold) {
{
label: '设备名称',
name: 'deviceName',
- width: isFold ? 200 : 130,
- fixed: true
+ width: isFold ? 200 : 130
},
{
label: '别名',
name: 'alias',
- width: isFold ? 120 : 90,
- fixed: true
+ width: isFold ? 120 : 90
},
{
label: '设备状态',
@@ -27,17 +25,17 @@ export function getColumn(isFold) {
{
label: '规格型号',
name: 'modelNo',
- width: isFold ? 160 : 130
+ width: isFold ? 180 : 150
},
{
label: '使用班组',
name: 'deptName',
- width: isFold ? 140 : 100
+ width: isFold ? 180 : 150
},
{
label: '负责人',
name: 'managerUserName',
- width: isFold ? 100 : 90
+ width: isFold ? 150 : 120
},
{
name: 'operation',
diff --git a/pages/device/deviceBusInfo/index.vue b/pages/device/deviceBusInfo/index.vue
index e36f605..b253949 100644
--- a/pages/device/deviceBusInfo/index.vue
+++ b/pages/device/deviceBusInfo/index.vue
@@ -1,60 +1,47 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 分类和产品
+
+
+
+
+
+
+ 重置
+
+
@@ -75,28 +62,39 @@ const column = computed(() => getColumn(isFold.value))
const isFold = ref(false)
const roomTreeData = ref([])
-const { scanQRInfo } = toRefs(nx.$store('biz'))
-watch(scanQRInfo, newVal => {
- if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusInfo/index') {
- try {
- const codeObj = JSON.parse(newVal)
+function handleScan() {
+ uni.scanCode({
+ onlyFromCamera: true,
+ success: function (res) {
+ const codeObj = JSON.parse(res.result)
handleDetail({ id: codeObj.id })
- scanQRInfo.value = ''
- } catch (error) {
- scanQRInfo.value = ''
- uni.showToast({
- title: '请扫描设备码',
- icon: 'none'
- })
}
- }
-})
-onShow(() => {
- scanQRInfo.value = ''
-})
+ })
+}
+// const { scanQRInfo } = toRefs(nx.$store('biz'))
+// watch(scanQRInfo, newVal => {
+// if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusInfo/index') {
+// try {
+// const codeObj = JSON.parse(newVal)
+// handleDetail({ id: codeObj.id })
+// scanQRInfo.value = ''
+// } catch (error) {
+// scanQRInfo.value = ''
+// uni.showToast({
+// title: '请扫描设备码',
+// icon: 'none'
+// })
+// }
+// }
+// })
+// onShow(() => {
+// scanQRInfo.value = ''
+// })
async function getTreeData() {
const res = await treeData()
- roomTreeData.value = res
+ console.log(res)
+
+ roomTreeData.value = nx.$helper.handleTree([...res])
}
getTreeData()
const { lockOrientation } = useScreenOrientation()
@@ -180,25 +178,26 @@ async function handleDetail(row, index) {
diff --git a/pages/device/deviceBusUseRecord/StandardSelectPopup.vue b/pages/device/deviceBusUseRecord/StandardSelectPopup.vue
new file mode 100644
index 0000000..0223f03
--- /dev/null
+++ b/pages/device/deviceBusUseRecord/StandardSelectPopup.vue
@@ -0,0 +1,80 @@
+
+
+
+ 标准物质选择
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.code }}
+ {{ item.modelNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/device/deviceBusUseRecord/detail.vue b/pages/device/deviceBusUseRecord/detail.vue
index 3763137..f68e08a 100644
--- a/pages/device/deviceBusUseRecord/detail.vue
+++ b/pages/device/deviceBusUseRecord/detail.vue
@@ -9,7 +9,7 @@
开始时间:
- {{ detailInfo.useTimeStart }}
+ {{ nx.$helper.formateToDateTime(detailInfo.useTimeStart) }}
@@ -19,7 +19,7 @@
结束时间:
- {{ detailInfo.useTimeEnd }}
+ {{ nx.$helper.formateToDateTime(detailInfo.useTimeEnd) }}
@@ -42,16 +42,19 @@
{{ detailInfo.humidity }}
样品类别/个数/任务:
- {{ detailInfo.useRemark }}
+ >检测项目:
+ {{ detailInfo.useItem }}
+
@@ -101,4 +114,7 @@ function handleOpen() {
:deep(.uicon-close) {
font-size: 22px !important;
}
+:deep(.u-popup__content__close--top-right) {
+ top: 30px;
+}
diff --git a/pages/device/deviceBusUseRecord/index.vue b/pages/device/deviceBusUseRecord/index.vue
index 8ea55d3..589904a 100644
--- a/pages/device/deviceBusUseRecord/index.vue
+++ b/pages/device/deviceBusUseRecord/index.vue
@@ -14,7 +14,12 @@
- handleTestAction(id)" />
+ handleTestAction(id)"
+ @scanResult="result => handleScanResult(result)"
+ />
@@ -51,28 +56,49 @@
- 样品类别/个数/任务:
-
-
-
-
-
- {{ useIng ? '结束使用人' : '开始使用人' }}:
-
-
+ 检测项目:
+
备注:
-
+
-
+
+
+
+
+
+
+
+
+
+
+ handleSampleSelect(list, 'sample')" />
+ handleSampleSelect(list, 'standard')" />
@@ -98,10 +127,12 @@
import { ref, reactive, onMounted, onUnmounted, watch, toRefs } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getDeviceBusInfoById } from '@/nx/api/deviceInfo'
-import { getUseRecordById, addUseRecord, editUseRecord } from './useRecord.api'
+import { getUseRecordById, addUseRecord, editUseRecord, getDetailList } from './useRecord.api'
import dailyCheckApi from '@/nx/api/dailyCheck'
import { useScreenOrientation } from '@/nx/hooks/useScreenOrientation'
import { useGridCol } from '@/nx/hooks/useGridCol'
+import SampleSelectPopup from './SampleSelectPopup.vue'
+import StandardSelectPopup from './StandardSelectPopup.vue'
import nx from '@/nx'
const { gridCol } = useGridCol([700], [6, 4])
@@ -116,53 +147,116 @@ const detailSchema = [
{ label: '设备编码', value: 'deviceCode' },
{ label: '使用班组', value: 'deptName' }
]
+const columns = ref([
+ { title: '样品名称', key: 'sampleName', align: 'center' },
+ { title: '样品编号', key: 'sampleCode', align: 'center' },
+ { title: '操作', key: 'action', width: '100px', align: 'center' }
+])
+const tableData = ref([])
+
+const sampleSelectPopupRef = ref()
+const standardSelectPopupRef = ref()
+function handleSelect(type) {
+ if (type === 'sample') {
+ sampleSelectPopupRef.value.show()
+ } else {
+ standardSelectPopupRef.value.show()
+ }
+}
+function handleSampleSelect(dataList, type) {
+ const transformData = newData => {
+ if (type === 'sample') {
+ return {
+ id: newData.id,
+ detailType: 'sample',
+ sampleCode: newData.sampleCode,
+ sampleName: newData.sampleName,
+ taskNo: newData.taskNo,
+ taskId: newData.businessAssayTaskId
+ }
+ } else {
+ return {
+ id: newData.id,
+ detailType: 'standard',
+ sampleCode: newData.code,
+ sampleName: newData.name
+ }
+ }
+ }
+
+ for (const newData of dataList) {
+ const index = tableData.value.findIndex(item => item.id === newData.id)
+ const transformedItem = transformData(newData)
+
+ if (index > -1) {
+ // 找到匹配的项,直接替换
+ tableData.value[index] = transformedItem
+ } else {
+ // 没有找到匹配的项,添加到末尾
+ tableData.value.push(transformedItem)
+ }
+ }
+}
+
+function handleDelete(row) {
+ tableData.value = tableData.value.filter(item => item.id !== row.id)
+}
const pageLoading = ref(false)
const userId = nx.$store('user').userInfo['id']
const userName = nx.$store('user').userInfo['realname']
let detailInfo = ref({})
-const { scanQRInfo } = toRefs(nx.$store('biz'))
-watch(scanQRInfo, newVal => {
- if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusUseRecord/index') {
- try {
- const codeObj = JSON.parse(newVal)
- if (!pageLoading.value) {
- getLastDailyCheckOfToday(codeObj.id)
- }
- scanQRInfo.value = ''
- } catch (error) {
- scanQRInfo.value = ''
- uni.showToast({
- title: '请扫描设备码',
- icon: 'none'
- })
- }
- }
-})
-onShow(() => {
- scanQRInfo.value = ''
-})
+// const { scanQRInfo } = toRefs(nx.$store('biz'))
+// watch(scanQRInfo, newVal => {
+// if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusUseRecord/index') {
+// try {
+// const codeObj = JSON.parse(newVal)
+// if (!pageLoading.value) {
+// getLastDailyCheckOfToday(codeObj.id)
+// }
+// scanQRInfo.value = ''
+// } catch (error) {
+// scanQRInfo.value = ''
+// uni.showToast({
+// title: '请扫描设备码',
+// icon: 'none'
+// })
+// }
+// }
+// })
+// onShow(() => {
+// scanQRInfo.value = ''
+// })
+function handleScanResult(result) {
+ const codeObj = JSON.parse(result)
+ if (!pageLoading.value) {
+ getLastDailyCheckOfToday(codeObj.id)
+ }
+}
// 检查该设备在使用前是否已经点检过
-function getLastDailyCheckOfToday(id) {
+async function getLastDailyCheckOfToday(id) {
pageLoading.value = true
try {
- dailyCheckApi.getLastDailyCheckOfToday({ deviceId: id }).then(async res => {
- if (!res || res.submitFlag == '0') {
- setTimeout(() => {
- uni.showToast({
- title: '设备使用前请先进行设备点检',
- icon: 'none'
- })
- }, 100)
- pageLoading.value = false
- nx.$router.go('/pages/device/deviceBusDailyCheck/index', { deviceId: id })
- } else {
- getDeviceInfo(id)
- await getUseIngRecord(id)
- pageLoading.value = false
- }
- })
+ // dailyCheckApi.getLastDailyCheckOfToday({ deviceId: id }).then(async res => {
+ // if (!res || res.submitFlag == '0') {
+ // setTimeout(() => {
+ // uni.showToast({
+ // title: '设备使用前请先进行设备点检',
+ // icon: 'none'
+ // })
+ // }, 100)
+ // pageLoading.value = false
+ // nx.$router.go('/pages/device/deviceBusDailyCheck/index', { deviceId: id })
+ // } else {
+ // getDeviceInfo(id)
+ // await getUseIngRecord(id)
+ // pageLoading.value = false
+ // }
+ // })
+ getDeviceInfo(id)
+ await getUseIngRecord(id)
+ pageLoading.value = false
} catch (error) {
pageLoading.value = false
}
@@ -186,11 +280,17 @@ async function getUseIngRecord(id) {
formData.value = res
formData.value.userIdEnd = userId
formData.value.userNameEnd = userName
+ getUseRecordDetailList(res.id)
+
// checkUseStatusIsMySelf(res)
} else {
useIng.value = false
}
}
+async function getUseRecordDetailList(id) {
+ const res = await getDetailList({ parentId: id })
+ tableData.value = res
+}
// 定义一个变量,用于标记当前是否有 modal 正在显示
let isModalShowing = false
// 如果设备在使用中,检查设备使用记录是否是所登录用户的
@@ -217,8 +317,6 @@ function checkUseStatusIsMySelf(useInfo) {
}
let formData = ref({
- userName,
- userId,
stateBefore: '正常'
})
@@ -244,15 +342,15 @@ function handleValidate() {
})
}
}
- if (!formData.value.userName) {
+ if (!formData.value.useItem) {
return uni.showToast({
- title: '请输入使用人',
+ title: '请输入检测项目',
icon: 'none'
})
}
- if (!formData.value.useRemark) {
+ if (tableData.value.length === 0) {
return uni.showToast({
- title: '请输入样品类别/个数/任务',
+ title: '请选择样品和标准物质',
icon: 'none'
})
}
@@ -266,7 +364,8 @@ async function submitConfirm() {
...formData.value,
deviceId: detailInfo.value.id,
temperature: formData.value.temperature || '/',
- humidity: formData.value.humidity || '/'
+ humidity: formData.value.humidity || '/',
+ detailList: tableData.value
}
// 如果在使用中加入使用结束参数
let currentTime = nx.$dayjs().format('YYYY-MM-DD HH:mm:ss')
@@ -288,10 +387,9 @@ async function submitConfirm() {
})
}
function reset() {
- formData.value = {
- userName: nx.$store('user').userInfo['realname']
- }
+ formData.value = {}
detailInfo.value = {}
+ tableData.value = []
}
function handleUseRecord() {
nx.$store('biz').deviceInfo = detailInfo.value
@@ -308,7 +406,8 @@ function handleUseRecord() {
background-color: #fff;
height: 100%;
padding: 16px;
- padding-top: 10px;
+ padding-top: 0px;
+ padding-bottom: 0px;
font-size: 16px;
.title {
font-size: 22px;
diff --git a/pages/device/deviceBusUseRecord/list.vue b/pages/device/deviceBusUseRecord/list.vue
index 533fa32..3d3adfb 100644
--- a/pages/device/deviceBusUseRecord/list.vue
+++ b/pages/device/deviceBusUseRecord/list.vue
@@ -1,8 +1,6 @@
-
-
-
+
@@ -18,7 +16,7 @@
@custom="reset"
>
-
+
@@ -58,12 +57,13 @@ const column = reactive([
{
label: '开始使用人',
name: 'userName',
- width: 100
+ width: 150
},
{
label: '开始时间',
name: 'useTimeStart',
- width: 170
+ width: 170,
+ formatter: true
},
{
label: '结束使用人',
@@ -73,7 +73,8 @@ const column = reactive([
{
label: '结束时间',
name: 'useTimeEnd',
- width: 170
+ width: 170,
+ formatter: true
},
{
label: '使用前状态',
@@ -94,10 +95,22 @@ const column = reactive([
{
name: 'operation',
type: 'operation',
+ width: 100,
label: '操作',
renders: [{ name: '详情', func: 'detail' }]
}
])
+function columnFormatter(row, column, rowIndex, columnIndex) {
+ // 判断是哪一列需要格式化
+ if (column.name === 'useTimeStart') {
+ return nx.$helper.formateToDateTime(row.useTimeStart)
+ }
+ if (column.name === 'useTimeEnd') {
+ return nx.$helper.formateToDateTime(row.useTimeEnd)
+ }
+ // 对于不需要特殊格式化的列,返回原始值
+ return row[column.name]
+}
let zbTableRef = ref(null)
const deviceId = ref('')
const deviceText = ref('')
@@ -148,10 +161,6 @@ function handleDetail(row) {
diff --git a/pages/material/useRecord/index.vue b/pages/material/useRecord/index.vue
new file mode 100644
index 0000000..1ee24b5
--- /dev/null
+++ b/pages/material/useRecord/index.vue
@@ -0,0 +1,228 @@
+
+
+
+
+ 监督人:
+
+
+
+ 是否配置:
+
+
+
+
+
+
+
+
+ 配置后危化品:
+
+
+ 参与配置危化品选择:
+
+
+
+
+
+
+ 危化品名称:{{ item.name }}
+
+
+ 规格型号:{{ item.modelNo }}
+
+
+ 使用量:{{ item.operationQuantity }}
+
+
+
+
+
+ 配置体积:{{ configVolume }}
+ 备注:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/material/useRecord/useConfirm.vue b/pages/material/useRecord/useConfirm.vue
new file mode 100644
index 0000000..c137f34
--- /dev/null
+++ b/pages/material/useRecord/useConfirm.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ 全选
+
+
+
+
+
+
+
+
+
+
+ 危化品名称:{{ item.infomationName }}
+ 使用人:{{ item.userName }}
+ 使之前量:{{ item.beforeQuantity }}
+ 本次用量:{{ item.operationQuantity }}
+ 余量:{{ item.afterQuantity }}
+ 说明:{{ item.reason }}
+ 使用日期:{{ nx.$dayjs(item.useDate).format('YYYY-MM-DD') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/material/useRecord/useForm.vue b/pages/material/useRecord/useForm.vue
new file mode 100644
index 0000000..8bae4c9
--- /dev/null
+++ b/pages/material/useRecord/useForm.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+ 危化品名称:{{ checkInfo.name }}
+
+
+ 规格型号:{{ checkInfo.modelNo }}
+
+
+ 计量单位:{{ checkInfo.unit }}
+
+
+ 总量:{{ checkInfo.remainingVolume }}
+
+
+ 使用量:
+
+
+
+
+ 用途:
+
+
+
+ 备注:
+
+
+
+
+
+
+
+
+
diff --git a/pages/material/useUpMark/index.vue b/pages/material/useUpMark/index.vue
new file mode 100644
index 0000000..014e231
--- /dev/null
+++ b/pages/material/useUpMark/index.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+ 物料编号:{{ item.code }}
+
+
+ 物料名称:{{ item.name }}
+
+ 规格型号:{{ item.modelNo }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/material/wash/index.vue b/pages/material/wash/index.vue
new file mode 100644
index 0000000..48ada02
--- /dev/null
+++ b/pages/material/wash/index.vue
@@ -0,0 +1,102 @@
+
+
+
+
+ 试剂瓶类型:
+
+
+
+ 试剂瓶名称:
+
+
+
+ 数量:
+
+
+
+ 备注:
+
+
+
+
+
+
+
+
+
diff --git a/static/images/add.png b/static/images/add.png
new file mode 100644
index 0000000..27330d5
Binary files /dev/null and b/static/images/add.png differ
diff --git a/static/images/menus/confirm.png b/static/images/menus/confirm.png
new file mode 100644
index 0000000..691cb5f
Binary files /dev/null and b/static/images/menus/confirm.png differ
diff --git a/static/images/menus/recycle.png b/static/images/menus/recycle.png
new file mode 100644
index 0000000..8e18ae0
Binary files /dev/null and b/static/images/menus/recycle.png differ
diff --git a/static/images/menus/sign.png b/static/images/menus/useUpMark.png
similarity index 100%
rename from static/images/menus/sign.png
rename to static/images/menus/useUpMark.png
diff --git a/static/images/menus/wash.png b/static/images/menus/wash.png
new file mode 100644
index 0000000..5f01e64
Binary files /dev/null and b/static/images/menus/wash.png differ
diff --git a/uview-plus/README.md b/uview-plus/README.md
index 930e9cc..6cf8517 100644
--- a/uview-plus/README.md
+++ b/uview-plus/README.md
@@ -12,7 +12,19 @@
## 说明
-uview-plus,是uni-app全面兼容vue3/nvue/鸿蒙/uni-app-x的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
+【文档有广告,不喜勿入谢谢】
+
+uview-plus,是uni-app全面兼容vue3/nvue/鸿蒙/uni-app-x(已经发布https://ext.dcloud.net.cn/plugin?name=uview-ultra)的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
+
+## 版本
+
+### uview-plus v3 (uni-app版本)
+1. 保持选项式API,尽可能兼容原有uview2各种API,比如mixins,方便大家升级更容易;
+2. 新手友好,保持原汁原味js,二次开发方便,未使用typescript重写,但带有独立的类型申明包;
+
+### uview-ultra v4 (uni-app-x版本)
+1. 尽可能保持原有组件的API一致,方便大家升级;
+2. 使用uts + 组合式API架构级全新重构,但仍然保持源码的简易,不封装过于复杂,便于修改。
## 可视化设计
@@ -32,7 +44,13 @@ uview-plus现已推出免费可视化设计,可以方便的进行页面可视
您可以通过**微信**扫码,查看最佳的演示效果。
-
+
+| H5 | 微信小程序 | 安卓 | 鸿蒙Next(已上架) |
+| --- | --- | --- | --- |
+|
|
|
|
|
+
+
+
## 链接
@@ -41,9 +59,6 @@ uview-plus现已推出免费可视化设计,可以方便的进行页面可视
- [升级指南](https://uview-plus.jiangruyi.com/components/changeGuide.html)
- [关于我们](https://uview-plus.jiangruyi.com/cooperation/about.html)
-## 交流反馈
-
-欢迎加入我们的QQ群交流反馈:[点此跳转](https://uview-plus.jiangruyi.com/components/addQQGroup.html)
## 关于PR
diff --git a/uview-plus/changelog.md b/uview-plus/changelog.md
index 90de199..95ec865 100644
--- a/uview-plus/changelog.md
+++ b/uview-plus/changelog.md
@@ -1,3 +1,1230 @@
+## 3.7.20(2026-02-26)
+improvement:box组件示例改为组合式API
+
+## 3.7.19(2026-02-25)
+improvement:agreement组件示例改为组合式API
+
+## 3.7.18(2026-02-24)
+improvement:barcode组件示例改为组合式API
+
+## 3.7.17(2026-02-11)
+fix: 修复steps组件current失效
+
+## 3.7.16(2026-02-09)
+improvment: choose组件示例改为组合式API
+
+## 3.7.14(2026-02-08)
+refactor: up-signature组件改用up-canvas组件
+
+## 3.7.13(2026-02-07)
+add: 新增up-canvas组件
+
+## 3.7.12(2026-02-07)
+improvment: 优化签名组件兼容性修复微信小程序支持
+
+## 3.7.11(2026-02-06)
+add: action-sheet组件新增nameKey和subnameKey属性
+
+## 3.7.10(2026-02-06)
+add: checkbox-group组件的change事件增加第二个返回参数为当前触发变化的checkbox组件name信息等
+
+## 3.7.9(2026-02-06)
+fix: 修复align-self属性值缺少d导致样式不生效的问题
+
+## 3.7.8(2026-02-05)
+improvment: 优化card组件示例
+
+## 3.7.7(2026-02-05)
+add: select组件新增closeSelect方法用于自定义控制关闭
+
+
+## 3.7.6(2026-02-04)
+add: picker组件示例onLoad后加载数据
+
+## 3.7.5(2026-02-03)
+add: up-slider组件新增垂直模式
+
+## 3.7.4(2026-02-03)
+add: box组件props优化及新增leftIcon/leftTitle/rightTopIcon/rightTopTitle/rightBottomIcon/rightBottomTitle参数
+
+## 3.7.3(2026-02-03)
+improvment: city-locate组件示例改为组合式API
+
+## 3.7.2(2026-02-02)
+improvment: color-picker组件示例改为组合式API
+
+## 3.7.1(2026-02-02)
+fix:修复qrcode缺失的preview定义emit
+
+## 3.7.0(2026-02-01)
+fix: 修复up-qrcode二维码在微信小程序报错
+
+## 3.6.134(2026-01-30)
+chore: dragsort可通过参数控制是否可震动
+
+## 3.6.132(2026-01-30)
+feat: dragsort支持自定义拖动句柄
+
+## 3.6.131(2026-01-29)
+fix: 优化dragdort组件
+
+## 3.6.130(2026-01-28)
+improvment: cropper组件示例改为组合式API
+
+## 3.6.129(2026-01-28)
+improvment: drag组件示例改为组合式API
+
+## 3.6.128(2026-01-27)
+improvment: tooltip组件示例改为组合式API
+
+## 3.6.127(2026-01-27)
+improvment: textarea组件示例改为组合式API
+
+## 3.6.126(2026-01-27)
+improvment: text组件示例改为组合式API
+
+## 3.6.125(2026-01-27)
+fix: 修复Cascader级联选择器设置默认值显示问题
+
+修复在传入默认值时多列只会显示第一列bug
+
+## 3.6.124(2026-01-27)
+improvment: tabs组件示例改为组合式API
+
+## 3.6.123(2026-01-27)
+improvment: swiper组件示例改为组合式API
+
+## 3.6.122(2026-01-26)
+fix: 🐛 修复u-input在change事件里无法获取value的异常情况 #950
+
+## 3.6.120(2026-01-26)
+improvment: 增加Cascader级联选择器的取消事件
+
+## 3.6.119(2026-01-26)
+improvment: skeleton组件示例改为组合式API
+
+## 3.6.118(2026-01-26)
+improvment: steps组件示例改为组合式API
+
+## 3.6.117(2026-01-24)
+improvment: subsection组就示例改为组合式API
+
+## 3.6.116(2026-01-24)
+improvment: 优化Cascader级联选择器右上角关闭图标的显示控制
+
+如果在级联文本过长或者类目过多时关闭图标会与类目文字重合,现在增加控制关闭图标的控制可以控制是否需要显示关闭图标,底部有取消按钮,关闭图标不是必须的
+
+## 3.6.115(2026-01-23)
+improvment: scroll-list组就示例改为组合式API
+
+## 3.6.114(2026-01-23)
+improvment: readmore组就示例改为组合式API
+
+## 3.6.113(2026-01-23)
+improvment: popover组就示例改为组合式API
+
+## 3.6.112(2026-01-23)
+improvment: picker组件示例改为组合式API
+
+## 3.6.111(2026-01-23)
+improvment: no-network组件示例改为组合式API
+
+## 3.6.110(2026-01-22)
+improvment: navbar组件示例改为组合式API
+
+## 3.6.109(2026-01-22)
+improvment: modal组件示例改为组合式API
+
+## 3.6.108(2026-01-22)
+improvment: loadmore组件示例改为组合式API
+
+## 3.6.107(2026-01-21)
+improvment: list组件示例改为组合式API
+
+## 3.6.106(2026-01-21)
+improvment: index-list2组件示例改为组合式API
+
+## 3.6.105(2026-01-21)
+improvment: index-list组件示例改为组合式API
+
+## 3.6.104(2026-01-21)
+improvment: layout组件示例改为组合式API
+
+## 3.6.103(2026-01-21)
+improvment: input组件示例改为组合式API
+
+## 3.6.102(2026-01-20)
+fix: 修复cascader缺少emits申明
+
+## 3.6.101(2026-01-20)
+improvment: form组件示例改为组合式API
+
+## 3.6.100(2026-01-20)
+improvment: datetimepicker组件示例改为组合式API
+
+## 3.6.99(2026-01-20)
+fix: 修复cate-tab组件设置默认current不生效
+
+## 3.6.98(2026-01-20)
+improvment: code-input组件示例改为组合式API
+
+## 3.6.97(2026-01-20)
+improvment: calendar组件示例改为组合式API
+
+## 3.6.96(2026-01-20)
+improvment: avatar组件示例改为组合式API
+
+## 3.6.95(2026-01-20)
+improvment: album组件示例改为组合式API
+
+## 3.6.94(2026-01-19)
+improvment: waterfall组件示例改为组合式API
+
+## 3.6.93(2026-01-19)
+improvment: upload组件示例改为组合式API
+
+## 3.6.92(2026-01-17)
+improvment: toast组件示例改为组合式API
+
+## 3.6.91(2026-01-16)
+improvment: tag组件示例改为组合式API
+
+## 3.6.90(2026-01-16)
+improvment: table2组件示例改为组合式API
+
+## 3.6.89(2026-01-16)
+add: 增加鸿蒙Next已上架二维码
+
+## 3.6.88(2026-01-16)
+improvment: table组件示例改为组合式API
+
+## 3.6.87(2026-01-15)
+tabbar2组件示例改为组合式API
+## 3.6.86(2026-01-15)
+improvment: tabbar组件示例改为组合式API
+## 3.6.85(2026-01-15)
+improvment: switch组件示例改为组合式API
+
+## 3.6.84(2026-01-15)
+improvment: slider组件示例改为组合式API
+
+## 3.6.83(2026-01-15)
+improvment: search组件示例改为组合式API
+
+## 3.6.82(2026-01-15)
+improvment: progress组件示例改为组合式API
+
+## 3.6.81(2026-01-15)
+improvment: parse组件示例改为组合式API
+
+
+## 3.6.80(2026-01-15)
+improvment: number-box组件示例改为组合式API
+
+## 3.6.78(2026-01-15)
+improvment: notify组件示例改为组合式API
+
+## 3.6.77(2026-01-15)
+improvment: notice-bar组件示例改为组合式API
+
+## 3.6.76(2026-01-15)
+ improvment: keyborad组件示例改为组合式API
+
+## 3.6.75(2026-01-15)
+improvment: dropdown组件示例改为组合式API
+
+## 3.6.74(2026-01-15)
+fix: 修复parse组件props缺少)
+
+## 3.6.73(2026-01-15)
+improvment: count-to组件示例改为组合式API
+
+## 3.6.72(2026-01-15)
+improvment: count-down组件示例改为组合式API
+
+## 3.6.71(2026-01-14)
+improvment: collapse组件示例改为组合式API
+
+## 3.6.70(2026-01-14)
+improvment: code组件示例改为组合式API
+
+## 3.6.69(2026-01-14)
+improvment: card组件示例改为组合式API
+
+## 3.6.68(2026-01-13)
+fix: 修复list组件在支付宝小程序下scrolltolower无法触发 #422
+## 3.6.67(2026-01-13)
+fix: 删除经典下拉框的打印
+
+## 3.6.66(2026-01-12)
+fix: 修正 RadioSlots 类型定义
+
+## 3.6.65(2026-01-12)
+fix: 修复u-picker在hasInput下回显异常和vue报错
+
+## 3.6.64(2026-01-12)
+fix: 解决cropper在ios小程序中底部操作栏被遮挡的问题
+
+## 3.6.63(2026-01-10)
+improvment: badge组建示例改为组合式API
+
+## 3.6.62(2026-01-10)
+improvment: alert组件示例改为组合式API
+
+## 3.6.61(2026-01-09)
+improvment: action-sheet组件示例改为组合式API
+
+## 3.6.60(2026-01-09)
+improvment: transition组件示例改为组合式API
+
+## 3.6.59(2026-01-09)
+improvment: swipe-action组件示例改为组合式API
+
+## 3.6.58(2026-01-09)
+improvment: sticky组件示例改为组合式API
+
+## 3.6.57(2026-01-08)
+improvment: 优化完善no-nerwork组件细节
+
+## 3.6.56(2026-01-08)
+fix: 修复signature的t方法
+
+## 3.6.55(2026-01-08)
+perf:补充多处TS声明提示信息 #953
+
+## 3.6.54(2026-01-08)
+fix: 修复slider示例页面变量重复
+## 3.6.53(2026-01-08)
+fix: 修复qrcode组件鸿蒙兼容
+
+## 3.6.52(2026-01-08)
+fix: nvue下采用webview支持二维码显示logo(因为gcanvas不支持图片渲染)
+
+## 3.6.51(2026-01-08)
+fix: 修复qrcode组件在App不显示logo
+
+improvment: qrcode逻辑优化封装
+
+## 3.6.50(2026-01-06)
+improvment: rate组件示例改为组合式API
+
+## 3.6.49(2026-01-06)
+improvment: radio组件示例改为组合式API
+
+## 3.6.48(2026-01-06)
+improvment: popup组件示例改为组合式API
+
+## 3.6.47(2026-01-06)
+improvment: overlay示例改为组合式API
+
+## 3.6.46(2026-01-05)
+improvment: loading-page组建示例改为组合式API
+
+## 3.6.45(2026-01-05)
+improvment: loading-icon组件示例改为组合式API
+
+## 3.6.44(2026-01-05)
+improvment: link组件示例改为组合式API
+
+## 3.6.43(2026-01-05)
+improvment: line组件示例改为组合式API
+
+## 3.6.42(2026-01-04)
+improvment: layzload组件示例改为组合式API
+
+## 3.6.41(2026-01-04)
+fix: 修复select组件缺少mixin
+
+## 3.6.40(2026-01-04)
+improvment: 去除ReadmeQQ群链接
+
+## 3.6.39(2026-01-04)
+improvment: image组件示例改为组合式API
+
+## 3.6.38(2026-01-03)
+improvment: icon示例改为组合式API
+
+## 3.6.37(2025-12-31)
+improvment: 静态资源修复
+
+## 3.6.36(2025-12-30)
+improvment: grid示例改为组合式API
+
+## 3.6.35(2025-12-25)
+fix: 修复grid布局由于内容溢出导致形变
+
+## 3.6.34(2025-12-24)
+fix: modal组件asyncCloseTip多语言key未对应
+
+## 3.6.33(2025-12-23)
+fix: 提升$parent方法兼容性修复表单验证失效
+
+## 3.6.32(2025-12-21)
+improvment: 优化slider、search、steps等组件细节
+
+## 3.6.31(2025-12-19)
+improvment: 优化search组件等
+
+## 3.6.30(2025-12-19)
+improvment: 优化完善部分文件注释
+
+## 3.6.29(2025-12-18)
+fix: 修复语法错
+## 3.6.28(2025-12-18)
+fix: 优化$parent方法兼容性
+
+## 3.6.27(2025-12-17)
+add: datetimepicker增加maskClass和maskStyle属性
+
+## 3.6.26(2025-12-16)
+add: picker增加maskClass/maskStyle属性
+
+## 3.6.25(2025-12-15)
+fix: 修复cascader对列表数据层级差异的兼容问题
+
+## 3.6.24(2025-12-14)
+fix: 修复将empty组件的mode设置为wifi后图标不能显示的问题 #928
+
+## 3.6.23(2025-12-13)
+fix: 修复cascader已选中三级菜单后再选择二级菜单时tabs报错问题
+
+## 3.6.22(2025-12-12)
+fix: dragsort组件拖动抖动的问题
+
+## 3.6.21(2025-12-09)
+ fix: form-item初始化时机优化
+
+## 3.6.20(2025-12-08)
+improvment: 优化form组件语法普适性
+
+## 3.6.19(2025-12-01)
+fix: 修复商品SKU组件i18n
+
+fix: Choose组件会有width警告提示 #915
+
+## 3.6.18(2025-11-30)
+feature: upload组件file模式支持微信小程序chooseMessageFile的extension属性 #913
+
+## 3.6.17(2025-11-18)
+add: picker-data支持表单验证
+
+## 3.6.16(2025-11-18)
+improvment: 优化下拉菜单示例
+
+## 3.6.15(2025-11-10)
+fix: 修复tabs添加activeStyle切换后滑块无法居中
+
+## 3.6.14(2025-11-07)
+fix: 修复引用拼写
+
+## 3.6.13(2025-11-06)
+improvment: 组合式API升级之gap示例改造
+
+## 3.6.12(2025-11-05)
+improvment: empty示例改为组合式API
+
+## 3.6.11(2025-11-05)
+improvment: divider示例改为组合式API
+
+## 3.6.10(2025-11-04)
+improvment: checkbox示例改为组合式API
+
+## 3.6.9(2025-10-21)
+improvment: cell示例改为组合式API
+
+## 3.6.8(2025-10-20)
+imporvment: button示例改为组合式API
+
+## 3.6.7(2025-10-17)
+fix: 优化picker当前列判断
+
+## 3.6.6(2025-10-13)
+fix: 修复getWindowInfo微信小程序下报警告
+
+## 3.6.5(2025-10-11)
+🐛fix: 修复picker双向绑定 #753
+
+## 3.6.4(2025-10-09)
+🐛fix: import rpx2px function and add to exports in index.js
+
+## 3.6.3(2025-10-09)
+fix: 修复getWindowInfo微信小程序下报警告
+
+## 3.6.2(2025-10-05)
+fix: 修复picker双向绑定 #753
+
+## 3.6.1(2025-10-01)
+fix: 修复poster海报组件微信小程序图片绘制失败
+
+## 3.6.0(2025-09-30)
+fix: 修复parse事件报错及统一事件名称小写
+
+## 3.5.57(2025-09-30)
+improvment: 更换部分资源域名提升访问速度
+
+## 3.5.56(2025-09-29)
+fix: 修复picker和datetime-picker在部分原生渲染时hasInput触发键盘弹起
+
+## 3.5.55(2025-09-29)
+feat: waterfall新增after-add-one和after-add-all事件
+
+## 3.5.54(2025-09-25)
+🐞 fix: 解决索引列表初始化时获取不到高度导致的字母列表异常
+
+## 3.5.53(2025-09-19)
+improvment: back-top示例组合式API改造
+
+## 3.5.52(2025-09-19)
+fix: 优化tabbar的borderColor优先级
+
+## 3.5.51(2025-09-19)
+fix: 微信小程序下u-transition包裹的内容因为没有默认flex column而出现布局错误
+
+## 3.5.50(2025-09-18)
+fix: 修复tabbar组件borderColor类型
+
+## 3.5.49(2025-09-18)
+fix: 修复action-sheet列表中第一个item的hover style
+
+## 3.5.48(2025-09-17)
+fix: 修复table2的fixedHeader参数生效
+
+## 3.5.47(2025-09-16)
+fix: 修复modelValue类型
+
+## 3.5.46(2025-09-15)
+feat: table2新增支持span-method合并单元格
+
+## 3.5.45(2025-09-13)
+fix: 修复数据分配时未等待获取元素后再执行下一次循环导致数据插入错误,addTime属性未使用修改。
+
+## 3.5.44(2025-09-12)
+fix: 单选快捷组件作为受控组件,当modelValue清除选择时,组件状态未被清除。
+
+## 3.5.43(2025-09-10)
+fix: 增加subsection兼容性索引转为数字
+
+## 3.5.42(2025-09-09)
+feat: index-list增加下边距高度
+
+## 3.5.41(2025-09-08)
+fix: 修复cascader方法引用位置
+
+## 3.5.40(2025-09-08)
+feat: goods-sku组件支持多语言
+
+## 3.5.39(2025-09-07)
+fix: 修复cascader多语言问题
+
+## 3.5.38(2025-09-07)
+improvment: 完善演示图标
+
+## 3.5.37(2025-09-05)
+feat: cascader支持多语言
+
+## 3.5.36(2025-09-04)
+improvment: 补充图标
+
+## 3.5.35(2025-09-04)
+feat: cascader级联组件增加垂直头部与单列选项支持
+
+## 3.5.34(2025-09-03)
+improvement: 优化steps-item
+
+## 3.5.33(2025-09-02)
+升级uni-app至最新版
+## 3.5.32(2025-09-01)
+feat: cate-tab支持非联动跟随的单一切换模式
+
+feat: choose组件示例使用cate-tab的单一切换模式
+
+
+## 3.5.31(2025-09-01)
+feat: 新增choose通用选项选择器组件
+
+## 3.5.30(2025-08-31)
+fix: 修复缺失cascader级联选择器
+
+## 3.5.29(2025-08-30)
+feat: 新增cascader级联选择器
+
+## 3.5.28(2025-08-29)
+feat: 多语言增加泰语
+
+## 3.5.27(2025-08-29)
+feat: 新增基于tooltip的popover组件
+
+## 3.5.26(2025-08-29)
+improvment: 增强多语言兼容性
+
+## 3.5.25(2025-08-28)
+fix: 修复左侧与右侧弹出时页面打开闪现问题
+
+## 3.5.24(2025-08-28)
+feat: 优化tooltip弹窗定位
+
+feat: tooltip组件新增forcePosition支持强制精确定位
+
+## 3.5.23(2025-08-28)
+improvment: 调整pdf阅读器默认高度
+
+## 3.5.22(2025-08-28)
+feat: 新增goods-sku商品SKU选购组件
+
+## 3.5.21(2025-08-27)
+fix: 修复popup组件手势控制参数注释
+
+## 3.5.20(2025-08-27)
+improvement: 提升checkbox条件编译兼容性
+
+## 3.5.19(2025-08-27)
+feat: popup新增iOS风格手势控制上下高度及下滑关闭
+
+## 3.5.18(2025-08-26)
+feat: 新增coupon优惠券组件
+
+## 3.5.17(2025-08-26)
+fix: 分支合并冲突修复
+
+feat: picker-data组件新增cancel/close/confirm事件支持
+
+## 3.5.16(2025-08-26)
+feat: tabbar新增支持中间凸起按钮
+
+## 3.5.15(2025-08-25)
+feat: 之前的color-picker颜色选择器按计划上线
+
+## 3.5.14(2025-08-25)
+feat: 新增PDF阅读器组件
+
+## 3.5.13(2025-08-24)
+fix: 修复短视频示例https
+
+## 3.5.12(2025-08-23)
+feat: short-video短视频组件增加视频播放示例
+
+## 3.5.11(2025-08-23)
+feat: 新增short-video短视频切换组件
+
+feat: tabbar支持backgroundColor和borderColor属性
+
+feat: slider支持innerStyle样式属性
+
+## 3.5.10(2025-08-22)
+feat: 新增poster海报生成组件
+
+
+## 3.5.9(2025-08-22)
+feat: 优化qrcode组件支持toTempFilePath方法
+
+## 3.5.8(2025-08-22)
+fix: 优化rpx下calendar高度计算强制px
+
+## 3.5.7(2025-08-22)
+feat: input和search新增onlyClearableOnFocused参数支持控制是否仅聚焦时显示清除按钮
+
+## 3.5.6(2025-08-21)
+feat: picker弹窗及datetime-picker组件支持页面内模式
+
+## 3.5.5(2025-08-21)
+feat: popup弹窗及canlendar组件支持页面内插入无弹窗模式
+
+## 3.5.4(2025-08-21)
+feat: popup弹窗及canlendar组件支持页面内插入无弹窗模式
+
+## 3.5.3(2025-08-21)
+fix: 修复下拉刷新多语言key
+
+## 3.5.2(2025-08-20)
+fix: 修复非cli模式下引入的三方库报An error occurred while trying to read the map file错误
+
+fix: 去除i18n多语言多余console
+
+## 3.5.1(2025-08-20)
+feat: calendar组件月份标题自动适配多语言
+
+## 3.5.0(2025-08-20)
+feat: 组件库新增多语言支持且无侵入无依赖内置八种语言
+
+## 3.4.107(2025-08-20)
+feat: input组件支持密码显示切换
+
+## 3.4.106(2025-08-20)
+feat: tooltip组件支持左右方向弹窗
+
+## 3.4.105(2025-08-19)
+feat: 增加markdown解析器组件AI对话流式响应示例
+
+## 3.4.104(2025-08-19)
+feat: tooltip支持自定义触发器
+
+feat: tooltip支持插槽自定义内容
+
+feat: tooltip支持单击触发
+
+feat: tooltip支持设置弹窗背景色
+
+## 3.4.103(2025-08-19)
+feat: 内置一份dayjs库
+
+fix: 删除个别组件多余重复方法
+
+fix: 修复marked库App打包时报错
+
+## 3.4.102(2025-08-19)
+fix: 小程序下cate-tab动态加载数据后尺寸获取及联动异常
+
+## 3.4.101(2025-08-18)
+improvment: 增加一些涉及触摸组件PC端需要仿真模式提示
+
+## 3.4.100(2025-08-18)
+feat: 新增markdown解析器组件
+
+## 3.4.99(2025-08-18)
+fix: 修复parse富文本组件可能导致无限循环的问题
+
+## 3.4.98(2025-08-17)
+feat: alert组件新增transitionMode/icon/duration/modelValue等参数
+
+improvment: 完善alert组件注释
+
+## 3.4.97(2025-08-16)
+improvment: 完善album组件注释
+
+## 3.4.96(2025-08-16)
+improvment: 完善action-sheet注释
+
+## 3.4.95(2025-08-16)
+del: 去除不再需要的重复组件
+
+## 3.4.94(2025-08-15)
+improvment: 组件库内部icon前缀统一
+
+## 3.4.93(2025-08-15)
+fix: 修复dropdown组件在打开下拉菜单时content高度为NANpx的问题
+
+## 3.4.92(2025-08-14)
+fix: 修复多余空格导致cropper编译出错 #830
+
+## 3.4.91(2025-08-14)
+feat: 新增agreement弹窗协议组件
+
+## 3.4.90(2025-08-13)
+feat: datetimepicker新增datehour类型
+
+## 3.4.89(2025-08-13)
+fix: 修复u-form-item组件缺少对labelPosition的判断
+
+## 3.4.88(2025-08-13)
+fix: subsection组件的disabled属性应为Boolean类型
+
+## 3.4.87(2025-08-12)
+improvment: 签名组件示例前缀改为up
+
+## 3.4.86(2025-08-12)
+feat: 新增signature签名签字组件
+
+## 3.4.85(2025-08-11)
+feat: 完善图片裁剪功能支持props及JS两种方式
+
+fix: 修复H5下裁剪后图片黑屏
+
+## 3.4.84(2025-08-11)
+feat: 新增cropper图片裁剪组件
+
+## 3.4.83(2025-08-11)
+feat: 新增barcode无三方依赖条码组
+
+## 3.4.82(2025-08-11)
+improvment: 优化table2递归组件逻辑
+
+feat: 支持树状列表复选框
+
+## 3.4.81(2025-08-10)
+feat: table2新增树状结构递归支持
+
+## 3.4.80(2025-08-10)
+feat: 新增table2固定列对树状支持
+
+## 3.4.79(2025-08-09)
+feat: table2组件支持左侧固定列功能
+
+## 3.4.78(2025-08-09)
+fix: 修复table2在popup弹窗中无法横向滚动
+
+## 3.4.77(2025-08-08)
+feat: 优化waterfall瀑布流组件逻辑
+
+feat: waterfall瀑布流组件支持多列
+
+feat: waterfall瀑布流组件支持响应式列数
+
+## 3.4.76(2025-08-08)
+feat: 取消props中tabs组件默认颜色影响主题色生效
+
+fix: 修复parse富文本组件报错$options
+
+feat: timeFormat时间格式化方法支持UTC格式时间 #596
+
+## 3.4.75(2025-08-07)
+feat: 新增loadFontOnce参数控制是否全局只加载一次字体图标
+
+## 3.4.74(2025-08-07)
+feat: input组件新增cursorColor属性
+
+## 3.4.73(2025-08-05)
+improvment: 优化下拉刷新默认图标
+
+## 3.4.72(2025-08-05)
+improvment: 优化virtual-list虚拟列表样式
+
+feat: 新增virtual-list虚拟列表演示
+
+## 3.4.71(2025-08-05)
+feat: 新增virtual-list虚拟列表组件
+
+feat: 新增pull-refresh下拉刷新结合虚拟列表使用
+
+## 3.4.70(2025-08-05)
+fix: 修复qrcode组件长按事件传入错误cid导致的报错
+
+fix: 修复index-list组件key为undefined导致的索引报错消失
+
+## 3.4.69(2025-08-04)
+feat: pull-refresh下拉刷新新增上拉加载特性
+
+## 3.4.68(2025-08-03)
+feat: 新增pull-refresh下拉刷新组件
+
+## 3.4.67(2025-08-02)
+feat: number-box支持disabledBgColor参数
+
+## 3.4.66(2025-08-01)
+improvment: 增加组件图标
+
+feat: table2组件新增列排序插槽
+
+fix: 分段器组件onWindowResize使用条件编译
+
+fix: 修复u-line-1单行省略样式
+
+## 3.4.65(2025-07-26)
+fix: 修复部分环境下字体图标全局加载问题
+
+## 3.4.64(2025-07-25)
+feat: 新增dragsort拖动排序组件
+
+## 3.4.63(2025-07-24)
+feat: count-down支持slot传递时间参数
+
+## 3.4.62(2025-07-24)
+feat: divider支持默认插槽
+
+## 3.4.61(2025-07-24)
+feat: divider支持默认插槽
+
+## 3.4.60(2025-07-23)
+fix: 修复use阶段全局加载图标引起App端不明$page报错
+
+## 3.4.59(2025-07-23)
+fix: 修复album组件和CateTab组件watch和emits重复
+
+fix: 修复样式优先级导致form表单labelPosition属性top失效
+
+## 3.4.58(2025-07-22)
+fix: 修复样式优先级影响grid宫格组件布局
+
+## 3.4.57(2025-07-22)
+feat: 新增title标题组件
+
+## 3.4.56(2025-07-21)
+fix: 去除多余hotCity参数
+
+## 3.4.55(2025-07-21)
+feat: 新增city-locate城市定位选择组件
+
+feat: 优化index-list组件索引
+
+## 3.4.54(2025-07-18)
+feat: dropdown组件的highlight方法支持同时高亮多个菜单项
+
+feat: 支持一次性全局加载icon字体
+
+## 3.4.53(2025-07-18)
+feat: dropdown组件的highlight方法支持同时高亮多个菜单项 感谢@keeplearning66
+
+## 3.4.52(2025-07-16)
+fix: 修复底部安全区域组件兼容性
+
+## 3.4.51(2025-07-14)
+fix: 修复u-slider在click后没有触发change事件
+
+## 3.4.50(2025-07-13)
+feat: subsection分段器添加禁用参数
+
+## 3.4.49(2025-07-11)
+feat: picker支持bgColor、round、duration和overlayOpacity属性
+
+## 3.4.48(2025-07-10)
+fix: 官方文档Card示例组件多行显示省略号样式异常
+
+feat: album组件支持自定义preview事件
+
+## 3.4.47(2025-07-09)
+fix: 修复datetime-picker打开时,数值可能出现对不上的问题
+
+feat: Subsection 分段器添加支持从 list中读取激活文字颜色和未激活文字颜色
+
+fix: 修复modal定义confirmButton
+
+fix: safe-bottom底部安全距离在小程序优先用JS计算
+
+feat: 新增tree树形组件
+
+## 3.4.46(2025-07-08)
+feat: 上传组件预览视频支持videoPreviewObjectFit参数
+
+feat: td增加多个样式props
+
+fix: 修复noticeBar字号增大时文字遮挡
+
+feat: 项目工程增加pinia
+
+## 3.4.45(2025-07-01)
+fix: 修复picker-data组件缺少name
+
+fix: 优化picker高度单位
+
+## 3.4.44(2025-06-30)
+fix: 修复indexList中stikcy属性写死的问题(always true)
+
+feat: 搜索框添加新的右侧插槽
+
+fix: 修复indexList中丢失的select event
+
+fix: 解决因为层级问题导致点击picker选择器无法正常弹出
+
+## 3.4.43(2025-06-16)
+feat: table2支持header插槽
+
+## 3.4.42(2025-06-12)
+fix: 修复qrcode中默认id问题及canvas2时App无法绘制二维码 感谢@jiaruiyan
+
+## 3.4.41(2025-06-11)
+feat: qrcode支持 新参数useRootHeightAndWidth 是否使用根节点的宽高 感谢@YJR
+
+feat: toast支持设置zIndex层级
+
+
+
+## 3.4.40(2025-06-06)
+fix: 升级二维码 canvas -> canvas2 感谢@yjr
+
+## 3.4.39(2025-05-31)
+fix: 修改步骤条微信小程序下的布局 感谢@jiaruiyan
+
+fix: u-tabs在屏幕尺寸发生变化时滑块位置没有发生变化 感谢@aqzhft
+
+fix: 鸿蒙平台不支持plus.runtime.openWeb 感谢@aqzhft
+
+## 3.4.38(2025-05-30)
+fix: 修复picker-data快捷组件缺少index
+
+fix: 修复picker组件双向绑定初始化及取消后复原再次打开后的当前项目
+
+## 3.4.37(2025-05-29)
+feat: modal支持设置动画时间
+
+fix: DatetimePicker v-model 绑定异步设置无效 (#803)
+
+## 3.4.36(2025-05-28)
+fix: lazy-load图片为空时显示错误
+
+## 3.4.35(2025-05-28)
+feat: 进度条支持从右往左加载
+
+## 3.4.34(2025-05-28)
+feat: table2支持自定义标题和单元格样式
+
+## 3.4.33(2025-05-27)
+fix: 修复小程序cate-tab第一次切换时没反应 感谢@jiaruiyan
+
+fix: 修复datetimepicker传入空字符串时导致组件崩溃 感谢@jiaruiyan
+
+fix: 修复album带单位的字符串参与计算导致的计算数据错误 感谢@jiaruiyan
+
+## 3.4.32(2025-05-26)
+feat: 增加状态栏独立颜色配置支持支付宝小程序状态栏对背景色识别的不友好的情况
+
+fix: 抖音二维码兼容修复
+
+feat: cate-tab组件增加rightTop插槽 #715
+
+fix: 修改 test.promise(res) 预期结果不一致
+
+## 3.4.31(2025-05-17)
+fix: 修复parse富文本组件导致鸿蒙运行白屏
+
+fix: 去除演示项目中uni.$u用法便于兼容鸿蒙
+
+feat: modal新增popupBottom插槽适用类似关闭按钮与内容区域分离的场景
+
+## 3.4.30(2025-05-16)
+feat: 新增pagination分页器组件
+
+feat: popup新增bottom插槽适用类似关闭按钮与内容区域分离的场景
+
+## 3.4.29(2025-05-15)
+fix: 修复table2横向滚动样式
+
+fix: 修复table2组件宽度兼容
+
+fix: 修复image显示png图片时默认背景色问题
+
+feat: cate-tab新增height参数便于设置组件高度
+
+feat: 在index.js种导出digit.js便于使用
+
+fix: 修复tag组件缺失iconColor属性
+
+fix: 优化index-list的setValueForTouch方法逻辑 #708
+
+feat: number-box支持change事件返回变动是点击了增加还是减少按钮
+
+fix: 修复table2在小程序下部分情形不显示表格
+
+## 3.4.28(2025-05-12)
+feat: 新增table表格组件
+
+feat: 新增element-plus风格的table2组件
+
+## 3.4.27(2025-05-06)
+fix: 修复card组件props
+
+## 3.4.26(2025-05-06)
+fix: 修复test工具引入
+
+feat: card组件支持全局设置props默认值
+
+fix: 修复image在加载错误情况下高度和宽度不正确问题
+
+fix: 修复picker-data快捷组件默认picker选中
+
+fix: 修复日历month子组件缺失emits定义
+
+## 3.4.25(2025-04-27)
+fix: up-form编译在微信小程序里样式缺失 #640
+
+fix: number-box输入为空时自动设为最小值
+
+feat: picker与datetimepicke组件hasInput模式支持inputProps属性
+
+## 3.4.24(2025-04-25)
+fix: 修复upload上传逻辑(感谢@semdy)
+
+## 3.4.23(2025-04-24)
+chore: 补全chooseFile TS类型(感谢@semdy)
+
+feat: u-search组件的图标支持显示在右边(感谢@semdy)
+
+chore: 修正chooseFile返回的数据TS类型(感谢@semdy)
+
+fix: PR导致缺失name影响uplad自动上传扩展名
+
+
+## 3.4.22(2025-04-22)
+fix: 修复自动上传偶发的success被覆盖为uploading
+
+fix: float-button缺少key #677
+
+fix: upload组件完善优化(感谢@semdy)
+
+fix: toolbar组件confirmColor属性默认改为空,以便默认使用主题色、标题字体加粗(感谢@semdy)
+
+## 3.4.21(2025-04-21)
+feat: subsection分段器支持双向绑定current
+
+feat: select组件支持maxHeight属性
+
+feat: datetime-picker支持inputBorder属性
+
+## 3.4.20(2025-04-17)
+fix: 修复navbar-mini提示border不存在
+
+feat: status-bar支持对外暴露状态栏高度值
+
+feat: upload支持自定义自动上传后处理逻辑便于对接不同规范后端
+
+feat: 优化tag组件插槽
+
+
+## 3.4.19(2025-04-14)
+fix: 修复model组件增加contentStyle带来的语法问题
+
+## 3.4.18(2025-04-14)
+fix: upload组件支持所有文件类型的onClickPreview事件
+
+## 3.4.17(2025-04-11)
+feat: select组件text插槽增加scope传递currentLabel
+
+## 3.4.16(2025-04-10)
+fix: 修复安卓新加载字体方式导致Cannot read property '$page' of undefined
+
+## 3.4.15(2025-04-10)
+improvment: 优化移步加载数据时swiper组件displayMultipleItems报错
+
+feat: modal增加contentStyle属性
+
+fix: 修复下拉菜单收起动画缺失
+
+fix: 修复sticky的offset属性值为响应式数据时失效 #237
+
+
+## 3.4.14(2025-04-09)
+feat: 支持自托管内置图标及扩展自定义图标
+
+## 3.4.13(2025-04-08)
+fix: tabs点击当前tab触发change事件
+
+## 3.4.12(2025-04-02)
+fix: dropdown关闭后遮挡页面内容 #653
+
+fix u-sticky.vue Uncaught TypeError: e.querySelector is not a function at uni-app-view.umd.js
+
+## 3.4.11(2025-03-31)
+fix: 优化upload组件预览视频的弹窗占位
+
+## 3.4.10(2025-03-28)
+feat: select组件新增多个props属性及优化
+
+fix: 修复cate-tab报错index is not defined #661
+
+
+## 3.4.9(2025-03-27)
+fix: 修复upload组件split报错
+
+fix: 修复float-button缺少flex样式
+
+## 3.4.8(2025-03-27)
+fix: 修复upload组件split报错
+
+fix: 移除mapState
+
+## 3.4.7(2025-03-26)
+fix: 修复action-sheet-data和picker-data数据回显
+
+fix: 优化upload组件视频封面兼容
+
+## 3.4.6(2025-03-25)
+feat: checkbox触发change时携带name参数
+
+feat: upload组件支持服务器本机和阿里云OSS自动上传功能及上传进度条
+
+feat: upload组件支持视频预览及oss上传时获取视频封面图
+
+feat: 新增up-action-sheet-data快捷组件
+
+feat: 新增up-picker-data快捷组件
+
+## 3.4.5(2025-03-24)
+feat: tag组件新增textSize/height/padding/borderRadius属性
+
+feat: 新增genLightColor自动计算浅色方法及tag组件支持autoBgColor自动计算背景色
+
+## 3.4.4(2025-03-13)
+feat: modal增加异步操作进行中点击取消弹出提示特性防止操作被中断
+
+fix: 修复toast组件show方法类型声明
+
+## 3.4.3(2025-03-12)
+fix: 修复textarea自动增高时在输入时高度异常
+
+## 3.4.2(2025-03-11)
+feat: step组件增加title插槽及增加辅助class便于自定义样式
+
+## 3.4.1(2025-03-11)
+feat: 新机制确保setConfig与http在nvue等环境下生效
+
+## 3.3.74(2025-03-06)
+fix: CateTab语法问题
+
+## 3.3.73(2025-03-06)
+feat: CateTab新增v-model:current属性
+
+## 3.3.72(2025-02-28)
+feat: tabs组件支持icon图标及插槽
+
+## 3.3.71(2025-02-27)
+feat: 折叠面板collapse增加titileStyle/iconStyle/rightIconStyle属性
+
+feat: 折叠面板组件新增cellCustomStyle/cellCustomClass属性
+
+fix: select组件盒模型
+
+## 3.3.70(2025-02-24)
+fix: 修改u-checkbox-group组件changes事件发生位置
+
+## 3.3.69(2025-02-19)
+picker允许传递禁用颜色props
+
+slider组件isRange状态下增加min max插槽分开显示内容
+
+feat: 新增经典下拉框组件up-select
+
+## 3.3.68(2025-02-12)
+fix: 修复weekText类型
+
+feat: 日历增加单选与多选指定禁止选中的日期功能
+
+fix: NumberBox删除数字时取值有误 #613
+
+## 3.3.67(2025-02-11)
+feat: navbar支持返回全局拦截器配置
+
+feat: 表单-校验-支持无提示-得到校验结果
+
+feat: picker传递hasInput属性时候,可以禁用输入框点击
+
+## 3.3.66(2025-02-09)
+feat: steps-item增加content插槽
+
+## 3.3.65(2025-02-05)
+feat: number-box组件新增按钮圆角/按钮宽度/数据框背景色/迷你模式
+## 3.3.64(2025-01-18)
+feat: 日历组件支持自定义星期文案
+
+## 3.3.63(2025-01-13)
+fix: cate-tab支持支付宝小程序
+
+fix: textarea 修复 placeholder-style
+
+fix: 修复在图片加载及加载失败时容器宽度
+
+fix: waterfall组件报错Maximum recursive updates
+
+## 3.3.62(2025-01-10)
+feat: sleder滑动选择器双滑块增加外层触发值的变动功能
+
+fix: picker支持hasInput优化
+
+## 3.3.61(2024-12-31)
+fix: 修复微信getSystemInfoSync接口废弃警告
+
+fix: 'u-status-bar' symbol missing
+
+## 3.3.60(2024-12-30)
+feat: 日期组件支持禁用
+
+fix: ts定义修复 #600
+
+feat: Tabs组件选中时增加一个active的class #595
+
+## 3.3.59(2024-12-30)
+fix: Property "isH5" was accessed during render
+
+## 3.3.58(2024-12-26)
+fix: slider组件change事件传参
+
## 3.3.57(2024-12-23)
fix: slider组件change事件传参
diff --git a/uview-plus/components/u--form/u--form.vue b/uview-plus/components/u--form/u--form.vue
deleted file mode 100644
index 78e9dc4..0000000
--- a/uview-plus/components/u--form/u--form.vue
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
diff --git a/uview-plus/components/u--image/u--image.vue b/uview-plus/components/u--image/u--image.vue
deleted file mode 100644
index 5916065..0000000
--- a/uview-plus/components/u--image/u--image.vue
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uview-plus/components/u--input/u--input.vue b/uview-plus/components/u--input/u--input.vue
deleted file mode 100644
index 2a8933f..0000000
--- a/uview-plus/components/u--input/u--input.vue
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
- :value="value"
- @input="e => $emit('input', e)"
-
-
- :modelValue="modelValue"
- @update:modelValue="e => $emit('update:modelValue', e)"
-
- :type="type"
- :fixed="fixed"
- :disabled="disabled"
- :disabledColor="disabledColor"
- :clearable="clearable"
- :password="password"
- :maxlength="maxlength"
- :placeholder="placeholder"
- :placeholderClass="placeholderClass"
- :placeholderStyle="placeholderStyle"
- :showWordLimit="showWordLimit"
- :confirmType="confirmType"
- :confirmHold="confirmHold"
- :holdKeyboard="holdKeyboard"
- :focus="focus"
- :autoBlur="autoBlur"
- :disableDefaultPadding="disableDefaultPadding"
- :cursor="cursor"
- :cursorSpacing="cursorSpacing"
- :selectionStart="selectionStart"
- :selectionEnd="selectionEnd"
- :adjustPosition="adjustPosition"
- :inputAlign="inputAlign"
- :fontSize="fontSize"
- :color="color"
- :prefixIcon="prefixIcon"
- :suffixIcon="suffixIcon"
- :suffixIconStyle="suffixIconStyle"
- :prefixIconStyle="prefixIconStyle"
- :border="border"
- :readonly="readonly"
- :shape="shape"
- :customStyle="customStyle"
- :formatter="formatter"
- :ignoreCompositionEvent="ignoreCompositionEvent"
- >
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uview-plus/components/u--text/u--text.vue b/uview-plus/components/u--text/u--text.vue
deleted file mode 100644
index 9cdcf7b..0000000
--- a/uview-plus/components/u--text/u--text.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
diff --git a/uview-plus/components/u--textarea/u--textarea.vue b/uview-plus/components/u--textarea/u--textarea.vue
deleted file mode 100644
index becd23d..0000000
--- a/uview-plus/components/u--textarea/u--textarea.vue
+++ /dev/null
@@ -1,47 +0,0 @@
-
- $emit('input', e)"
- @update:modelValue="e => $emit('update:modelValue', e)"
- >
-
-
-
diff --git a/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue b/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue
new file mode 100644
index 0000000..234d5cf
--- /dev/null
+++ b/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-action-sheet/actionSheet.js b/uview-plus/components/u-action-sheet/actionSheet.js
index 086898d..bc27648 100644
--- a/uview-plus/components/u-action-sheet/actionSheet.js
+++ b/uview-plus/components/u-action-sheet/actionSheet.js
@@ -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 16:44:35
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/actionSheet.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-08-16 10:52:35
+ * @FilePath : /uview-plus/libs/config/props/actionSheet.js
*/
export default {
// action-sheet组件
@@ -14,6 +14,8 @@ export default {
title: '',
description: '',
actions: [],
+ nameKey: 'name',
+ subnameKey: 'subnameKey',
index: '',
cancelText: '',
closeOnClickAction: true,
diff --git a/uview-plus/components/u-action-sheet/props.js b/uview-plus/components/u-action-sheet/props.js
index eb45834..e08c9af 100644
--- a/uview-plus/components/u-action-sheet/props.js
+++ b/uview-plus/components/u-action-sheet/props.js
@@ -1,3 +1,11 @@
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 3.0
+ * @LastAuthor : jry
+ * @lastTime : 2025-08-16 10:52:35
+ * @FilePath : /uview-plus/libs/config/props/props.js
+ */
import { defineMixin } from '../../libs/vue'
import defProps from '../../libs/config/props.js'
@@ -23,6 +31,16 @@ export const props = defineMixin({
type: Array,
default: () => defProps.actionSheet.actions
},
+ // 选项名称key
+ nameKey: {
+ type: String,
+ default: () => defProps.actionSheet.nameKey
+ },
+ // 选项子名称key
+ subnameKey: {
+ type: String,
+ default: () => defProps.actionSheet.subnameKey
+ },
// 取消按钮的文字,不为空时显示按钮
cancelText: {
type: String,
diff --git a/uview-plus/components/u-action-sheet/u-action-sheet.vue b/uview-plus/components/u-action-sheet/u-action-sheet.vue
index 98174b8..46a9ba1 100644
--- a/uview-plus/components/u-action-sheet/u-action-sheet.vue
+++ b/uview-plus/components/u-action-sheet/u-action-sheet.vue
@@ -1,4 +1,3 @@
-
+
+
{{description}}
+
+
@@ -62,17 +65,19 @@
@tap.stop="selectHandler(index)"
:hover-class="!item.disabled && !item.loading ? 'u-action-sheet--hover' : ''"
:hover-stay-time="150"
+ :style="getItemHoverStyle(index)"
>
{{ item.name }}
+ >{{ item[nameKey] }}
{{ item.subname }}
+ >{{ item[subnameKey] }}
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-agreement/u-agreement.vue b/uview-plus/components/u-agreement/u-agreement.vue
new file mode 100644
index 0000000..438c467
--- /dev/null
+++ b/uview-plus/components/u-agreement/u-agreement.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+ 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,
+ 请务必审慎阅读《用户协议》
+ 和《隐私政策》内的所有条款,
+ 尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2. 约定我们的限制责任、免责
+ 条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,请先不要同意,您点击“同意并继续”的行为即表示您已阅读
+ 完毕并同意以上协议的全部内容。
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-album/album.js b/uview-plus/components/u-album/album.js
index 8aebaba..e7568bf 100644
--- a/uview-plus/components/u-album/album.js
+++ b/uview-plus/components/u-album/album.js
@@ -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 16:47:24
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/album.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-08-16 16:32:24
+ * @FilePath : /uview-plus/libs/config/props/album.js
*/
export default {
// album 组件
diff --git a/uview-plus/components/u-album/props.js b/uview-plus/components/u-album/props.js
index a219acb..a8d5474 100644
--- a/uview-plus/components/u-album/props.js
+++ b/uview-plus/components/u-album/props.js
@@ -1,5 +1,14 @@
+/*
+ * @Author : jry
+ * @Description :
+ * @version : 3.0
+ * @LastAuthor : jry
+ * @lastTime : 2025-08-16 16:35:24
+ * @FilePath : /uview-plus/components/u-album/props.js
+ */
import { defineMixin } from '../../libs/vue'
import defProps from '../../libs/config/props.js'
+
export const props = defineMixin({
props: {
// 图片地址,Array|Array
@@ -66,7 +66,7 @@
/**
* ColumnNotice 滚动通知中的垂直滚动 内部组件
* @description 该组件用于滚动通告场景,是其中的垂直滚动方式
- * @tutorial https://ijry.github.io/uview-plus/components/noticeBar.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/noticeBar.html
* @property {Array} text 显示的内容,字符串
* @property {String} icon 是否显示左侧的音量图标 ( 默认 'volume' )
* @property {String} mode 通告模式,link-显示右箭头,closable-显示右侧关闭图标
@@ -128,7 +128,6 @@
\ No newline at end of file
diff --git a/uview-plus/components/u-cropper/u-cropper.vue b/uview-plus/components/u-cropper/u-cropper.vue
new file mode 100644
index 0000000..d5dc3e8
--- /dev/null
+++ b/uview-plus/components/u-cropper/u-cropper.vue
@@ -0,0 +1,1231 @@
+
+
+
+
+
+
+
+
+
+
+ {{ t("up.common.re-select") }}
+
+
+ {{ t("up.common.close") }}
+
+
+ {{ t("up.common.rotate") }}
+
+
+ {{ t("up.common.preview") }}
+
+
+ {{ t("up.common.confirm") }}
+
+
+
+
+
+ {{ t("up.common.confirm") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-datetime-picker/datetimePicker.js b/uview-plus/components/u-datetime-picker/datetimePicker.js
index 96e8ab8..b196522 100644
--- a/uview-plus/components/u-datetime-picker/datetimePicker.js
+++ b/uview-plus/components/u-datetime-picker/datetimePicker.js
@@ -1,12 +1,13 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 16:57:48
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/datetimePicker.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/datetimePicker.js
*/
+import { t } from '../../libs/i18n'
export default {
// datetimePicker 组件
datetimePicker: {
@@ -26,12 +27,18 @@ export default {
formatter: null,
loading: false,
itemHeight: 44,
- cancelText: '取消',
- confirmText: '确认',
+ cancelText: t("up.common.cancel"),
+ confirmText: t("up.common.confirm"),
cancelColor: '#909193',
confirmColor: '#3c9cff',
visibleItemCount: 5,
closeOnClickOverlay: false,
- defaultIndex: []
+ defaultIndex: [],
+ inputBorder: 'surround',
+ disabled: false,
+ disabledColor: '',
+ placeholder: t("up.common.pleaseChoose"),
+ inputProps: {},
+ pageInline: false
}
}
diff --git a/uview-plus/components/u-datetime-picker/dayjs.esm.min.js b/uview-plus/components/u-datetime-picker/dayjs.esm.min.js
new file mode 100644
index 0000000..24c6ec9
--- /dev/null
+++ b/uview-plus/components/u-datetime-picker/dayjs.esm.min.js
@@ -0,0 +1,7 @@
+/**
+ * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.
+ * Original file: /npm/dayjs@1.11.13/dayjs.min.js
+ *
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
+ */
+"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var t={exports:{}},e=t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",i="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),s=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(s,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,s=a}return!r&&s&&(m=s),s||!r&&m},b=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=w,O.i=S,O.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var g=M.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var s=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return O},g.isValid=function(){return!(this.$d.toString()===l)},g.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return b(t) false
+ default: false
},
+ inputProps: {
+ type: Object,
+ default: () => {
+ return {}
+ }
+ },
+ inputBorder: {
+ type: String,
+ default: () => defProps.input.inputBorder
+ },
+ disabled: {
+ type: Boolean,
+ default: () => defProps.input.disabled
+ },
+ disabledColor:{
+ type: String,
+ default: () => defProps.input.disabledColor
+ },
placeholder: {
type: String,
- default: () => '请选择'
+ default: () => defProps.input.placeholder
},
format: {
type: String,
@@ -145,6 +163,21 @@ export const props = defineMixin({
defaultIndex: {
type: Array,
default: () => defProps.datetimePicker.defaultIndex
- }
+ },
+ // 是否页面内展示
+ pageInline:{
+ type: Boolean,
+ default: () => defProps.datetimePicker.pageInline
+ },
+ // 蒙层样式样式
+ maskClass: {
+ type: String,
+ defualt: ''
+ },
+ // 蒙层样式样式
+ maskStyle: {
+ type: String,
+ defualt: ''
+ }
}
})
diff --git a/uview-plus/components/u-datetime-picker/u-datetime-picker.vue b/uview-plus/components/u-datetime-picker/u-datetime-picker.vue
index 5b3afd1..7b12fe9 100644
--- a/uview-plus/components/u-datetime-picker/u-datetime-picker.vue
+++ b/uview-plus/components/u-datetime-picker/u-datetime-picker.vue
@@ -1,22 +1,21 @@
-
-
+
+
diff --git a/uview-plus/components/u-dropdown-item/u-dropdown-item.vue b/uview-plus/components/u-dropdown-item/u-dropdown-item.vue
index ec15a06..461e272 100644
--- a/uview-plus/components/u-dropdown-item/u-dropdown-item.vue
+++ b/uview-plus/components/u-dropdown-item/u-dropdown-item.vue
@@ -28,7 +28,7 @@
/**
* dropdown-item 下拉菜单
* @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
- * @tutorial https://ijry.github.io/uview-plus/components/dropdown.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/dropdown.html
* @property {String | Number} v-model 双向绑定选项卡选择值
* @property {String} title 菜单项标题
* @property {Array[Object]} options 选项数据,如果传入了默认slot,此参数无效
@@ -114,7 +114,6 @@
diff --git a/uview-plus/components/u-goods-sku/u-goods-sku.vue b/uview-plus/components/u-goods-sku/u-goods-sku.vue
new file mode 100644
index 0000000..dbb5c2a
--- /dev/null
+++ b/uview-plus/components/u-goods-sku/u-goods-sku.vue
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ treeItem.label }}
+
+
+ {{ leafItem.name }}
+
+
+
+
+
+ {{ t('up.goodsSku.buyAmount') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-grid-item/gridItem.js b/uview-plus/components/u-grid-item/gridItem.js
index 1b747f4..7aff5c6 100644
--- a/uview-plus/components/u-grid-item/gridItem.js
+++ b/uview-plus/components/u-grid-item/gridItem.js
@@ -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:06:13
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/gridItem.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/gridItem.js
*/
export default {
// grid-item组件
diff --git a/uview-plus/components/u-grid-item/u-grid-item.vue b/uview-plus/components/u-grid-item/u-grid-item.vue
index 43c5ce7..cff7bd2 100644
--- a/uview-plus/components/u-grid-item/u-grid-item.vue
+++ b/uview-plus/components/u-grid-item/u-grid-item.vue
@@ -33,7 +33,7 @@
/**
* gridItem 提示
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用
- * @tutorial https://ijry.github.io/uview-plus/components/grid.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/grid.html
* @property {String | Number} name 宫格的name ( 默认 null )
* @property {String} bgColor 宫格的背景颜色 (默认 'transparent' )
* @property {Object} customStyle 自定义样式,对象形式
@@ -172,7 +172,6 @@
diff --git a/uview-plus/components/u-icon/icon.js b/uview-plus/components/u-icon/icon.js
index 86910f7..b500cc1 100644
--- a/uview-plus/components/u-icon/icon.js
+++ b/uview-plus/components/u-icon/icon.js
@@ -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 18:00:14
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/icon.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/icon.js
*/
import config from '../../libs/config/config'
diff --git a/uview-plus/components/u-icon/icons.js b/uview-plus/components/u-icon/icons.js
index f4d0fe2..20b2fa0 100644
--- a/uview-plus/components/u-icon/icons.js
+++ b/uview-plus/components/u-icon/icons.js
@@ -203,6 +203,7 @@ export default {
'uicon-empty-list': '\ue68b',
'uicon-empty-page': '\ue627',
'uicon-empty-order': '\ue639',
+ 'uicon-empty-wifi': '\ue668',
'uicon-man': '\ue697',
'uicon-woman': '\ue69c',
'uicon-man-add': '\ue61c',
diff --git a/uview-plus/components/u-icon/u-icon.vue b/uview-plus/components/u-icon/u-icon.vue
index 38afd79..5d540f6 100644
--- a/uview-plus/components/u-icon/u-icon.vue
+++ b/uview-plus/components/u-icon/u-icon.vue
@@ -1,243 +1,235 @@
-
-
- {{icon}}
-
- {{ label }}
-
+
+
+ {{ icon }}
+
+ {{ label }}
+
diff --git a/uview-plus/components/u-icon/util.js b/uview-plus/components/u-icon/util.js
new file mode 100644
index 0000000..907f8dd
--- /dev/null
+++ b/uview-plus/components/u-icon/util.js
@@ -0,0 +1,68 @@
+import config from '../../libs/config/config';
+
+let params = {
+ loaded: false
+};
+// 加载字体方法
+const loadFont = () => {
+ // console.log('加载字体图标');
+ // 全局加载不稳定,默认关闭,需要开启可以配置loadFontOnce。
+ if (config.loadFontOnce) {
+ params.loaded = true;
+ }
+ // #ifdef APP-NVUE
+ // nvue通过weex的dom模块引入字体,相关文档地址如下:
+ // https://weex.apache.org/zh/docs/modules/dom.html#addrule
+ const domModule = weex.requireModule('dom');
+ domModule.addRule('fontFace', {
+ 'fontFamily': "uicon-iconfont",
+ 'src': `url('${config.iconUrl}')`
+ });
+ if (config.customIcon.family) {
+ domModule.addRule('fontFace', {
+ 'fontFamily': config.customIcon.family,
+ 'src': `url('${config.customIcon.url}')`
+ });
+ }
+ // #endif
+ // #ifdef APP || H5 || MP-WEIXIN || MP-ALIPAY
+ uni.loadFontFace({
+ global: true, // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。
+ family: 'uicon-iconfont',
+ source: 'url("' + config.iconUrl + '")',
+ success() {
+ // console.log('内置字体图标加载成功');
+ },
+ fail() {
+ // console.error('内置字体图标加载出错');
+ }
+ });
+ if (config.customIcon.family) {
+ uni.loadFontFace({
+ global: true, // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。
+ family: config.customIcon.family,
+ source: 'url("' + config.customIcon.url + '")',
+ success() {
+ // console.log('扩展字体图标加载成功');
+ },
+ fail() {
+ // console.error('扩展字体图标加载出错');
+ }
+ });
+ }
+ // #endif
+ // #ifdef APP-NVUE
+ // if (this.customFontFamily) {
+ // domModule.addRule('fontFace', {
+ // 'fontFamily': `${this.customPrefix}-${this.customFontFamily}`,
+ // 'src': `url('${this.customFontUrl}')`
+ // })
+ // }
+ // #endif
+ return true;
+};
+
+export default {
+ params: params,
+ loadFont
+}
diff --git a/uview-plus/components/u-image/image.js b/uview-plus/components/u-image/image.js
index 2552db6..591b676 100644
--- a/uview-plus/components/u-image/image.js
+++ b/uview-plus/components/u-image/image.js
@@ -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:01:51
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/image.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/image.js
*/
export default {
// image组件
diff --git a/uview-plus/components/u-image/u-image.vue b/uview-plus/components/u-image/u-image.vue
index 606429e..24e3b10 100644
--- a/uview-plus/components/u-image/u-image.vue
+++ b/uview-plus/components/u-image/u-image.vue
@@ -36,22 +36,25 @@
}"
>
-
+ >
-
+ >
@@ -115,7 +118,6 @@
if (!n) {
// 如果传入null或者'',或者false,或者undefined,标记为错误状态
this.isError = true
-
} else {
this.isError = false;
this.loading = true;
@@ -132,13 +134,13 @@
style.height = addUnit(this.height);
// #endif
// #ifndef APP-NVUE
- if (this.width == '100%') {
- style.width = this.width;
+ if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
+ style.width = addUnit(this.width);
} else {
style.width = 'fit-content';
}
- if (this.height == '100%') {
- style.height = this.height;
+ if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
+ style.height = addUnit(this.height);
} else {
style.height = 'fit-content';
}
@@ -153,13 +155,13 @@
style.height = addUnit(this.height);
// #endif
// #ifndef APP-NVUE
- if (this.width == '100%') {
- style.width = this.width;
+ if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
+ style.width = addUnit(this.width);
} else {
style.width = 'fit-content';
}
- if (this.height == '100%') {
- style.height = this.height;
+ if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
+ style.height = addUnit(this.height);
} else {
style.height = 'fit-content';
}
@@ -221,17 +223,15 @@
// 移除图片的背景色
removeBgColor() {
// 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
- this.backgroundStyle = {
- backgroundColor: this.bgColor || '#ffffff'
- };
+ // this.backgroundStyle = {
+ // backgroundColor: this.bgColor || '#ffffff'
+ // };
}
}
};
diff --git a/uview-plus/components/u-index-list/indexList.js b/uview-plus/components/u-index-list/indexList.js
index 4f31b37..319f1eb 100644
--- a/uview-plus/components/u-index-list/indexList.js
+++ b/uview-plus/components/u-index-list/indexList.js
@@ -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:13:35
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexList.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/indexList.js
*/
export default {
// indexList 组件
@@ -15,6 +15,7 @@ export default {
indexList: [],
sticky: true,
customNavHeight: 0,
- safeBottomFix: false
+ safeBottomFix: false,
+ itemMargin: '0rpx'
}
}
diff --git a/uview-plus/components/u-index-list/props.js b/uview-plus/components/u-index-list/props.js
index 46a1fba..07ec35f 100644
--- a/uview-plus/components/u-index-list/props.js
+++ b/uview-plus/components/u-index-list/props.js
@@ -32,5 +32,10 @@ export const props = defineMixin({
type: Boolean,
default: () => defProps.indexList.safeBottomFix
},
+ //自定义下边距
+ itemMargin: {
+ type: String,
+ default: () => defProps.indexList.itemMargin
+ },
}
})
diff --git a/uview-plus/components/u-index-list/u-index-list.vue b/uview-plus/components/u-index-list/u-index-list.vue
index c345413..8718637 100644
--- a/uview-plus/components/u-index-list/u-index-list.vue
+++ b/uview-plus/components/u-index-list/u-index-list.vue
@@ -66,7 +66,7 @@
{{ item }}
+ >{{ item.key || item }}
- {{ uIndexList[activeIndex] }}
+ {{ uIndexList[activeIndex]?.key || uIndexList[activeIndex] }}
@@ -105,7 +105,7 @@
import { props } from './props';
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
- import { addUnit, sys, sleep, getPx } from '../../libs/function/index';
+ import { addUnit, getWindowInfo, sleep, getPx } from '../../libs/function/index';
// #ifdef APP-NVUE
// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
@@ -152,7 +152,7 @@
// scroll-view的高度
scrollViewHeight: 0,
// 系统信息
- sys: sys(),
+ sys: {},
scrolling: false,
scrollIntoView: '',
pageY: 0,
@@ -188,6 +188,7 @@
created() {
this.children = []
this.anchors = []
+ this.sys = getWindowInfo()
},
mounted() {
this.init()
@@ -283,8 +284,10 @@
return new Promise(resolve => {
// 延时一定时间,以获取dom尺寸
// #ifndef APP-NVUE
- this.$uGetRect('.u-index-list__scroll-view').then(size => {
- resolve(size)
+ this.$nextTick(() => {
+ this.$uGetRect('.u-index-list__scroll-view').then(size => {
+ resolve(size)
+ })
})
// #endif
@@ -320,7 +323,7 @@
const {
height
} = size
- const sysData = sys()
+ const sysData = getWindowInfo()
const windowHeight = sysData.windowHeight
let customNavHeight = 0
// 消除各端导航栏非原生和原生导致的差异,让索引列表字母对屏幕垂直居中
@@ -358,7 +361,7 @@
let index = this.currentIndex;
// 对H5的pageY进行修正,这是由于uni-app自作多情在H5中将触摸点的坐标跟H5的导航栏结合导致的问题
// #ifdef H5
- // pageY += sys().windowTop
+ // pageY += getWindowInfo().windowTop
// #endif
// 对第一和最后一个字母做边界处理,因为用户可能在字母列表上触摸到两端的尽头后依然继续滑动
// console.log('top1', top)
@@ -388,9 +391,14 @@
// 如果偏移量太小,前后得出的会是同一个索引字母,为了防抖,进行返回
if (currentIndex === this.activeIndex) return
this.activeIndex = currentIndex
+ this.$emit('select', this.uIndexList[currentIndex])
// #ifndef APP-NVUE || MP-WEIXIN
// 在非nvue中,由于anchor和item都在u-index-item中,所以需要对index-item进行偏移
- this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}`
+ if (typeof this.uIndexList[currentIndex] == 'string') {
+ this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}`
+ } else {
+ this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].name.charCodeAt(0)}`
+ }
// #endif
// #ifdef MP-WEIXIN
@@ -405,12 +413,13 @@
const anchors = this.anchors
// 由于list组件无法获取cell的top值,这里通过header slot和各个item之间的height,模拟出类似非nvue下的位置信息
let children = this.children.map((item, index) => {
+ const childHeight = item.height + getPx(this.itemMargin)
const child = {
- height: item.height,
+ height: childHeight,
top: top
}
// 进行累加,给下一个item提供计算依据
- top = top + item.height
+ top = top + childHeight
// #ifdef APP-NVUE
// 只有nvue下,需要将锚点的高度也累加,非nvue下锚点高度是包含在index-item中的。
top = top + anchors[index].height
@@ -418,7 +427,7 @@
return child
})
// console.log('this.children[currentIndex].top', children[currentIndex].top)
- if (children[currentIndex]?.top) {
+ if (children[currentIndex]?.top || children[currentIndex].top === 0) {
this.scrollTop = children[currentIndex].top - getPx(customNavHeight)
}
// #endif
@@ -476,8 +485,8 @@
let children = this.children
// #ifdef APP-NVUE
// nvue下获取的滚动条偏移为负数,需要转为正数
- let sys = uni.getSystemInfoSync()
- scrollTop = Math.abs(e.contentOffset.y) / 10
+ let sys = getWindowInfo()
+ scrollTop = Math.abs(e.contentOffset.y) / 10
// console.log('native', e)
// #endif
@@ -488,12 +497,13 @@
const anchors = this.anchors
// 由于list组件无法获取cell的top值,这里通过header slot和各个item之间的height,模拟出类似非nvue下的位置信息
children = this.children.map((item, index) => {
+ const childHeight = item.height + getPx(this.itemMargin)
const child = {
- height: item.height,
+ height: childHeight,
top: top
}
// 进行累加,给下一个item提供计算依据
- top = top + item.height
+ top = top + childHeight
// #ifdef APP-NVUE
// 只有nvue下,需要将锚点的高度也累加,非nvue下锚点高度是包含在index-item中的。
top = top + anchors[index].height
@@ -515,7 +525,7 @@
if (scrollTop <= children[0].top || scrollTop >= children[len - 1].top + children[len - 1].height) {
this.activeIndex = -1
break
- } else if (!nextItem) {
+ } else if (!nextItem) {
// 当不存在下一个item时,意味着历遍到了最后一个
this.activeIndex = len - 1
break
@@ -530,7 +540,6 @@
diff --git a/uview-plus/components/u-list/list.js b/uview-plus/components/u-list/list.js
index a830c32..94010e4 100644
--- a/uview-plus/components/u-list/list.js
+++ b/uview-plus/components/u-list/list.js
@@ -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:14:53
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/list.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/list.js
*/
export default {
// list 组件
diff --git a/uview-plus/components/u-list/u-list.vue b/uview-plus/components/u-list/u-list.vue
index af95ff1..726ff38 100644
--- a/uview-plus/components/u-list/u-list.vue
+++ b/uview-plus/components/u-list/u-list.vue
@@ -50,14 +50,14 @@
import { props } from './props';
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
- import { addUnit, addStyle, deepMerge, sleep, sys } from '../../libs/function/index';
+ import { addUnit, addStyle, deepMerge, sleep, getWindowInfo } from '../../libs/function/index';
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom')
// #endif
/**
* List 列表
* @description 该组件为高性能列表组件
- * @tutorial https://ijry.github.io/uview-plus/components/list.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/list.html
* @property {Boolean} showScrollbar 控制是否出现滚动条,仅nvue有效 (默认 false )
* @property {String | Number} lowerThreshold 距底部多少时触发scrolltolower事件 (默认 50 )
* @property {String | Number} upperThreshold 距顶部多少时触发scrolltoupper事件,非nvue有效 (默认 0 )
@@ -90,7 +90,7 @@
innerScrollTop: 0,
// vue下,scroll-view在上拉加载时的偏移值
offset: 0,
- sys: sys()
+ sys: getWindowInfo()
}
},
computed: {
@@ -114,7 +114,7 @@
this.anchors = []
},
mounted() {},
- emits: ["scroll", "scrolltolower", "scrolltoupper",
+ emits: ["scroll", "scrolltolower", "scroll-to-lower", "scrolltoupper", "scroll-to-upper",
"refresherpulling", "refresherrefresh", "refresherrestore", "refresherabort"],
methods: {
updateOffsetFromChild(top) {
@@ -145,6 +145,8 @@
scrolltolower(e) {
sleep(30).then(() => {
this.$emit('scrolltolower')
+ // 支付宝小程序奇怪无法触发scrolltolowerhttps://github.com/ijry/uview-plus/issues/422
+ this.$emit('scroll-to-lower')
})
},
// #ifndef APP-NVUE
@@ -152,6 +154,7 @@
scrolltoupper(e) {
sleep(30).then(() => {
this.$emit('scrolltoupper')
+ this.$emit('scroll-to-upper')
// 这一句很重要,能绝对保证在性功能障碍的webview,滚动条到顶时,取消偏移值,让页面置顶
this.offset = 0
})
@@ -174,7 +177,6 @@
+
diff --git a/uview-plus/components/u-loading-page/loadingPage.js b/uview-plus/components/u-loading-page/loadingPage.js
index 6ed7485..8bb017a 100644
--- a/uview-plus/components/u-loading-page/loadingPage.js
+++ b/uview-plus/components/u-loading-page/loadingPage.js
@@ -1,16 +1,17 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:00:23
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingPage.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/loadingPage.js
*/
+import { t } from '../../libs/i18n'
export default {
// loading-page组件
loadingPage: {
- loadingText: '正在加载',
+ loadingText: t("up.common.loading2"),
image: '',
loadingMode: 'circle',
loading: false,
diff --git a/uview-plus/components/u-loading-page/u-loading-page.vue b/uview-plus/components/u-loading-page/u-loading-page.vue
index d81dff2..6671125 100644
--- a/uview-plus/components/u-loading-page/u-loading-page.vue
+++ b/uview-plus/components/u-loading-page/u-loading-page.vue
@@ -56,7 +56,7 @@ import { addUnit } from '../../libs/function/index';
/**
* loadingPage 加载动画
* @description 警此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。
- * @tutorial https://ijry.github.io/uview-plus/components/loading.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/loading.html
* @property {String | Number} loadingText 提示内容 (默认 '正在加载' )
* @property {String} image 文字上方用于替换loading动画的图片
* @property {String} loadingMode 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 (默认 'circle' )
@@ -83,8 +83,6 @@ export default {
\ No newline at end of file
diff --git a/uview-plus/components/u-modal/modal.js b/uview-plus/components/u-modal/modal.js
index 02dadaa..59d8abc 100644
--- a/uview-plus/components/u-modal/modal.js
+++ b/uview-plus/components/u-modal/modal.js
@@ -1,20 +1,21 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:15:59
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/modal.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/modal.js
*/
+import { t } from '../../libs/i18n'
export default {
// modal 组件
modal: {
show: false,
title: '',
content: '',
- confirmText: '确认',
- cancelText: '取消',
+ confirmText: t("up.common.confirm"),
+ cancelText: t("up.common.cancel"),
showConfirmButton: true,
showCancelButton: false,
confirmColor: '#2979ff',
@@ -26,6 +27,10 @@ export default {
negativeTop: 0,
width: '650rpx',
confirmButtonShape: '',
- contentTextAlign: 'left'
+ duration: 400,
+ contentTextAlign: 'left',
+ asyncCloseTip: t("up.common.inOperation") + '...',
+ asyncCancelClose: false,
+ contentStyle: {}
}
}
diff --git a/uview-plus/components/u-modal/props.js b/uview-plus/components/u-modal/props.js
index 0e7443b..0f0177b 100644
--- a/uview-plus/components/u-modal/props.js
+++ b/uview-plus/components/u-modal/props.js
@@ -82,10 +82,30 @@ export const props = defineMixin({
type: String,
default: () => defProps.modal.confirmButtonShape
},
+ // 弹窗动画过度时间
+ duration: {
+ type: [Number],
+ default: defProps.modal.duration
+ },
// 文案对齐方式
contentTextAlign: {
type: String,
default: () => defProps.modal.contentTextAlign
},
+ // 异步确定时如果点击了取消时候的提示文案
+ asyncCloseTip: {
+ type: String,
+ default: () => defProps.modal.asyncCloseTip
+ },
+ // 是否异步关闭,只对取消按钮有效
+ asyncCancelClose: {
+ type: Boolean,
+ default: () => defProps.modal.asyncCancelClose
+ },
+ // 内容样式
+ contentStyle: {
+ type: Object,
+ default: () => defProps.modal.contentStyle
+ }
}
})
diff --git a/uview-plus/components/u-modal/u-modal.vue b/uview-plus/components/u-modal/u-modal.vue
index ed2d578..eab8f72 100644
--- a/uview-plus/components/u-modal/u-modal.vue
+++ b/uview-plus/components/u-modal/u-modal.vue
@@ -11,7 +11,7 @@
}"
:closeOnClickOverlay="closeOnClickOverlay"
:safeAreaInsetBottom="false"
- :duration="400"
+ :duration="duration"
@click="clickHandler"
>
{{ title }}
@@ -89,6 +87,9 @@
+
+
+
@@ -100,7 +101,7 @@
/**
* Modal 模态框
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作。
- * @tutorial https://ijry.github.io/uview-plus/components/modul.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/modul.html
* @property {Boolean} show 是否显示模态框,请赋值给show (默认 false )
* @property {String} title 标题内容
* @property {String} content 模态框内容,如传入slot内容,则此参数无效
@@ -117,6 +118,7 @@
* @property {String | Number} negativeTop 往上偏移的值,给一个负的margin-top,往上偏移,避免和键盘重合的情况,单位任意,数值则默认为px单位 (默认 0 )
* @property {String | Number} width modal宽度,不支持百分比,可以数值,px,rpx单位 (默认 '650rpx' )
* @property {String} confirmButtonShape 确认按钮的样式,如设置,将不会显示取消按钮
+ * @property {Number} duration 弹窗动画过度时间 (默认 400 )
* @event {Function} confirm 点击确认按钮时触发
* @event {Function} cancel 点击取消按钮时触发
* @event {Function} close 点击遮罩关闭出发,closeOnClickOverlay为true有效
@@ -137,7 +139,14 @@
if (n && this.loading) this.loading = false
}
},
- emits: ["confirm", "cancel", "close", "update:show"],
+ emits: ["confirm", "cancel", "close", "update:show", 'cancelOnAsync'],
+ computed: {
+ contentStyleCpu() {
+ let style = this.contentStyle;
+ style.paddingTop = `${this.title ? 12 : 25}px`
+ return style;
+ }
+ },
methods: {
addUnit,
// 点击确定按钮
@@ -152,7 +161,21 @@
},
// 点击取消按钮
cancelHandler() {
- this.$emit('update:show', false)
+ // 如果点击了确定按钮,确定按钮正在请求接口执行异步操作,那么限制不能取消。
+ if (this.asyncClose && this.loading) {
+ if (this.asyncCloseTip) {
+ uni.showToast({
+ title: this.asyncCloseTip,
+ icon: 'none'
+ });
+ }
+ this.$emit('cancelOnAsync')
+ } else {
+ // 如果配置了取消时异步关闭
+ if (!this.asyncCancelClose) {
+ this.$emit('update:show', false)
+ }
+ }
this.$emit('cancel')
},
// 点击遮罩
@@ -171,7 +194,6 @@
diff --git a/uview-plus/components/u-parse/node/node.vue b/uview-plus/components/u-parse/node/node.vue
index 70a4b05..bc5b262 100644
--- a/uview-plus/components/u-parse/node/node.vue
+++ b/uview-plus/components/u-parse/node/node.vue
@@ -10,13 +10,19 @@
-
+
-
-
+
+
+
+
+
+
+
+
-
+
@@ -25,14 +31,14 @@
{{n.text}}
- \n
+ {{'\n'}}
-
+
@@ -61,13 +67,13 @@
-
+
-
+
@@ -106,7 +112,6 @@ module.exports = {
}
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-picker-column/u-picker-column.vue b/uview-plus/components/u-picker-column/u-picker-column.vue
index a2490d9..f788634 100644
--- a/uview-plus/components/u-picker-column/u-picker-column.vue
+++ b/uview-plus/components/u-picker-column/u-picker-column.vue
@@ -25,5 +25,4 @@
diff --git a/uview-plus/components/u-picker-data/u-picker-data.vue b/uview-plus/components/u-picker-data/u-picker-data.vue
new file mode 100644
index 0000000..959c811
--- /dev/null
+++ b/uview-plus/components/u-picker-data/u-picker-data.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-picker/picker.js b/uview-plus/components/u-picker/picker.js
index 3d4d936..61fca3e 100644
--- a/uview-plus/components/u-picker/picker.js
+++ b/uview-plus/components/u-picker/picker.js
@@ -1,12 +1,13 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:18:20
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/picker.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/picker.js
*/
+import { t } from '../../libs/i18n'
export default {
// picker
picker: {
@@ -17,15 +18,25 @@ export default {
columns: [],
loading: false,
itemHeight: 44,
- cancelText: '取消',
- confirmText: '确定',
+ cancelText: t("up.common.cancel"),
+ confirmText: t("up.common.confirm"),
cancelColor: '#909193',
- confirmColor: '#3c9cff',
+ confirmColor: '',
visibleItemCount: 5,
keyName: 'text',
+ valueName: 'value',
closeOnClickOverlay: false,
defaultIndex: [],
immediateChange: true,
zIndex: 10076,
+ disabled: false,
+ disabledColor: '',
+ placeholder: t("up.common.pleaseChoose"),
+ inputProps: {},
+ bgColor: '',
+ round: 0,
+ duration: 300,
+ overlayOpacity: 0.5,
+ pageInline: false
}
}
diff --git a/uview-plus/components/u-picker/props.js b/uview-plus/components/u-picker/props.js
index 610c70e..cb2f2ea 100644
--- a/uview-plus/components/u-picker/props.js
+++ b/uview-plus/components/u-picker/props.js
@@ -10,9 +10,27 @@ export const props = defineMixin({
type: Boolean,
default: false
},
+ inputProps: {
+ type: Object,
+ default: () => {
+ return {}
+ }
+ },
+ inputBorder: {
+ type: String,
+ default: () => defProps.input.inputBorder
+ },
+ disabled: {
+ type: Boolean,
+ default: () => defProps.picker.disabled
+ },
+ disabledColor:{
+ type: String,
+ default: () => defProps.picker.disabledColor
+ },
placeholder: {
type: String,
- default: () => '请选择'
+ default: () => defProps.picker.placeholder
},
// 是否展示picker弹窗
show: {
@@ -79,6 +97,11 @@ export const props = defineMixin({
type: String,
default: () => defProps.picker.keyName
},
+ // 选项对象中,需要获取的属性值键名
+ valueName: {
+ type: String,
+ default: () => defProps.picker.valueName
+ },
// 是否允许点击遮罩关闭选择器
closeOnClickOverlay: {
type: Boolean,
@@ -104,5 +127,40 @@ export const props = defineMixin({
type: [String, Number],
default: () => defProps.picker.zIndex
},
+ // 弹窗背景色,设置为transparent可去除白色背景
+ bgColor: {
+ type: String,
+ default: () => defProps.picker.bgColor
+ },
+ // 是否显示圆角
+ round: {
+ type: [Boolean, String, Number],
+ default: () => defProps.picker.round
+ },
+ // 动画时长,单位ms
+ duration: {
+ type: [String, Number],
+ default: () => defProps.picker.duration
+ },
+ // 遮罩的透明度,0-1之间
+ overlayOpacity: {
+ type: [Number, String],
+ default: () => defProps.picker.overlayOpacity
+ },
+ // 是否页面内展示
+ pageInline:{
+ type: Boolean,
+ default: () => defProps.picker.pageInline
+ },
+ // 蒙层样式样式
+ maskClass: {
+ type: String,
+ defualt: ''
+ },
+ // 蒙层样式样式
+ maskStyle: {
+ type: String,
+ defualt: ''
+ }
}
})
diff --git a/uview-plus/components/u-picker/u-picker.vue b/uview-plus/components/u-picker/u-picker.vue
index 9b932ed..625e8db 100644
--- a/uview-plus/components/u-picker/u-picker.vue
+++ b/uview-plus/components/u-picker/u-picker.vue
@@ -1,16 +1,27 @@
-
-
-
-
- {{ inputLabel && inputLabel.length ? inputLabel.join('/') : placeholder }}
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -32,11 +43,13 @@
@@ -52,8 +65,8 @@
v-for="(item1, index1) in item"
:key="index1"
:style="{
- height: addUnit(itemHeight),
- lineHeight: addUnit(itemHeight),
+ height: addUnit(itemHeight, 'px'),
+ lineHeight: addUnit(itemHeight, 'px'),
fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal',
display: 'block'
}"
@@ -90,6 +103,10 @@
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器(默认 false )
* @property {Array} defaultIndex 各列的默认索引
* @property {Boolean} immediateChange 是否在手指松开时立即触发change事件(默认 true )
+ * @property {String | Number} round 圆角值(默认 0)
+ * @property {String } bgColor 背景色值(默认 '' )
+ * @property {String | Number} duration 动画时长,单位ms (默认 300 )
+ * @property {String | Number} overlayDuration 遮罩层动画时长,单位ms (默认 350 )
* @event {Function} close 关闭选择器时触发
* @event {Function} cancel 点击取消按钮触发
* @event {Function} change 当选择值变化时触发
@@ -114,17 +131,10 @@ export default {
// 上一次的变化列索引
columnIndex: 0,
showByClickInput: false,
+ currentActiveValue: [] //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个
}
},
watch: {
- // 监听默认索引的变化,重新设置对应的值
- defaultIndex: {
- immediate: true,
- deep:true,
- handler(n) {
- this.setIndexs(n, true)
- }
- },
// 监听columns参数的变化
columns: {
immediate: true,
@@ -133,29 +143,111 @@ export default {
this.setColumns(n)
}
},
+ // 监听默认索引的变化,重新设置对应的值
+ defaultIndex: {
+ immediate: true,
+ deep:true,
+ handler(n,o) {
+ // 修复uniapp调用子组件直接:defaultIndex="[0]"这样写
+ // v-model的值变化时候导致defaultIndexwatch也会执行的问题
+ //单纯vue不会出现
+ if (!o || n.join("/") != o.join("/")) {
+ this.setIndexs(n, true)
+ }
+ }
+ },
+ modelValue: {
+ immediate: true,
+ deep:true,
+ handler(n,o) {
+ // 修复uniapp调用子组件直接:defaultIndex="[0]"这样写
+ // v-model的值变化时候导致defaultIndexwatch也会执行的问题
+ //单纯vue不会出现
+ if (!o || n.join("/") != o.join("/")) {
+ let arr = [];
+ if (n != null) {
+ n.forEach((element, index) => {
+ let currentCols = this.getColumnValues(index)
+ if(!Array.isArray(currentCols) && currentCols.length===0) {
+ return
+ }
+ if (typeof currentCols[0] === 'object') {
+ currentCols.forEach((item, index2) => {
+ if (item[this.valueName] == element) {
+ arr.push(index2)
+ }
+ })
+ } else {
+ currentCols.forEach((item, index2) => {
+ if (item == element) {
+ arr.push(index2)
+ }
+ })
+ }
+ });
+ // alert(arr)
+ if (arr.length == 0 && this.defaultIndex) {
+ } else {
+ this.setIndexs(arr, true)
+ }
+ }
+ }
+ }
+ }
},
emits: ['close', 'cancel', 'confirm', 'change', 'update:modelValue', 'update:show'],
computed: {
- inputLabel() {
- let items = this.innerColumns.map((item, index) => item[this.innerIndex[index]])
- let res = []
- items.forEach(element => {
- res.push(element[this.keyName])
- });
- return res
- },
- inputValue() {
- let items = this.innerColumns.map((item, index) => item[this.innerIndex[index]])
- let res = []
- items.forEach(element => {
- res.push(element['id'])
- });
- return res
- }
+ // input的props
+ inputPropsInner() {
+ return {
+ border: this.inputBorder,
+ placeholder: this.placeholder,
+ disabled: this.disabled,
+ disabledColor: this.disabledColor,
+ ...this.inputProps
+ }
+ },
+ //已选&&已确认的值显示在input上面的文案
+ inputLabel() {
+ let firstItem = this.innerColumns[0] && this.innerColumns[0][0];
+ // //区分是不是对象数组
+ if (firstItem && Object.prototype.toString.call(firstItem) === '[object Object]') {
+ let res = this.innerColumns[0].filter(item => this.modelValue.includes(item[this.valueName]))
+ res = res.map(item => item[this.keyName]);
+ return res.join("/");
+
+ } else {
+ //用户确定的值,才显示到输入框
+ return this.modelValue.join("/");
+ }
+ },
+ //已选,待确认的值
+ inputValue() {
+ let items = this.innerColumns.map((item, index) => item[this.innerIndex[index]])
+ let res = []
+ //区分是不是对象数组
+ if (items[0] && Object.prototype.toString.call(items[0]) === '[object Object]') {
+ //对象数组返回属性值集合
+ items.forEach(element => {
+ res.push(element && element[this.valueName])
+ });
+ } else {
+ //非对象数组返回元素集合
+ items.forEach((element, index) => {
+ res.push(element)
+ });
+ }
+ return res
+ }
},
methods: {
addUnit,
testArray: test.array,
+ onShowByClickInput(){
+ if(!this.disabled){
+ this.showByClickInput=!this.showByClickInput;
+ }
+ },
// 获取item需要显示的文字,判别为对象还是文本
getItemText(item) {
if (test.object(item)) {
@@ -170,6 +262,7 @@ export default {
if (this.hasInput) {
this.showByClickInput = false
}
+ this.setDefault()
this.$emit('update:show', false)
this.$emit('close')
}
@@ -179,15 +272,37 @@ export default {
if (this.hasInput) {
this.showByClickInput = false
}
+ this.setDefault()
this.$emit('update:show', false)
this.$emit('cancel')
},
+ setDefault() {
+ let arr = [0]
+ if (this.lastIndex.length == 0) {
+ //如果有默认值&&默认值的数组长度是正确的,就用默认值
+ if (Array.isArray(this.defaultIndex) && this.defaultIndex.length == this.innerColumns.length) {
+ arr = [...this.defaultIndex];
+ } else {
+ //否则默认都选中第一个
+ arr = Array(this.innerColumns.length).fill(0);
+ }
+ } else {
+ arr = deepClone(this.lastIndex)
+ }
+ this.setLastIndex(arr)
+ this.setIndexs(arr)
+ },
// 点击工具栏的确定按钮
confirm() {
+ // 如果用户有没有触发过change
+ if (!this.currentActiveValue.length) {
+ this.setDefault()
+ }
this.$emit('update:modelValue', this.inputValue)
if (this.hasInput) {
this.showByClickInput = false
}
+ this.setLastIndex(this.innerIndex)
this.$emit('update:show', false)
this.$emit('confirm', {
indexs: this.innerIndex,
@@ -202,10 +317,12 @@ export default {
} = e.detail
let index = 0,
columnIndex = 0
+ //记录用户选中但是还没确认的值
+ this.currentActiveValue = value;
// 通过对比前后两次的列索引,得出当前变化的是哪一列
for (let i = 0; i < value.length; i++) {
let item = value[i]
- if (item !== (this.lastIndex[i] || 0)) { // 把undefined转为合法假值0
+ if (item !== undefined && item !== (this.lastIndex[i] || 0)) { // 把undefined转为合法假值0
// 设置columnIndex为当前变化列的索引
columnIndex = i
// index则为变化列中的变化项的索引
@@ -216,11 +333,14 @@ export default {
this.columnIndex = columnIndex
const values = this.innerColumns
// 将当前的各项变化索引,设置为"上一次"的索引变化值
- this.setLastIndex(value)
+ // this.setLastIndex(value)
this.setIndexs(value)
-
- this.$emit('update:modelValue', this.inputValue)
-
+ //如果是非自带输入框才会在change时候触发v-model绑值的变化
+ //否则会非常的奇怪,用户未确认,值就变了
+ // if (!this.hasInput) {
+ // this.$emit('update:modelValue', this.inputValue)
+ // }
+
this.$emit('change', {
// #ifndef MP-WEIXIN || MP-LARK
// 微信小程序不能传递this,会因为循环引用而报错
@@ -299,11 +419,21 @@ export default {
\ No newline at end of file
diff --git a/uview-plus/components/u-popup/popup.js b/uview-plus/components/u-popup/popup.js
index 5440c3c..9560586 100644
--- a/uview-plus/components/u-popup/popup.js
+++ b/uview-plus/components/u-popup/popup.js
@@ -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:06:33
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/popup.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/popup.js
*/
export default {
// popup组件
@@ -21,9 +21,13 @@ export default {
safeAreaInsetBottom: true,
safeAreaInsetTop: false,
closeIconPos: 'top-right',
- round: 0,
+ round: '20px',
zoom: true,
bgColor: '',
- overlayOpacity: 0.5
+ overlayOpacity: 0.5,
+ pageInline: false,
+ touchable: false,
+ minHeight: '200px',
+ maxHeight: '600px'
}
}
diff --git a/uview-plus/components/u-popup/props.js b/uview-plus/components/u-popup/props.js
index 78e976b..68e7c86 100644
--- a/uview-plus/components/u-popup/props.js
+++ b/uview-plus/components/u-popup/props.js
@@ -76,6 +76,26 @@ export const props = defineMixin({
overlayOpacity: {
type: [Number, String],
default: () => defProps.popup.overlayOpacity
- }
+ },
+ // 是否页面内展示
+ pageInline:{
+ type: Boolean,
+ default: () => defProps.popup.pageInline
+ },
+ // 是否页开启手势滑动
+ touchable:{
+ type: Boolean,
+ default: () => defProps.popup.touchable
+ },
+ // 手势滑动最小高度
+ minHeight:{
+ type: [String],
+ default: () => defProps.popup.minHeight
+ },
+ // 手势滑动最大高度
+ maxHeight:{
+ type: [String],
+ default: () => defProps.popup.maxHeight
+ }
}
})
diff --git a/uview-plus/components/u-popup/u-popup.vue b/uview-plus/components/u-popup/u-popup.vue
index bd5fa32..e66015e 100644
--- a/uview-plus/components/u-popup/u-popup.vue
+++ b/uview-plus/components/u-popup/u-popup.vue
@@ -1,7 +1,15 @@
-
@@ -51,11 +74,11 @@
import { props } from './props';
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
- import { addUnit, addStyle, deepMerge, sleep, sys } from '../../libs/function/index';
+ import { addUnit, addStyle, deepMerge, sleep, getWindowInfo } from '../../libs/function/index';
/**
* popup 弹窗
* @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
- * @tutorial https://ijry.github.io/uview-plus/components/popup.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/popup.html
* @property {Boolean} show 是否展示弹窗 (默认 false )
* @property {Boolean} overlay 是否显示遮罩 (默认 true )
* @property {String} mode 弹出方向(默认 'bottom' )
@@ -69,8 +92,12 @@
* @property {Boolean} safeAreaInsetBottom 是否为iPhoneX留出底部安全距离 (默认 true )
* @property {Boolean} safeAreaInsetTop 是否留出顶部安全距离(状态栏高度) (默认 false )
* @property {String} closeIconPos 自定义关闭图标位置(默认 'top-right' )
- * @property {String | Number} round 圆角值(默认 0)
+ * @property {String | Number} round 圆角值(默认 20px)
+ * @property {String } bgColor 背景色值(默认 '' )
* @property {Boolean} zoom 当mode=center时 是否开启缩放(默认 true )
+ * @property {Boolean} touchable 是否开启底部弹窗手势功能(默认 false )
+ * @property {String} minHeight 最小高度,单位任意,数值默认为px(默认 '200px' )
+ * @property {String} maxHeight 最大高度,单位任意,数值默认为px(默认 '80%' )
* @property {Object} customStyle 组件的样式,对象形式
* @event {Function} open 弹出层打开
* @event {Function} close 弹出层收起
@@ -81,7 +108,13 @@
mixins: [mpMixin, mixin, props],
data() {
return {
- overlayDuration: this.duration + 50
+ overlayDuration: this.duration + 50,
+ // 触摸相关数据
+ touchStartY: 0,
+ touchStartHeight: 0,
+ isTouching: false,
+ // 当前弹窗高度
+ currentHeight: 'auto'
}
},
watch: {
@@ -97,10 +130,12 @@
computed: {
transitionStyle() {
const style = {
- zIndex: this.zIndex,
- position: 'fixed',
display: 'flex',
}
+ if (!this.pageInline) {
+ style.zIndex = this.zIndex
+ style.position = 'fixed'
+ }
style[this.mode] = 0
if (this.mode === 'left') {
return deepMerge(style, {
@@ -133,13 +168,30 @@
})
}
},
+ contentStyleWrap() {
+ const style = {}
+
+ // 处理手势滑动时的高度变化
+ if (this.mode === 'bottom' && this.touchable) {
+ if (this.currentHeight !== 'auto') {
+ style.height = this.currentHeight
+ }
+ if (this.maxHeight) {
+ style.maxHeight = addUnit(this.maxHeight)
+ }
+ if (this.minHeight) {
+ style.minHeight = addUnit(this.minHeight)
+ }
+ }
+ return style;
+ },
contentStyle() {
const style = {}
// 通过设备信息的safeAreaInsets值来判断是否需要预留顶部状态栏和底部安全局的位置
// 不使用css方案,是因为nvue不支持css的iPhoneX安全区查询属性
const {
safeAreaInsets
- } = sys()
+ } = getWindowInfo()
if (this.mode !== 'center') {
style.flex = 1
}
@@ -159,6 +211,7 @@
style.borderRadius = value
}
}
+
return deepMerge(style, addStyle(this.customStyle))
},
position() {
@@ -188,6 +241,9 @@
this.$emit('close')
}
},
+ open(e) {
+ this.$emit('update:show', true)
+ },
close(e) {
this.$emit('update:show', false)
this.$emit('close')
@@ -227,19 +283,82 @@
this.retryComputedComponentRect(grandChild)
}
}
- }
+ },
// #endif
+
+ // 触摸开始
+ onTouchStart(e) {
+ if (!this.touchable || this.mode !== 'bottom') return;
+ this.isTouching = true;
+ this.touchStartY = e.touches[0].clientY;
+ // 保存当前高度
+ this.touchStartHeight = this.$el.querySelector('.u-popup__content—transition').offsetHeight;
+ },
+
+ // 触摸移动
+ onTouchMove(e) {
+ if (!this.isTouching || !this.touchable || this.mode !== 'bottom') return;
+ const touchY = e.touches[0].clientY;
+ const deltaY = touchY - this.touchStartY;
+
+ // 只处理向上滑动(减小高度)和向下滑动(增加高度)
+ if (deltaY !== 0) {
+ const newHeight = this.touchStartHeight - deltaY;
+ const minHeight = parseFloat(addUnit(this.minHeight)) || 200;
+ const maxHeight = this.maxHeight ?
+ (this.maxHeight.toString().includes('%') ?
+ getWindowInfo().windowHeight * (parseFloat(this.maxHeight) / 100) :
+ parseFloat(addUnit(this.maxHeight))) :
+ getWindowInfo().windowHeight * 0.8;
+
+ // 限制高度在最小值和最大值之间
+ if (newHeight >= minHeight && newHeight <= maxHeight) {
+ this.currentHeight = newHeight + 'px';
+ }
+ }
+
+ // 阻止默认滚动行为
+ e.preventDefault();
+ },
+
+ // 触摸结束
+ onTouchEnd(e) {
+ if (!this.isTouching || !this.touchable || this.mode !== 'bottom') return;
+ this.isTouching = false;
+
+ const touchY = e.changedTouches[0].clientY;
+ const deltaY = touchY - this.touchStartY;
+ const velocity = Math.abs(deltaY) / (e.timeStamp - e.changedTouches[0].timestamp); // 简单的速度计算
+
+ // 快速向下滑动时关闭弹窗
+ if (deltaY > 100 || (deltaY > 30 && velocity > 0.5)) {
+ this.close();
+ } else {
+ // 恢复到自适应高度
+ // this.currentHeight = 'auto';
+ }
+ }
}
}
+
\ No newline at end of file
diff --git a/uview-plus/components/u-poster/u-poster.vue b/uview-plus/components/u-poster/u-poster.vue
new file mode 100644
index 0000000..fe2b600
--- /dev/null
+++ b/uview-plus/components/u-poster/u-poster.vue
@@ -0,0 +1,629 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-pull-refresh/u-pull-refresh.vue b/uview-plus/components/u-pull-refresh/u-pull-refresh.vue
new file mode 100644
index 0000000..a71a27e
--- /dev/null
+++ b/uview-plus/components/u-pull-refresh/u-pull-refresh.vue
@@ -0,0 +1,334 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ t("up.pullRefresh.pull") }}
+
+
+
+
+
+
+
+
+
+ {{ t("up.pullRefresh.release") }}
+
+
+
+
+
+
+
+
+
+ {{ t("up.pullRefresh.refreshing") }}...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-qrcode/qrcode.js b/uview-plus/components/u-qrcode/qrcode.js
index 7ec89fc..b420833 100644
--- a/uview-plus/components/u-qrcode/qrcode.js
+++ b/uview-plus/components/u-qrcode/qrcode.js
@@ -18,6 +18,7 @@ let QRCode = {};
return [c0, c1];
// 3 bytes
} else {
+
c0 = 224 + (code >> 12);
c1 = 128 + (code >> 6 & 63);
c2 = 128 + (code & 63);
@@ -1031,12 +1032,14 @@ let QRCode = {};
image: '',
imageSize: 30,
canvasId: opt.canvasId,
- nvueContext: opt.nvueContext,
- context: opt.context,
+ ctx: opt.ctx,
+ isNvue: opt.isNvue,
+ vuectx: opt.vuectx,
usingComponents: opt.usingComponents,
showLoading: opt.showLoading,
loadingText: opt.loadingText,
};
+
if (typeof opt === 'string') { // 只编码ASCII字符串
opt = {
text: opt
@@ -1083,8 +1086,14 @@ let QRCode = {};
}
return options.foreground;
}
+
// 创建canvas
- let createCanvas = function (options) {
+ let createCanvas = async function (options) {
+ let isApp = false;
+ // #ifdef APP
+ isApp = true;
+ // #endif
+
if(options.showLoading){
uni.showLoading({
title: options.loadingText,
@@ -1092,11 +1101,8 @@ let QRCode = {};
});
}
var ctx = '';
- if (options.nvueContext) {
- ctx = options.nvueContext;
- } else {
- ctx = uni.createCanvasContext(options.canvasId, options.context);
- }
+ ctx = options.ctx;
+
var count = qrCodeAlg.getModuleCount();
var ratioSize = options.size;
var ratioImgSize = options.imageSize;
@@ -1107,14 +1113,18 @@ let QRCode = {};
for (var row = 0; row < count; row++) {
for (var col = 0; col < count; col++) {
var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
- var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
+ var h = (Math.ceil((row + 1) * tileH) - Math.floor(row * tileH));
var foreground = getForeGround({
row: row,
col: col,
count: count,
options: options
});
- ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
+ if (options.isNvue) {
+ ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
+ } else {
+ ctx.fillStyle = qrCodeAlg.modules[row][col] ? foreground : options.background;
+ }
ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
}
}
@@ -1122,18 +1132,33 @@ let QRCode = {};
var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
- ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
+ options.vuectx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
// 画圆角矩形
function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
- ctxi.setLineWidth(lineWidth);
- ctxi.setFillStyle(options.background);
- ctxi.setStrokeStyle(options.background);
- ctxi.beginPath(); // draw top and top right corner
+ if (options.isNvue || isApp) {
+ ctxi.setLineWidth(lineWidth);
+ ctxi.setFillStyle(options.background);
+ ctxi.setStrokeStyle(options.background);
+ }
+ else {
+ ctxi.lineWidth = lineWidth;
+ ctxi.fillStyle = options.background;
+ ctxi.strokeStyle = options.background;
+ }
+ ctxi.beginPath(); // draw top and top right corner
ctxi.moveTo(x + r, y);
- ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner
- ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner
- ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner
- ctxi.arcTo(x, y, x + r, y, r);
+ ctxi.lineTo(x + width, y); // move to top-right corner
+ ctxi.arc(x + width - r, y + r, r, -Math.PI / 2, 0); // draw right side and bottom right corner
+
+ ctxi.lineTo(x + width, y + height - r);
+ ctxi.arc(x + width - r, y + height - r, r, 0, Math.PI / 2); // draw bottom and bottom left corner
+
+ ctxi.lineTo(x + r, y + height);
+ ctxi.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);// draw left and top left corner
+
+ ctxi.lineTo(x, y + r);
+ ctxi.arc(x + r, y + r, r, Math.PI, Math.PI * 3 / 2);
+
ctxi.closePath();
if (fill) {
ctxi.fill();
@@ -1144,58 +1169,67 @@ let QRCode = {};
}
}
setTimeout(() => {
- ctx.draw(true, () => {
- // 保存到临时区域
- setTimeout(() => {
- if (options.nvueContext) {
- ctx.toTempFilePath(
- 0,
- 0,
- options.width,
- options.height,
- options.width,
- options.height,
- "",
- 1,
- function(res) {
- if (options.cbResult) {
- options.cbResult(res.tempFilePath)
- }
- }
- );
- } else {
- uni.canvasToTempFilePath({
- width: options.width,
- height: options.height,
- destWidth: options.width,
- destHeight: options.height,
- canvasId: options.canvasId,
- quality: Number(1),
- success: function (res) {
- if (options.cbResult) {
- // 由于官方还没有统一此接口的输出字段,所以先判定下 支付宝为 res.apFilePath
- if (!empty(res.tempFilePath)) {
- options.cbResult(res.tempFilePath)
- } else if (!empty(res.apFilePath)) {
- options.cbResult(res.apFilePath)
- } else {
+ // canvas2 绘制是自动的不需要手动绘制
+ if(options.isNvue || isApp){
+ ctx.draw(true, () => {
+ // 保存到临时区域
+ setTimeout(() => {
+ if (options.isNvue) {
+ ctx.toTempFilePath(
+ 0,
+ 0,
+ options.width,
+ options.height,
+ options.width,
+ options.height,
+ "",
+ 1,
+ function(res) {
+ if (options.cbResult) {
options.cbResult(res.tempFilePath)
}
}
- },
- fail: function (res) {
- if (options.cbResult) {
- options.cbResult(res)
- }
- },
- complete: function () {
- uni.hideLoading();
- },
- }, options.context);
- }
- }, options.text.length + 100);
- });
- }, options.usingComponents ? 0 : 150);
+ );
+ } else {
+ uni.canvasToTempFilePath({
+ width: options.width,
+ height: options.height,
+ destWidth: options.width,
+ destHeight: options.height,
+ canvasId: options.canvasId,
+ quality: Number(1),
+ success: function (res) {
+ // console.log('绘制成功', res)
+ if (options.cbResult) {
+ // 由于官方还没有统一此接口的输出字段,所以先判定下 支付宝为 res.apFilePath
+ if (!empty(res.tempFilePath)) {
+ options.cbResult(res.tempFilePath)
+ } else if (!empty(res.apFilePath)) {
+ options.cbResult(res.apFilePath)
+ } else {
+ options.cbResult(res.tempFilePath)
+ }
+ }
+ },
+ fail: function (res) {
+ console.log('绘制失败', res)
+ if (options.cbResult) {
+ options.cbResult(res)
+ }
+ },
+ complete: function () {
+ uni.hideLoading();
+ },
+ }, options.vuectx);
+ }
+ }, options.text.length + 100);
+ });
+ }
+ else{
+ options.cbResult("")
+ }
+
+ }, options.usingComponents ? 100 : 200);
}
createCanvas(this.options);
// 空判定
@@ -1218,10 +1252,10 @@ let QRCode = {};
};
QRCode.prototype.clear = function (fn) {
var ctx = '';
- if (options.nvueContext) {
- ctx = options.nvueContext;
+ if (options.isNvue) {
+ ctx = options.ctx;
} else {
- uni.createCanvasContext(this.options.canvasId, this.options.context)
+ uni.createCanvasContext(this.options.canvasId, this.options.vuectx)
}
ctx.clearRect(0, 0, this.options.size, this.options.size)
ctx.draw(false, () => {
@@ -1232,4 +1266,4 @@ let QRCode = {};
};
})()
-export default QRCode
\ No newline at end of file
+export default QRCode
diff --git a/uview-plus/components/u-qrcode/u-qrcode.vue b/uview-plus/components/u-qrcode/u-qrcode.vue
index dc9574b..1196d4a 100644
--- a/uview-plus/components/u-qrcode/u-qrcode.vue
+++ b/uview-plus/components/u-qrcode/u-qrcode.vue
@@ -1,304 +1,548 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-radio-group/radioGroup.js b/uview-plus/components/u-radio-group/radioGroup.js
index 3d73fd5..7bba89b 100644
--- a/uview-plus/components/u-radio-group/radioGroup.js
+++ b/uview-plus/components/u-radio-group/radioGroup.js
@@ -1,11 +1,11 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
* @LastAuthor : CPS
- * @lastTime : 2024-11-05 16:01:12
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/radioGroup.js
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/radioGroup.js
*/
export default {
// radio-group组件
diff --git a/uview-plus/components/u-radio-group/u-radio-group.vue b/uview-plus/components/u-radio-group/u-radio-group.vue
index 794c2c5..6ec9435 100644
--- a/uview-plus/components/u-radio-group/u-radio-group.vue
+++ b/uview-plus/components/u-radio-group/u-radio-group.vue
@@ -17,7 +17,7 @@
/**
* radioRroup 单选框父组件
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用
- * @tutorial https://ijry.github.io/uview-plus/components/radio.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/radio.html
* @property {String | Number | Boolean} value 绑定的值
* @property {Boolean} disabled 是否禁用所有radio(默认 false )
* @property {String} shape 外观形状,shape-方形,circle-圆形(默认 circle )
@@ -118,7 +118,6 @@
diff --git a/uview-plus/components/u-section/section.js b/uview-plus/components/u-section/section.js
index f432648..d33780e 100644
--- a/uview-plus/components/u-section/section.js
+++ b/uview-plus/components/u-section/section.js
@@ -1,17 +1,18 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:07:33
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/section.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/section.js
*/
+import { t } from '../../libs/i18n'
export default {
// u-section组件
section: {
title: '',
- subTitle: '更多',
+ subTitle: t("up.common.more"),
right: true,
fontSize: 15,
bold: true,
diff --git a/uview-plus/components/u-select/u-select.vue b/uview-plus/components/u-select/u-select.vue
new file mode 100644
index 0000000..e71e22b
--- /dev/null
+++ b/uview-plus/components/u-select/u-select.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+ {{ currentLabel }}
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item[labelName]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-short-video/u-short-video.vue b/uview-plus/components/u-short-video/u-short-video.vue
new file mode 100644
index 0000000..b755043
--- /dev/null
+++ b/uview-plus/components/u-short-video/u-short-video.vue
@@ -0,0 +1,463 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.author.name }}
+ {{ item.author.desc }}
+
+
+ 关注
+
+
+
+
+
+
+
+
+ {{ item.likeCount }}
+
+
+
+ {{ item.commentCount }}
+
+
+
+ {{ item.shareCount }}
+
+
+
+ {{ item.collectCount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-signature/u-signature.vue b/uview-plus/components/u-signature/u-signature.vue
new file mode 100644
index 0000000..d76ba34
--- /dev/null
+++ b/uview-plus/components/u-signature/u-signature.vue
@@ -0,0 +1,486 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t("up.signature.penSize") }}:
+
+
+
+
+
+
+
+ {{ t("up.signature.penColor") }}:
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-skeleton/skeleton.js b/uview-plus/components/u-skeleton/skeleton.js
index 83b777d..6b421a9 100644
--- a/uview-plus/components/u-skeleton/skeleton.js
+++ b/uview-plus/components/u-skeleton/skeleton.js
@@ -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:20:14
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/skeleton.js
*/
export default {
// skeleton
diff --git a/uview-plus/components/u-skeleton/u-skeleton.vue b/uview-plus/components/u-skeleton/u-skeleton.vue
index a34e806..3716edd 100644
--- a/uview-plus/components/u-skeleton/u-skeleton.vue
+++ b/uview-plus/components/u-skeleton/u-skeleton.vue
@@ -62,7 +62,7 @@
/**
* Skeleton 骨架屏
* @description 骨架屏一般用于页面在请求远程数据尚未完成时,页面用灰色块预显示本来的页面结构,给用户更好的体验。
- * @tutorial https://ijry.github.io/uview-plus/components/skeleton.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/skeleton.html
* @property {Boolean} loading 是否显示骨架占位图,设置为false将会展示子组件内容 (默认 true )
* @property {Boolean} animate 是否开启动画效果 (默认 true )
* @property {String | Number} rows 段落占位图行数 (默认 0 )
@@ -187,7 +187,6 @@
diff --git a/uview-plus/components/u-sticky/sticky.js b/uview-plus/components/u-sticky/sticky.js
index b034604..683c36b 100644
--- a/uview-plus/components/u-sticky/sticky.js
+++ b/uview-plus/components/u-sticky/sticky.js
@@ -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:01:30
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/sticky.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/sticky.js
*/
export default {
// sticky组件
diff --git a/uview-plus/components/u-sticky/u-sticky.vue b/uview-plus/components/u-sticky/u-sticky.vue
index 7c3eb5e..d074026 100644
--- a/uview-plus/components/u-sticky/u-sticky.vue
+++ b/uview-plus/components/u-sticky/u-sticky.vue
@@ -1,10 +1,10 @@
@@ -17,12 +17,12 @@
import { props } from './props';
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
- import { addUnit, addStyle, deepMerge, getPx, guid, sys, os } from '../../libs/function/index';
+ import { addUnit, addStyle, deepMerge, getPx, guid, getDeviceInfo, os } from '../../libs/function/index';
import zIndex from '../../libs/config/zIndex';
/**
* sticky 吸顶
* @description 该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
- * @tutorial https://ijry.github.io/uview-plus/components/sticky.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/sticky.html
* @property {String | Number} offsetTop 吸顶时与顶部的距离,单位px(默认 0 )
* @property {String | Number} customNavHeight 自定义导航栏的高度 (h5 默认44 其他默认 0 )
* @property {Boolean} disabled 是否开启吸顶功能 (默认 false )
@@ -90,6 +90,11 @@
mounted() {
this.init()
},
+ watch: {
+ offsetTop(nval) {
+ this.getStickyTop()
+ }
+ },
methods: {
init() {
this.getStickyTop()
@@ -114,7 +119,7 @@
observeContent() {
// 先断掉之前的观察
this.disconnectObserver('contentObserver')
- const contentObserver = uni.createIntersectionObserver({
+ const contentObserver = uni.createIntersectionObserver(this,{
// 检测的区间范围
thresholds: [0.95, 0.98, 1]
})
@@ -150,7 +155,7 @@
// #endif
// 如果安卓版本高于8.0,依然认为是支持css sticky的(因为安卓7在某些机型,可能不支持sticky)
- if (os() === 'android' && Number(sys().system) > 8) {
+ if (os() === 'android' && Number(getDeviceInfo().system) > 8) {
this.cssSticky = true
}
diff --git a/uview-plus/components/u-subsection/props.js b/uview-plus/components/u-subsection/props.js
index 684afcc..799f518 100644
--- a/uview-plus/components/u-subsection/props.js
+++ b/uview-plus/components/u-subsection/props.js
@@ -1,5 +1,6 @@
-import { defineMixin } from '../../libs/vue'
+import {defineMixin} from '../../libs/vue'
import defProps from '../../libs/config/props.js'
+
export const props = defineMixin({
props: {
// tab的数据
@@ -42,10 +43,25 @@ export const props = defineMixin({
type: String,
default: () => defProps.subsection.bgColor
},
- // 从list元素对象中读取的键名
- keyName: {
- type: String,
- default: () => defProps.subsection.keyName
- }
+ // 从list元素对象中读取的键名
+ keyName: {
+ type: String,
+ default: () => defProps.subsection.keyName
+ },
+ // 从`list`元素对象中读取激活时的颜色 如果存在字段 优先级大于 activeColor
+ activeColorKeyName: {
+ type: String,
+ default: () => defProps.subsection.activeColorKeyName
+ },
+ // 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor
+ inactiveColorKeyName: {
+ type: String,
+ default: () => defProps.subsection.inactiveColorKeyName
+ },
+ // 是否禁用
+ disabled: {
+ type: Boolean,
+ default: () => defProps.subsection.disabled
+ }
}
})
diff --git a/uview-plus/components/u-subsection/subsection.js b/uview-plus/components/u-subsection/subsection.js
index 9a165ff..1e3ef53 100644
--- a/uview-plus/components/u-subsection/subsection.js
+++ b/uview-plus/components/u-subsection/subsection.js
@@ -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:12:20
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/subsection.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/subsection.js
*/
export default {
// subsection组件
@@ -18,6 +18,9 @@ export default {
fontSize: 12,
bold: true,
bgColor: '#eeeeef',
- keyName: 'name'
+ keyName: 'name',
+ activeColorKeyName: 'activeColorKey',
+ inactiveColorKeyName: 'inactiveColorKey',
+ disabled: false,
}
}
diff --git a/uview-plus/components/u-subsection/u-subsection.vue b/uview-plus/components/u-subsection/u-subsection.vue
index 37fb4b5..4aacc24 100644
--- a/uview-plus/components/u-subsection/u-subsection.vue
+++ b/uview-plus/components/u-subsection/u-subsection.vue
@@ -31,6 +31,7 @@
'u-subsection__item--no-border-right',
index === 0 && 'u-subsection__item--first',
index === list.length - 1 && 'u-subsection__item--last',
+ getTextViewDisableClass(index),
]"
:ref="`u-subsection__item--${index}`"
:style="[itemStyle(index)]"
@@ -40,7 +41,8 @@
>
{{ getText(item) }}
@@ -59,17 +61,20 @@ import { addStyle, addUnit, sleep } from '../../libs/function/index';
/**
* Subsection 分段器
* @description 该分段器一般用于用户从几个选项中选择某一个的场景
- * @tutorial https://ijry.github.io/uview-plus/components/subsection.html
- * @property {Array} list tab的数据
- * @property {String | Number} current 当前活动的tab的index(默认 0 )
- * @property {String} activeColor 激活时的颜色(默认 '#3c9cff' )
- * @property {String} inactiveColor 未激活时的颜色(默认 '#303133' )
- * @property {String} mode 模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
- * @property {String | Number} fontSize 字体大小,单位px(默认 12 )
- * @property {Boolean} bold 激活选项的字体是否加粗(默认 true )
- * @property {String} bgColor 组件背景颜色,mode为button时有效(默认 '#eeeeef' )
- * @property {Object} customStyle 定义需要用到的外部样式
- * @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
+ * @tutorial https://uview-plus.jiangruyi.com/components/subsection.html
+ * @property {Array} list tab的数据
+ * @property {String | Number} current 当前活动的tab的index(默认 0 )
+ * @property {String} activeColor 激活时的颜色(默认 '#3c9cff' )
+ * @property {String} inactiveColor 未激活时的颜色(默认 '#303133' )
+ * @property {String} mode 模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
+ * @property {String | Number} fontSize 字体大小,单位px(默认 12 )
+ * @property {Boolean} bold 激活选项的字体是否加粗(默认 true )
+ * @property {String} bgColor 组件背景颜色,mode为button时有效(默认 '#eeeeef' )
+ * @property {Object} customStyle 定义需要用到的外部样式
+ * @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
+ * @property {String} activeColorKeyName 从`list`元素对象中读取激活时的颜色(默认 'activeColorKey' ) 如果存在字段 优先级大于 activeColor
+ * @property {String} inactiveColorKeyName 从`list`元素对象中读取未激活时的颜色 (默认 'inactiveColorKey' )如果存在字段 优先级大于 inactiveColor
+ * @property {Boolean} disabled 是否禁用分段器 (默认 false )
*
* @event {Function} change 分段器选项发生改变时触发 回调 index:选项的index索引值,从0开始
* @example
@@ -96,7 +101,7 @@ export default {
immediate: true,
handler(n) {
if (n !== this.innerCurrent) {
- this.innerCurrent = n
+ this.innerCurrent = Number(n)
}
// #ifdef APP-NVUE
// 在安卓nvue上,如果通过translateX进行位移,到最后一个时,会导致右侧无法绘制圆角
@@ -158,22 +163,46 @@ export default {
};
},
// 分段器文字颜色
- textStyle(index) {
- return (index) => {
+ textStyle(index,item) {
+ return (index,item) => {
const style = {};
style.fontWeight =
this.bold && this.innerCurrent === index ? "bold" : "normal";
style.fontSize = addUnit(this.fontSize);
+
+ let activeColorTemp = null;
+ let inactiveColorTemp = null;
+ // 如果是对象并且设置了对应的背景色字段 则优先使用设置的字段
+ if(typeof item === 'object' && item[this.activeColorKeyName]){
+ activeColorTemp = item[this.activeColorKeyName];
+ }
+ if(typeof item === 'object' && item[this.inactiveColorKeyName]){
+ inactiveColorTemp = item[this.inactiveColorKeyName];
+ }
+
// subsection模式下,激活时默认为白色的文字
if (this.mode === "subsection") {
- style.color =
- this.innerCurrent === index ? "#fff" : this.inactiveColor;
- } else {
+ // 判断当前是否激活
+ if(this.innerCurrent === index){
+ // 判断当前是否有自定义的颜色
+ style.color = activeColorTemp ? activeColorTemp : '#FFF'
+ // style.color = activeColorTemp ? activeColorTemp : this.activeColor
+ }
+ else{
+ // 判断当前是否有自定义的颜色
+ style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor;
+ }
+ }
+ else {
// button模式下,激活时文字颜色默认为activeColor
- style.color =
- this.innerCurrent === index
- ? this.activeColor
- : this.inactiveColor;
+ if(this.innerCurrent === index){
+ // 判断当前是否有自定义的颜色
+ style.color = activeColorTemp ? activeColorTemp : this.activeColor
+ }
+ else{
+ // 判断当前是否有自定义的颜色
+ style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor;
+ }
}
return style;
};
@@ -181,15 +210,19 @@ export default {
},
mounted() {
this.init();
+ // #ifndef APP || MP-WEIXIN || MP-LARK|| MP-QQ || H5
this.windowResizeCallback = (res) => {
this.init();
}
uni.onWindowResize(this.windowResizeCallback)
+ // #endif
},
beforeUnmount() {
+ // #ifndef APP || MP-WEIXIN || MP-LARK|| MP-QQ || H5
uni.offWindowResize(this.windowResizeCallback)
+ // #endif
},
- emits: ["change"],
+ emits: ["change", "update:current"],
methods: {
addStyle,
init() {
@@ -217,16 +250,36 @@ export default {
// #endif
},
clickHandler(index) {
- this.innerCurrent = index
+ // 防止某些平台 css 无法阻止点击事件 在此处拦截
+ if(this.disabled){
+ return
+ }
+ this.innerCurrent = index;
+ this.$emit('update:current', index);
this.$emit("change", index);
},
+ /**
+ * 获取当前文字区域的 class禁用样式
+ * @param index
+ */
+ getTextViewDisableClass(index){
+ // 禁用状态下
+ if(this.disabled){
+ // 判断模式
+ if(this.mode === 'button'){
+ return 'item-button--disabled'
+ }
+ else{
+ return 'item-subsection--disabled'
+ }
+ }
+ return '';
+ }
},
};
diff --git a/uview-plus/components/u-swipe-action-item/swipeActionItem.js b/uview-plus/components/u-swipe-action-item/swipeActionItem.js
index 4b2cdf6..f6afb44 100644
--- a/uview-plus/components/u-swipe-action-item/swipeActionItem.js
+++ b/uview-plus/components/u-swipe-action-item/swipeActionItem.js
@@ -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:01:13
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeActionItem.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/swipeActionItem.js
*/
export default {
// swipeActionItem 组件
diff --git a/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue b/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue
index d655166..f8a718d 100644
--- a/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue
+++ b/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue
@@ -14,12 +14,12 @@
borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : '0',
padding: item.style && item.style.borderRadius ? '0' : '0 15px',
}, item.style]">
-
+ }">
- @import "../../libs/css/components.scss";
.u-swipe-action-item {
position: relative;
diff --git a/uview-plus/components/u-swipe-action/swipeAction.js b/uview-plus/components/u-swipe-action/swipeAction.js
index 25051b8..253fbfc 100644
--- a/uview-plus/components/u-swipe-action/swipeAction.js
+++ b/uview-plus/components/u-swipe-action/swipeAction.js
@@ -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:00:42
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeAction.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/swipeAction.js
*/
export default {
// swipe-action组件
diff --git a/uview-plus/components/u-swipe-action/u-swipe-action.vue b/uview-plus/components/u-swipe-action/u-swipe-action.vue
index 1cc1ff6..6f0f5ae 100644
--- a/uview-plus/components/u-swipe-action/u-swipe-action.vue
+++ b/uview-plus/components/u-swipe-action/u-swipe-action.vue
@@ -11,7 +11,7 @@
/**
* SwipeAction 滑动单元格
* @description 该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作
- * @tutorial https://ijry.github.io/uview-plus/components/swipeAction.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/swipeAction.html
* @property {Boolean} autoClose 是否自动关闭其他swipe按钮组
* @event {Function(index)} click 点击组件时触发
* @example
diff --git a/uview-plus/components/u-swiper-indicator/swipterIndicator.js b/uview-plus/components/u-swiper-indicator/swipterIndicator.js
index 4b59e6e..c474f1c 100644
--- a/uview-plus/components/u-swiper-indicator/swipterIndicator.js
+++ b/uview-plus/components/u-swiper-indicator/swipterIndicator.js
@@ -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:22:07
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiperIndicator.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/swiperIndicator.js
*/
export default {
// swiperIndicator 组件
diff --git a/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue b/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
index 7820d47..f485153 100644
--- a/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
+++ b/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
@@ -38,7 +38,7 @@
/**
* SwiperIndicator 轮播图指示器
* @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用,
- * @tutorial https://ijry.github.io/uview-plus/components/swiper.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/swiper.html
* @property {String | Number} length 轮播的长度(默认 0 )
* @property {String | Number} current 当前处于活动状态的轮播的索引(默认 0 )
* @property {String} indicatorActiveColor 指示器非激活颜色
@@ -79,7 +79,6 @@
+
\ No newline at end of file
diff --git a/uview-plus/components/u-tabbar/props.js b/uview-plus/components/u-tabbar/props.js
index 8ce1d2f..2645a2e 100644
--- a/uview-plus/components/u-tabbar/props.js
+++ b/uview-plus/components/u-tabbar/props.js
@@ -18,6 +18,11 @@ export const props = defineMixin({
type: Boolean,
default: () => defProps.tabbar.border
},
+ // 上方边框颜色
+ borderColor: {
+ type: String,
+ default: () => defProps.tabbar.borderColor
+ },
// 元素层级z-index
zIndex: {
type: [String, Number],
@@ -42,6 +47,11 @@ export const props = defineMixin({
placeholder: {
type: Boolean,
default: () => defProps.tabbar.placeholder
+ },
+ // 背景色
+ backgroundColor: {
+ type: String,
+ default: () => defProps.tabbar.backgroundColor
}
}
})
diff --git a/uview-plus/components/u-tabbar/tabbar.js b/uview-plus/components/u-tabbar/tabbar.js
index 187112d..4818e9f 100644
--- a/uview-plus/components/u-tabbar/tabbar.js
+++ b/uview-plus/components/u-tabbar/tabbar.js
@@ -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:22:40
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/tabbar.js
*/
export default {
// tabbar
@@ -17,6 +17,8 @@ export default {
activeColor: '#1989fa',
inactiveColor: '#7d7e80',
fixed: true,
- placeholder: true
+ placeholder: true,
+ borderColor: '',
+ backgroundColor: ''
}
}
diff --git a/uview-plus/components/u-tabbar/u-tabbar.vue b/uview-plus/components/u-tabbar/u-tabbar.vue
index d67a634..c05d8a2 100644
--- a/uview-plus/components/u-tabbar/u-tabbar.vue
+++ b/uview-plus/components/u-tabbar/u-tabbar.vue
@@ -33,7 +33,7 @@
/**
* Tabbar 底部导航栏
* @description 此组件提供了自定义tabbar的能力。
- * @tutorial https://ijry.github.io/uview-plus/components/tabbar.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/tabbar.html
* @property {String | Number} value 当前匹配项的name
* @property {Boolean} safeAreaInsetBottom 是否为iPhoneX留出底部安全距离(默认 true )
* @property {Boolean} border 是否显示上方边框(默认 true )
@@ -42,6 +42,7 @@
* @property {String} inactiveColor 未选中标签的颜色(默认 '#7d7e80' )
* @property {Boolean} fixed 是否固定在底部(默认 true )
* @property {Boolean} placeholder fixed定位固定在底部时,是否生成一个等高元素防止塌陷(默认 true )
+ * @property {String} backgroundColor 背景色(默认 '#ffffff' )
* @property {Object} customStyle 定义需要用到的外部样式
*
* @example value2 = name" :fixed="false" :safeAreaInsetBottom="false">
@@ -59,6 +60,12 @@
const style = {
zIndex: this.zIndex
}
+ if (this.borderColor) {
+ style.borderColor = this.borderColor + ' !important'
+ }
+ if (this.backgroundColor) {
+ style.backgroundColor = this.backgroundColor
+ }
// 合并来自父组件的customStyle样式
return deepMerge(style, addStyle(this.customStyle))
},
@@ -117,7 +124,6 @@
diff --git a/uview-plus/components/u-table2/tableRow.vue b/uview-plus/components/u-table2/tableRow.vue
new file mode 100644
index 0000000..6f7b8cd
--- /dev/null
+++ b/uview-plus/components/u-table2/tableRow.vue
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ isExpanded(row) ? '▼' : '▶' }}
+
+
+
+
+ {{ row[col.key] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-table2/u-table2.vue b/uview-plus/components/u-table2/u-table2.vue
new file mode 100644
index 0000000..db075b5
--- /dev/null
+++ b/uview-plus/components/u-table2/u-table2.vue
@@ -0,0 +1,756 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ emptyText }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-tabs-item/u-tabs-item.vue b/uview-plus/components/u-tabs-item/u-tabs-item.vue
index 3ba1db0..58d9cc5 100644
--- a/uview-plus/components/u-tabs-item/u-tabs-item.vue
+++ b/uview-plus/components/u-tabs-item/u-tabs-item.vue
@@ -11,7 +11,7 @@
/**
* TabsItem tabs标签组件的自组件
* @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
- * @tutorial https://ijry.github.io/uview-plus/components/tabs.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/tabs.html
* @property {type} prop_name
* @event {Function()}
* @example
diff --git a/uview-plus/components/u-tabs/props.js b/uview-plus/components/u-tabs/props.js
index bce1598..5684818 100644
--- a/uview-plus/components/u-tabs/props.js
+++ b/uview-plus/components/u-tabs/props.js
@@ -61,6 +61,11 @@ export const props = defineMixin({
keyName: {
type: String,
default: () => defProps.tabs.keyName
- }
+ },
+ // 左侧图标样式
+ iconStyle: {
+ type: [String, Object],
+ default: () => defProps.tabs.iconStyle
+ }
}
})
diff --git a/uview-plus/components/u-tabs/tabs.js b/uview-plus/components/u-tabs/tabs.js
index 817e2d2..089512f 100644
--- a/uview-plus/components/u-tabs/tabs.js
+++ b/uview-plus/components/u-tabs/tabs.js
@@ -1,18 +1,18 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:23:14
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabs.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/tabs.js
*/
export default {
//
tabs: {
duration: 300,
list: [],
- lineColor: '#3c9cff',
+ lineColor: '',
activeStyle: {
color: '#303133'
},
@@ -27,6 +27,7 @@ export default {
},
scrollable: true,
current: 0,
- keyName: 'name'
+ keyName: 'name',
+ iconStyle: {}
}
}
diff --git a/uview-plus/components/u-tabs/u-tabs.vue b/uview-plus/components/u-tabs/u-tabs.vue
index 8a37d9f..109f894 100644
--- a/uview-plus/components/u-tabs/u-tabs.vue
+++ b/uview-plus/components/u-tabs/u-tabs.vue
@@ -3,38 +3,28 @@
-
-
-
+
+
+ :style="[addStyle(itemStyle), {flex: scrollable ? '' : 1}]" :class="[`u-tabs__wrapper__nav__item-${index}`,
+ item.disabled && 'u-tabs__wrapper__nav__item--disabled',
+ innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']">
+
+
+
+
+
+
-
-
+ {{ item[keyName] }}
- {{ item[keyName] }}
+
+ customStyle="margin-left: 4px;">
-
+ }]">
-
+ display: lineShow ? 'block': 'none'
+ }]">
@@ -89,15 +72,29 @@
const animation = uni.requireNativePlugin('animation')
const dom = uni.requireNativePlugin('dom')
// #endif
- import { props } from './props';
- import { mpMixin } from '../../libs/mixin/mpMixin';
- import { mixin } from '../../libs/mixin/mixin';
+ import {
+ props
+ } from './props';
+ import {
+ mpMixin
+ } from '../../libs/mixin/mpMixin';
+ import {
+ mixin
+ } from '../../libs/mixin/mixin';
import defProps from '../../libs/config/props.js'
- import { addUnit, addStyle, deepMerge, getPx, sleep, sys } from '../../libs/function/index';
+ import {
+ addUnit,
+ addStyle,
+ deepMerge,
+ deepClone,
+ getPx,
+ sleep,
+ getWindowInfo
+ } from '../../libs/function/index';
/**
* Tabs 标签
* @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
- * @tutorial https://ijry.github.io/uview-plus/components/tabs.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/tabs.html
* @property {String | Number} duration 滑块移动一次所需的时间,单位秒(默认 200 )
* @property {String | Number} swierWidth swiper的宽度(默认 '750rpx' )
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
@@ -111,10 +108,11 @@
mixins: [mpMixin, mixin, props],
data() {
return {
- firstTime: true,
+ tabList: [],
scrollLeft: 0,
scrollViewWidth: 0,
lineOffsetLeft: 0,
+ lineShow: false,
tabsRect: {
left: 0
},
@@ -125,7 +123,7 @@
watch: {
current: {
immediate: true,
- handler (newValue, oldValue) {
+ handler(newValue, oldValue) {
// 内外部值不相等时,才尝试移动滑块
if (newValue !== this.innerCurrent) {
if (typeof newValue == 'string') {
@@ -140,10 +138,16 @@
}
},
// list变化时,重新渲染list各项信息
- list() {
- this.$nextTick(() => {
- this.resize()
- })
+ list: {
+ handler(newValue, oldValue) {
+ // 重新拷贝一份list用于增加其他额外信息处理后导致重复监听的死循环
+ this.tabList = deepClone(newValue);
+ this.$nextTick(() => {
+ this.resize()
+ })
+ },
+ immediate: true,
+ deep: true,
}
},
computed: {
@@ -151,11 +155,11 @@
return index => {
const style = {}
// 取当期是否激活的样式
- const customeStyle = (index == this.innerCurrent)
- ? addStyle(this.activeStyle)
- : addStyle(this.inactiveStyle)
+ const customeStyle = (index == this.innerCurrent) ?
+ addStyle(this.activeStyle) :
+ addStyle(this.inactiveStyle)
// 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
- if (this.list[index].disabled) {
+ if (this.tabList[index].disabled) {
style.color = '#c8c9cc'
}
return deepMerge(customeStyle, style)
@@ -167,35 +171,37 @@
},
async mounted() {
this.init()
+ this.windowResizeCallback = (res) => {
+ this.init()
+ }
+ uni.onWindowResize(this.windowResizeCallback)
+ },
+ beforeUnmount() {
+ uni.offWindowResize(this.windowResizeCallback)
},
emits: ['click', 'longPress', 'change', 'update:current'],
methods: {
addStyle,
addUnit,
setLineLeft() {
- const tabItem = this.list[this.innerCurrent];
+ const tabItem = this.tabList[this.innerCurrent];
if (!tabItem) {
return;
}
// 获取滑块该移动的位置
- let lineOffsetLeft = this.list
+ let lineOffsetLeft = this.tabList
.slice(0, this.innerCurrent)
.reduce((total, curr) => total + curr.rect.width, 0);
- // 获取下划线的数值px表示法
+ // 获取下划线的数值px表示法
const lineWidth = getPx(this.lineWidth);
this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2
// #ifdef APP-NVUE
// 第一次移动滑块,无需过渡时间
- this.animation(this.lineOffsetLeft, this.firstTime ? 0 : parseInt(this.duration))
+ this.animation(this.lineOffsetLeft, parseInt(this.duration))
// #endif
- // 如果是第一次执行此方法,让滑块在初始化时,瞬间滑动到第一个tab item的中间
- // 这里需要一个定时器,因为在非nvue下,是直接通过style绑定过渡时间,需要等其过渡完成后,再设置为false(非第一次移动滑块)
- if (this.firstTime) {
- setTimeout(() => {
- this.firstTime = false
- }, 10);
- }
+ // 如果是第一次执行此方法,滑块默认不显示,在加载完成后进行显示
+ if (!this.lineShow) this.lineShow = true;
},
// nvue下设置滑块的位置
animation(x, duration = 0) {
@@ -218,8 +224,12 @@
}, index)
// 如果disabled状态,返回
if (item.disabled) return
+ // 如果点击当前不触发change
+ if (this.innerCurrent == index) return
this.innerCurrent = index
- this.resize()
+ this.$nextTick(() => {
+ this.resize()
+ })
this.$emit('update:current', index)
this.$emit('change', {
...item,
@@ -241,17 +251,17 @@
setScrollLeft() {
// 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
if (this.innerCurrent < 0) {
- this.innerCurrent = 0;
- }
- const tabRect = this.list[this.innerCurrent]
+ this.innerCurrent = 0;
+ }
+ const tabRect = this.tabList[this.innerCurrent]
// 累加得到当前item到左边的距离
- const offsetLeft = this.list
+ const offsetLeft = this.tabList
.slice(0, this.innerCurrent)
.reduce((total, curr) => {
return total + curr.rect.width
}, 0)
// 此处为屏幕宽度
- const windowWidth = sys().windowWidth
+ const windowWidth = getWindowInfo().windowWidth
// 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect
.right) / 2 + this.tabsRect.left / 2
@@ -262,13 +272,14 @@
// 获取所有标签的尺寸
resize() {
// 如果不存在list,则不处理
- if(this.list.length === 0) {
+ if (this.tabList.length === 0) {
return
}
Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
// 兼容在swiper组件中使用
if (tabsRect.left > tabsRect.width) {
- tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect.width
+ tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect
+ .width
tabsRect.left = tabsRect.left % tabsRect.width
}
// console.log(tabsRect)
@@ -278,7 +289,7 @@
// 计算scroll-view的宽度,这里
this.scrollViewWidth += item.width
// 另外计算每一个item的中心点X轴坐标
- this.list[index].rect = item
+ this.tabList[index].rect = item
})
// 获取了tabs的尺寸之后,设置滑块的位置
this.setLineLeft()
@@ -294,15 +305,15 @@
// 获取所有标签的尺寸
getAllItemRect() {
return new Promise(resolve => {
- const promiseAllArr = this.list.map((item, index) => this.queryRect(
- `u-tabs__wrapper__nav__item-${index}`, true))
- Promise.all(promiseAllArr).then(sizes => resolve(sizes))
+ const promiseAllArr = this.tabList.map((item, index) => this.queryRect(
+ `u-tabs__wrapper__nav__item-${index}`, true));
+ Promise.all(promiseAllArr).then(sizes => resolve(sizes));
})
},
// 获取各个标签的尺寸
queryRect(el, item) {
// #ifndef APP-NVUE
- // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://ijry.github.io/uview-plus/js/getRect.html
+ // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-plus.jiangruyi.com/js/getRect.html
// 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
return new Promise(resolve => {
this.$uGetRect(`.${el}`).then(size => {
@@ -326,8 +337,6 @@
diff --git a/uview-plus/components/u-text/text.js b/uview-plus/components/u-text/text.js
index e61b059..b6329f3 100644
--- a/uview-plus/components/u-text/text.js
+++ b/uview-plus/components/u-text/text.js
@@ -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:23:58
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/text.js
*/
export default {
// text 组件
diff --git a/uview-plus/components/u-text/u-text.vue b/uview-plus/components/u-text/u-text.vue
index d852eed..6d76e68 100644
--- a/uview-plus/components/u-text/u-text.vue
+++ b/uview-plus/components/u-text/u-text.vue
@@ -13,10 +13,10 @@
>¥
-
+ >
{{ value }}
-
+ >
@@ -78,7 +78,7 @@ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
/**
* Text 文本
* @description 此组件集成了文本类在项目中的常用功能,包括状态,拨打电话,格式化日期,*替换,超链接...等功能。 您大可不必在使用特殊文本时自己定义,text组件几乎涵盖您能使用的大部分场景。
- * @tutorial https://ijry.github.io/uview-plus/components/loading.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/loading.html
* @property {String} type 主题颜色
* @property {Boolean} show 是否显示(默认 true )
* @property {String | Number} text 显示的值
@@ -175,8 +175,6 @@ export default {
diff --git a/uview-plus/components/u-title/u-title.vue b/uview-plus/components/u-title/u-title.vue
new file mode 100644
index 0000000..7e19030
--- /dev/null
+++ b/uview-plus/components/u-title/u-title.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-toast/toast.js b/uview-plus/components/u-toast/toast.js
index 2dd2ed1..19134b7 100644
--- a/uview-plus/components/u-toast/toast.js
+++ b/uview-plus/components/u-toast/toast.js
@@ -1,18 +1,18 @@
/*
* @Author : LQ
* @Description :
- * @version : 1.0
+ * @version : 3.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 17:07:07
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/toast.js
*/
export default {
// toast组件
toast: {
zIndex: 10090,
loading: false,
- text: '',
+ message: '',
icon: '',
type: '',
loadingMode: '',
diff --git a/uview-plus/components/u-toast/u-toast.vue b/uview-plus/components/u-toast/u-toast.vue
index b03e1d3..ec0597c 100644
--- a/uview-plus/components/u-toast/u-toast.vue
+++ b/uview-plus/components/u-toast/u-toast.vue
@@ -2,7 +2,7 @@
-
+ >
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
- import { os, sys, deepMerge, type2icon } from '../../libs/function/index';
+ import { os, getWindowInfo, deepMerge, type2icon } from '../../libs/function/index';
import color from '../../libs/config/color';
import { hexToRgb } from '../../libs/function/colorGradient';
/**
* toast 消息提示
* @description 此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。
- * @tutorial https://ijry.github.io/uview-plus/components/toast.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/toast.html
* @property {String | Number} zIndex toast展示时的zIndex值 (默认 10090 )
* @property {Boolean} loading 是否加载中 (默认 false )
* @property {String | Number} message 显示的文字内容
@@ -77,6 +77,7 @@
config: {
message: '', // 显示文本
type: '', // 主题类型,primary,success,error,warning,black
+ zIndex: 10090, // 层级
duration: 2000, // 显示的时间,毫秒
icon: true, // 显示的图标
position: 'center', // toast出现的位置
@@ -136,7 +137,7 @@
},
// 内容盒子的样式
contentStyle() {
- const windowHeight = sys().windowHeight, style = {}
+ const windowHeight = getWindowInfo().windowHeight, style = {}
let value = 0
// 根据top和bottom,对Y轴进行窗体高度的百分比偏移
if(this.tmpConfig.position === 'top') {
@@ -193,7 +194,6 @@
+
\ No newline at end of file
diff --git a/uview-plus/components/u-tr/u-tr.vue b/uview-plus/components/u-tr/u-tr.vue
index fa0d3bd..23f13b4 100644
--- a/uview-plus/components/u-tr/u-tr.vue
+++ b/uview-plus/components/u-tr/u-tr.vue
@@ -1,6 +1,6 @@
-
+
@@ -28,6 +28,7 @@
diff --git a/uview-plus/components/u-transition/transition.js b/uview-plus/components/u-transition/transition.js
index 0fad118..7d2bd5d 100644
--- a/uview-plus/components/u-transition/transition.js
+++ b/uview-plus/components/u-transition/transition.js
@@ -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 16:59:00
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/transition.js
*/
export default {
// transition动画组件的props
diff --git a/uview-plus/components/u-transition/u-transition.vue b/uview-plus/components/u-transition/u-transition.vue
index 7fa94d1..8e0551b 100644
--- a/uview-plus/components/u-transition/u-transition.vue
+++ b/uview-plus/components/u-transition/u-transition.vue
@@ -85,11 +85,122 @@ export default {
\ No newline at end of file
diff --git a/uview-plus/components/u-tree/u-tree.vue b/uview-plus/components/u-tree/u-tree.vue
new file mode 100644
index 0000000..a0e9114
--- /dev/null
+++ b/uview-plus/components/u-tree/u-tree.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-upload/props.js b/uview-plus/components/u-upload/props.js
index b157320..529a4b2 100644
--- a/uview-plus/components/u-upload/props.js
+++ b/uview-plus/components/u-upload/props.js
@@ -56,7 +56,7 @@ export const props = defineMixin({
type: Function,
default: null
},
- // 是否显示组件自带的图片预览功能
+ // 是否显示组件自带的图片&视频预览功能
previewFullImage: {
type: Boolean,
default: () => defProps.upload.previewFullImage
@@ -125,6 +125,52 @@ export const props = defineMixin({
previewImage: {
type: Boolean,
default: () => defProps.upload.previewImage
- }
+ },
+ // 是否自动删除
+ autoDelete: {
+ type: Boolean,
+ default: () => defProps.upload.autoDelete
+ },
+ // 是否自动上传需要传递action指定地址
+ autoUpload: {
+ type: Boolean,
+ default: () => defProps.upload.autoUpload
+ },
+ // 自动上传接口地址
+ autoUploadApi: {
+ type: String,
+ default: () => defProps.upload.autoUploadApi
+ },
+ // 自动上传驱动,local/oss/cos/kodo
+ autoUploadDriver: {
+ type: String,
+ default: () => defProps.upload.autoUploadDriver
+ },
+ // 自动上传授权接口,比如oss的签名接口。
+ autoUploadAuthUrl: {
+ type: String,
+ default: () => defProps.upload.autoUploadAuthUrl
+ },
+ // 自动上传携带的header
+ autoUploadHeader: {
+ type: Object,
+ default: () => {
+ return defProps.upload.autoUploadHeader
+ }
+ },
+ // 本地计算视频封面
+ getVideoThumb: {
+ type: Boolean,
+ default: () => defProps.upload.getVideoThumb
+ },
+ // 自定义自动上传后处理
+ customAfterAutoUpload: {
+ type: Boolean,
+ default: () => defProps.upload.customAfterAutoUpload
+ },
+ videoPreviewObjectFit: {
+ type: String,
+ default: () => defProps.upload.videoPreviewObjectFit
+ },
}
})
diff --git a/uview-plus/components/u-upload/u-upload.vue b/uview-plus/components/u-upload/u-upload.vue
index c49155a..91fff93 100644
--- a/uview-plus/components/u-upload/u-upload.vue
+++ b/uview-plus/components/u-upload/u-upload.vue
@@ -1,576 +1,927 @@
-
-
-
-
-
-
-
-
- {{ item.isVideo || (item.type && item.type === 'video') ? '视频' : '文件' }}
-
-
-
-
-
-
-
- {{ item.message }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ uploadText }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.isVideo || (item.type && item.type === 'video') ? item.name || t("up.common.video") : item.name || t("up.common.file")}}
+
+
+
+
+
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ uploadText }}
+
+
+
+
+
+
+
diff --git a/uview-plus/components/u-upload/upload.js b/uview-plus/components/u-upload/upload.js
index c727c27..74a0835 100644
--- a/uview-plus/components/u-upload/upload.js
+++ b/uview-plus/components/u-upload/upload.js
@@ -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:09:50
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js
+ * @LastAuthor : jry
+ * @lastTime : 2025-12-19 08:55:21
+ * @FilePath : /uview-plus/libs/config/props/upload.js
*/
export default {
// upload组件
@@ -32,6 +32,15 @@ export default {
uploadText: '',
width: 80,
height: 80,
- previewImage: true
+ previewImage: true,
+ autoDelete: false,
+ autoUpload: false,
+ autoUploadApi: '',
+ autoUploadAuthUrl: '',
+ autoUploadDriver: '',
+ autoUploadHeader: {},
+ getVideoThumb: false,
+ customAfterAutoUpload: false,
+ videoPreviewObjectFit: 'cover'
}
}
diff --git a/uview-plus/components/u-upload/utils.js b/uview-plus/components/u-upload/utils.js
index 64e46d1..8a31cca 100644
--- a/uview-plus/components/u-upload/utils.js
+++ b/uview-plus/components/u-upload/utils.js
@@ -1,3 +1,4 @@
+import test from '../../libs/function/test'
function pickExclude(obj, keys) {
// 某些情况下,type可能会为
if (!['[object Object]', '[object File]'].includes(Object.prototype.toString.call(obj))) {
@@ -22,10 +23,14 @@ function formatImage(res) {
name: item.name,
file: item
// #endif
+ // #ifndef H5
+ name: item.path.split('/').pop() + '.png',
+ // #endif
}))
}
function formatVideo(res) {
+ // console.log(res)
return [
{
...pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg']),
@@ -33,10 +38,15 @@ function formatVideo(res) {
url: res.tempFilePath,
thumb: res.thumbTempFilePath,
size: res.size,
+ width: res.width || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
+ height: res.height || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
// #ifdef H5
name: res.name,
file: res
// #endif
+ // #ifndef H5
+ name: res.tempFilePath.split('/').pop() + '.mp4',
+ // #endif
}
]
}
@@ -51,6 +61,9 @@ function formatMedia(res) {
// #ifdef H5
file: item
// #endif
+ // #ifndef H5
+ name: item.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
+ // #endif
}))
}
@@ -77,6 +90,11 @@ export function chooseFile({
maxCount,
extension
}) {
+ try {
+ capture = test.array(capture) ? capture : capture.split(',');
+ } catch(e) {
+ capture = [];
+ }
return new Promise((resolve, reject) => {
switch (accept) {
case 'image':
@@ -112,32 +130,28 @@ export function chooseFile({
fail: reject
})
break
- // #ifdef MP-WEIXIN || H5
- // 只有微信小程序才支持chooseMessageFile接口
+ // #ifdef MP-WEIXIN || H5
+ // 只有微信小程序才支持chooseMessageFile接口
case 'file':
- // #ifdef MP-WEIXIN
- wx.chooseMessageFile({
- count: multiple ? maxCount : 1,
- type: accept,
- success: (res) => resolve(formatFile(res)),
- fail: reject
- })
- // #endif
- // #ifdef H5
- // 需要hx2.9.9以上才支持uni.chooseFile
let params = {
count: multiple ? maxCount : 1,
type: accept,
success: (res) => resolve(formatFile(res)),
fail: reject
}
+ // Array根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。
if (extension.length && extension.length > 0) {
params.extension = extension
}
+ // #ifdef MP-WEIXIN
+ wx.chooseMessageFile(params)
+ // #endif
+ // #ifdef H5
+ // 需要hx2.9.9以上才支持uni.chooseFile
uni.chooseFile(params)
// #endif
break
- // #endif
+ // #endif
default:
// 此为保底选项,在accept不为上面任意一项的时候选取全部文件
// #ifdef MP-WEIXIN
diff --git a/uview-plus/components/u-view/u-view.vue b/uview-plus/components/u-view/u-view.vue
index efb2f1d..c7846d2 100644
--- a/uview-plus/components/u-view/u-view.vue
+++ b/uview-plus/components/u-view/u-view.vue
@@ -23,7 +23,7 @@ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
/**
* View 视图
* @description 对View默认标签的封装
- * @tutorial https://ijry.github.io/uview-plus/components/view.html
+ * @tutorial https://uview-plus.jiangruyi.com/components/view.html
* @property {String} bgColor 背景颜色
* @event {Function} click 点击触发事件
* @example
@@ -66,8 +66,6 @@ export default {
diff --git a/uview-plus/components/u-virtual-list/u-virtual-list.vue b/uview-plus/components/u-virtual-list/u-virtual-list.vue
new file mode 100644
index 0000000..c4dd8fa
--- /dev/null
+++ b/uview-plus/components/u-virtual-list/u-virtual-list.vue
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uview-plus/components/u-waterfall/u-waterfall.vue b/uview-plus/components/u-waterfall/u-waterfall.vue
index 507acfa..b0c793d 100644
--- a/uview-plus/components/u-waterfall/u-waterfall.vue
+++ b/uview-plus/components/u-waterfall/u-waterfall.vue
@@ -1,25 +1,41 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+