-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.vue
97 lines (89 loc) · 2.93 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
<t-config-provider :global-config="{ classPrefix: 't' }">
<t-space direction="vertical" style="width: 100%; text-align: center">
<t-space>
<a href="https://tdesign.tencent.com/vue-next/overview" target="_blank">
<img :src="TDesignLogo" class="logo tdesign" alt="TDesign" />
</a>
<a href="https://vitejs.dev/" target="_blank">
<img :src="ViteLogo" class="logo vite" alt="Vite" />
</a>
</t-space>
<h2>
Welcome to use
<t-link size="large" theme="primary" href="https://tdesign.tencent.com/vue-next/overview" target="_blank">
<template #suffix-icon>
<jump-icon />
</template>
TDesign-vue-next
</t-link>
+
<t-link size="large" theme="primary" href="https://vitejs.dev/" target="_blank">
<template #suffix-icon>
<jump-icon />
</template>
Vite
</t-link>
!
</h2>
<h3>
Experience it quickly using the
<t-link theme="warning" href="https://tdesign.tencent.com/starter/vue-next/" target="_blank">
<template #suffix-icon>
<jump-icon />
</template>
TDesign Starter
</t-link>
page template.
</h3>
<t-space size="24px">
<t-button theme="primary">
<template #icon><add-icon /></template>
新建
</t-button>
<t-button variant="outline">
<template #icon><cloud-upload-icon /></template>
上传文件
</t-button>
<t-button shape="circle" theme="primary">
<template #icon><discount-icon /></template>
</t-button>
<t-button shape="circle" theme="primary">
<template #icon> <cloud-download-icon /></template>
</t-button>
<t-button variant="outline"> 搜索 </t-button>
</t-space>
<!-- 1_PascalCase in template works fine -->
<!-- eslint-disable-next-line vue/component-name-in-template-casing -->
<EditModal :data="editModal" />
<!-- 2_kebab-case in template works bad -->
<create-modal :data="createModal" />
</t-space>
</t-config-provider>
</template>
<script setup lang="ts">
import { AddIcon, CloudDownloadIcon, CloudUploadIcon, DiscountIcon, JumpIcon } from 'tdesign-icons-vue-next';
import { ref } from 'vue';
import TDesignLogo from '../public/tdesign-logo.svg';
import ViteLogo from './assets/svg/vite-logo.svg';
// problem there
import CreateModal from './components/create-modal/index.vue';
import EditModal from './components/edit-modal/index.vue';
// same variable name but different case
const editModal = ref({});
const createModal = ref({});
</script>
<style scoped>
.logo {
height: 6em;
padding: 3em 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo.tdesign:hover {
filter: drop-shadow(0 0 2em #194de9);
}
.logo.vite:hover {
filter: drop-shadow(0 0 2em #bd34fe);
}
</style>