mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 15:11:16 +00:00
fix: 修复一个正则表达式不被 safari 支持的问题
This commit is contained in:
parent
15ac510c6f
commit
41cd77d75e
@ -13,8 +13,8 @@ export const filterSelectValues = (values) => {
|
||||
selects.push(item)
|
||||
} else {
|
||||
// 格式校验:不以:开头,不以:结尾
|
||||
const rule = /^(?!:).*(?<!:)$/
|
||||
if (item.name.indexOf(':') > -1 && rule.test(item.name)) {
|
||||
const reg = /^:|:$/
|
||||
if (item.name.indexOf(':') > -1 && !reg.test(item.name)) {
|
||||
const [name, value] = item.name.split(':')
|
||||
const inputValue = { name, value }
|
||||
selects.push(inputValue)
|
||||
|
Loading…
Reference in New Issue
Block a user