Dragger.js 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
  2. import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
  3. var _excluded = ["height"],
  4. _excluded2 = ["style"];
  5. import { createVNode as _createVNode, resolveDirective as _resolveDirective } from "vue";
  6. import { defineComponent } from 'vue';
  7. import Upload from './Upload';
  8. import { uploadProps } from './interface';
  9. export default defineComponent({
  10. compatConfig: {
  11. MODE: 3
  12. },
  13. name: 'AUploadDragger',
  14. inheritAttrs: false,
  15. props: uploadProps(),
  16. setup: function setup(props, _ref) {
  17. var slots = _ref.slots,
  18. attrs = _ref.attrs;
  19. return function () {
  20. var height = props.height,
  21. restProps = _objectWithoutProperties(props, _excluded);
  22. var style = attrs.style,
  23. restAttrs = _objectWithoutProperties(attrs, _excluded2);
  24. var draggerProps = _objectSpread(_objectSpread(_objectSpread({}, restProps), restAttrs), {}, {
  25. type: 'drag',
  26. style: _objectSpread(_objectSpread({}, style), {}, {
  27. height: typeof height === 'number' ? "".concat(height, "px") : height
  28. })
  29. });
  30. return _createVNode(Upload, draggerProps, slots);
  31. };
  32. }
  33. });