npm init slidev@latest
npm init slidev@latest
yarn create slidev
yarn create slidev
pnpm create slidev
pnpm create slidev
<Arrow x1="10" y1="20" x2="100" y2="200" />
<Arrow x1="10" y1="20" x2="100" y2="200" />
your-slidev/ ├── ... └── components/ └── Counter.vue
your-slidev/ ├── ... └── components/ └── Counter.vue
<!--自定義 components --> <Counter :count="10" /> <!-- 略... -->
<!--自定義 components --> <Counter :count="10" /> <!-- 略... -->
突顯某部分重要程式碼片段時,可使用 Markdown 中的三個反引號(```)來指定程式碼區塊,同時在後面指定程式碼的語言。
interface Users { id: number firstName: string lastName: string role: string } //...略 function updateUser(id: number, update: User) { const user = getUser(id) const newUser = { ...user, ...update } saveUser(id, newUser) }
interface Users { id: number firstName: string lastName: string role: string } //...略 function updateUser(id: number, update: User) { const user = getUser(id) const newUser = { ...user, ...update } saveUser(id, newUser) }
程式碼:
<div class="border my-10 tracking-wide relative"> <div class="bg-[#f1f1f1] p-2 text-[#696969]" > <span v-click="[1,2]">我.. <span class="text-2xl">{{ $clicks }}</span> ..出現的</span> <span v-click="2">我是點擊第 <span class="text-2xl">2</span> 次 出現的</span> <span class="transition-all ease-linear duration-500" :class="$clicks === 3? 'opacity-100': 'opacity-0'" >...{{ $clicks }}...</span> </div> </div>
<div class="border my-10 tracking-wide relative"> <div class="bg-[#f1f1f1] p-2 text-[#696969]" > <span v-click="[1,2]">我.. <span class="text-2xl">{{ $clicks }}</span> ..出現的</span> <span v-click="2">我是點擊第 <span class="text-2xl">2</span> 次 出現的</span> <span class="transition-all ease-linear duration-500" :class="$clicks === 3? 'opacity-100': 'opacity-0'" >...{{ $clicks }}...</span> </div> </div>
<img v-motion :initial="{ x:-380, opacity: 0 }" :enter="{ x:-160 , y:120, opacity: 1, transition: { delay: 1000, duration: 1000 } }" class="top-0 right-0 bottom-0 left-0 absolute" :src="elSrc" />
<img v-motion :initial="{ x:-380, opacity: 0 }" :enter="{ x:-160 , y:120, opacity: 1, transition: { delay: 1000, duration: 1000 } }" class="top-0 right-0 bottom-0 left-0 absolute" :src="elSrc" />
npm i -D playwright-chromium
npm i -D playwright-chromium
slidev export --with-clicks --output my-pdf-export
slidev export --with-clicks --output my-pdf-export
slidev export --format png
slidev export --format png