Skip to content

Commit 0e65a85

Browse files
chore: add @unlazy/vue playground
1 parent 6566144 commit 0e65a85

File tree

6 files changed

+45
-0
lines changed

6 files changed

+45
-0
lines changed

packages/vue/playground/App.vue

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script setup lang="ts">
2+
import { LazyImage } from '../src/components'
3+
</script>
4+
5+
<template>
6+
<LazyImage
7+
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
8+
auto-sizes
9+
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
10+
width="640"
11+
height="640"
12+
/>
13+
</template>

packages/vue/playground/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>@unlazy/vue</title>
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<script type="module" src="/main.ts"></script>
11+
</body>
12+
</html>

packages/vue/playground/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { createApp } from 'vue'
2+
import App from './App.vue'
3+
4+
createApp(App).mount('#app')

packages/vue/playground/package.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "module",
3+
"private": true,
4+
"scripts": {
5+
"dev": "vite",
6+
"build": "vite build",
7+
"preview": "vite preview"
8+
}
9+
}

packages/vue/playground/vite-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'vite'
2+
import vue from '@vitejs/plugin-vue'
3+
4+
export default defineConfig({
5+
plugins: [vue()],
6+
})

0 commit comments

Comments
 (0)