vue2server7 7.0.30 → 7.0.31

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/test/11111111111 +24 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2server7",
3
- "version": "7.0.30",
3
+ "version": "7.0.31",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "nodemon --watch src --ext ts --exec \"ts-node src/app.ts\"",
@@ -0,0 +1,24 @@
1
+ let el = $0
2
+ while (el) {
3
+ if (el.__vueParentComponent) {
4
+ console.log('找到了 Vue3 实例:', el)
5
+ console.log(el.__vueParentComponent)
6
+ break
7
+ }
8
+ el = el.parentElement
9
+ }
10
+
11
+ el.__vueParentComponent.setupState
12
+
13
+ let el = $0
14
+ while (el) {
15
+ const comp = el.__vueParentComponent
16
+ if (comp) {
17
+ const data = comp.setupState || comp.ctx
18
+ if (data && data.forrcats) {
19
+ console.log('找到了 forrcats:', data.forrcats)
20
+ break
21
+ }
22
+ }
23
+ el = el.parentElement
24
+ }