只匹配数字
This commit is contained in:
3
App.vue
3
App.vue
@@ -508,7 +508,8 @@ function checkUpdate() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function extractVersionNum(str) {
|
function extractVersionNum(str) {
|
||||||
const match = str.match(/(\\d+\\.\\d+(?:\\.\\d+)?)/);
|
// 匹配第一个出现的数字版本号
|
||||||
|
const match = str.match(/(\d+\.\d+(?:\.\d+)?)/);
|
||||||
return match ? match[1] : '0.0.0';
|
return match ? match[1] : '0.0.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user