This commit is contained in:
shuhongfan
2023-09-04 16:40:17 +08:00
commit cf5ac25c14
8267 changed files with 1305066 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
const _sfc_main = {
__name: "index",
props: {
isShowCancel: {
type: Boolean,
default: false
}
},
emits: "handleSearch",
setup(__props, { emit }) {
const searchVal = common_vendor.ref("");
let capsuleTop = common_vendor.ref();
common_vendor.onLoad(() => {
common_vendor.index.getSystemInfo({
success: (res) => {
capsuleTop.value = common_vendor.index.getMenuButtonBoundingClientRect().top;
}
});
});
const handleCancel = () => {
searchVal.value = "";
emit("handleSearch", searchVal);
};
const handleSearch = (e) => {
searchVal.value = e.detail.value;
emit("handleSearch", searchVal);
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
type: "search",
size: "18",
color: "#999"
}),
b: common_vendor.o(handleSearch),
c: common_vendor.o([($event) => searchVal.value = $event.detail.value, handleSearch]),
d: searchVal.value,
e: searchVal.value
}, searchVal.value ? {
f: common_vendor.o(handleCancel)
} : {}, {
g: common_vendor.unref(capsuleTop) + "px"
});
};
}
};
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-39bdeeba"], ["__file", "E:/project/project-wl-yonghuduan-uniapp-vue3/components/uni-search/index.vue"]]);
wx.createComponent(Component);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
}
}

View File

@@ -0,0 +1 @@
<view class="navBox data-v-39bdeeba"><view class="search data-v-39bdeeba"><view class="uni-navbar data-v-39bdeeba" style="{{'padding-top:' + g}}"><view class="input-view data-v-39bdeeba"><uni-icons wx:if="{{a}}" class="input-uni-icon data-v-39bdeeba" u-i="39bdeeba-0" bind:__l="__l" u-p="{{a}}"/><input confirm-type="search" class="nav-bar-input data-v-39bdeeba" type="text" placeholder="请输入快递单号" bindconfirm="{{b}}" bindinput="{{c}}" value="{{d}}"/><icon wx:if="{{e}}" class="data-v-39bdeeba" type="clear" size="14" bindtap="{{f}}"></icon></view></view></view></view>

View File

@@ -0,0 +1,13 @@
/* 水平间距 */
/* 水平间距 */
.navBox .input-view.data-v-39bdeeba {
position: relative;
}
.navBox .input-view icon.data-v-39bdeeba {
width: 20rpx;
height: 20rpx;
position: absolute;
right: 220rpx;
top: 15rpx;
z-index: 9;
}