tabber
13
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -7,5 +7,18 @@
|
||||
"navigationStyle": "custom",
|
||||
"statusBarBackground": "#ffffff"
|
||||
},
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/Home/Home",
|
||||
"text": "组件"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "API"
|
||||
}
|
||||
]
|
||||
},
|
||||
"usingComponents": {}
|
||||
}
|
||||
34
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@@ -85,9 +85,29 @@ const def = (obj, key, value) => {
|
||||
});
|
||||
};
|
||||
const looseToNumber = (val) => {
|
||||
const n = parseFloat(val);
|
||||
return isNaN(n) ? val : n;
|
||||
const n2 = parseFloat(val);
|
||||
return isNaN(n2) ? val : n2;
|
||||
};
|
||||
function normalizeClass(value) {
|
||||
let res = "";
|
||||
if (isString(value)) {
|
||||
res = value;
|
||||
} else if (isArray(value)) {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
const normalized = normalizeClass(value[i]);
|
||||
if (normalized) {
|
||||
res += normalized + " ";
|
||||
}
|
||||
}
|
||||
} else if (isObject(value)) {
|
||||
for (const name in value) {
|
||||
if (value[name]) {
|
||||
res += name + " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
return res.trim();
|
||||
}
|
||||
const toDisplayString = (val) => {
|
||||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
||||
};
|
||||
@@ -5132,6 +5152,7 @@ function vFor(source, renderItem) {
|
||||
const o = (value, key) => vOn(value, key);
|
||||
const f = (source, renderItem) => vFor(source, renderItem);
|
||||
const e = (target, ...sources) => extend(target, ...sources);
|
||||
const n = (value) => normalizeClass(value);
|
||||
const t = (val) => toDisplayString(val);
|
||||
function createApp$1(rootComponent, rootProps = null) {
|
||||
rootComponent && (rootComponent.mpType = "app");
|
||||
@@ -5723,8 +5744,8 @@ const $once = defineSyncApi(API_ONCE, (name, callback) => {
|
||||
const $off = defineSyncApi(API_OFF, (name, callback) => {
|
||||
if (!isArray(name))
|
||||
name = name ? [name] : [];
|
||||
name.forEach((n) => {
|
||||
eventBus.off(n, callback);
|
||||
name.forEach((n2) => {
|
||||
eventBus.off(n2, callback);
|
||||
});
|
||||
}, OffProtocol);
|
||||
const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
|
||||
@@ -7905,7 +7926,12 @@ exports.createSSRApp = createSSRApp;
|
||||
exports.e = e;
|
||||
exports.f = f;
|
||||
exports.index = index;
|
||||
exports.n = n;
|
||||
exports.o = o;
|
||||
exports.onMounted = onMounted;
|
||||
exports.reactive = reactive;
|
||||
exports.ref = ref;
|
||||
exports.resolveComponent = resolveComponent;
|
||||
exports.t = t;
|
||||
exports.unref = unref;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|
||||
|
||||
91
unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.js
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "tabBar",
|
||||
props: {
|
||||
tabIndex: Number
|
||||
},
|
||||
setup(__props) {
|
||||
let showMiddleButton = common_vendor.ref(false);
|
||||
let tabList = common_vendor.reactive([
|
||||
{
|
||||
iconPath: "../../static/Pk.png",
|
||||
selectedIconPath: "../../static/PkClick.png",
|
||||
text: "PK",
|
||||
pagePath: "../../pages/Home/Home",
|
||||
middleClass: ""
|
||||
},
|
||||
{
|
||||
iconPath: "../../static/Forum.png",
|
||||
selectedIconPath: "../../static/Forumclick.png",
|
||||
// text: '消息',
|
||||
text: "论坛",
|
||||
pagePath: "",
|
||||
middleClass: ""
|
||||
},
|
||||
{
|
||||
iconPath: "../../static/jiahao.png",
|
||||
selectedIconPath: "../../static/jiahao.png",
|
||||
text: "",
|
||||
pagePath: "/pages/c/c",
|
||||
middleClass: ""
|
||||
},
|
||||
{
|
||||
iconPath: "../../static/Message.png",
|
||||
selectedIconPath: "../../static/Messageclick.png",
|
||||
text: "消息",
|
||||
// text: '社区',
|
||||
pagePath: ""
|
||||
},
|
||||
{
|
||||
iconPath: "../../static/Mine.png",
|
||||
selectedIconPath: "../../static/Mineclick.png",
|
||||
text: "我的",
|
||||
pagePath: "",
|
||||
middleClass: ""
|
||||
}
|
||||
]);
|
||||
common_vendor.onMounted(() => {
|
||||
setTabBar();
|
||||
});
|
||||
common_vendor.index.getSystemInfo({
|
||||
success: function(res) {
|
||||
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:89", "机型", res.deviceType);
|
||||
if (res.safeArea.top > 40) {
|
||||
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:91", "苹果的底部栏大小", res.safeArea.top);
|
||||
}
|
||||
}
|
||||
});
|
||||
function setTabBar() {
|
||||
let tabLength = tabList.length;
|
||||
if (tabLength % 2) {
|
||||
showMiddleButton.value = true;
|
||||
let middleIndex = Math.floor(tabLength / 2);
|
||||
tabList[middleIndex].middleClass = "mid-button";
|
||||
}
|
||||
}
|
||||
common_vendor.ref();
|
||||
const disabledScroll = () => {
|
||||
return false;
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(common_vendor.unref(tabList), (item, index, i0) => {
|
||||
return {
|
||||
a: __props.tabIndex == index ? item.selectedIconPath : item.iconPath,
|
||||
b: common_vendor.t(item.text),
|
||||
c: __props.tabIndex == index ? "#1DD2F9" : "#A7A3A3",
|
||||
d: common_vendor.n("list-item flex flex-column flex-middle " + item.middleClass),
|
||||
e: common_vendor.o(($event) => _ctx.handlePush(item, index), index),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
b: common_vendor.n(common_vendor.unref(showMiddleButton) === true ? "tab-list-middle" : "tab-list-default"),
|
||||
c: common_vendor.o(disabledScroll)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c497a889"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/tabBar/tabBar.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="tab-block data-v-c497a889"><view class="{{['tab-list', 'flex', 'flex-center', 'data-v-c497a889', b]}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="f" class="{{['data-v-c497a889', item.d]}}" bindtap="{{item.e}}"><view class="item-img-box data-v-c497a889"><image class="item-img data-v-c497a889" src="{{item.a}}"/></view><view class="item-text font-20 data-v-c497a889" style="{{'color:' + item.c}}">{{item.b}}</view></view></view><view class="data-v-c497a889" catchtouchmove="{{c}}"></view></view>
|
||||
107
unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.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 */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.flex.data-v-c497a889 {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
.flex-center.data-v-c497a889 {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.flex-column.data-v-c497a889 {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.flex-middle.data-v-c497a889 {
|
||||
align-items: center;
|
||||
}
|
||||
.font-20.data-v-c497a889 {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.tab-block.data-v-c497a889 {
|
||||
position: relative;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
background-size: contain;
|
||||
width: 100vw;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
.tab-block .tab-list.data-v-c497a889 {
|
||||
height: 100rpx;
|
||||
padding: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.tab-block .tab-list-default.data-v-c497a889 {
|
||||
background-color: #ffffff;
|
||||
border-top: 1px #dddddd solid;
|
||||
}
|
||||
.tab-block .tab-list-middle.data-v-c497a889 {
|
||||
position: relative;
|
||||
background-size: cover;
|
||||
}
|
||||
.tab-block .list-item.data-v-c497a889 {
|
||||
flex: 1;
|
||||
}
|
||||
.tab-block .list-item .item-img-box.data-v-c497a889 {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-bottom: 9rpx;
|
||||
position: relative;
|
||||
}
|
||||
.tab-block .list-item .item-img.data-v-c497a889 {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
color: red;
|
||||
}
|
||||
.tab-block .mid-button.data-v-c497a889 {
|
||||
position: relative;
|
||||
}
|
||||
.tab-block .mid-button .item-img-box.data-v-c497a889 {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 9rpx;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: -104rpx;
|
||||
}
|
||||
.tab-block .mid-button .item-img.data-v-c497a889 {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
.tab-block .mid-button .item-text.data-v-c497a889 {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
z-index: 1002;
|
||||
bottom: -40rpx;
|
||||
color: #393a41;
|
||||
}
|
||||
.tab-block .tab-bar.data-v-c497a889 {
|
||||
height: 30rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
12
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
@@ -3,6 +3,8 @@ const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
|
||||
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
|
||||
const contentList = () => "../../components/contentList/contentList.js";
|
||||
const tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
@@ -14,18 +16,22 @@ const _sfc_main = {
|
||||
},
|
||||
components: {
|
||||
topNavigation,
|
||||
Advertisement
|
||||
Advertisement,
|
||||
contentList,
|
||||
tabBar
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_top_navigation = common_vendor.resolveComponent("top-navigation");
|
||||
const _component_advertisement = common_vendor.resolveComponent("advertisement");
|
||||
const _easycom_contentList2 = common_vendor.resolveComponent("contentList");
|
||||
(_component_top_navigation + _component_advertisement + _easycom_contentList2)();
|
||||
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
|
||||
(_component_top_navigation + _component_advertisement + _easycom_contentList2 + _easycom_tabBar2)();
|
||||
}
|
||||
const _easycom_contentList = () => "../../components/contentList/contentList.js";
|
||||
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
if (!Math) {
|
||||
_easycom_contentList();
|
||||
(_easycom_contentList + _easycom_tabBar)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"usingComponents": {
|
||||
"top-navigation": "../../components/topNavigation/topNavigation",
|
||||
"advertisement": "../../components/Advertisement/Advertisement",
|
||||
"content-list": "../../components/contentList/contentList"
|
||||
"content-list": "../../components/contentList/contentList",
|
||||
"tab-bar": "../../components/tabBar/tabBar"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="page data-v-7ffebbf4"><image src="{{a}}" class="HomeBackground data-v-7ffebbf4"></image></view><view class="top-navigation-container data-v-7ffebbf4"><top-navigation class="data-v-7ffebbf4" u-i="7ffebbf4-0" bind:__l="__l"></top-navigation></view><view class="Advertisement data-v-7ffebbf4"><advertisement class="data-v-7ffebbf4" u-i="7ffebbf4-1" bind:__l="__l"></advertisement></view><view class="contentList data-v-7ffebbf4"><content-list class="data-v-7ffebbf4" u-i="7ffebbf4-2" bind:__l="__l"></content-list></view><view class="tabBar data-v-7ffebbf4"></view>
|
||||
<view class="page data-v-7ffebbf4"><image src="{{a}}" class="HomeBackground data-v-7ffebbf4"></image></view><view class="top-navigation-container data-v-7ffebbf4"><top-navigation class="data-v-7ffebbf4" u-i="7ffebbf4-0" bind:__l="__l"></top-navigation></view><view class="Advertisement data-v-7ffebbf4"><advertisement class="data-v-7ffebbf4" u-i="7ffebbf4-1" bind:__l="__l"></advertisement></view><view class="contentList data-v-7ffebbf4"><content-list class="data-v-7ffebbf4" u-i="7ffebbf4-2" bind:__l="__l"></content-list></view><view class="tabBar data-v-7ffebbf4"><tab-bar class="data-v-7ffebbf4" u-i="7ffebbf4-3" bind:__l="__l"></tab-bar></view>
|
||||
BIN
unpackage/dist/dev/mp-weixin/static/Forum.png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/Forumclick.png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/Message.png
vendored
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
unpackage/dist/dev/mp-weixin/static/Messageclick.png
vendored
Normal file
|
After Width: | Height: | Size: 553 B |
BIN
unpackage/dist/dev/mp-weixin/static/Mine.png
vendored
Normal file
|
After Width: | Height: | Size: 849 B |
BIN
unpackage/dist/dev/mp-weixin/static/Mineclick.png
vendored
Normal file
|
After Width: | Height: | Size: 844 B |
BIN
unpackage/dist/dev/mp-weixin/static/PKClick.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/Pk.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/jiahao.png
vendored
Normal file
|
After Width: | Height: | Size: 3.2 KiB |