No Description

utils-6b513b37.js 1009B

123456789101112131415161718192021222324252627282930313233343536
  1. import { _ as _defineProperty } from './defineProperty-18999f8e.js';
  2. var IMAGE_PROCESS = '?x-oss-process=image/resize,h_350';
  3. var IMAGE_PROCESS_SMALL = '?x-oss-process=image/resize,h_100';
  4. var IMAGE_PROCESS_LARGE = '?x-oss-process=image/resize,h_500';
  5. function addImageProcess(url) {
  6. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  7. width: '36px',
  8. height: '36px'
  9. };
  10. if (url && url.indexOf('x-oss-process') > -1) {
  11. return url;
  12. }
  13. if (options.small) {
  14. return url + IMAGE_PROCESS_SMALL;
  15. }
  16. if (options.large) {
  17. return url + IMAGE_PROCESS_LARGE;
  18. }
  19. if (options.custom) {
  20. return "".concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_").concat(options.width, ",h_").concat(options.height);
  21. }
  22. return url + IMAGE_PROCESS;
  23. }
  24. function exportStyleSizeClass(styles, size) {
  25. return _defineProperty({}, styles[size], true);
  26. }
  27. export { addImageProcess as a, exportStyleSizeClass as e };
  28. //# sourceMappingURL=utils-6b513b37.js.map