tabber
@@ -18,13 +18,13 @@
|
|||||||
<imgSuccess @closeSuccess="closeSuccess"></imgSuccess>
|
<imgSuccess @closeSuccess="closeSuccess"></imgSuccess>
|
||||||
</uni-popup> -->
|
</uni-popup> -->
|
||||||
</view>
|
</view>
|
||||||
<moduleSelect ref="createModule"></moduleSelect>
|
<!-- <moduleSelect ref="createModule"></moduleSelect> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import moduleSelect from './moduleSelect.vue'
|
// import moduleSelect from './moduleSelect.vue'
|
||||||
import {
|
import {
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
defineProps,
|
defineProps,
|
||||||
@@ -42,39 +42,39 @@
|
|||||||
tabIndex: Number
|
tabIndex: Number
|
||||||
})
|
})
|
||||||
let tabList = reactive([{
|
let tabList = reactive([{
|
||||||
iconPath: '/static/mh/img/tabbar1.png',
|
iconPath: '../../static/Pk.png',
|
||||||
selectedIconPath: '/static/mh/img/tabbarSetl1.png',
|
selectedIconPath: '../../static/PkClick.png',
|
||||||
text: '探索',
|
text: 'PK',
|
||||||
pagePath: '/pages/index/index',
|
pagePath: '../../pages/Home/Home',
|
||||||
middleClass: ''
|
middleClass: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: '/static/mh/img/tabbar3.png',
|
iconPath: '../../static/Forum.png',
|
||||||
selectedIconPath: '/static/mh/img/tabbarSetl3.png',
|
selectedIconPath: '../../static/Forumclick.png',
|
||||||
// text: '消息',
|
// text: '消息',
|
||||||
text: 'AI绘图',
|
text: '论坛',
|
||||||
pagePath: '/pages/messages/messages',
|
pagePath: '',
|
||||||
middleClass: ''
|
middleClass: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: '/static/mh/img/add.png',
|
iconPath: '../../static/jiahao.png',
|
||||||
selectedIconPath: '/static/mh/img/add.png',
|
selectedIconPath: '../../static/jiahao.png',
|
||||||
text: '',
|
text: '',
|
||||||
pagePath: '/pages/c/c',
|
pagePath: '/pages/c/c',
|
||||||
middleClass: ''
|
middleClass: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: '/static/mh/img/tabbar2.png',
|
iconPath: '../../static/Message.png',
|
||||||
selectedIconPath: '/static/mh/img/tabbarSetl2.png',
|
selectedIconPath: '../../static/Messageclick.png',
|
||||||
text: '换背景',
|
text: '消息',
|
||||||
// text: '社区',
|
// text: '社区',
|
||||||
pagePath: '/pages/like/like'
|
pagePath: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: '/static/mh/img/tabbar4.png',
|
iconPath: '../../static/Mine.png',
|
||||||
selectedIconPath: '/static/mh/img/tabbarSetl4.png',
|
selectedIconPath: '../../static/Mineclick.png',
|
||||||
text: '我的',
|
text: '我的',
|
||||||
pagePath: '/pages/my/my',
|
pagePath: '',
|
||||||
middleClass: ''
|
middleClass: ''
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -104,28 +104,28 @@
|
|||||||
tabList[middleIndex].middleClass = 'mid-button';
|
tabList[middleIndex].middleClass = 'mid-button';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//点击按钮
|
// //点击按钮
|
||||||
function handlePush(item, index) {
|
// function handlePush(item, index) {
|
||||||
if (index === 2) {
|
// if (index === 2) {
|
||||||
//打开弹窗
|
// //打开弹窗
|
||||||
// addSuccess.value.open();
|
// // addSuccess.value.open();
|
||||||
openPopupQuantity()
|
// openPopupQuantity()
|
||||||
return;
|
// return;
|
||||||
} else if (index === 1) {
|
// } else if (index === 1) {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: "/pages/create/wenshengPicture/wenshengPicture"
|
// url: "/pages/create/wenshengPicture/wenshengPicture"
|
||||||
})
|
// })
|
||||||
} else if (index === 3) {
|
// } else if (index === 3) {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: "/pages/create/backgroundPicture/backgroundPicture"
|
// url: "/pages/create/backgroundPicture/backgroundPicture"
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
uni.switchTab({
|
// uni.switchTab({
|
||||||
url: item.pagePath
|
// url: item.pagePath
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
const createModule = ref()
|
const createModule = ref()
|
||||||
|
|
||||||
function openPopupQuantity() {
|
function openPopupQuantity() {
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
z-index: 999;
|
z-index: 999;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
background-color: #111111;
|
background-color: #ffffff;
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
padding-bottom: constant(safe-area-inset-bottom);
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
.tab-list {
|
.tab-list {
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
|
|
||||||
.item-img-box {
|
.item-img-box {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 148rpx;
|
height: 150rpx;
|
||||||
margin-bottom: 9rpx;
|
margin-bottom: 9rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
|
|
||||||
.item-img {
|
.item-img {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 116rpx;
|
height: 150rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-text {
|
.item-text {
|
||||||
|
|||||||
15
pages.json
@@ -17,5 +17,18 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"statusBarBackground": "#ffffff"
|
"statusBarBackground": "#ffffff"
|
||||||
},
|
},
|
||||||
"uniIdRouter": {}
|
"uniIdRouter": {},
|
||||||
|
"tabBar": {
|
||||||
|
"custom": true,
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/Home/Home",
|
||||||
|
"text": "组件"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"text": "API"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<contentList></contentList>
|
<contentList></contentList>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabBar">
|
<view class="tabBar">
|
||||||
<!-- <tabBar></tabBar> -->
|
<tabBar></tabBar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
import topNavigation from "../../components/topNavigation/topNavigation";
|
import topNavigation from "../../components/topNavigation/topNavigation";
|
||||||
import Advertisement from "../../components/Advertisement/Advertisement";
|
import Advertisement from "../../components/Advertisement/Advertisement";
|
||||||
import contentList from "../../components/contentList/contentList";
|
import contentList from "../../components/contentList/contentList";
|
||||||
// import tabBar from "../../components/tabBar/tabBar";
|
import tabBar from "../../components/tabBar/tabBar";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
@@ -34,6 +34,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
topNavigation,
|
topNavigation,
|
||||||
Advertisement,
|
Advertisement,
|
||||||
|
contentList,
|
||||||
|
tabBar,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
BIN
static/Forum.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/Forumclick.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/Message.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
static/Messageclick.png
Normal file
|
After Width: | Height: | Size: 553 B |
BIN
static/Mine.png
Normal file
|
After Width: | Height: | Size: 849 B |
BIN
static/Mineclick.png
Normal file
|
After Width: | Height: | Size: 844 B |
BIN
static/PKClick.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/Pk.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/jiahao.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\"> \r\n <contentList></contentList>\r\n </view>\r\n <view class=\"tabBar\">\r\n <!-- <tabBar></tabBar> -->\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\n// import tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AAGjC,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAER;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;ACpCA,GAAG,WAAW,eAAe;"}
|
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\"> \r\n <contentList></contentList>\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n contentList,\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAER;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;ACtCA,GAAG,WAAW,eAAe;"}
|
||||||
13
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -7,5 +7,18 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"statusBarBackground": "#ffffff"
|
"statusBarBackground": "#ffffff"
|
||||||
},
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"custom": true,
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/Home/Home",
|
||||||
|
"text": "组件"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"text": "API"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"usingComponents": {}
|
"usingComponents": {}
|
||||||
}
|
}
|
||||||
34
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@@ -85,9 +85,29 @@ const def = (obj, key, value) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const looseToNumber = (val) => {
|
const looseToNumber = (val) => {
|
||||||
const n = parseFloat(val);
|
const n2 = parseFloat(val);
|
||||||
return isNaN(n) ? val : n;
|
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) => {
|
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);
|
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 o = (value, key) => vOn(value, key);
|
||||||
const f = (source, renderItem) => vFor(source, renderItem);
|
const f = (source, renderItem) => vFor(source, renderItem);
|
||||||
const e = (target, ...sources) => extend(target, ...sources);
|
const e = (target, ...sources) => extend(target, ...sources);
|
||||||
|
const n = (value) => normalizeClass(value);
|
||||||
const t = (val) => toDisplayString(val);
|
const t = (val) => toDisplayString(val);
|
||||||
function createApp$1(rootComponent, rootProps = null) {
|
function createApp$1(rootComponent, rootProps = null) {
|
||||||
rootComponent && (rootComponent.mpType = "app");
|
rootComponent && (rootComponent.mpType = "app");
|
||||||
@@ -5723,8 +5744,8 @@ const $once = defineSyncApi(API_ONCE, (name, callback) => {
|
|||||||
const $off = defineSyncApi(API_OFF, (name, callback) => {
|
const $off = defineSyncApi(API_OFF, (name, callback) => {
|
||||||
if (!isArray(name))
|
if (!isArray(name))
|
||||||
name = name ? [name] : [];
|
name = name ? [name] : [];
|
||||||
name.forEach((n) => {
|
name.forEach((n2) => {
|
||||||
eventBus.off(n, callback);
|
eventBus.off(n2, callback);
|
||||||
});
|
});
|
||||||
}, OffProtocol);
|
}, OffProtocol);
|
||||||
const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
|
const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
|
||||||
@@ -7905,7 +7926,12 @@ exports.createSSRApp = createSSRApp;
|
|||||||
exports.e = e;
|
exports.e = e;
|
||||||
exports.f = f;
|
exports.f = f;
|
||||||
exports.index = index;
|
exports.index = index;
|
||||||
|
exports.n = n;
|
||||||
exports.o = o;
|
exports.o = o;
|
||||||
|
exports.onMounted = onMounted;
|
||||||
|
exports.reactive = reactive;
|
||||||
|
exports.ref = ref;
|
||||||
exports.resolveComponent = resolveComponent;
|
exports.resolveComponent = resolveComponent;
|
||||||
exports.t = t;
|
exports.t = t;
|
||||||
|
exports.unref = unref;
|
||||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|
//# 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 common_assets = require("../../common/assets.js");
|
||||||
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
|
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
|
||||||
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
|
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
|
||||||
|
const contentList = () => "../../components/contentList/contentList.js";
|
||||||
|
const tabBar = () => "../../components/tabBar/tabBar.js";
|
||||||
const _sfc_main = {
|
const _sfc_main = {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
@@ -14,18 +16,22 @@ const _sfc_main = {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
topNavigation,
|
topNavigation,
|
||||||
Advertisement
|
Advertisement,
|
||||||
|
contentList,
|
||||||
|
tabBar
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!Array) {
|
if (!Array) {
|
||||||
const _component_top_navigation = common_vendor.resolveComponent("top-navigation");
|
const _component_top_navigation = common_vendor.resolveComponent("top-navigation");
|
||||||
const _component_advertisement = common_vendor.resolveComponent("advertisement");
|
const _component_advertisement = common_vendor.resolveComponent("advertisement");
|
||||||
const _easycom_contentList2 = common_vendor.resolveComponent("contentList");
|
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_contentList = () => "../../components/contentList/contentList.js";
|
||||||
|
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
|
||||||
if (!Math) {
|
if (!Math) {
|
||||||
_easycom_contentList();
|
(_easycom_contentList + _easycom_tabBar)();
|
||||||
}
|
}
|
||||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"top-navigation": "../../components/topNavigation/topNavigation",
|
"top-navigation": "../../components/topNavigation/topNavigation",
|
||||||
"advertisement": "../../components/Advertisement/Advertisement",
|
"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 |