feat: 初始化
This commit is contained in:
3
uni_modules/no-data/components/no-data/i18n/en.json
Normal file
3
uni_modules/no-data/components/no-data/i18n/en.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"no-data.title": "No Data"
|
||||
}
|
10
uni_modules/no-data/components/no-data/i18n/index.js
Normal file
10
uni_modules/no-data/components/no-data/i18n/index.js
Normal file
@ -0,0 +1,10 @@
|
||||
import en from './en.json'
|
||||
import zhHans from './zh-Hans.json'
|
||||
import zhHant from './zh-Hant.json'
|
||||
import ja from './ja.json'
|
||||
export default {
|
||||
en,
|
||||
'zh-Hans': zhHans,
|
||||
'zh-Hant': zhHant,
|
||||
ja
|
||||
}
|
3
uni_modules/no-data/components/no-data/i18n/ja.json
Normal file
3
uni_modules/no-data/components/no-data/i18n/ja.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"no-data.title": "データなし"
|
||||
}
|
3
uni_modules/no-data/components/no-data/i18n/zh-Hans.json
Normal file
3
uni_modules/no-data/components/no-data/i18n/zh-Hans.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"no-data.title": "无数据"
|
||||
}
|
3
uni_modules/no-data/components/no-data/i18n/zh-Hant.json
Normal file
3
uni_modules/no-data/components/no-data/i18n/zh-Hant.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"no-data.title": "無數據"
|
||||
}
|
44
uni_modules/no-data/components/no-data/no-data.vue
Normal file
44
uni_modules/no-data/components/no-data/no-data.vue
Normal file
@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<text class="message">{{title}}</text>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
initVueI18n
|
||||
} from '@dcloudio/uni-i18n'
|
||||
import messages from './i18n/index.js'
|
||||
const {
|
||||
t
|
||||
} = initVueI18n(messages)
|
||||
|
||||
export default {
|
||||
name: 'no-data',
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
title: t('no-data.title')
|
||||
}
|
||||
},
|
||||
created(e) {},
|
||||
// #ifndef VUE3
|
||||
destroyed() {},
|
||||
// #endif
|
||||
// #ifdef VUE3
|
||||
unmounted() {},
|
||||
// #endif
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.message {
|
||||
opacity: .8;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user