Commit d8d3d075 by xinla

全部删除scss $blue,并替换为var(--color),后续变量直接使用var()

1 parent 418bc606
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import VueAMap from 'vue-amap' import VueAMap from 'vue-amap'
Vue.use(VueAMap) Vue.use(VueAMap)
VueAMap.initAMapApiLoader({ VueAMap.initAMapApiLoader({
key: '32396af00cd726deed804cf5b63ed2d8', key: '32396af00cd726deed804cf5b63ed2d8',
plugin: [ plugin: [
'AMap.Autocomplete', 'AMap.Autocomplete',
...@@ -13,24 +13,24 @@ ...@@ -13,24 +13,24 @@
'AMap.ToolBar', 'AMap.ToolBar',
'AMap.MapType', 'AMap.MapType',
'AMap.PolyEditor', 'AMap.PolyEditor',
'AMap.CircleEditor' 'AMap.CircleEditor',
], ],
v: '1.4.4' v: '1.4.4',
}) })
import Voice from '@/components/Voice' import Voice from '@/components/Voice'
import { parseTime } from '@/utils/common.js' import { parseTime } from '@/utils/common.js'
import { emotion } from '@/utils/index.js' import { emotion } from '@/utils/index.js'
export default { export default {
name: 'ChatContent', name: 'ChatContent',
props: { props: {
message: { message: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
}, },
queryChat: { queryChat: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
components: { Voice }, components: { Voice },
data() { data() {
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
video: 'attachment', video: 'attachment',
voice: 'attachment', voice: 'attachment',
location: 'address', location: 'address',
weapp: 'title' weapp: 'title',
} }
let attr = typeDict[this.message.msgType] let attr = typeDict[this.message.msgType]
if (attr) { if (attr) {
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
} else { } else {
return JSON.parse(this.message.contact) return JSON.parse(this.message.contact)
} }
} },
}, },
watch: {}, watch: {},
created() {}, created() {},
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
}, },
setDate(str) { setDate(str) {
return parseTime(str) return parseTime(str)
} },
} },
} }
</script> </script>
<template> <template>
...@@ -82,14 +82,13 @@ ...@@ -82,14 +82,13 @@
<img <img
v-else v-else
:src="`https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${setIndex( :src="`https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${setIndex(
JSON.parse(this.message.contact).content JSON.parse(this.message.contact).content,
)}.gif`" )}.gif`"
alt="" alt="" />
/>
</template> </template>
<template v-else-if="message.msgType === 'revoke'"> 已撤回 </template> <template v-else-if="message.msgType === 'revoke'">已撤回</template>
<template v-else-if="'image,emotion'.includes(message.msgType)"> <template v-else-if="'image,emotion'.includes(message.msgType)">
<el-image style="width: 100px; height: 100px;" :src="content" fit="fit" :preview-src-list="[content]"> </el-image> <el-image style="width: 100px; height: 100px" :src="content" fit="fit" :preview-src-list="[content]"></el-image>
</template> </template>
<a v-else-if="'file'.includes(message.msgType)" class="msgtypefile"> <a v-else-if="'file'.includes(message.msgType)" class="msgtypefile">
<!-- :href="JSON.parse(this.message.contact).attachment" <!-- :href="JSON.parse(this.message.contact).attachment"
...@@ -100,19 +99,18 @@ ...@@ -100,19 +99,18 @@
v-else-if="'docmsg'.includes(message.msgType)" v-else-if="'docmsg'.includes(message.msgType)"
class="msgtypefile" class="msgtypefile"
:href="JSON.parse(this.message.contact).link_url" :href="JSON.parse(this.message.contact).link_url"
target="_black" target="_black">
>
{{ content }} {{ content }}
</a> </a>
<div v-else-if="message.msgType === 'voice'"> <div v-else-if="message.msgType === 'voice'">
<voice :amrUrl="JSON.parse(message.contact)['attachment']"></voice> <voice :amrUrl="JSON.parse(message.contact)['attachment']"></voice>
<span style="font-size: 12px; color: #999;">语音消息</span> <span style="font-size: 12px; color: #999">语音消息</span>
</div> </div>
<div v-else-if="message.msgType === 'meeting_voice_call'"> <div v-else-if="message.msgType === 'meeting_voice_call'">
<voice :amrUrl="JSON.parse(message.contact)['attachment']"></voice> <voice :amrUrl="JSON.parse(message.contact)['attachment']"></voice>
<span style="font-size: 12px; color: #999;" v-if="JSON.parse(message.contact)['endtime']" <span style="font-size: 12px; color: #999" v-if="JSON.parse(message.contact)['endtime']">
>语音通话-结束时间:{{ setDate(JSON.parse(message.contact)['endtime']) }}</span 语音通话-结束时间:{{ setDate(JSON.parse(message.contact)['endtime']) }}
> </span>
</div> </div>
<template v-else-if="message.msgType === 'video'"> <template v-else-if="message.msgType === 'video'">
<video <video
...@@ -123,24 +121,21 @@ ...@@ -123,24 +121,21 @@
playsinline="true" playsinline="true"
:autoplay="false" :autoplay="false"
preload="none" preload="none"
style="height: 100%; width: 100%;" style="height: 100%; width: 100%">
>
<source :src="content" type="video/mp4" /> <source :src="content" type="video/mp4" />
</video> </video>
</template> </template>
<div v-else-if="message.msgType === 'location'" class="msgtypecard"> <div v-else-if="message.msgType === 'location'" class="msgtypecard">
<div class="card-content" style="height: 100%; width: 100%;"> <div class="card-content" style="height: 100%; width: 100%">
<el-amap <el-amap
ref="map" ref="map"
vid="amapDemo" vid="amapDemo"
:center="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]" :center="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"
:zoom="14" :zoom="14"
class="amap-demo" class="amap-demo"
style="height: 120px; width: 250px; pointer-events: none;" style="height: 120px; width: 250px; pointer-events: none">
>
<el-amap-marker <el-amap-marker
:position="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]" :position="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"></el-amap-marker>
></el-amap-marker>
</el-amap> </el-amap>
</div> </div>
<div class="card-foot">{{ content }}</div> <div class="card-foot">{{ content }}</div>
...@@ -151,7 +146,7 @@ ...@@ -151,7 +146,7 @@
</div> </div>
<div v-else-if="message.msgType === 'card'" class="msgtypecard"> <div v-else-if="message.msgType === 'card'" class="msgtypecard">
<div class="card-content"> <div class="card-content">
<span style="flex: none;"> {{ content.corpname }}: </span> <span style="flex: none">{{ content.corpname }}:</span>
<span> <span>
{{ content.userid }} {{ content.userid }}
</span> </span>
...@@ -162,26 +157,22 @@ ...@@ -162,26 +157,22 @@
<div v-else-if="message.msgType === 'link'" class="msgtypecard"> <div v-else-if="message.msgType === 'link'" class="msgtypecard">
<a target="_black" :href="content.link_url"> <a target="_black" :href="content.link_url">
<div class="card-content fxbw"> <div class="card-content fxbw">
<div style="flex: 1;"> <div style="flex: 1">
<div class="card--link-title">{{ content.title }}</div> <div class="card--link-title">{{ content.title }}</div>
<div class="card--link-desc">{{ content.description }}</div> <div class="card--link-desc">{{ content.description }}</div>
</div> </div>
<el-image style="width: 50px; height: 50px;" :src="content.image_url" fit="fit"></el-image> <el-image style="width: 50px; height: 50px" :src="content.image_url" fit="fit"></el-image>
</div> </div>
</a> </a>
</div> </div>
<div v-else-if="message.msgType === 'agree'"> <div v-else-if="message.msgType === 'agree'">客户已同意会话存档</div>
客户已同意会话存档 <div v-else-if="message.msgType === 'disagree'">客户不同意会话存档</div>
</div>
<div v-else-if="message.msgType === 'disagree'">
客户不同意会话存档
</div>
<div v-else>不支持的消息类型:{{ message.msgType }}</div> <div v-else>不支持的消息类型:{{ message.msgType }}</div>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.message { .message {
max-width: 50%; max-width: 50%;
background-color: #fff; background-color: #fff;
position: relative; position: relative;
...@@ -210,15 +201,15 @@ ...@@ -210,15 +201,15 @@
top: 8px; top: 8px;
z-index: 888; z-index: 888;
} }
} }
.message-right { .message-right {
max-width: 50%; max-width: 50%;
position: relative; position: relative;
background-color: #fff; background-color: #fff;
padding: 10px; padding: 10px;
line-height: 14px; line-height: 14px;
border-radius: 5px; border-radius: 5px;
// background: $blue; // background: var(--color);
box-shadow: 0px 2px 6px 0px rgba(60, 136, 240, 0.1); box-shadow: 0px 2px 6px 0px rgba(60, 136, 240, 0.1);
border: 1px solid #e1edfc; border: 1px solid #e1edfc;
color: #333; color: #333;
...@@ -240,8 +231,8 @@ ...@@ -240,8 +231,8 @@
top: 8px; top: 8px;
z-index: 888; z-index: 888;
} }
} }
.msgtypefile { .msgtypefile {
margin: 5px; margin: 5px;
width: 200px; width: 200px;
display: inline-block; display: inline-block;
...@@ -250,9 +241,9 @@ ...@@ -250,9 +241,9 @@
color: #199ed8; color: #199ed8;
// text-indent: 10px; // text-indent: 10px;
// box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19); // box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19);
} }
.msgtypecard { .msgtypecard {
// width: 320px; // width: 320px;
// height: 140px; // height: 140px;
margin: 10px 5px; margin: 10px 5px;
...@@ -308,5 +299,5 @@ ...@@ -308,5 +299,5 @@
font-weight: bold; font-weight: bold;
width: 100%; width: 100%;
} }
} }
</style> </style>
...@@ -570,8 +570,8 @@ export default { ...@@ -570,8 +570,8 @@ export default {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
transition: all 0.3s; transition: all 0.3s;
&:hover { &:hover {
border-color: $blue; border-color: var(--color);
color: $blue; color: var(--color);
} }
} }
.progress { .progress {
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
.home { .home {
color: $blue; color: var(--color);
} }
::v-deep .el-breadcrumb__separator { ::v-deep .el-breadcrumb__separator {
margin: 0 5px; margin: 0 5px;
......
...@@ -220,8 +220,8 @@ ...@@ -220,8 +220,8 @@
cursor: default; cursor: default;
} }
&.is-checked .el-radio__inner { &.is-checked .el-radio__inner {
background-color: $blue; background-color: var(--color);
border-color: $blue; border-color: var(--color);
cursor: default; cursor: default;
&::after { &::after {
...@@ -257,8 +257,8 @@ ...@@ -257,8 +257,8 @@
} }
.el-pagination.is-background .el-pager li:not(.disabled).active { .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: transparent; background-color: transparent;
border-color: $blue; border-color: var(--color);
color: $blue; color: var(--color);
} }
// to fixed https://github.com/ElemeFE/element/issues/2461 // to fixed https://github.com/ElemeFE/element/issues/2461
// .el-dialog { // .el-dialog {
...@@ -298,8 +298,8 @@ ...@@ -298,8 +298,8 @@
} }
} }
.el-button--default { .el-button--default {
border-color: $blue; border-color: var(--color);
color: $blue; color: var(--color);
} }
.el-button--default.el-button--primary { .el-button--default.el-button--primary {
color: #fff; color: #fff;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
**/ **/
/* theme color */ /* theme color */
$--color-primary: $blue; $--color-primary: var(--color);
$--color-success: #07c160; $--color-success: #07c160;
$--color-warning: #faad14; $--color-warning: #faad14;
$--color-danger: #eb5e12; $--color-danger: #eb5e12;
......
...@@ -59,7 +59,7 @@ a:hover { ...@@ -59,7 +59,7 @@ a:hover {
} }
a:hover { a:hover {
// 提高hover权重,其他地方的ahover如需改变,也使用important // 提高hover权重,其他地方的ahover如需改变,也使用important
color: $blue !important; color: var(--color) !important;
} }
div:focus { div:focus {
...@@ -363,7 +363,7 @@ aside { ...@@ -363,7 +363,7 @@ aside {
margin-left: 5px; margin-left: 5px;
} }
.el-icon-edit-outline { .el-icon-edit-outline {
color: $blue; color: var(--color);
} }
.el-icon-circle-plus-outline { .el-icon-circle-plus-outline {
color: $green; color: $green;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
--border-radius-big: 16px; --border-radius-big: 16px;
} }
// base color // base color
$blue: #07c160;
$light-blue: #90de45; $light-blue: #90de45;
$red: #eb5e12; $red: #eb5e12;
$pink: #eb5e12; $pink: #eb5e12;
...@@ -26,7 +25,7 @@ $sub-text-color: #999; ...@@ -26,7 +25,7 @@ $sub-text-color: #999;
} }
// sidebar // sidebar
// $menuText: #333; // $menuText: #333;
// $menuActiveText: $blue; // $menuActiveText: var(--color);
// $subMenuActiveText: #333; // https://github.com/ElemeFE/element/issues/12951 // $subMenuActiveText: #333; // https://github.com/ElemeFE/element/issues/12951
// $menuBg: #fff; // $menuBg: #fff;
...@@ -56,7 +55,7 @@ $border-radius: 4px; ...@@ -56,7 +55,7 @@ $border-radius: 4px;
} }
.bglg { .bglg {
background: linear-gradient(to left, $blue 0%, $light-blue 100%); background: linear-gradient(to left, var(--color) 0%, $light-blue 100%);
box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2); box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2);
} }
.border-radius-small { .border-radius-small {
......
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.el-icon-copy-document { .el-icon-copy-document {
&:hover { &:hover {
color: $blue; color: var(--color);
} }
} }
</style> </style>
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.theme { .theme {
color: $blue; color: var(--color);
} }
.list-wrap { .list-wrap {
display: flex; display: flex;
......
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.theme { .theme {
color: $blue; color: var(--color);
} }
::v-deep.detail-form { ::v-deep.detail-form {
.el-input.is-disabled .el-input__inner, .el-input.is-disabled .el-input__inner,
...@@ -300,8 +300,8 @@ export default { ...@@ -300,8 +300,8 @@ export default {
cursor: default; cursor: default;
} }
&.is-checked .el-radio__inner { &.is-checked .el-radio__inner {
background-color: $blue; background-color: var(--color);
border-color: $blue; border-color: var(--color);
cursor: default; cursor: default;
&::after { &::after {
......
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.theme { .theme {
color: $blue; color: var(--color);
} }
.list-wrap { .list-wrap {
display: flex; display: flex;
......
...@@ -9,16 +9,8 @@ ...@@ -9,16 +9,8 @@
<h3 class="title">{{ lwConfig.SYSTEM_NAME }}</h3> <h3 class="title">{{ lwConfig.SYSTEM_NAME }}</h3>
<template v-if="loginType === 'account'"> <template v-if="loginType === 'account'">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
v-model="loginForm.username" <svg-icon style="height: 33px" slot="prefix" icon-class="user" class="el-input__icon input-icon" />
type="text"
auto-complete="off"
placeholder="账号">
<svg-icon
style="height: 33px"
slot="prefix"
icon-class="user"
class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
...@@ -28,11 +20,7 @@ ...@@ -28,11 +20,7 @@
auto-complete="off" auto-complete="off"
placeholder="密码" placeholder="密码"
@keyup.enter.native="handleLogin"> @keyup.enter.native="handleLogin">
<svg-icon <svg-icon style="height: 33px" slot="prefix" icon-class="password" class="el-input__icon input-icon" />
style="height: 33px"
slot="prefix"
icon-class="password"
class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
...@@ -160,14 +148,10 @@ export default { ...@@ -160,14 +148,10 @@ export default {
} }
}) })
window.lwConfig.IS_PUBLISH_DIALOG && window.lwConfig.IS_PUBLISH_DIALOG &&
this.$alert( this.$alert('LinkWeChat V2.5 已正式发布,遇到使用上的问题欢迎提交 Issue,我们将光速修复。', '提示', {
'LinkWeChat V2.5 已正式发布,遇到使用上的问题欢迎提交 Issue,我们将光速修复。',
'提示',
{
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
}, })
)
}, },
methods: { methods: {
changeLoginType(type) { changeLoginType(type) {
...@@ -346,7 +330,7 @@ export default { ...@@ -346,7 +330,7 @@ export default {
z-index: 20; z-index: 20;
} }
.link { .link {
color: $blue; color: var(--color);
font-size: 14px; font-size: 14px;
float: right; float: right;
padding-right: 25px; padding-right: 25px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!