49 lines
1.4 KiB
JavaScript
49 lines
1.4 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
if (!Array) {
|
|
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
|
_easycom_up_input2();
|
|
}
|
|
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
|
if (!Math) {
|
|
_easycom_up_input();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "search",
|
|
props: {
|
|
Fixed: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
emits: ["change", "search"],
|
|
setup(__props, { emit: __emit }) {
|
|
let value = common_vendor.ref("");
|
|
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
|
const emits = __emit;
|
|
let change = (e) => {
|
|
emits("change", e);
|
|
};
|
|
let confirm = (e) => {
|
|
emits("search", e);
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: statusBarHeight,
|
|
b: common_vendor.o(common_vendor.unref(change)),
|
|
c: common_vendor.o(common_vendor.unref(confirm)),
|
|
d: common_vendor.o(($event) => common_vendor.isRef(value) ? value.value = $event : value = $event),
|
|
e: common_vendor.p({
|
|
placeholder: "查找地点、电站",
|
|
confirmType: "search",
|
|
suffixIcon: "/static/icon/search.png",
|
|
border: "none",
|
|
modelValue: common_vendor.unref(value)
|
|
}),
|
|
f: common_vendor.n(__props.Fixed ? "Fixed" : "")
|
|
};
|
|
};
|
|
}
|
|
};
|
|
my.createComponent(_sfc_main);
|