mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 06:36:45 +08:00
[NEW] 人力发展模块 完成 views目录文件结构、通用组件、router、
完成部分功能,保存提交
This commit is contained in:
74
src/components/ebiz/manpower/NavItem.vue
Normal file
74
src/components/ebiz/manpower/NavItem.vue
Normal 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>
|
||||
Reference in New Issue
Block a user