From 92230c9a97dc9ce9df3313d11d26999c04bb6b26 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 13:12:48 +0800 Subject: [PATCH] 项目初始化 --- src/pages/template.vue | 65 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/src/pages/template.vue b/src/pages/template.vue new file mode 100644 index 0000000..3f0b7ac --- /dev/null +++ b/src/pages/template.vue @@ -0,0 +1,65 @@ +<template> + <view class="wrap"> + <view class="list-wrap"> + <u-cell-group title-bg-color="rgb(243, 244, 246)" :title="getGroupTitle(item)" v-for="(item, index) in list" + :key="index"> + <u-cell :titleStyle="{ fontWeight: 500 }" @click="openPage(item1.path)" :title="getFieldTitle(item1)" + v-for="(item1, index1) in item.list" :key="index1"> + <template v-slot:icon> + <image class="u-cell-icon" :src="getIcon(item1.icon)" mode="widthFix"></image> + </template> + </u-cell> + </u-cell-group> + </view> + <u-gap height="70"></u-gap> + <!-- <u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar> --> + </view> + </template> + + <script> + import list from "./template.config.js"; + export default { + data() { + return { + list: list, + // desc: '鏀堕泦浼楀鐨勫父鐢ㄩ〉闈㈠拰甯冨眬锛屽噺灏戝紑鍙戣�呯殑閲嶅宸ヤ綔锛岃浣犱笓娉ㄩ�昏緫锛屼簨鍗婂姛鍊�' + } + }, + computed: { + getIcon() { + return path => { + return '../static/uview/demo/' + path + '.png'; + return 'https://cdn.uviewui.com/uview/example/' + path + '.png'; + } + }, + }, + methods: { + openPage(path) { + this.$u.route({ + url: path + }) + }, + getGroupTitle(item) { + return item.groupName + }, + getFieldTitle(item) { + return item.title + } + } + } + </script> + + <style> + /* page { + background-color: rgb(240, 242, 244); + } */ + </style> + + <style lang="scss" scoped> + .u-cell-icon { + width: 36rpx; + height: 36rpx; + margin-right: 8rpx; + } + </style> + \ No newline at end of file -- Gitblit v1.9.3