Skip to content

Commit

Permalink
fix: fix vue test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Mar 2, 2024
1 parent 0d2c747 commit 381bf1b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 39 deletions.
24 changes: 0 additions & 24 deletions tests/vue-app-vite/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion tests/vue-app-vite/index.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
6 changes: 3 additions & 3 deletions tests/vue-app-vite/package.json
Expand Up @@ -4,9 +4,9 @@
"private": true,
"type": "module",
"scripts": {
"build": "vue-tsc && vite build",
"dev": "vite",
"preview": "vite preview"
"test:build": "vue-tsc && vite build",
"test:dev": "vite",
"test:preview": "vite preview"
},
"dependencies": {
"oh-my-live2d": "workspace:*",
Expand Down
19 changes: 8 additions & 11 deletions tests/vue-app-vite/src/App.vue
@@ -1,12 +1,11 @@
<script setup lang="ts">
import { loadOml2d } from 'oh-my-live2d';
import { onMounted, ref } from 'vue';
import { onMounted } from 'vue';
import HelloWorld from './components/HelloWorld.vue';
const appRef = ref();
onMounted(() => {
loadOml2d({
parentElement: appRef.value,
parentElement: document.body,
models: [
{
path: 'https://model.oml2d.com/pio/model.json',
Expand All @@ -18,14 +17,12 @@ onMounted(() => {
</script>

<template>
<div ref="appRef">
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
<HelloWorld msg="Vite + Vue" />
</template>

Expand Down

0 comments on commit 381bf1b

Please sign in to comment.