- Composition API by default. Do not generate Options API code unless explicitly requested.
- TypeScript +
<script setup>by default. Use<script setup lang="ts">. - Use compiler macros:
defineProps,defineEmits,defineModel,defineExpose,defineOptions,defineSlots. - Prefer
ref()andcomputed()overreactive(). - Use
watchEffect()for automatic dependency tracking. Usewatch()when you need old values, explicit sources, or lazy execution. - Extract reusable stateful logic into composables (
use*functions).
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> | |
| <dialog | |
| ref="dialog" | |
| :class="`${type}`" | |
| class="rounded-md shadow-xl border-0 p-0 min-w-[320px] max-w-[calc(100vw - 40px)] backdrop:bg-black/50" | |
| > | |
| <div class="flex gap-5 py-6 px-7"> | |
| <aside> | |
| <i class="text-lg w-[2.3rem] aspect-square flex justify-center items-center rounded-full"> | |
| <Icon v-if="type === 'info'" :icon="faInfo" /> |
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> | |
| <VirtualScroller v-slot="{ item }" :item-height="35" :items="myMassiveArray"> | |
| <div :item="item" :key="item.id">{{ item.details.i.guess? }}</div> | |
| </VirtualScroller> | |
| </template> |
I hereby claim:
- I am phanan on github.
- I am phanan (https://keybase.io/phanan) on keybase.
- I have a public key ASAi51vqQYcLGu2lPXcdCCNWLQsOte_t0aXAPF21r4yo5Ao
To claim this, I am signing this object:
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| // Run this from the commandline: | |
| // phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4 | |
| var page = require('webpage').create(), | |
| address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279', | |
| duration = 3, // duration of the video, in seconds | |
| framerate = 24, // number of frames per second. 24 is a good value. | |
| counter = 0, | |
| width = 500, | |
| height = 500; |