购物网站毕设(源码+视频)
立即下载
资源介绍:
技术栈springboot+vue+mysql
import verify from '@/utils/verify';
/*
label 标题名 ‘’为没有标题名
colon 标题名是否带冒号 true/false
field 字段名 对应后端字段
preIcon input类型的icon
eleType 模版类型 input/radio/select
type 模版类型 所属下面的类型 密码/文本域
bordered 输入框是否带边框
placeholder 默认提示
rules 必填规则
required 是否必填 true/false
message 错误的提示信息
trigger 触发条件 blur/change
validator: (rule, value) => { 自定义规则
return Promise.reject('Please input the age');
}
options select/radio数据配置
label 内容名
value 传给后台值
optionType 单选按钮样式(eleType:radio) default/button
buttonStyle 单选按钮边框样式(eleType:radio) outline/solid
{
label: '头像',
field: 'fileHead',
eleType: 'upload',
listType: "picture-card",
maxCount: 1,
span: 8,
} // 上传案例
*/
export const formList = [
{
label: '账号',
colon: true,
field: 'username',
eleType: 'input',
type: 'text',
placeholder: '输入账号',
bordered: true,
span: 24,
rules:[
{
required: true,
message: '请输入账号!',
trigger: 'blur',
}
]
},
{
label: '密码',
colon: true,
field: 'password',
eleType: 'input',
type: 'password',
placeholder: '输入密码',
bordered: true,
span: 24,
rules:[
{
required: true,
message: '请输入密码!',
trigger: 'blur',
}
]
},
{
label: '确认密码',
colon: true,
field: 'configPassword',
eleType: 'input',
type: 'password',
placeholder: '请输入密码',
bordered: true,
span: 24,
rules:[
{
required: true,
trigger: 'blur',
validator: (rule, value,) => {
if(value == formModel['password']) return Promise.resolve('');
else return Promise.reject('密码不一致,请重新输入。');
}
}
]
},
{
label: '昵称',
colon: true,
field: 'name',
eleType: 'input',
type: 'text',
placeholder: '输入姓名',
bordered: true,
span: 24,
rules:[
{
required: true,
message: '请输入姓名!',
trigger: 'blur',
}
]
},
{
label: '邮箱',
colon: true,
field: 'email',
eleType: 'input',
type: 'text',
placeholder: '请输入邮箱',
bordered: true,
span: 24,
rules:[
{
required: true,
trigger: 'blur',
validator: verify.isEmailNotNull
}
]
},
{
label: '手机',
colon: true,
field: 'phone',
eleType: 'input',
type: 'text',
placeholder: '请输入手机号',
bordered: true,
span: 24,
rules:[
{
required: true,
trigger: 'blur',
validator: verify.isPhoneNotNull
}
]
},
{
label: '头像',
colon: true,
field: 'headPortrait',
eleType: 'upload',
listType: "picture-card",
maxCount: 1,
span: 24,
}
]
/*
务必在传组件前要套一个reactive来进行响应式
*/
export const formModel = {}
/*
labelAlign 标题方向 left/right
layout 方向 horizontal/vertical/inline
labelCol 标题设置宽度 span offset(偏移值)/ style{width: xxpx}/ xs:{span:14} sm: { span: 6 },
wrapperCol 内容设置宽度 同labelCol
submitText 提交按钮文案
resetText 重置按钮文案
registreType 注册按钮类型
operaWrapperCol 操作按钮设置布局 同labelCol
verificationCodeObj: { 验证码配置
flag: true,
label: '',
colon: false,
field: 'captcha',
eleType: 'input',
type: 'text',
placeholder: '输入验证码',
bordered: true,
rules:[
{
required: true,
message: '请输入验证码!',
trigger: 'blur',
}
],
span: 24,
}
emailCodeObj: { 邮箱验证码配置
flag: true,
label: '',
colon: false,
field: 'captcha',
eleType: 'input',
type: 'text',
placeholder: '输入验证码',
bordered: true,
rules:[
{
required: true,
message: '请输入验证码!',
trigger: 'blur',
}
],
span: 24,
},
slidingBlockCodeObj: { 滑块验证配置
slidingBlockFlag: true,
flag: true,
label: '',
colon: false,
field: 'captcha',
eleType: 'input',
type: 'text',
placeholder: '输入验证码',
bordered: true,
rules:[
{
required: true,
trigger: 'blur',
}
],
span: 24,
},
*/
export const formConfig = {
labelAlign: 'right',
layout: 'horizontal',
labelCol: {
span: 6
},
verificationCodeObj: {
span: 24,
},
editText: '',
submitText: '注册',
resetText: '重置',
operaLocationObj: {
span: 24,
},
}
资源文件列表:
球衣购物网站.zip 大约有1957个文件