Demo:颜色选择器支持选择透明颜色
This commit is contained in:
parent
c80eacc5e7
commit
0d992bd6b1
@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2479351 */
|
font-family: "iconfont"; /* Project id 2479351 */
|
||||||
src: url('iconfont.woff2?t=1690537337895') format('woff2'),
|
src: url('iconfont.woff2?t=1691822758372') format('woff2'),
|
||||||
url('iconfont.woff?t=1690537337895') format('woff'),
|
url('iconfont.woff?t=1691822758372') format('woff'),
|
||||||
url('iconfont.ttf?t=1690537337895') format('truetype');
|
url('iconfont.ttf?t=1691822758372') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -13,6 +13,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icontouming:before {
|
||||||
|
content: "\e60c";
|
||||||
|
}
|
||||||
|
|
||||||
.iconlieri:before {
|
.iconlieri:before {
|
||||||
content: "\e60b";
|
content: "\e60b";
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -97,7 +97,8 @@ export const colorList = [
|
|||||||
'#0C797D',
|
'#0C797D',
|
||||||
'#0062B1',
|
'#0062B1',
|
||||||
'#653294',
|
'#653294',
|
||||||
'#AB149E'
|
'#AB149E',
|
||||||
|
'transparent'
|
||||||
]
|
]
|
||||||
|
|
||||||
// 边框宽度
|
// 边框宽度
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
<div class="colorContainer" :class="{ isDark: isDark }">
|
<div class="colorContainer" :class="{ isDark: isDark }">
|
||||||
<div class="colorList">
|
<div class="colorList">
|
||||||
<span
|
<span
|
||||||
class="colorItem"
|
class="colorItem iconfont"
|
||||||
v-for="item in colorList"
|
v-for="item in colorList"
|
||||||
:style="{ backgroundColor: item }"
|
:style="{ backgroundColor: item }"
|
||||||
|
:class="{ icontouming: item === 'transparent' }"
|
||||||
:key="item"
|
:key="item"
|
||||||
@click="clickColorItem(item)"
|
@click="clickColorItem(item)"
|
||||||
></span>
|
></span>
|
||||||
@ -87,9 +88,13 @@ export default {
|
|||||||
|
|
||||||
.colorList {
|
.colorList {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.colorItem {
|
.colorItem {
|
||||||
display: inline-block;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user