Skip to content

Commit

Permalink
✨ feat: 编写测试代码;
Browse files Browse the repository at this point in the history
  • Loading branch information
ruan-cat committed Sep 30, 2024
1 parent 59798ac commit e9a78e2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
41 changes: 15 additions & 26 deletions learn-create-compoents-lib/test-app/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
<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>
</div>
<HelloWorld msg="Vite + Vue" />
<div>
<gie-input v-model="state" ref="inputRef" />
{{ state }}
<button @click="onFocus">focus</button>
</div>
</template>

<style scoped>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
<script setup lang="ts">
import type { InputInstance } from "@giegie/components";
import { ref } from "vue";
const state = ref("");
const inputRef = ref<InputInstance>();
function onFocus() {
inputRef.value?.focus();
}
</style>
</script>
15 changes: 11 additions & 4 deletions learn-create-compoents-lib/test-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createApp } from "vue";

createApp(App).mount('#app')
import "./style.css";
import App from "./App.vue";

import "@giegie/components/es/style.css";
import GieComponents from "@giegie/components";

createApp(App)
//
.use(GieComponents)
.mount("#app");

0 comments on commit e9a78e2

Please sign in to comment.