xy-svg.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. __name: "xy-svg",
  5. props: {
  6. url: {
  7. type: String,
  8. require: true
  9. },
  10. width: {
  11. type: String,
  12. default: "30"
  13. },
  14. height: {
  15. type: String,
  16. default: "30"
  17. },
  18. color: {
  19. type: String,
  20. default: "skyblue"
  21. }
  22. },
  23. setup(__props) {
  24. const props = __props;
  25. let style = common_vendor.computed(() => {
  26. return {
  27. width: `${props.width}rpx`,
  28. height: `${props.height}rpx`,
  29. transform: `translateX(${props.width}rpx)`,
  30. filter: `drop-shadow(${props.color} -${props.width}rpx 0px 0px)`
  31. };
  32. });
  33. return (_ctx, _cache) => {
  34. return {
  35. a: __props.url,
  36. b: common_vendor.s(common_vendor.unref(style)),
  37. c: __props.width + "rpx",
  38. d: __props.height + "rpx"
  39. };
  40. };
  41. }
  42. };
  43. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bd0a7296"], ["__file", "F:/兴元/开门柜项目/平台端管理系统小程序/src/components/xy-svg/xy-svg.vue"]]);
  44. wx.createComponent(Component);