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

-1
View File
@@ -8,5 +8,4 @@
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
export { t }
</script>
+9 -8
View File
@@ -14,7 +14,7 @@
<div>
<button
class="btn m-3 text-sm mt-8"
@click="back"
@click="router.back()"
>
{{ t('button.back') }}
</button>
@@ -22,17 +22,18 @@
</div>
</template>
<script setup='props' lang='ts'>
<script setup lang='ts'>
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { defineProps } from 'vue'
declare const props: {
name: string
}
const props = defineProps({
name: {
type: String,
require: true,
},
})
const router = useRouter()
export const back = () => router.push('/')
const { t } = useI18n()
export { t }
</script>
+2 -3
View File
@@ -39,14 +39,13 @@ import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
export const name = ref('')
const name = ref('')
const router = useRouter()
export const go = () => {
const go = () => {
if (name.value)
router.push(`/hi/${name.value}`)
}
const { t } = useI18n()
export { t }
</script>