Created
July 9, 2025 18:36
-
-
Save codigoconjuan/1232db1554b58c9d0986b81c21ff60c3 to your computer and use it in GitHub Desktop.
Componentes de Precio Fijo y Variable en Vue y Astro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="col-span-full"> | |
<label for="price" class="block text-sm/6 font-medium text-gray-900"> | |
Precio del Producto: | |
</label> | |
<div class="mt-2"> | |
<input | |
id="price" | |
name="price" | |
type="number" | |
class="w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6" | |
/> | |
</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="col-span-full " v-for="(size, index) in store.sizes" :key="index"> | |
<label :for="index" class="block text-sm/6 font-medium text-gray-900"> | |
<span class="font-bold"> Precio Tamaño: </span> {{ size.size }} | |
</label> | |
<div class="mt-2"> | |
<input | |
:id="index" | |
:name="index" | |
:value="size.price" | |
type="number" | |
class="w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6" | |
/> | |
</div> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment