6/22完善引入,

This commit is contained in:
Zy
2026-06-22 08:14:35 +08:00
parent ea8129216b
commit 826bf3c782
208 changed files with 1122 additions and 1685 deletions

View File

@@ -19,8 +19,8 @@ export function isPlateNumber(val: string): boolean {
}
/**
* 验证金钱
* @param {number} val
* @return {boolean} true 符合 false 不符合
* @param value
*/
export function isMoney(value: number): boolean {
const reg = /^(0|[1-9]\d*)(\.\d{1,2})?$/;

View File

@@ -73,6 +73,7 @@ type ValidTreeKey = {
* 根据 houseId 查找完整路径(楼栋 > 单元 > 楼层 > 房屋)
* @param treeData 转换后的树形数据
* @param houseId 目标房屋ID
* @param response
* @returns string[] 路径数组,如 ['1号楼', '1单元', '3层', '301']
*/
export function getHousePathById(treeData: Tree[], houseId: string | number, response: ValidTreeKey = 'value'): (string | number)[] {

View File

@@ -90,8 +90,8 @@ export const getQueryObject = (url: string) => {
};
/**
* @param {string} input value
* @returns {number} output value
* @param str
* @param str
*/
export const byteLength = (str: string) => {
// returns the byte length of an utf8 string
@@ -245,7 +245,7 @@ export const debounce = (func: any, wait: number, immediate: boolean) => {
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args);
if (!timeout) context = args = null;
context = args = null;
}
}
};