整合样式,BUG 59

This commit is contained in:
aixianling
2023-03-08 09:33:10 +08:00
parent 5a43d51436
commit cc748e1c99
7 changed files with 40 additions and 22 deletions

View File

@@ -17,11 +17,20 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
/**
常用内外边距样式
*/
@each $v in (8, 10, 16, 20, 32, 48, 56, 64, 80) {
@each $v in (333, 666, 888, 999, '26f', 'f46') {
.color-#{$v} {
color: \##{$v};
}
}
@each $v in (8, 10, 12, 14, 16, 20, 32, 48, 56, 64, 80) {
//gap
.gap-#{$v} {
gap: #{$v}px
}
.font-#{$v} {
font-size: #{$v}px;
}
@each $padMar, $pm in (mar:margin, pad:padding) {
.#{$padMar}-#{$v} {
#{$pm}: #{$v}px
@@ -58,7 +67,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
/**
不换行文本
*/
.nowarp-text {
.nowrap-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

View File

@@ -6,7 +6,7 @@
<i style="font-size: 16px" class="iconfont iconLocation"/>
切换地区
</div>
<div class="content nowarp-text fill" v-text="fullName"/>
<div class="content nowrap-text fill" v-text="fullName"/>
<i class="iconfont iconChange pad-r10"/>
</el-row>
</div>

View File

@@ -1,8 +1,8 @@
<template>
<section class="AiAvatar">
<el-row type="flex">
<el-row type="flex" v-if="type=='rect'">
<div class="image-box">
<el-image v-if="value" :src="value" :preview-src-list="preview?[value]:null"></el-image>
<el-image v-if="value" :src="value" :preview-src-list="preview?[value]:null"/>
<div style="margin: 36px auto;" v-else>
<i class="iconfont iconProfile_Picture"></i>
<div style="color: #666;font-size: 12px;">暂无照片</div>
@@ -17,6 +17,9 @@
</el-upload>
</div>
</el-row>
<el-avatar v-else-if="type=='circle'" :src="value">
<slot v-if="!value"/>
</el-avatar>
</section>
</template>
@@ -32,7 +35,8 @@ export default {
instance: Function,
editable: {type: Boolean, default: true},
bid: String,
preview: {type: Boolean, default: true}
preview: {type: Boolean, default: true},
type: {default: "rect"}
},
data() {
return {
@@ -48,7 +52,6 @@ export default {
formData.append('bizId', this.bid)
formData.append('bizType', '2')
formData.append('file', this.file)
console.log(this.file)
this.instance.post("/admin/file/add", formData).then(res => {
if (res.data) {
const fileInfo = res.data[0]
@@ -73,6 +76,10 @@ export default {
color: #89b;
}
:deep(.el-avatar) {
background: #26f;
}
.image-box {
width: 104px !important;
height: 120px;