vue3-json-viewer.d.ts 846 B

12345678910111213141516171819202122232425262728
  1. declare module "vue3-json-viewer" {
  2. import {
  3. AllowedComponentProps,
  4. App,
  5. Component,
  6. ComponentCustomProps,
  7. VNodeProps
  8. } from "vue";
  9. interface JsonViewerProps {
  10. value: Object | Array<any> | string | number | boolean; //对象
  11. expanded: boolean; //是否自动展开
  12. expandDepth: number; //展开层级
  13. copyable: boolean | object; //是否可复制
  14. sort: boolean; //是否排序
  15. boxed: boolean; //是否boxed
  16. theme: string; //主题 jv-dark | jv-light
  17. previewMode: boolean; //是否可复制
  18. timeformat: (value: any) => string;
  19. }
  20. type JsonViewerType = JsonViewerProps &
  21. VNodeProps &
  22. AllowedComponentProps &
  23. ComponentCustomProps;
  24. const JsonViewer: Component<JsonViewerType>;
  25. export { JsonViewer };
  26. const def: { install: (app: App) => void };
  27. export default def;
  28. }