优化组件样式

This commit is contained in:
kuaifan 2021-05-30 22:56:12 +08:00
parent af3d8d6d8c
commit b3d84f875b
7 changed files with 102 additions and 68 deletions

View File

@ -13,6 +13,7 @@
"axios": "^0.21", "axios": "^0.21",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"css-loader": "^0.28.7", "css-loader": "^0.28.7",
"file-loader": "^2.0.0",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"laravel-mix": "^6.0.6", "laravel-mix": "^6.0.6",
"lodash": "^4.17.19", "lodash": "^4.17.19",

View File

@ -75,18 +75,22 @@
</template> </template>
<style lang="scss"> <style lang="scss">
:global {
.img-upload-modal { .img-upload-modal {
.ivu-modal-mask { .ivu-modal-mask {
z-index: 1001; z-index: 1001;
} }
.ivu-modal-no-mask { .ivu-modal-no-mask {
background-color: rgba(55,55,55,.2); background-color: rgba(55, 55, 55, .2);
} }
.ivu-modal-wrap { .ivu-modal-wrap {
z-index: 1001; z-index: 1001;
} }
} }
.imgcomp-upload-list{
.imgcomp-upload-list {
display: inline-block; display: inline-block;
width: 60px; width: 60px;
height: 60px; height: 60px;
@ -97,9 +101,10 @@
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
position: relative; position: relative;
box-shadow: 0 1px 1px rgba(0,0,0,.2); box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
margin-right: 4px; margin-right: 4px;
vertical-align: top; vertical-align: top;
.imgcomp-upload-img { .imgcomp-upload-img {
position: absolute; position: absolute;
top: 0; top: 0;
@ -109,16 +114,18 @@
background-position: center; background-position: center;
background-size: cover; background-size: cover;
} }
.imgcomp-upload-list-cover{
.imgcomp-upload-list-cover {
display: none; display: none;
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
background: rgba(0,0,0,.6); background: rgba(0, 0, 0, .6);
} }
.imgcomp-upload-list-cover i{
.imgcomp-upload-list-cover i {
color: #fff; color: #fff;
font-size: 24px; font-size: 24px;
cursor: pointer; cursor: pointer;
@ -126,29 +133,36 @@
margin: 0; margin: 0;
transition: all .2s; transition: all .2s;
} }
.imgcomp-upload-list-cover i:hover{
.imgcomp-upload-list-cover i:hover {
font-size: 28px; font-size: 28px;
} }
.ivu-progress-outer { .ivu-progress-outer {
background-color: rgba(0, 0, 0, 0.68); background-color: rgba(0, 0, 0, 0.68);
.ivu-progress-inner{
.ivu-progress-inner {
width: 88%; width: 88%;
} }
} }
} }
.imgcomp-upload-list:hover .imgcomp-upload-list-cover{
.imgcomp-upload-list:hover .imgcomp-upload-list-cover {
display: block; display: block;
} }
.img-upload-foot { .img-upload-foot {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.img-upload-foot-input { .img-upload-foot-input {
flex: 1; flex: 1;
text-align: left; text-align: left;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.img-upload-foot-httptitle { .img-upload-foot-httptitle {
cursor: pointer; cursor: pointer;
padding-left: 3px; padding-left: 3px;
@ -156,6 +170,7 @@
} }
} }
} }
.add-box { .add-box {
width: 60px; width: 60px;
height: 60px; height: 60px;
@ -168,12 +183,14 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
vertical-align: top; vertical-align: top;
.add-box-icon { .add-box-icon {
i { i {
vertical-align:middle; vertical-align: middle;
padding-bottom: 2px; padding-bottom: 2px;
} }
} }
.add-box-upload { .add-box-upload {
display: none; display: none;
position: absolute; position: absolute;
@ -184,36 +201,44 @@
color: #ffffff; color: #ffffff;
padding-top: 9px; padding-top: 9px;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
.add-box-item { .add-box-item {
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
cursor: pointer; cursor: pointer;
.ivu-upload-drag,.ivu-upload-drag:hover {
background:transparent; .ivu-upload-drag, .ivu-upload-drag:hover {
border:0; background: transparent;
border-radius:0; border: 0;
border-radius: 0;
} }
span { span {
transition: all .2s; transition: all .2s;
font-size: 12px; font-size: 12px;
} }
} }
.add-box-item:hover { .add-box-item:hover {
span { span {
font-size: 14px; font-size: 14px;
} }
} }
} }
em { em {
font-style: normal; font-style: normal;
} }
} }
.add-box:hover { .add-box:hover {
border-color: rgba(0,0,0,.6); border-color: rgba(0, 0, 0, .6);
.add-box-upload { .add-box-upload {
display: block; display: block;
} }
} }
.callback-add-box { .callback-add-box {
display: block; display: block;
width: auto; width: auto;
@ -221,34 +246,41 @@
line-height: 25px; line-height: 25px;
border: 0; border: 0;
background: transparent; background: transparent;
.add-box-icon { .add-box-icon {
display: none; display: none;
} }
.add-box-upload { .add-box-upload {
display: block; display: block;
width: auto; width: auto;
background: transparent; background: transparent;
color: #333; color: #333;
padding: 0; padding: 0;
> div { > div {
display: inline-block; display: inline-block;
padding-right: 10px; padding-right: 10px;
} }
} }
} }
.browse-load { .browse-load {
margin: 20px; margin: 20px;
text-align: center; text-align: center;
} }
.browse-list { .browse-list {
max-height: 540px; max-height: 540px;
overflow: auto; overflow: auto;
.browse-item { .browse-item {
margin: 10px 15px; margin: 10px 15px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
.browse-img { .browse-img {
width: 64px; width: 64px;
height: 64px; height: 64px;
@ -257,6 +289,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
} }
.browse-title { .browse-title {
display: block; display: block;
width: 64px; width: 64px;
@ -265,6 +298,7 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.browse-icon { .browse-icon {
position: absolute; position: absolute;
top: 0; top: 0;
@ -278,9 +312,11 @@
} }
} }
} }
.browse-list-disabled { .browse-list-disabled {
position: relative; position: relative;
} }
.browse-list-disabled:after { .browse-list-disabled:after {
position: absolute; position: absolute;
content: ''; content: '';
@ -291,6 +327,7 @@
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
z-index: 1; z-index: 1;
} }
}
</style> </style>
<script> <script>
export default { export default {

View File

@ -1,12 +1,10 @@
<template> <template>
<svg viewBox="25 25 50 50" class="common-loading"><circle cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10" class="w-path"></circle></svg> <svg viewBox="25 25 50 50" class="common-loading"><circle cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10" class="common-path"></circle></svg>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
:global {
.common-loading { .common-loading {
-webkit-animation: rotate 2s linear infinite;
animation: rotate 2s linear infinite;
-webkit-transform-origin: center center;
transform-origin: center center; transform-origin: center center;
width: 30px; width: 30px;
height: 30px; height: 30px;
@ -14,18 +12,17 @@
max-height: 100%; max-height: 100%;
margin: auto; margin: auto;
overflow: hidden; overflow: hidden;
.w-path { &:local {
stroke-dasharray: 1,200; animation: rotate 2s linear infinite;
stroke-dashoffset: 0;
-webkit-animation: dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;
animation: dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;
stroke-linecap: round;
} }
}
@-webkit-keyframes rotate { .common-path {
to { stroke-dasharray: 1, 200;
-webkit-transform: rotate(1turn); stroke-dashoffset: 0;
transform: rotate(1turn) stroke-linecap: round;
&:local {
animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
}
} }
} }
@keyframes rotate { @keyframes rotate {
@ -34,57 +31,24 @@
transform: rotate(1turn) transform: rotate(1turn)
} }
} }
@-webkit-keyframes dash {
0% {
stroke-dasharray: 1,200;
stroke-dashoffset: 0
}
50% {
stroke-dasharray: 89,200;
stroke-dashoffset: -35
}
to {
stroke-dasharray: 89,200;
stroke-dashoffset: -124
}
}
@keyframes dash { @keyframes dash {
0% { 0% {
stroke-dasharray: 1,200; stroke-dasharray: 1, 200;
stroke-dashoffset: 0 stroke-dashoffset: 0
} }
50% { 50% {
stroke-dasharray: 89,200; stroke-dasharray: 89, 200;
stroke-dashoffset: -35 stroke-dashoffset: -35
} }
to { to {
stroke-dasharray: 89,200; stroke-dasharray: 89, 200;
stroke-dashoffset: -124 stroke-dashoffset: -124
} }
} }
@-webkit-keyframes color {
0%,to {
stroke: #d62d20
}
40% {
stroke: #0057e7
}
66% {
stroke: #008744
}
80%,90% {
stroke: #ffa700
}
}
@keyframes color { @keyframes color {
0%,to { 0%, to {
stroke: #d62d20 stroke: #d62d20
} }
@ -96,10 +60,11 @@
stroke: #008744 stroke: #008744
} }
80%,90% { 80%, 90% {
stroke: #ffa700 stroke: #ffa700
} }
} }
}
</style> </style>
<script> <script>
export default { export default {

View File

@ -5,6 +5,7 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
:global {
.common-spinner { .common-spinner {
display: none; display: none;
position: fixed; position: fixed;
@ -14,6 +15,7 @@
margin: 0 auto; margin: 0 auto;
width: 30px; width: 30px;
height: 30px; height: 30px;
.common-circular { .common-circular {
position: absolute; position: absolute;
top: 0; top: 0;
@ -24,6 +26,7 @@
height: 100%; height: 100%;
} }
} }
}
</style> </style>
<script> <script>
export default { export default {

View File

@ -50,16 +50,19 @@
</template> </template>
<style lang="scss"> <style lang="scss">
:global {
.teditor-box { .teditor-box {
textarea { textarea {
opacity: 0; opacity: 0;
} }
.tox-tinymce { .tox-tinymce {
box-shadow: none; box-shadow: none;
box-sizing: border-box; box-sizing: border-box;
border-color: #dddee1; border-color: #dddee1;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
.tox-statusbar { .tox-statusbar {
span.tox-statusbar__branding { span.tox-statusbar__branding {
a { a {
@ -69,8 +72,10 @@
} }
} }
} }
.teditor-transfer { .teditor-transfer {
background-color: #ffffff; background-color: #ffffff;
.tox-toolbar { .tox-toolbar {
> div:last-child { > div:last-child {
> button:last-child { > button:last-child {
@ -78,13 +83,16 @@
} }
} }
} }
.ivu-modal-header { .ivu-modal-header {
display: none; display: none;
} }
.ivu-modal-close { .ivu-modal-close {
top: 7px; top: 7px;
z-index: 2; z-index: 2;
} }
.teditor-transfer-body { .teditor-transfer-body {
position: absolute; position: absolute;
top: 0; top: 0;
@ -93,11 +101,14 @@
height: 100%; height: 100%;
padding: 0; padding: 0;
margin: 0; margin: 0;
textarea { textarea {
opacity: 0; opacity: 0;
} }
.tox-tinymce { .tox-tinymce {
border: 0; border: 0;
.tox-statusbar { .tox-statusbar {
span.tox-statusbar__branding { span.tox-statusbar__branding {
a { a {
@ -108,31 +119,37 @@
} }
} }
} }
.tox { .tox {
&.tox-silver-sink { &.tox-silver-sink {
z-index: 13000; z-index: 13000;
} }
} }
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
:global {
.teditor-loadstyle { .teditor-loadstyle {
width: 100%; width: 100%;
height: 180px; height: 180px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.teditor-loadedstyle { .teditor-loadedstyle {
width: 100%; width: 100%;
max-height: inherit; max-height: inherit;
overflow: inherit; overflow: inherit;
position: relative; position: relative;
} }
.upload-control { .upload-control {
display: none; display: none;
width: 0; width: 0;
height: 0; height: 0;
overflow: hidden; overflow: hidden;
} }
}
</style> </style>
<script> <script>

View File

@ -11,6 +11,7 @@
</template> </template>
<style lang="scss"> <style lang="scss">
:global {
.tags-wrap { .tags-wrap {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@ -26,6 +27,7 @@
line-height: normal; line-height: normal;
-webkit-transition: border .2s ease-in-out, background .2s ease-in-out, -webkit-box-shadow .2s ease-in-out; -webkit-transition: border .2s ease-in-out, background .2s ease-in-out, -webkit-box-shadow .2s ease-in-out;
transition: border .2s ease-in-out, background .2s ease-in-out, -webkit-box-shadow .2s ease-in-out; transition: border .2s ease-in-out, background .2s ease-in-out, -webkit-box-shadow .2s ease-in-out;
.tags-item, .tags-input { .tags-item, .tags-input {
position: relative; position: relative;
float: left; float: left;
@ -35,9 +37,11 @@
line-height: 22px; line-height: 22px;
margin: 2px 6px 2px 0; margin: 2px 6px 2px 0;
padding: 0 20px 0 6px; padding: 0 20px 0 6px;
.tags-content { .tags-content {
line-height: 22px; line-height: 22px;
} }
.tags-del { .tags-del {
width: 20px; width: 20px;
height: 22px; height: 22px;
@ -48,6 +52,7 @@
right: 0; right: 0;
} }
} }
.tags-input { .tags-input {
max-width: 80%; max-width: 80%;
padding: 0; padding: 0;
@ -61,9 +66,11 @@
resize: none; resize: none;
overflow: hidden; overflow: hidden;
} }
.tags-input::placeholder { .tags-input::placeholder {
color: #bbbbbb; color: #bbbbbb;
} }
.tags-placeholder { .tags-placeholder {
position: absolute; position: absolute;
left: 0; left: 0;
@ -79,6 +86,7 @@
height: 0; height: 0;
clear: both; clear: both;
} }
}
</style> </style>
<script> <script>
export default { export default {

View File

@ -29,6 +29,9 @@ mix
} }
}, },
}) })
.options({
processCssUrls: false
})
.vue({ .vue({
version: 2, version: 2,
}); });