emp icon indicating copy to clipboard operation
emp copied to clipboard

在库中使用vue插槽会使currentRenderingInstance为null

Open mmj8000 opened this issue 1 year ago • 5 comments

runtime-core.esm-bundler.js:2943 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE') at renderSlot (runtime-core.esm-bundler.js:2943:1) at Proxy.render (index.vue:7:13) at renderComponentRoot (runtime-core.esm-bundler.js:877:1) at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:6004:1) at ReactiveEffect.run (reactivity.esm-bundler.js:177:1) at instance.update (runtime-core.esm-bundler.js:6135:1) at setupRenderEffect (runtime-core.esm-bundler.js:6145:1) at mountComponent (runtime-core.esm-bundler.js:5913:1) at processComponent (runtime-core.esm-bundler.js:5867:1) at patch (runtime-core.esm-bundler.js:5335:1)

a 组件预留了就会报错

exposes a 组件

<template>
    <div class="p-container">
        <div class="p-header">
            {{ name }}
        </div>
        <div class="p-main">
            <slot></slot>
        </div>
    </div>
</template>
<script lang="ts" setup>
const name = 'APP_LIB_Container';
</script>

<template>
    <ContainerPage>
            1223
    </ContainerPage>
</template>
<script lang="ts" setup>
import { ContainerPage } from 'UnifyAppLib/busComp';  // 通过empShare.remote 引入
</script>

mmj8000 avatar Mar 04 '24 03:03 mmj8000

const { defineConfig } = require('@efox/emp'); const path = require('path'); const vue3 = require('@efox/plugin-vue-3'); const appTitle = require('./package.json').title; const exposes = require('./expose-config'); const remotes = require('./remote-config');

module.exports = defineConfig({ plugins: [vue3], appEntry: 'main.ts',

empShare: { name: 'UnifyPortal', filename: 'emp.js', remotes: { 'UnifyAppLib': 'UnifyAppLib@http://localhost:8083/emp.js', }, }, })

mmj8000 avatar Mar 04 '24 05:03 mmj8000

两个项目使用的都是 const vue3 = require('@efox/plugin-vue-3');

mmj8000 avatar Mar 04 '24 05:03 mmj8000

请问有仓库吗

ckken avatar Mar 07 '24 03:03 ckken

这个测试仓库 随便玩 https://github.com/17722970136/emp-issue.git

------------------ 原始邮件 ------------------ 发件人: "empjs/emp" @.>; 发送时间: 2024年3月7日(星期四) 中午11:23 @.>; @.@.>; 主题: Re: [empjs/emp] 在库中使用vue插槽会使currentRenderingInstance为null (Issue #365)

请问有仓库吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

mmj8000 avatar Mar 07 '24 04:03 mmj8000

使用组合式api exposes 的组件,ref 也会出现失去响应式的情况

mmj8000 avatar Mar 07 '24 08:03 mmj8000

个人用法问题

mmj8000 avatar Mar 25 '24 09:03 mmj8000