{"version":3,"file":"dropdown-button-simple.mjs","sources":["../../../../../../packages/components/dropdown-button-simple/src/dropdown-button-simple.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\r\n\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type DropdownButtonSimple from './dropdown-button-simple.vue'\r\nimport type { IconProps, ButtonProps } from '@ll-plus/components'\r\nimport {\r\n  type ButtonProps as AButtonProps,\r\n  type DropdownProps\r\n} from 'ant-design-vue'\r\n\r\nexport interface DropdownItemProps {\r\n  iconProps?: IconProps\r\n  label?: string\r\n  disabled?: boolean\r\n  key?: string | number\r\n}\r\n\r\nexport const defaultButtonProps = {\r\n  label: '新增',\r\n  type: 'primary'\r\n}\r\n\r\nexport const dropdownButtonSimpleProps = buildProps({\r\n  /**\r\n   * 按钮相关配置\r\n   */\r\n  buttonProps: {\r\n    type: definePropType<ButtonProps & AButtonProps>(Object),\r\n    default: () => ({})\r\n  },\r\n  /**\r\n   * 按钮Icon配置\r\n   */\r\n  iconProps: {\r\n    type: definePropType<IconProps>(Object),\r\n    default: () => ({\r\n      iconName: 'icon-add'\r\n    })\r\n  },\r\n  /**\r\n   * 下拉菜单相关配置\r\n   */\r\n  dropDownProps: {\r\n    type: definePropType<DropdownProps>(Object),\r\n    default: () => ({\r\n      trigger: 'click'\r\n    })\r\n  },\r\n  /**\r\n   * 下拉菜单项\r\n   */\r\n  dropdownItems: {\r\n    type: definePropType<DropdownItemProps[]>(Array),\r\n    default: () => []\r\n  },\r\n  /**\r\n   * 是否显示展开状态\r\n   */\r\n  showExpandType: {\r\n    type: Boolean,\r\n    default: true\r\n  },\r\n  /**\r\n   * 总体的启禁用\r\n   */\r\n  disabled: {\r\n    type: Boolean,\r\n    default: false\r\n  }\r\n} as const)\r\n\r\nexport const dropdownButtonSimpleEmits = {\r\n  clickItem: (item: DropdownItemProps) => !!item\r\n} as const\r\n\r\n// props\r\nexport type DropdownButtonSimpleProps = ExtractPropTypes<\r\n  typeof dropdownButtonSimpleProps\r\n>\r\n\r\n// emits\r\nexport type DropdownButtonSimpleEmits = typeof dropdownButtonSimpleEmits\r\n\r\n// instance\r\nexport type DropdownButtonSimpleInstance = InstanceType<\r\n  typeof DropdownButtonSimple\r\n>\r\n"],"names":[],"mappings":";;;;AAiBO,MAAM,kBAAA,GAAqB;AAAA,EAChC,KAAA,EAAO,cAAA;AAAA,EACP,IAAA,EAAM;AACR;AAEO,MAAM,4BAA4B,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlD,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,eAA2C,MAAM,CAAA;AAAA,IACvD,OAAA,EAAS,OAAO,EAAC;AAAA,GACnB;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,eAA0B,MAAM,CAAA;AAAA,IACtC,SAAS,OAAO;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,eAA8B,MAAM,CAAA;AAAA,IAC1C,SAAS,OAAO;AAAA,MACd,OAAA,EAAS;AAAA,KACX;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,eAAoC,KAAK,CAAA;AAAA,IAC/C,OAAA,EAAS,MAAM;AAAC,GAClB;AAAA;AAAA;AAAA;AAAA,EAIA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAU;AAEH,MAAM,yBAAA,GAA4B;AAAA,EACvC,SAAA,EAAW,CAAC,IAAA,KAA4B,CAAC,CAAC;AAC5C;;;;"}