quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.99k stars 3.53k forks source link

Feature Request - QTime - Customizable for inner circle and outer circle #10734

Open cyfung1031 opened 3 years ago

cyfung1031 commented 3 years ago

Currently there is only a boolean option format24h for providing the two circles.

However it is not customizable. (e.g. font size for different circles, 12h inside and 24h outside, etc.) To solve this, I would like to have two slots for the two circles.

instead of format24h, add props :formatCircles="[12, 12]" innerCircle has 12 elements and outerCircle has 12 elements

Note: the formatCircles shall be either number or array ( [6]; [6, 6] )

<slot name="innerCircle" :index="index"></slot>
<slot name="outerCircle" :index="index"></slot>

index is between 0 and n-1

<template #innerCircle="{ index }" >
<span class="text-subtitle2" :data-value="index ? index : 12">{{  ( index ? index : 12 )  }}</span>
</template>

<template #outerCircle="{ number }" >
<span class="text-subtitle1" :data-value="index ? index + 12 : 0">{{ pad00( index ? index + 12 : 0 )  }}</span>
</template>

the prop value is the number for the hour/minute/second

Current Apperance with :format24h = "true"

sdvdfbghnjh

Reference Image:

signal-2021-09-19-021904b

Remarks: Placing the 1-12 inside can use a larger font size to make contrast to the outer circle.

JeRabix commented 3 years ago

mmm, you have css :) why not just tap on the css selector?