|
@@ -31,6 +31,13 @@
|
|
|
</el-badge>
|
|
|
</template>
|
|
|
</el-menu-item>
|
|
|
+ <el-menu-item index="2" @click="previewPic">
|
|
|
+ <template slot="title">
|
|
|
+ <el-badge value="">
|
|
|
+ <icon-svg name="minprogram" class="el-icon-setting"></icon-svg>
|
|
|
+ </el-badge>
|
|
|
+ </template>
|
|
|
+ </el-menu-item>
|
|
|
<el-menu-item class="site-navbar__avatar" index="3">
|
|
|
<el-dropdown :show-timeout="0" placement="bottom">
|
|
|
<span class="el-dropdown-link">
|
|
@@ -47,6 +54,7 @@
|
|
|
<!-- 弹窗, 修改密码 -->
|
|
|
<update-password v-if="updatePasswordVisible" ref="updatePassowrd"></update-password>
|
|
|
<Msg ref="msgDialog" @noticeAdded="noticeAdded"/>
|
|
|
+ <youli-component v-if="previewVisible" ref="preview"/>
|
|
|
</nav>
|
|
|
</template>
|
|
|
|
|
@@ -54,14 +62,19 @@
|
|
|
import UpdatePassword from './main-navbar-update-password'
|
|
|
import Msg from './common/msg'
|
|
|
import { clearLoginInfo } from '@/utils'
|
|
|
- export default {
|
|
|
+ import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
+ import YouliComponent from '@/views/modules/common/youli-component'
|
|
|
+export default {
|
|
|
data () {
|
|
|
return {
|
|
|
updatePasswordVisible: false,
|
|
|
- cnt: 0
|
|
|
+ cnt: 0,
|
|
|
+ previewVisible: false
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
+ YouliComponent,
|
|
|
+ PreviewComponent,
|
|
|
UpdatePassword,
|
|
|
Msg
|
|
|
},
|
|
@@ -113,6 +126,13 @@
|
|
|
// 通知数量变化
|
|
|
noticeAdded (num) {
|
|
|
this.cnt = num
|
|
|
+ },
|
|
|
+ // 小程序图片预览
|
|
|
+ previewPic () {
|
|
|
+ this.previewVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.preview.init()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|