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.

54 lines
1.7 KiB

2 months ago
2 months ago
2 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 }) {
  25. let keyword = common_vendor.ref("");
  26. function searchFn() {
  27. emit("searchFn", keyword.value);
  28. }
  29. function clearSearchFn() {
  30. keyword.value = "";
  31. }
  32. return (_ctx, _cache) => {
  33. return {
  34. a: common_assets._imports_0$4,
  35. b: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 1500)),
  36. c: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 500)),
  37. d: common_vendor.o(clearSearchFn),
  38. e: common_vendor.o(($event) => common_vendor.isRef(keyword) ? keyword.value = $event : keyword = $event),
  39. f: common_vendor.p({
  40. placeholder: __props.placeholder,
  41. searchIcon: " ",
  42. color: "#333",
  43. disabled: __props.disable,
  44. placeholderColor: "#9C9C9C",
  45. bgColor: "transparent",
  46. showAction: false,
  47. modelValue: common_vendor.unref(keyword)
  48. })
  49. };
  50. };
  51. }
  52. };
  53. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-612eacee"], ["__file", "D:/work/xinjiangMiniProgram/components/searchRow/searchRow.vue"]]);
  54. wx.createComponent(Component);