Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法读取fixEnter属性 #26

Open
BruceChen5683 opened this issue Dec 10, 2024 · 11 comments
Open

无法读取fixEnter属性 #26

BruceChen5683 opened this issue Dec 10, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@BruceChen5683
Copy link

image
@BruceChen5683
Copy link
Author

想自己调试的,【 // .filter(operation => !operation.attributes.fixEnter)
.map(op => {

  console.log('Operation attributes:', op.attributes);】控制台没输出,js这块不怎么懂,请教下

@whale4113
Copy link
Owner

试一试添加如下代码:

// packages/lark/src/docx.ts
window.postMessage({
  flag: 'console-log',
  data: [JSON.stringify(ops)],
})
// apps/chrome-extension/src/content.ts
window.addEventListener('message', function (event) {
  if (event.source !== window) return

  if (event.data && event.data.flag === 'console-log') {
    console.log(...event.data.data)
  }
})
image

@whale4113 whale4113 added the question Further information is requested label Dec 11, 2024
@BruceChen5683
Copy link
Author

BruceChen5683 commented Dec 13, 2024

image image

俩处修改,目前正常下载了。

另外为什么有些图片或者视频文件链接存在,但是会下载失败。如何打印图片、文件获取到链接相关日志。感谢您百忙之中的答复

@BruceChen5683
Copy link
Author

BruceChen5683 commented Dec 14, 2024

想结合IDM来下载插件无法下载的文件,但是日志输出这块 图片或者文件链接在哪没看懂,😓

@BruceChen5683
Copy link
Author

感谢

@aixiao0621
Copy link

image image
俩处修改,目前正常下载了。

另外为什么有些图片或者视频文件链接存在,但是会下载失败。如何打印图片、文件获取到链接相关日志。感谢您百忙之中的答复

遇到了同样的问题,应用这两个代码修改仍然未修复

@whale4113 whale4113 added bug Something isn't working and removed question Further information is requested labels Dec 18, 2024
@whale4113
Copy link
Owner

可以提供能复现的飞书文档(公开可访问)地址吗?

@BruceChen5683
Copy link
Author

BruceChen5683 commented Dec 19, 2024

docx.ts 新的一处undefined错误,修改如下。然后OK
image

我看的飞书文档都是带权限的,别人开放给我的,抱歉。我无法控制权限

@BruceChen5683
Copy link
Author

抱歉不小心点了close

@BruceChen5683
Copy link
Author

BruceChen5683 commented Dec 19, 2024

另外请教一个问题,对于网页https://xx.com/test 查看网页源码是以下这种类型

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/assets/logo-DdllJMnB.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>测试数据</title>
    <script type="module" crossorigin src="/assets/index-4-_xxxx1.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/lodash-_xxxx2.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-_xxxx3.js">
    <link rel="modulepreload" crossorigin href="/assets/vue-vendor-_xxxx4.js">
    <link rel="modulepreload" crossorigin href="/assets/ant-design-vue-_xxxx5.js">
    <link rel="modulepreload" crossorigin href="/assets/axios-_xxxx6.js">
    <link rel="stylesheet" crossorigin href="/assets/index-Dspm-_xxxx7.css">
    <script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
    <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
  </head>
  <body>
    <div id="app"></div>

    <script src='https://lf3-cdn-tos.bytegoofy.com/obj/goofy/locl/lark/external_js_sdk/h5-js-sdk-1.2.17.js'></script>
    <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
    <script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-xxx8.js"></script>
    <script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-xxx9.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
  </body>
</html>

实际显示的内容的也是飞书文档内容,在控制台输入document.getElementById('app'),显示
image
app对应地址x.feishu.com的会加载完整的文档。
如何处理比较合适,感谢。
直接访问x.feishu.com无权限,但是输入https://xx.com/test 可以正常看到。感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants