feat: tailwind 2 + script setup!

This commit is contained in:
Anthony Fu committed 2020-11-28 14:14:36 +08:00
1 parent f179e3e40b
commit 14b6a74360
21 files changed
+526 -455

No files matched your search

+2 -2
View File
@@ -17,11 +17,11 @@
<script setup lang='ts'>
import { useI18n } from 'vue-i18n'
import { locales } from '/~/messages'
export { isDark } from '/~/utils'
import { isDark } from '/~/logics'
const i18n = useI18n()
export const toggleLocales = () => {
const toggleLocales = () => {
// change to some real logic
i18n.locale.value = locales[(locales.indexOf(i18n.locale.value) + 1) % locales.length]
}
+8 -5
View File
@@ -3,14 +3,17 @@
</template>
<script setup="props" lang="ts">
import { watch, ref, onMounted, nextTick } from 'vue'
import { watch, ref, onMounted, nextTick, defineProps } from 'vue'
import Iconify from '@purge-icons/generated'
declare const props: {
icon: string
}
const props = defineProps({
icon: {
type: String,
required: true,
},
})
export const el = ref<HTMLElement | null>(null)
const el = ref<HTMLElement | null>(null)
const update = async() => {
if (el.value) {