mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-29 12:56:34 +08:00
docs(Empty): use composition api
This commit is contained in:
parent
668a7fbf5f
commit
7537370343
@ -34,9 +34,11 @@
|
|||||||
</demo-block>
|
</demo-block>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
export default {
|
import { ref } from 'vue';
|
||||||
i18n: {
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
|
const i18n = {
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
error: '通用错误',
|
error: '通用错误',
|
||||||
search: '搜索提示',
|
search: '搜索提示',
|
||||||
@ -55,11 +57,16 @@ export default {
|
|||||||
customImage: 'Custom Image',
|
customImage: 'Custom Image',
|
||||||
bottomContent: 'Bottom Content',
|
bottomContent: 'Bottom Content',
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const t = useTranslate(i18n);
|
||||||
|
const active = ref('error');
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
return {
|
||||||
active: 'error',
|
t,
|
||||||
|
active,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user