|
@@ -60,7 +60,7 @@
|
|
|
/**
|
|
|
* 模板组件 - 提供页面公共组件,属性,方法
|
|
|
*/
|
|
|
- import { computed } from 'vue';
|
|
|
+ import { computed, onMounted } from 'vue';
|
|
|
import sheep from '@/sheep';
|
|
|
import { isEmpty } from 'lodash-es';
|
|
|
// #ifdef MP-WEIXIN
|
|
@@ -212,11 +212,12 @@
|
|
|
});
|
|
|
// #endif
|
|
|
|
|
|
- onShow(() => {
|
|
|
+ // 组件中使用 onMounted 监听页面加载,不是页面组件不使用 onShow
|
|
|
+ onMounted(()=>{
|
|
|
if (!isEmpty(shareInfo.value)) {
|
|
|
sheep.$platform.share.updateShareInfo(shareInfo.value);
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|