dsh-pick 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/plugin/client.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-pick",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "帮你在 DSH 生态里选对插件:说需求 → 找候选 → 多维比较 → 出结论。下载量是证据,AI 是推理。",
5
5
  "type": "module",
6
6
  "main": "./plugin/index.js",
package/plugin/client.js CHANGED
@@ -34,7 +34,7 @@ window.__ModuleLoader__.load({
34
34
  function PickPanel() {
35
35
  const frame = useRef(null)
36
36
  const [meta, setMeta] = useState(null)
37
- const [h, setH] = useState(720)
37
+ const [frameH, setFrameH] = useState(720)
38
38
 
39
39
  useEffect(() => {
40
40
  let alive = true
@@ -52,12 +52,12 @@ window.__ModuleLoader__.load({
52
52
  const doc = frame.current && frame.current.contentDocument
53
53
  if (doc && doc.body) {
54
54
  const need = Math.max(720, doc.body.scrollHeight + 40)
55
- if (Math.abs(need - h) > 40) setH(need)
55
+ if (Math.abs(need - frameH) > 40) setFrameH(need)
56
56
  }
57
57
  } catch { /* 跨域就不管,保持默认高度 */ }
58
58
  }, 1500)
59
59
  return () => clearInterval(t)
60
- }, [h])
60
+ }, [frameH])
61
61
 
62
62
  const tip = !meta
63
63
  ? L('正在读取目录…', 'Loading catalog…')
@@ -80,7 +80,7 @@ window.__ModuleLoader__.load({
80
80
  title: 'dsh-pick',
81
81
  style: {
82
82
  width: '100%',
83
- height: h + 'px',
83
+ height: frameH + 'px',
84
84
  border: '1px solid ' + C.border,
85
85
  borderRadius: '10px',
86
86
  background: 'transparent',