| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <pyh-nv :config="config"></pyh-nv>
- </template>
- <script setup>
- import {
- ref,
- defineProps,
- watch,
- reactive,
- defineEmits,
- defineExpose
- } from 'vue';
- const props = defineProps();
- const config = reactive({
- title: '',
- back: {
- hide: false, //是否隐藏导航按钮
- iconForce: true //是否出现返回按钮
- },
- bgImage: '../../../../static/标题栏.jpg',
- })
- watch(
- () => props.title,
- (val, prevVal) => {
- config.title = val
- }, {
- immediate: true,
- deep: true
- }
- );
- watch(
- () => props.iconForce,
- (val, prevVal) => {
- config.back.hide = val
- }, {
- // immediate: true,
- deep: true
- }
- );
- const changeTitle = (e) => {
- config.title = e
- }
- defineExpose({
- changeTitle
- })
- </script>
- <style>
- </style>
|