u-notice-bar.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u-notice-bar",
  5. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$1],
  6. data() {
  7. return {
  8. show: true
  9. };
  10. },
  11. emits: ["click", "close"],
  12. methods: {
  13. addStyle: common_vendor.addStyle,
  14. // 点击通告栏
  15. click(index) {
  16. this.$emit("click", index);
  17. if (this.url && this.linkType) {
  18. this.openPage();
  19. }
  20. },
  21. // 点击关闭按钮
  22. close() {
  23. this.show = false;
  24. this.$emit("close");
  25. }
  26. }
  27. };
  28. if (!Array) {
  29. const _easycom_u_column_notice2 = common_vendor.resolveComponent("u-column-notice");
  30. const _easycom_u_row_notice2 = common_vendor.resolveComponent("u-row-notice");
  31. (_easycom_u_column_notice2 + _easycom_u_row_notice2)();
  32. }
  33. const _easycom_u_column_notice = () => "../u-column-notice/u-column-notice.js";
  34. const _easycom_u_row_notice = () => "../u-row-notice/u-row-notice.js";
  35. if (!Math) {
  36. (_easycom_u_column_notice + _easycom_u_row_notice)();
  37. }
  38. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  39. return common_vendor.e({
  40. a: $data.show
  41. }, $data.show ? common_vendor.e({
  42. b: _ctx.direction === "column" || _ctx.direction === "row" && _ctx.step
  43. }, _ctx.direction === "column" || _ctx.direction === "row" && _ctx.step ? {
  44. c: common_vendor.o($options.close),
  45. d: common_vendor.o($options.click),
  46. e: common_vendor.p({
  47. color: _ctx.color,
  48. bgColor: _ctx.bgColor,
  49. text: _ctx.text,
  50. mode: _ctx.mode,
  51. step: _ctx.step,
  52. icon: _ctx.icon,
  53. ["disable-touch"]: _ctx.disableTouch,
  54. fontSize: _ctx.fontSize,
  55. duration: _ctx.duration
  56. })
  57. } : {
  58. f: common_vendor.o($options.close),
  59. g: common_vendor.o($options.click),
  60. h: common_vendor.p({
  61. color: _ctx.color,
  62. bgColor: _ctx.bgColor,
  63. text: _ctx.text,
  64. mode: _ctx.mode,
  65. fontSize: _ctx.fontSize,
  66. speed: _ctx.speed,
  67. url: _ctx.url,
  68. linkType: _ctx.linkType,
  69. icon: _ctx.icon
  70. })
  71. }, {
  72. i: common_vendor.s({
  73. backgroundColor: _ctx.bgColor
  74. }),
  75. j: common_vendor.s($options.addStyle(_ctx.customStyle))
  76. }) : {});
  77. }
  78. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-63dbbc8e"], ["__file", "D:/project/学吧/learn_applet/node_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue"]]);
  79. wx.createComponent(Component);