| | |
| | | export default {
|
| | | data() {
|
| | | const checkPwd = (rule, value, callback) => {
|
| | | if (value=="") {
|
| | | if (value == "") {
|
| | | return callback(new Error("密码不能为空"));
|
| | | }
|
| | | // setTimeout(() => {
|
| | | if (value.length != 6) {
|
| | | callback(new Error("密码应为6位!"));
|
| | | } else {
|
| | | callback();
|
| | | }
|
| | | if (value.length != 6) {
|
| | | callback(new Error("密码应为6位!"));
|
| | | } else {
|
| | | callback();
|
| | | }
|
| | | // }, 1000);
|
| | | };
|
| | | const checkID = (rule, value, callback) => {
|
| | |
| | | clustername: [
|
| | | { required: true, message: "请输入集群名称", trigger: "blur" },
|
| | | ],
|
| | | clusterpwd: [{ validator: checkPwd, required: true,trigger: "blur" }],
|
| | | clusterpwd: [{ validator: checkPwd, required: true, trigger: "blur" }],
|
| | | virtualIp: [{ required: true, validator: isIPv4, trigger: "change" }],
|
| | | },
|
| | | joinExistRules: {
|
| | | clusterid: [{ validator: checkID, trigger: "blur" }],
|
| | | clusterip: [{ validator: isIPv4, trigger: "blur" }],
|
| | | clusterpwd: [{ validator: checkPwd, required: true,trigger: "blur" }],
|
| | | clusterpwd: [{ validator: checkPwd, required: true, trigger: "blur" }],
|
| | | },
|
| | | };
|
| | | },
|
| | |
| | | left: 20px;
|
| | | }
|
| | | .el-form-item {
|
| | | margin-bottom: 16px;
|
| | | margin-bottom: 16px;
|
| | | .el-input__inner {
|
| | | background-color: #ffffff;
|
| | | border: 2px solid transparent;
|