controller.ts 659 B

1234567891011121314151617181920
  1. import Color from "./color.vue";
  2. export const colorType = "color";
  3. export const propertyComponents = {
  4. [colorType]: Color,
  5. };
  6. export type PropertyType = keyof typeof propertyComponents;
  7. export type PropertyComponents<T extends PropertyType> =
  8. (typeof propertyComponents)[T];
  9. export type PropertyValue<T extends PropertyType> = InstanceType<PropertyComponents<T>>['$props']['value']
  10. export type PropertyDescribes = Record<string, { type: PropertyType; label: string }>
  11. export type PropertysData<T extends PropertyDescribes = PropertyDescribes> = {
  12. [K in keyof T]: PropertyValue<T[K]['type']>
  13. }
  14. export { default as Propertys } from './propertys.vue'