App.vue 825 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <a-locale-provider :locale="zhCN">
  3. <div id="app">
  4. <router-view/>
  5. </div>
  6. </a-locale-provider>
  7. </template>
  8. <script>
  9. import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
  10. import moment from 'moment'
  11. import 'moment/locale/zh-cn'
  12. import { AppDeviceEnquire } from '@/utils/mixin'
  13. moment.locale('zh-cn')
  14. export default {
  15. mixins: [AppDeviceEnquire],
  16. data () {
  17. return {
  18. zhCN
  19. }
  20. },
  21. mounted () {
  22. // const createForm = this.$form.createForm
  23. // this.$form.createForm = function (context) {
  24. // const options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { validateMessages: {
  25. // required: '%s 必填项'
  26. // } }
  27. // return createForm(context, options)
  28. // }
  29. }
  30. }
  31. </script>
  32. <style>
  33. #app {
  34. height: 100%;
  35. }
  36. </style>