Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
43011874
提交
43011874
编写于
6月 24, 2020
作者:
alex.zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建小圈等比例上传图片
上级
ef88979f
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
127 行增加
和
87 行删除
+127
-87
baseinfo.vue
src/components/yqrange/baseinfo.vue
+127
-87
未找到文件。
src/components/yqrange/baseinfo.vue
浏览文件 @
43011874
<
template
>
<
template
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
<el-form-item
label=
"圈子名称"
prop=
"name"
>
<el-form-item
label=
"圈子名称"
prop=
"name"
>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<el-input
size=
"small"
v-model=
"formData.name"
placeholder=
"请输入圈子名称"
style=
"width:70%;"
<el-input
@
change=
"returnTypeData('name')"
></el-input>
size=
"small"
v-model=
"formData.name"
placeholder=
"请输入圈子名称"
style=
"width:70%;"
@
change=
"returnTypeData('name')"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
name
).
replace
(
/
\s
+/g
,
""
).
length
}}
/14
</span>
<span
class=
"word-num"
>
{{
(
formData
.
name
).
replace
(
/
\s
+/g
,
""
).
length
}}
/14
</span>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<div
class=
"basic-item-icon"
>
<div
class=
"basic-item-icon"
>
<el-form-item
label=
"圈子头像"
class=
"required-label"
>
<el-form-item
label=
"圈子头像"
class=
"required-label"
>
<el-upload
v-model=
"formData.headUrl"
class=
"bg-uploader"
action=
"#"
:show-file-list=
"false"
<el-upload
:before-upload=
"beforeUploadPic1"
>
v-model=
"formData.headUrl"
<img
v-if=
"formData.headUrl"
:src=
"formData.headUrl"
@
mouseover
.
stop=
"imgMouseOver1=true"
class=
"bg-img"
/>
class=
"bg-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeUploadPic1"
>
<img
v-if=
"formData.headUrl"
:src=
"formData.headUrl"
@
mouseover
.
stop=
"imgMouseOver1=true"
class=
"bg-img"
/>
<img
v-if=
"!formData.headUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<img
v-if=
"!formData.headUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<div
class=
"img-delete"
v-show=
"imgMouseOver1"
@
click
.
stop=
"deleteImg(1)"
<div
@
mouseout
.
stop=
"imgMouseOver1=false"
>
class=
"img-delete"
v-show=
"imgMouseOver1"
@
click
.
stop=
"deleteImg(1)"
@
mouseout
.
stop=
"imgMouseOver1=false"
>
<i
class=
"el-icon-delete"
></i>
<i
class=
"el-icon-delete"
></i>
</div>
</div>
<div
class=
"limit-text"
>
<div
class=
"limit-text"
>
...
@@ -28,16 +54,30 @@
...
@@ -28,16 +54,30 @@
</div>
</div>
<el-form-item
label=
"圈子介绍"
prop=
"introduce"
>
<el-form-item
label=
"圈子介绍"
prop=
"introduce"
>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<el-input
size=
"small"
v-model=
"formData.introduce"
placeholder=
"请输入圈子介绍"
@
change=
"returnTypeData('introduce')"
<el-input
style=
"width:70%;"
></el-input>
size=
"small"
v-model=
"formData.introduce"
placeholder=
"请输入圈子介绍"
@
change=
"returnTypeData('introduce')"
style=
"width:70%;"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
introduce
).
replace
(
/
\s
+/g
,
""
).
length
}}
/40
</span>
<span
class=
"word-num"
>
{{
(
formData
.
introduce
).
replace
(
/
\s
+/g
,
""
).
length
}}
/40
</span>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"内容发布权限"
prop=
"dynamicFlag"
>
<el-form-item
label=
"内容发布权限"
prop=
"dynamicFlag"
>
<el-select
v-model=
"formData.dynamicFlag"
@
change=
"returnTypeData('dynamicFlag')"
placeholder=
"请选择发布权限"
<el-select
size=
"small"
clearable
>
v-model=
"formData.dynamicFlag"
<el-option
v-for=
"(item,index) in contentList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
>
@
change=
"returnTypeData('dynamicFlag')"
</el-option>
placeholder=
"请选择发布权限"
size=
"small"
clearable
>
<el-option
v-for=
"(item,index) in contentList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -163,7 +203,7 @@
...
@@ -163,7 +203,7 @@
}
}
if (!isLt2M) {
if (!isLt2M) {
vm.$message.error("
图片大小不符合规范,请根据规范上传图片
");
vm.$message.error("
图片大小不符合规范,请根据规范上传图片
");
//
return;
return;
}
}
let _img = new FileReader();
let _img = new FileReader();
_img.readAsDataURL(file);
_img.readAsDataURL(file);
...
@@ -173,9 +213,9 @@
...
@@ -173,9 +213,9 @@
image.onload = function () {
image.onload = function () {
let _this = this;
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
// // if (false
) {
if (_this.width != _this.height
) {
//
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
//
} else {
} else {
openLoading(vm);
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
closeLoading(vm);
closeLoading(vm);
...
@@ -193,7 +233,7 @@
...
@@ -193,7 +233,7 @@
};
};
vm.$message.success("
上传成功
");
vm.$message.success("
上传成功
");
});
});
//
}
}
};
};
};
};
return isJPG && isLt2M;
return isJPG && isLt2M;
...
@@ -210,90 +250,90 @@
...
@@ -210,90 +250,90 @@
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.first-step {
.first-step {
margin-top: 20px;
margin-top: 20px;
.p-title {
padding-left: 10px;
margin-bottom: 15px;
}
.basic-item-icon {
position: relative;
.require {
.p-title {
position: absolute;
padding-left: 10px;
left: 67px;
margin-bottom: 15px;
top: 11px;
}
color: #f56c6c;
}
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
color: #f56c6c;
}
.img-delete {
.basic-item-icon {
position: absolute;
position: relative;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
i {
.require {
color: #fff;
position: absolute;
margin-top: 39px;
left: 67px;
margin-left: 0px;
top: 11px;
}
color: #f56c6c;
}
}
}
.word-num {
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
font-size: 12px;
color: #999;
color: #f56c6c;
padding-top: 5px;
}
}
.line {
.img-delete {
margin-left: 10px;
position: absolute;
width: 20px;
left: 0px;
}
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
.bg-uploader {
i {
.bg-img {
color: #fff;
float: left;
margin-top: 39px;
width: 84px;
margin-left: 0px;
height: 100px;
}
}
}
}
.limit-text {
.word-num {
float: left;
font-size: 12px;
margin-left: 10px;
color: #999;
margin-top: -10px;
padding-top: 5px;
}
p {
.line {
font-size: 12px;
margin-left: 10px;
color: #999;
width: 20px;
}
}
}
.bg-uploader {
.bg-img {
float: left;
width: 84px;
height: 100px;
}
}
.el-upload__tip {
.limit-text {
position: absolute;
float: left;
top: -6px;
margin-left: 10px;
left: 130px;
margin-top: -10px;
p {
font-size: 12px;
color: #999;
}
}
}
}
}
.
required-label .el-form-item__label::before
{
.
el-upload__tip
{
content: '*'
;
position: absolute
;
color: #F56C6C
;
top: -6px
;
margin-right: 4
px;
left: 130
px;
}
}
}
.required-label .el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
</
style
>
</
style
>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录