调整微信小程序的报错。
This commit is contained in:
195
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js
vendored
Normal file
195
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const statusBar = () => "./uni-status-bar.js";
|
||||
const getVal = (val) => typeof val === "number" ? val + "px" : val;
|
||||
const _sfc_main = {
|
||||
name: "UniNavBar",
|
||||
components: {
|
||||
statusBar
|
||||
},
|
||||
emits: ["clickLeft", "clickRight", "clickTitle"],
|
||||
props: {
|
||||
dark: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
leftText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
rightText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
rightIcon: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
fixed: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
statusBar: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
shadow: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
border: {
|
||||
type: [Boolean, String],
|
||||
default: true
|
||||
},
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 44
|
||||
},
|
||||
leftWidth: {
|
||||
type: [Number, String],
|
||||
default: 60
|
||||
},
|
||||
rightWidth: {
|
||||
type: [Number, String],
|
||||
default: 60
|
||||
},
|
||||
stat: {
|
||||
type: [Boolean, String],
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
themeBgColor() {
|
||||
if (this.dark) {
|
||||
if (this.backgroundColor) {
|
||||
return this.backgroundColor;
|
||||
} else {
|
||||
return this.dark ? "#333" : "#FFF";
|
||||
}
|
||||
}
|
||||
return this.backgroundColor || "#FFF";
|
||||
},
|
||||
themeColor() {
|
||||
if (this.dark) {
|
||||
if (this.color) {
|
||||
return this.color;
|
||||
} else {
|
||||
return this.dark ? "#fff" : "#333";
|
||||
}
|
||||
}
|
||||
return this.color || "#333";
|
||||
},
|
||||
navbarHeight() {
|
||||
return getVal(this.height);
|
||||
},
|
||||
leftIconWidth() {
|
||||
return getVal(this.leftWidth);
|
||||
},
|
||||
rightIconWidth() {
|
||||
return getVal(this.rightWidth);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (common_vendor.index.report && this.stat && this.title !== "") {
|
||||
common_vendor.index.report("title", this.title);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClickLeft() {
|
||||
this.$emit("clickLeft");
|
||||
},
|
||||
onClickRight() {
|
||||
this.$emit("clickRight");
|
||||
},
|
||||
onClickTitle() {
|
||||
this.$emit("clickTitle");
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_status_bar = common_vendor.resolveComponent("status-bar");
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
(_component_status_bar + _easycom_uni_icons2)();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.statusBar
|
||||
}, $props.statusBar ? {} : {}, {
|
||||
b: $props.leftIcon.length > 0
|
||||
}, $props.leftIcon.length > 0 ? {
|
||||
c: common_vendor.p({
|
||||
color: $options.themeColor,
|
||||
type: $props.leftIcon,
|
||||
size: "20"
|
||||
})
|
||||
} : {}, {
|
||||
d: $props.leftText.length
|
||||
}, $props.leftText.length ? {
|
||||
e: common_vendor.t($props.leftText),
|
||||
f: $options.themeColor,
|
||||
g: !$props.leftIcon.length > 0 ? 1 : ""
|
||||
} : {}, {
|
||||
h: common_vendor.o((...args) => $options.onClickLeft && $options.onClickLeft(...args)),
|
||||
i: $options.leftIconWidth,
|
||||
j: $props.title.length > 0
|
||||
}, $props.title.length > 0 ? {
|
||||
k: common_vendor.t($props.title),
|
||||
l: $options.themeColor
|
||||
} : {}, {
|
||||
m: common_vendor.o((...args) => $options.onClickTitle && $options.onClickTitle(...args)),
|
||||
n: $props.rightIcon.length
|
||||
}, $props.rightIcon.length ? {
|
||||
o: common_vendor.p({
|
||||
color: $options.themeColor,
|
||||
type: $props.rightIcon,
|
||||
size: "22"
|
||||
})
|
||||
} : {}, {
|
||||
p: $props.rightText.length && !$props.rightIcon.length
|
||||
}, $props.rightText.length && !$props.rightIcon.length ? {
|
||||
q: common_vendor.t($props.rightText),
|
||||
r: $options.themeColor
|
||||
} : {}, {
|
||||
s: common_vendor.o((...args) => $options.onClickRight && $options.onClickRight(...args)),
|
||||
t: $options.rightIconWidth,
|
||||
v: $options.themeColor,
|
||||
w: $options.themeBgColor,
|
||||
x: $options.navbarHeight,
|
||||
y: $props.fixed ? 1 : "",
|
||||
z: $props.shadow ? 1 : "",
|
||||
A: $props.border ? 1 : "",
|
||||
B: $options.themeBgColor,
|
||||
C: $options.themeColor,
|
||||
D: $props.fixed
|
||||
}, $props.fixed ? common_vendor.e({
|
||||
E: $props.statusBar
|
||||
}, $props.statusBar ? {} : {}, {
|
||||
F: $options.navbarHeight
|
||||
}) : {}, {
|
||||
G: $props.dark ? 1 : "",
|
||||
H: $props.fixed ? 1 : ""
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-26544265"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"status-bar": "./uni-status-bar",
|
||||
"uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['uni-navbar', 'data-v-26544265', G && 'uni-dark', H && 'uni-nvue-fixed']}}"><view class="{{['uni-navbar__content', 'data-v-26544265', y && 'uni-navbar--fixed', z && 'uni-navbar--shadow', A && 'uni-navbar--border']}}" style="{{'background-color:' + B + ';' + ('border-bottom-color:' + C)}}"><status-bar wx:if="{{a}}" class="data-v-26544265" u-i="26544265-0" bind:__l="__l"/><view style="{{'color:' + v + ';' + ('background-color:' + w) + ';' + ('height:' + x)}}" class="uni-navbar__header data-v-26544265"><view bindtap="{{h}}" class="uni-navbar__header-btns uni-navbar__header-btns-left data-v-26544265" style="{{'width:' + i}}"><block wx:if="{{$slots.left}}"><slot name="left"></slot></block><block wx:else><view wx:if="{{b}}" class="uni-navbar__content_view data-v-26544265"><uni-icons wx:if="{{c}}" class="data-v-26544265" u-i="26544265-1" bind:__l="__l" u-p="{{c}}"/></view><view wx:if="{{d}}" class="{{[g && 'uni-navbar-btn-icon-left', 'uni-navbar-btn-text', 'data-v-26544265']}}"><text class="data-v-26544265" style="{{'color:' + f + ';' + ('font-size:' + '12px')}}">{{e}}</text></view></block></view><view class="uni-navbar__header-container data-v-26544265" bindtap="{{m}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><view wx:if="{{j}}" class="uni-navbar__header-container-inner data-v-26544265"><text class="uni-nav-bar-text uni-ellipsis-1 data-v-26544265" style="{{'color:' + l}}">{{k}}</text></view></block></view><view bindtap="{{s}}" class="uni-navbar__header-btns uni-navbar__header-btns-right data-v-26544265" style="{{'width:' + t}}"><block wx:if="{{$slots.right}}"><slot name="right"></slot></block><block wx:else><view wx:if="{{n}}" class="data-v-26544265"><uni-icons wx:if="{{o}}" class="data-v-26544265" u-i="26544265-2" bind:__l="__l" u-p="{{o}}"/></view><view wx:if="{{p}}" class="uni-navbar-btn-text data-v-26544265"><text class="uni-nav-bar-right-text data-v-26544265" style="{{'color:' + r}}">{{q}}</text></view></block></view></view></view><view wx:if="{{D}}" class="uni-navbar__placeholder data-v-26544265"><status-bar wx:if="{{E}}" class="data-v-26544265" u-i="26544265-3" bind:__l="__l"/><view class="uni-navbar__placeholder-view data-v-26544265" style="{{'height:' + F}}"/></view></view>
|
||||
107
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxss
vendored
Normal file
107
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxss
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uni-nav-bar-text.data-v-26544265 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.uni-nav-bar-right-text.data-v-26544265 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.uni-navbar__content.data-v-26544265 {
|
||||
position: relative;
|
||||
background-color: transparent;
|
||||
}
|
||||
.uni-navbar-btn-text.data-v-26544265 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
line-height: 12px;
|
||||
}
|
||||
.uni-navbar__header.data-v-26544265 {
|
||||
display: flex;
|
||||
padding: 0 10px;
|
||||
flex-direction: row;
|
||||
height: 44px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.uni-navbar__header-btns.data-v-26544265 {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
width: 120rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-navbar__header-btns-left.data-v-26544265 {
|
||||
display: flex;
|
||||
width: 120rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-navbar__header-btns-right.data-v-26544265 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-navbar__header-container.data-v-26544265 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
padding: 0 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.uni-navbar__header-container-inner.data-v-26544265 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.uni-navbar__placeholder-view.data-v-26544265 {
|
||||
height: 44px;
|
||||
}
|
||||
.uni-navbar--fixed.data-v-26544265 {
|
||||
position: fixed;
|
||||
z-index: 998;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.uni-navbar--shadow.data-v-26544265 {
|
||||
box-shadow: 0 1px 6px #ccc;
|
||||
}
|
||||
.uni-navbar--border.data-v-26544265 {
|
||||
border-bottom-width: 1rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
.uni-ellipsis-1.data-v-26544265 {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
18
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js
vendored
Normal file
18
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "UniStatusBar",
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: common_vendor.index.getSystemInfoSync().statusBarHeight + "px"
|
||||
};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: $data.statusBarHeight
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view style="{{'height:' + a}}" class="uni-status-bar"><slot/></view>
|
||||
28
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxss
vendored
Normal file
28
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxss
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uni-status-bar {
|
||||
height: 20px;
|
||||
}
|
||||
Reference in New Issue
Block a user