You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

4 months ago
3 months ago
2 weeks ago
3 months ago
2 weeks ago
4 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_assets = require("../../common/assets.js");
  4. if (!Array) {
  5. const _easycom_u_search2 = common_vendor.resolveComponent("u-search");
  6. _easycom_u_search2();
  7. }
  8. const _easycom_u_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
  9. if (!Math) {
  10. _easycom_u_search();
  11. }
  12. const _sfc_main = {
  13. __name: "searchRow",
  14. props: {
  15. placeholder: {
  16. type: String,
  17. default: ""
  18. },
  19. disable: {
  20. type: Boolean,
  21. default: false
  22. }
  23. },
  24. setup(__props, { emit: __emit }) {
  25. let emit = __emit;
  26. let keyword = common_vendor.ref("");
  27. function searchFn() {
  28. emit("searchFn", keyword.value);
  29. }
  30. function clearSearchFn() {
  31. keyword.value = "";
  32. }
  33. return (_ctx, _cache) => {
  34. return {
  35. a: common_assets._imports_0$4,
  36. b: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 1500)),
  37. c: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 500)),
  38. d: common_vendor.o(clearSearchFn),
  39. e: common_vendor.o(($event) => common_vendor.isRef(keyword) ? keyword.value = $event : keyword = $event),
  40. f: common_vendor.p({
  41. placeholder: __props.placeholder,
  42. searchIcon: " ",
  43. color: "#333",
  44. disabled: __props.disable,
  45. placeholderColor: "#9C9C9C",
  46. bgColor: "transparent",
  47. showAction: false,
  48. modelValue: common_vendor.unref(keyword)
  49. })
  50. };
  51. };
  52. }
  53. };
  54. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-612eacee"]]);
  55. wx.createComponent(Component);