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

"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Array) {
const _easycom_u_search2 = common_vendor.resolveComponent("u-search");
_easycom_u_search2();
}
const _easycom_u_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
if (!Math) {
_easycom_u_search();
}
const _sfc_main = {
__name: "searchRow",
props: {
placeholder: {
type: String,
default: ""
},
disable: {
type: Boolean,
default: false
}
},
setup(__props, { emit: __emit }) {
let emit = __emit;
let keyword = common_vendor.ref("");
function searchFn() {
emit("searchFn", keyword.value);
}
function clearSearchFn() {
keyword.value = "";
}
return (_ctx, _cache) => {
return {
a: common_assets._imports_0$4,
b: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 1500)),
c: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 500)),
d: common_vendor.o(clearSearchFn),
e: common_vendor.o(($event) => common_vendor.isRef(keyword) ? keyword.value = $event : keyword = $event),
f: common_vendor.p({
placeholder: __props.placeholder,
searchIcon: " ",
color: "#333",
disabled: __props.disable,
placeholderColor: "#9C9C9C",
bgColor: "transparent",
showAction: false,
modelValue: common_vendor.unref(keyword)
})
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-612eacee"]]);
wx.createComponent(Component);