code refactor
This commit is contained in:
@@ -72,9 +72,7 @@ const icons = {
|
||||
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
|
||||
const itemPerRow = ref<number>(props.columnCount || 7);
|
||||
|
||||
const allColorRows = computed<ColorInfo[][]>(() => {
|
||||
return getColorsInRows(props.allColorInfos, itemPerRow.value);
|
||||
});
|
||||
const allColorRows = computed<ColorInfo[][]>(() => getColorsInRows(props.allColorInfos, itemPerRow.value));
|
||||
|
||||
const color = computed<ColorValue>({
|
||||
get: () => props.modelValue,
|
||||
|
||||
@@ -99,9 +99,7 @@ const firstDayOfWeek = computed<number>(() => userStore.currentUserFirstDayOfWee
|
||||
const dayNames = computed<string[]>(() => arrangeArrayWithNewStartIndex(getAllMinWeekdayNames(), firstDayOfWeek.value));
|
||||
const isYearFirst = computed<boolean>(() => isLongDateMonthAfterYear());
|
||||
const is24Hour = computed<boolean>(() => isLongTime24HourFormat());
|
||||
const displayTime = computed<string>(() => {
|
||||
return formatUnixTimeToLongDateTime(getActualUnixTimeForStore(getUnixTime(dateTime.value), getTimezoneOffsetMinutes(), getBrowserTimezoneOffsetMinutes()));
|
||||
});
|
||||
const displayTime = computed<string>(() => formatUnixTimeToLongDateTime(getActualUnixTimeForStore(getUnixTime(dateTime.value), getTimezoneOffsetMinutes(), getBrowserTimezoneOffsetMinutes())));
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -70,9 +70,7 @@ const icons = {
|
||||
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
|
||||
const itemPerRow = ref<number>(props.columnCount || 7);
|
||||
|
||||
const allIconRows = computed<IconInfoWithId[][]>(() => {
|
||||
return getIconsInRows(props.allIconInfos, itemPerRow.value);
|
||||
});
|
||||
const allIconRows = computed<IconInfoWithId[][]>(() => getIconsInRows(props.allIconInfos, itemPerRow.value));
|
||||
|
||||
const icon = computed<string>({
|
||||
get: () => props.modelValue,
|
||||
|
||||
@@ -63,9 +63,7 @@ const emit = defineEmits<{
|
||||
(e: 'step:change', stepName: string): void;
|
||||
}>();
|
||||
|
||||
const isClickable = computed<boolean>(() => {
|
||||
return props.clickable !== 'false' && props.clickable !== false;
|
||||
});
|
||||
const isClickable = computed<boolean>(() => props.clickable !== 'false' && props.clickable !== false);
|
||||
|
||||
function changeStep(step: StepBarItem): void {
|
||||
if (isClickable.value) {
|
||||
|
||||
Reference in New Issue
Block a user