wd-gap.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const __default__ = {
  4. name: "wd-gap",
  5. options: {
  6. addGlobalClass: true,
  7. virtualHost: true,
  8. styleIsolation: "shared"
  9. }
  10. };
  11. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  12. ...__default__,
  13. props: common_vendor.gapProps,
  14. setup(__props) {
  15. const props = __props;
  16. const rootStyle = common_vendor.computed(() => {
  17. const rootStyle2 = {};
  18. if (common_vendor.isDef(props.bgColor)) {
  19. rootStyle2["background"] = props.bgColor;
  20. }
  21. if (common_vendor.isDef(props.height)) {
  22. rootStyle2["height"] = common_vendor.addUnit(props.height);
  23. }
  24. return `${common_vendor.objToStyle(rootStyle2)}${props.customStyle}`;
  25. });
  26. return (_ctx, _cache) => {
  27. return {
  28. a: common_vendor.n(`wd-gap ${_ctx.safeAreaBottom ? "wd-gap--safe" : ""} ${_ctx.customClass}`),
  29. b: common_vendor.s(rootStyle.value)
  30. };
  31. };
  32. }
  33. });
  34. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a388563b"]]);
  35. wx.createComponent(Component);