前端转vue

CodeView.ts 615B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // 定义 CodeView 类
  2. class CodeView {
  3. public Value: string;
  4. public Key: string;
  5. constructor() {
  6. this.Value = "";
  7. this.Key = "";
  8. }
  9. }
  10. // 定义 Province 类
  11. class Province extends CodeView {
  12. public Child: City[];
  13. constructor() {
  14. super();
  15. this.Child = [];
  16. }
  17. }
  18. // 定义 City 类
  19. class City extends CodeView {
  20. public Child: County[];
  21. constructor() {
  22. super();
  23. this.Child = [];
  24. }
  25. }
  26. // 定义 County 类
  27. class County extends CodeView {
  28. constructor() {
  29. super();
  30. }
  31. }
  32. export { CodeView, Province, City, County };