feat:样品库管理
This commit is contained in:
@@ -731,6 +731,17 @@ function reviver(key, value) {
|
||||
return value
|
||||
}
|
||||
|
||||
function isJsonString(str) {
|
||||
if (typeof str !== 'string') return false
|
||||
|
||||
try {
|
||||
const parsed = JSON.parse(str)
|
||||
return typeof parsed === 'object' && parsed !== null
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
range,
|
||||
getPx,
|
||||
@@ -765,5 +776,6 @@ export default {
|
||||
showToast,
|
||||
uuid,
|
||||
replacer,
|
||||
reviver
|
||||
reviver,
|
||||
isJsonString
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user