Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
YuichiSemura committed Apr 3, 2024
1 parent 35ed366 commit 34aac5c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/Roulette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const getParam = (name: string, url: string) => {
// URLからの情報取得処理
const setParameter = () => {
const query = getParam('list', location.href);
return query == null ? initList : query.split(',');
return query == null ? initList.map((v)=> v) : query.split(',');
};
// 色のランダム生成
Expand Down Expand Up @@ -169,8 +169,12 @@ const hslMapForCylinder = (h: number) => {
return `hsl(${h}, ${hslForCylinder.value})`;
};
const hslMapForTextField = (h: number) => {
return `hsl(${h}, ${hslForTextField.value})`;
const hslMapForTextField = (ind: number) => {
return ind < colorViewList.value.length
? `hsl(${colorViewList.value[ind]}, ${hslForTextField.value})`
: darkMode.value
? '#CCCCCC'
: '#FFFFFF';
};
const addLunch = () => {
Expand Down Expand Up @@ -427,7 +431,7 @@ watchEffect(() => {
density="compact"
hide-details
variant="outlined"
:bg-color="hslMapForTextField(colorViewList[index])"
:bg-color="hslMapForTextField(index)"
>
<template v-slot:append>
<v-btn
Expand Down

0 comments on commit 34aac5c

Please sign in to comment.