Skip to content

Commit

Permalink
fix: 添加集群中的 CRANE URL 正常输入时 无法输入 反斜杠 的问题 删除注释
Browse files Browse the repository at this point in the history
  • Loading branch information
RuoChengF committed May 8, 2023
1 parent e946d00 commit 82d3228
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/web/src/modules/editClusterSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Description:
* @Author: 若城
* @Date: 2023-05-04 22:20:52
* @LastEditTime: 2023-05-08 10:15:00
* @LastEditTime: 2023-05-08 10:34:27
*/

import { createSlice, PayloadAction } from '@reduxjs/toolkit';
Expand Down Expand Up @@ -71,7 +71,10 @@ const slice = createSlice({
const { craneUrl } = action.payload.data;

console.log("🚀 ~ file: editClusterSlice.ts:73 ~ craneUrl:", action);

if(craneUrl){
let reg = /^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/;

}
// if (craneUrl) {
// action.payload.data.craneUrl = craneUrl.endsWith('/')
// ? craneUrl.substring(0, craneUrl.lastIndexOf('/'))
Expand Down

0 comments on commit 82d3228

Please sign in to comment.