2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
@@ -0,0 +1,148 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
var sys = common_vendor.index.getSystemInfoSync();
const _sfc_main = {
name: "fui-nav-bar",
emits: ["init", "leftClick", "rightClick", "titleClick"],
props: {
//navbar左右padding值,单位px
padding: {
type: [Number, String],
default: 8
},
//标题
title: {
type: String,
default: ""
},
//标题字体大小,单位px
size: {
type: [Number, String],
default: 17
},
//标题颜色
color: {
type: String,
default: ""
},
fontWeight: {
type: [Number, String],
default: 500
},
background: {
type: String,
default: ""
},
//是否需要底部分割线
splitLine: {
type: Boolean,
default: false
},
//分割线颜色,仅Nvue生效
lineColor: {
type: String,
default: "#eee"
},
//是否包含状态栏
statusBar: {
type: Boolean,
default: true
},
//是否固定在顶部
isFixed: {
type: Boolean,
default: false
},
//z-index
zIndex: {
type: [Number, String],
default: 996
},
//自定义navbar内容,title、右插槽失效
custom: {
type: Boolean,
default: false
},
//v1.9.9+
isOccupy: {
type: Boolean,
default: false
}
},
computed: {
getStyle() {
let style = "";
if (this.isOccupy) {
let height = this.statusBar ? this.statusBarHeight + 44 : 44;
style += `height:${height}px;`;
}
return style;
}
},
data() {
return {
statusBarHeight: sys.statusBarHeight
};
},
created() {
let obj = {};
obj = common_vendor.index.getMenuButtonBoundingClientRect();
this.$emit("init", {
windowWidth: sys.windowWidth,
//不包含状态栏高度固定为:44px
height: 44,
statusBarHeight: this.statusBarHeight,
//小程序右上角悬浮按钮左边界坐标,单位:px
left: obj.left || -1,
//小程序右上角悬浮按钮宽度,单位:px
btnWidth: obj.width || 0,
//小程序右上角悬浮按钮高度,单位:px
btnHeight: obj.height || 0
});
},
methods: {
leftClick() {
this.$emit("leftClick");
},
rightClick() {
this.$emit("rightClick");
},
titleClick() {
this.$emit("titleClick");
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $props.statusBar
}, $props.statusBar ? {
b: $data.statusBarHeight + "px"
} : {}, {
c: !$props.custom
}, !$props.custom ? common_vendor.e({
d: common_vendor.o((...args) => $options.leftClick && $options.leftClick(...args)),
e: $props.title
}, $props.title ? {
f: common_vendor.t($props.title),
g: $props.size + "px",
h: $props.color,
i: $props.fontWeight,
j: common_vendor.o((...args) => $options.titleClick && $options.titleClick(...args))
} : {}, {
k: common_vendor.o((...args) => $options.rightClick && $options.rightClick(...args))
}) : {}, {
l: $props.custom
}, $props.custom ? {} : {}, {
m: $props.splitLine ? 1 : "",
n: !$props.background ? 1 : "",
o: $props.isFixed ? 1 : "",
p: $props.background,
q: $props.lineColor,
r: $props.padding + "px",
s: $props.padding + "px",
t: $props.zIndex,
v: common_vendor.s($options.getStyle)
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d46cf250"]]);
wx.createComponent(Component);
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view style="{{v + ';' + virtualHostStyle}}" class="{{['data-v-d46cf250', virtualHostClass]}}"><view class="{{['fui-nav__bar', 'data-v-d46cf250', m && 'fui-nav__bar-line', n && 'fui-nva__bar-bg', o && 'fui-nav__bar-fixed']}}" style="{{'background:' + p + ';' + ('border-bottom-color:' + q) + ';' + ('padding-left:' + r) + ';' + ('padding-right:' + s) + ';' + ('z-index:' + t)}}"><view wx:if="{{a}}" class="fui-nav__status-bar data-v-d46cf250" style="{{'height:' + b}}"></view><view wx:if="{{c}}" class="fui-nav__header data-v-d46cf250"><view class="fui-nav__left data-v-d46cf250" bindtap="{{d}}"><slot></slot></view><view wx:if="{{e}}" class="fui-nav__title data-v-d46cf250" bindtap="{{j}}"><text class="fui-nav__title-text data-v-d46cf250" style="{{'font-size:' + g + ';' + ('color:' + h) + ';' + ('font-weight:' + i)}}">{{f}}</text></view><view class="fui-nav__right data-v-d46cf250" bindtap="{{k}}"><slot name="right"></slot></view></view><view wx:if="{{l}}" class="fui-nav__header data-v-d46cf250"><slot></slot></view></view></view>
@@ -0,0 +1,106 @@
.fui-nav__status-bar.data-v-d46cf250 {
width: 100%;
box-sizing: border-box;
}
.fui-nav__header.data-v-d46cf250 {
height: 44px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
overflow: hidden;
}
.fui-nav__bar.data-v-d46cf250 {
flex: 1;
width: 100%;
box-sizing: border-box;
}
.fui-nva__bar-bg.data-v-d46cf250 {
background: var(--fui-bg-color, #fff) !important;
}
.fui-nav__bar-line.data-v-d46cf250 {
position: relative;
border-bottom: 0;
}
.fui-nav__bar-line.data-v-d46cf250::after {
content: '';
position: absolute;
border-bottom: 1px solid var(--fui-color-border, #EEEEEE) !important;
transform: scaleY(0.5);
transform-origin: 0 100%;
bottom: 0;
right: 0;
left: 0;
}
.fui-nav__left.data-v-d46cf250 {
display: flex;
flex-direction: row;
width: 150rpx;
justify-content: flex-start;
align-items: center;
}
.fui-nav__right.data-v-d46cf250 {
display: flex;
flex-direction: row;
width: 150rpx;
justify-content: flex-end;
align-items: center;
}
.fui-nav__title.data-v-d46cf250 {
flex: 1;
display: flex;
box-sizing: border-box;
flex-direction: row;
align-items: center;
justify-content: center;
overflow: hidden;
padding: 0 30rpx;
}
.fui-nav__title-color.data-v-d46cf250 {
color: var(--fui-color-title, #181818) !important;
}
.fui-nav__title-text.data-v-d46cf250 {
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.fui-nav__bar-fixed.data-v-d46cf250 {
position: fixed;
left: 0;
right: 0;
top: 0;
}