model.ts 658 B

1234567891011121314151617181920212223242526272829303132
  1. import { ref } from 'vue'
  2. import { getModels, ModelType } from '@/api'
  3. import sdk from '@/sdk'
  4. import type { Models } from '@/api'
  5. export const models = ref<Models>([])
  6. export const initialModels = async () => {
  7. // models.value = await getModels()
  8. models.value = [
  9. {
  10. id: '123',
  11. url: '',
  12. type: ModelType.SWKJ,
  13. title: '某安外',
  14. size: 1000,
  15. time: '2012-02-05',
  16. scale: 1,
  17. rotation: { x: 1, y: 1, z: 1},
  18. position: { x: 1, y: 1, z: 1},
  19. opacity: 0.1,
  20. bottom: 1,
  21. show: true
  22. }
  23. ]
  24. }
  25. export { ModelType, ModelTypeDesc } from '@/api'
  26. export type { Model, Models } from '@/api'