mirror of https://github.com/Nofated095/Q2TG.git
fix: emoji 的分割
This commit is contained in:
parent
f3a0a583de
commit
17669d5a60
|
@ -3,7 +3,7 @@ import random from '../utils/random';
|
|||
export default {
|
||||
picture: () => random.pick('🎆', '🌃', '🌇', '🎇', '🌌', '🌠', '🌅', '🌉', '🏞', '🌆', '🌄', '🖼', '🗾', '🎑', '🏙', '🌁'),
|
||||
color(index: number) {
|
||||
const arr = [...'🔴🟠🟡🟢🔵🟣⚫️⚪️🟤'];
|
||||
const arr = [...new Intl.Segmenter().segment('🔴🟠🟡🟢🔵🟣⚫️⚪️🟤')].map(x => x.segment);
|
||||
index = index % arr.length;
|
||||
return arr[index];
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue