收藏
回答

wx-open-launch-weapp中样式设置无效

vue3+vite使用uniapp编写,H5端使用wx-open-launch-weapp,内部内联样式完全无用

        <wx-open-launch-weapp
                class="yz-weapp-component"
               :appid="item.jump_details.mini_appid"
           :path="item.jump_details.mini_link || item.jump_details.mini_path"
        >
          <component :is="'script'" type="text/wxtag-template">
            <div class="yz-weapp-button" style="width: 100%; height: 400px;">打开小程序</div>
          </component>
        </wx-open-launch-weapp>

其中yz-weapp-component设置了绝对定外占满父盒子,zindex:50保证悬浮在父盒子之上,功能没有问题,只是高度无论怎么设置都只有一行文字的高度

也试过在里面加style标签,也是完全无用

<component :is="'script'" type="text/wxtag-template">
            <component :is="'style'">.yz-weapp-button{width: 100%;
                            height: 400px;}<component>
            <div class="yz-weapp-button" style="width: 100%; height: 400px;">打开小程序</div>
</component>

另外,开发工具完全无法审查,点击没效果,元素的具体样式有没有也看不着,每次都得发布之后才能看到效果,很难受

回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员--许涛
    社区技术运营专员--许涛
    2025-07-07

    你好,原生开发是否有这个问题呢?

    2025-07-07
    有用
    回复 1
    • 深呼吸
      深呼吸
      2025-07-07
      原生暂时没有测试
      2025-07-07
      回复
登录 后发表内容