Skip to content

Commit

Permalink
fix: 修复ColorPicker设置颜色失效
Browse files Browse the repository at this point in the history
  • Loading branch information
wuchenguang1998 authored and Qiu-Jun committed May 5, 2024
1 parent cdc311e commit b0b3a4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/bgBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Divider orientation="left" plain>{{ $t('color') }}</Divider>
<Form :label-width="40">
<FormItem :label="$t('color')" prop="name">
<ColorPicker v-model="color" @on-change="setThisColor" alpha size="small" transfer />
<ColorPicker v-model="color" @on-change="setThisColor" alpha size="small" />
</FormItem>
</Form>
<Divider orientation="left" plain>{{ $t('color_macthing') }}</Divider>
Expand Down Expand Up @@ -58,7 +58,7 @@ const colorList = computed(() => [
},
]);
const color = ref('');
const color = ref('rgba(255, 255, 255, 1)');
// 背景颜色设置
const setThisColor = () => {
setColor(color.value);
Expand All @@ -75,6 +75,9 @@ function setColor(color) {
<style scoped lang="less">
:deep(.ivu-form-item) {
margin-bottom: 0;
.ivu-color-picker {
display: unset;
}
}
.img {
width: 50px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/waterMark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div class="setting-item">
<span class="mr-10px">{{ $t('waterMark.setting.color') }}</span>

<ColorPicker v-model="waterMarkState.color" alpha size="small" transfer />
<ColorPicker v-model="waterMarkState.color" alpha size="small" />
</div>
<div class="setting-item">
<span class="mr-10px">{{ $t('waterMark.setting.position.label') }}</span>
Expand Down

0 comments on commit b0b3a4b

Please sign in to comment.