[NEW] 人力发展模块 完成 views目录文件结构、通用组件、router、

完成部分功能,保存提交
This commit is contained in:
tian.guangyuan
2020-03-11 18:24:53 +08:00
parent fa17320915
commit a07105c26f
21 changed files with 263 additions and 1 deletions

View File

@@ -0,0 +1,74 @@
<!-- 导航 元素 -->
<template>
<!-- <div class="nav-item"> -->
<van-cell is-link class="relative" @click="rout(config)">
<template slot="title">
<img class="t-cell-icon" :src="config.src" alt="config" />
<span class="custom-title">{{ config.title }}</span>
</template>
</van-cell>
<!-- </div> -->
</template>
<script>
import { Cell } from 'vant'
export default {
name: 'NavItem',
components: {
[Cell.name]: Cell
},
props: {
config: {
type: Object,
required: true,
default: function() {
return {
title: '默认title',
path: '/404',
src: 'http://localhost:8080/favicon.ico'
}
}
}
},
data() {
return {}
},
created() {},
methods: {
rout(config) {
if (!config.share) {
let url = config.path.split("/").pop()
let path = config.path
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#${url}`
},
routerInfo: { path: path }
})
} else {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
shareType: '1'
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
// .nav-item {
.t-cell-icon {
position: absolute;
width: 6.4vw;
height: 6.4vw;
}
.custom-title {
margin-left: 8.4vw;
}
// }
</style>