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,56 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
const _sfc_main = {
__name: "index",
props: {
title: {
type: String,
default: ""
},
handleToLink: {
type: Function
},
src: {
type: String,
default: "../../static/goBack.png"
}
},
setup(__props) {
const props = __props;
let deviceNavHeight = common_vendor.ref();
let capsuleTop = common_vendor.ref();
let capsuleBottom = common_vendor.ref();
let all = common_vendor.ref();
let capsuleHeight = common_vendor.ref();
common_vendor.onLoad(() => {
common_vendor.index.getSystemInfo({
success: (res) => {
deviceNavHeight.value = res.statusBarHeight;
capsuleTop.value = common_vendor.index.getMenuButtonBoundingClientRect().top;
capsuleBottom.value = common_vendor.index.getMenuButtonBoundingClientRect().bottom;
all.value = capsuleTop.value + capsuleBottom.value - deviceNavHeight.value + "px";
capsuleHeight.value = common_vendor.index.getMenuButtonBoundingClientRect().height;
}
});
});
const handleTo = () => {
if (props.handleToLink) {
props.handleToLink();
} else {
common_vendor.index.navigateBack();
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.t(__props.title),
b: __props.src,
c: common_vendor.o(handleTo),
d: common_vendor.unref(capsuleTop) + "px",
e: common_vendor.unref(capsuleHeight) + "px",
f: common_vendor.unref(all)
};
};
}
};
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6e7b2b6e"], ["__file", "E:/project/project-wl-yonghuduan-uniapp-vue3/components/Navbar/index.vue"]]);
wx.createComponent(Component);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="NavBar data-v-6e7b2b6e" style="{{'height:' + f}}"><view class="title data-v-6e7b2b6e" style="{{'padding-top:' + d + ';' + ('height:' + e)}}">{{a}} <image src="{{b}}" bindtap="{{c}}" class="navbar-image data-v-6e7b2b6e"></image></view></view>

View File

@@ -0,0 +1,20 @@
/* 水平间距 */
/* 水平间距 */
.NavBar.data-v-6e7b2b6e {
position: relative;
background-color: white;
}
.NavBar .title.data-v-6e7b2b6e {
font-weight: bold;
font-size: 32rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.NavBar .navbar-image.data-v-6e7b2b6e {
width: 40rpx;
height: 40rpx;
position: absolute;
left: 26rpx;
}