uudev 1.0.0 → 1.1.0

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.
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "uuapp-template",
2
+ "name": "exceltest",
3
3
  "version": "1.0.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
- "name": "uuapp-template",
8
+ "name": "exceltest",
9
9
  "version": "1.0.0",
10
10
  "dependencies": {
11
11
  "vue": "3.5.30",
@@ -26,7 +26,7 @@
26
26
  "oxlint": "~1.51.0",
27
27
  "prettier": "3.8.1",
28
28
  "typescript": "~5.9.3",
29
- "uuapp": "file:../..",
29
+ "uudev": "latest",
30
30
  "vite": "^7.3.1",
31
31
  "vite-plugin-vue-devtools": "^8.0.7",
32
32
  "vue-tsc": "^3.2.5"
@@ -39,6 +39,8 @@
39
39
  "version": "1.0.0",
40
40
  "dev": true,
41
41
  "license": "ISC",
42
+ "optional": true,
43
+ "peer": true,
42
44
  "dependencies": {
43
45
  "archiver": "^7.0.1",
44
46
  "chalk": "^5.6.2",
@@ -51,6 +53,27 @@
51
53
  "@types/archiver": "^7.0.0"
52
54
  }
53
55
  },
56
+ "../../uudev": {
57
+ "version": "1.0.0",
58
+ "dev": true,
59
+ "license": "ISC",
60
+ "dependencies": {
61
+ "archiver": "^7.0.1",
62
+ "chalk": "^5.6.2",
63
+ "inquirer": "^12.10.0"
64
+ },
65
+ "bin": {
66
+ "uudev": "src/main.ts"
67
+ },
68
+ "devDependencies": {
69
+ "@types/archiver": "^7.0.0",
70
+ "tsup": "^8.5.0",
71
+ "typescript": "^5.8.3"
72
+ },
73
+ "engines": {
74
+ "node": ">=24.14.0"
75
+ }
76
+ },
54
77
  "node_modules/@babel/code-frame": {
55
78
  "version": "7.29.0",
56
79
  "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.29.0.tgz",
@@ -2222,7 +2245,7 @@
2222
2245
  },
2223
2246
  "node_modules/@vue-macros/common": {
2224
2247
  "version": "3.1.2",
2225
- "resolved": "https://registry.npmmirror.com/@vue-macros/common/-/common-3.1.2.tgz",
2248
+ "resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.2.tgz",
2226
2249
  "integrity": "sha512-h9t4ArDdniO9ekYHAD95t9AZcAbb19lEGK+26iAjUODOIJKmObDNBSe4+6ELQAA3vtYiFPPBtHh7+cQCKi3Dng==",
2227
2250
  "license": "MIT",
2228
2251
  "dependencies": {
@@ -2351,12 +2374,12 @@
2351
2374
  }
2352
2375
  },
2353
2376
  "node_modules/@vue/devtools-api": {
2354
- "version": "8.1.0",
2355
- "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-8.1.0.tgz",
2356
- "integrity": "sha512-O44X57jjkLKbLEc4OgL/6fEPOOanRJU8kYpCE8qfKlV96RQZcdzrcLI5mxMuVRUeXhHKIHGhCpHacyCk0HyO4w==",
2377
+ "version": "8.1.1",
2378
+ "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.1.1.tgz",
2379
+ "integrity": "sha512-bsDMJ07b3GN1puVwJb/fyFnj/U2imyswK5UQVLZwVl7O05jDrt6BHxeG5XffmOOdasOj/bOmIjxJvGPxU7pcqw==",
2357
2380
  "license": "MIT",
2358
2381
  "dependencies": {
2359
- "@vue/devtools-kit": "^8.1.0"
2382
+ "@vue/devtools-kit": "^8.1.1"
2360
2383
  }
2361
2384
  },
2362
2385
  "node_modules/@vue/devtools-core": {
@@ -2374,21 +2397,21 @@
2374
2397
  }
2375
2398
  },
2376
2399
  "node_modules/@vue/devtools-kit": {
2377
- "version": "8.1.0",
2378
- "resolved": "https://registry.npmmirror.com/@vue/devtools-kit/-/devtools-kit-8.1.0.tgz",
2379
- "integrity": "sha512-/NZlS4WtGIB54DA/z10gzk+n/V7zaqSzYZOVlg2CfdnpIKdB61bd7JDIMxf/zrtX41zod8E2/bbEBoW/d7x70Q==",
2400
+ "version": "8.1.1",
2401
+ "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.1.1.tgz",
2402
+ "integrity": "sha512-gVBaBv++i+adg4JpH71k9ppl4soyR7Y2McEqO5YNgv0BI1kMZ7BDX5gnwkZ5COYgiCyhejZG+yGNrBAjj6Coqg==",
2380
2403
  "license": "MIT",
2381
2404
  "dependencies": {
2382
- "@vue/devtools-shared": "^8.1.0",
2405
+ "@vue/devtools-shared": "^8.1.1",
2383
2406
  "birpc": "^2.6.1",
2384
2407
  "hookable": "^5.5.3",
2385
2408
  "perfect-debounce": "^2.0.0"
2386
2409
  }
2387
2410
  },
2388
2411
  "node_modules/@vue/devtools-shared": {
2389
- "version": "8.1.0",
2390
- "resolved": "https://registry.npmmirror.com/@vue/devtools-shared/-/devtools-shared-8.1.0.tgz",
2391
- "integrity": "sha512-h8uCb4Qs8UT8VdTT5yjY6tOJ//qH7EpxToixR0xqejR55t5OdISIg7AJ7eBkhBs8iu1qG5gY3QQNN1DF1EelAA==",
2412
+ "version": "8.1.1",
2413
+ "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.1.1.tgz",
2414
+ "integrity": "sha512-+h4ttmJYl/txpxHKaoZcaKpC+pvckgLzIDiSQlaQ7kKthKh8KuwoLW2D8hPJEnqKzXOvu15UHEoGyngAXCz0EQ==",
2392
2415
  "license": "MIT"
2393
2416
  },
2394
2417
  "node_modules/@vue/eslint-config-typescript": {
@@ -2586,7 +2609,7 @@
2586
2609
  },
2587
2610
  "node_modules/ast-kit": {
2588
2611
  "version": "2.2.0",
2589
- "resolved": "https://registry.npmmirror.com/ast-kit/-/ast-kit-2.2.0.tgz",
2612
+ "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-2.2.0.tgz",
2590
2613
  "integrity": "sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==",
2591
2614
  "license": "MIT",
2592
2615
  "dependencies": {
@@ -2602,7 +2625,7 @@
2602
2625
  },
2603
2626
  "node_modules/ast-walker-scope": {
2604
2627
  "version": "0.8.3",
2605
- "resolved": "https://registry.npmmirror.com/ast-walker-scope/-/ast-walker-scope-0.8.3.tgz",
2628
+ "resolved": "https://registry.npmjs.org/ast-walker-scope/-/ast-walker-scope-0.8.3.tgz",
2606
2629
  "integrity": "sha512-cbdCP0PGOBq0ASG+sjnKIoYkWMKhhz+F/h9pRexUdX2Hd38+WOlBkRKlqkGOSm0YQpcFMQBJeK4WspUAkwsEdg==",
2607
2630
  "license": "MIT",
2608
2631
  "dependencies": {
@@ -2754,7 +2777,7 @@
2754
2777
  },
2755
2778
  "node_modules/chokidar": {
2756
2779
  "version": "5.0.0",
2757
- "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-5.0.0.tgz",
2780
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",
2758
2781
  "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
2759
2782
  "license": "MIT",
2760
2783
  "dependencies": {
@@ -2769,7 +2792,7 @@
2769
2792
  },
2770
2793
  "node_modules/confbox": {
2771
2794
  "version": "0.2.4",
2772
- "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.4.tgz",
2795
+ "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz",
2773
2796
  "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==",
2774
2797
  "license": "MIT"
2775
2798
  },
@@ -3220,7 +3243,7 @@
3220
3243
  },
3221
3244
  "node_modules/exsolve": {
3222
3245
  "version": "1.0.8",
3223
- "resolved": "https://registry.npmmirror.com/exsolve/-/exsolve-1.0.8.tgz",
3246
+ "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz",
3224
3247
  "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==",
3225
3248
  "license": "MIT"
3226
3249
  },
@@ -3616,7 +3639,7 @@
3616
3639
  },
3617
3640
  "node_modules/local-pkg": {
3618
3641
  "version": "1.1.2",
3619
- "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-1.1.2.tgz",
3642
+ "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.2.tgz",
3620
3643
  "integrity": "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==",
3621
3644
  "license": "MIT",
3622
3645
  "dependencies": {
@@ -3668,7 +3691,7 @@
3668
3691
  },
3669
3692
  "node_modules/magic-string-ast": {
3670
3693
  "version": "1.0.3",
3671
- "resolved": "https://registry.npmmirror.com/magic-string-ast/-/magic-string-ast-1.0.3.tgz",
3694
+ "resolved": "https://registry.npmjs.org/magic-string-ast/-/magic-string-ast-1.0.3.tgz",
3672
3695
  "integrity": "sha512-CvkkH1i81zl7mmb94DsRiFeG9V2fR2JeuK8yDgS8oiZSFa++wWLEgZ5ufEOyLHbvSbD1gTRKv9NdX69Rnvr9JA==",
3673
3696
  "license": "MIT",
3674
3697
  "dependencies": {
@@ -3732,7 +3755,7 @@
3732
3755
  },
3733
3756
  "node_modules/mlly": {
3734
3757
  "version": "1.8.2",
3735
- "resolved": "https://registry.npmmirror.com/mlly/-/mlly-1.8.2.tgz",
3758
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",
3736
3759
  "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==",
3737
3760
  "license": "MIT",
3738
3761
  "dependencies": {
@@ -3744,13 +3767,13 @@
3744
3767
  },
3745
3768
  "node_modules/mlly/node_modules/confbox": {
3746
3769
  "version": "0.1.8",
3747
- "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.1.8.tgz",
3770
+ "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
3748
3771
  "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
3749
3772
  "license": "MIT"
3750
3773
  },
3751
3774
  "node_modules/mlly/node_modules/pkg-types": {
3752
3775
  "version": "1.3.1",
3753
- "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.3.1.tgz",
3776
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
3754
3777
  "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
3755
3778
  "license": "MIT",
3756
3779
  "dependencies": {
@@ -4097,7 +4120,7 @@
4097
4120
  },
4098
4121
  "node_modules/pkg-types": {
4099
4122
  "version": "2.3.0",
4100
- "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-2.3.0.tgz",
4123
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz",
4101
4124
  "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==",
4102
4125
  "license": "MIT",
4103
4126
  "dependencies": {
@@ -4186,7 +4209,7 @@
4186
4209
  },
4187
4210
  "node_modules/quansync": {
4188
4211
  "version": "0.2.11",
4189
- "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz",
4212
+ "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz",
4190
4213
  "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==",
4191
4214
  "funding": [
4192
4215
  {
@@ -4237,7 +4260,7 @@
4237
4260
  },
4238
4261
  "node_modules/readdirp": {
4239
4262
  "version": "5.0.0",
4240
- "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-5.0.0.tgz",
4263
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz",
4241
4264
  "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
4242
4265
  "license": "MIT",
4243
4266
  "engines": {
@@ -4343,7 +4366,7 @@
4343
4366
  },
4344
4367
  "node_modules/scule": {
4345
4368
  "version": "1.3.0",
4346
- "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
4369
+ "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz",
4347
4370
  "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==",
4348
4371
  "license": "MIT"
4349
4372
  },
@@ -4554,7 +4577,7 @@
4554
4577
  },
4555
4578
  "node_modules/ufo": {
4556
4579
  "version": "1.6.3",
4557
- "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.3.tgz",
4580
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz",
4558
4581
  "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==",
4559
4582
  "license": "MIT"
4560
4583
  },
@@ -4567,7 +4590,7 @@
4567
4590
  },
4568
4591
  "node_modules/unplugin": {
4569
4592
  "version": "3.0.0",
4570
- "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-3.0.0.tgz",
4593
+ "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.0.0.tgz",
4571
4594
  "integrity": "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==",
4572
4595
  "license": "MIT",
4573
4596
  "dependencies": {
@@ -4608,9 +4631,9 @@
4608
4631
  }
4609
4632
  },
4610
4633
  "node_modules/unplugin/node_modules/picomatch": {
4611
- "version": "4.0.3",
4612
- "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz",
4613
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
4634
+ "version": "4.0.4",
4635
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
4636
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
4614
4637
  "license": "MIT",
4615
4638
  "engines": {
4616
4639
  "node": ">=12"
@@ -4667,8 +4690,8 @@
4667
4690
  "dev": true,
4668
4691
  "license": "MIT"
4669
4692
  },
4670
- "node_modules/uuapp": {
4671
- "resolved": "../..",
4693
+ "node_modules/uudev": {
4694
+ "resolved": "../../uudev",
4672
4695
  "link": true
4673
4696
  },
4674
4697
  "node_modules/vite": {
@@ -4948,7 +4971,7 @@
4948
4971
  },
4949
4972
  "node_modules/vue-router": {
4950
4973
  "version": "5.0.3",
4951
- "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-5.0.3.tgz",
4974
+ "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.0.3.tgz",
4952
4975
  "integrity": "sha512-nG1c7aAFac7NYj8Hluo68WyWfc41xkEjaR0ViLHCa3oDvTQ/nIuLJlXJX1NUPw/DXzx/8+OKMng045HHQKQKWw==",
4953
4976
  "license": "MIT",
4954
4977
  "dependencies": {
@@ -4992,9 +5015,9 @@
4992
5015
  }
4993
5016
  },
4994
5017
  "node_modules/vue-router/node_modules/picomatch": {
4995
- "version": "4.0.3",
4996
- "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz",
4997
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
5018
+ "version": "4.0.4",
5019
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
5020
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
4998
5021
  "license": "MIT",
4999
5022
  "engines": {
5000
5023
  "node": ">=12"
@@ -5022,7 +5045,7 @@
5022
5045
  },
5023
5046
  "node_modules/webpack-virtual-modules": {
5024
5047
  "version": "0.6.2",
5025
- "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
5048
+ "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
5026
5049
  "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
5027
5050
  "license": "MIT"
5028
5051
  },
@@ -5087,7 +5110,7 @@
5087
5110
  },
5088
5111
  "node_modules/yaml": {
5089
5112
  "version": "2.8.3",
5090
- "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.8.3.tgz",
5113
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
5091
5114
  "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
5092
5115
  "license": "ISC",
5093
5116
  "bin": {
@@ -7,10 +7,10 @@
7
7
  "author": "uuer",
8
8
  "type": "module",
9
9
  "scripts": {
10
+ "debug": "uudev debug",
11
+ "makezip": "uudev publish",
10
12
  "dev": "vite --port 41260",
11
13
  "build": "run-p type-check \"build-only {@}\" --",
12
- "debug": "uudev debug",
13
- "publish": "uudev publish",
14
14
  "preview": "vite preview",
15
15
  "build-only": "vite build",
16
16
  "type-check": "vue-tsc --build",
@@ -0,0 +1,13 @@
1
+
2
+
3
+ <template>
4
+ <RouterView />
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { RouterView, useRoute } from 'vue-router'
9
+ const route = useRoute()
10
+ </script>
11
+ <style scoped>
12
+
13
+ </style>
@@ -0,0 +1,51 @@
1
+
2
+
3
+ <template>
4
+ <h1>欢迎使用uudev系列工具</h1>
5
+ <p>
6
+ uudev是一个基于TypeScript的Office开发工具集,提供了丰富的类型定义和开发支持,帮助开发者更高效地构建Office插件和应用。
7
+ </p>
8
+ <h3>Excel运行示例</h3>
9
+ <div>
10
+ <a class="demoHref" @click="putCellValue">给选中的单元格赋值</a>(代码:Application.ActiveCell.Formula = 'Hello, uudev!')
11
+ </div>
12
+ <div>
13
+ <a class="demoHref" @click="getDocInfo">取文档信息</a>
14
+ <a class="demoHref" @click="clearDocInfo">清除文档信息</a>
15
+ <span>{{ docName }}</span>(代码:Application.ActiveWorkbook.Name)
16
+ </div>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { ref } from 'vue';
21
+ const putCellValue = () => {
22
+ const activeCell = Application.ActiveCell;
23
+ if (activeCell) {
24
+ activeCell.Formula = 'Hello, uudev!';
25
+ }
26
+ }
27
+
28
+ var docName = ref('');
29
+ const getDocInfo=() => {
30
+ const doc = Application.ActiveWorkbook
31
+ if (doc) {
32
+ docName.value = `文档名称: ${doc.Name}`;
33
+ const info = `文档名称: ${doc.Name}\n文档路径: ${doc.FullName}`;
34
+ console.log(info);
35
+ } else {
36
+ docName.value = '';
37
+ alert('没有打开的文档');
38
+ }
39
+ }
40
+ const clearDocInfo = () => {
41
+ docName.value = '';
42
+ }
43
+ </script>
44
+ <style scoped>
45
+ .demoHref {
46
+ color: #42b983;
47
+ cursor: pointer;
48
+ text-decoration: underline;
49
+ margin-right: 50px;
50
+ }
51
+ </style>
@@ -7,3 +7,7 @@ const app = createApp(App)
7
7
  app.use(router)
8
8
 
9
9
  app.mount('#app')
10
+
11
+ //Application.WorkBooks.Open(openConstants.xlCn23);
12
+ //Application.WorkBooks.TestOpen(xlBMP);
13
+ Application.Range('A1').Address
@@ -6,12 +6,12 @@ const router = createRouter({
6
6
  {
7
7
  path: '/',
8
8
  name: 'home',
9
- component: () => import('../App.vue')
9
+ redirect: 'demo'
10
10
  },
11
11
  {
12
- path: '/zouyf',
13
- name: 'zouyf',
14
- component: () => import('../App.vue')
12
+ path: '/demo',
13
+ name: 'demo',
14
+ component: () => import('../demo/demo.vue')
15
15
  }
16
16
  ],
17
17
  })
@@ -0,0 +1,13 @@
1
+
2
+
3
+ <template>
4
+ <RouterView />
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { RouterView, useRoute } from 'vue-router'
9
+ const route = useRoute()
10
+ </script>
11
+ <style scoped>
12
+
13
+ </style>
@@ -0,0 +1,63 @@
1
+
2
+
3
+ <template>
4
+ <h1>欢迎使用uudev系列工具</h1>
5
+ <p>
6
+ uudev是一个基于TypeScript的Office开发工具集,提供了丰富的类型定义和开发支持,帮助开发者更高效地构建Office插件和应用。
7
+ </p>
8
+ <h3>Ppt运行示例</h3>
9
+ <div>
10
+ <a class="demoHref" @click="putShapeValue">给形状赋值</a>(代码:Application.ActivePresentation.Slides.Item(1).Shapes.Item(1).TextFrame.TextRange.Text = 'Hello, uudev!')
11
+ </div>
12
+ <div>
13
+ <a class="demoHref" @click="getDocInfo">取文档信息</a>
14
+ <a class="demoHref" @click="clearDocInfo">清除文档信息</a>
15
+ <span>{{ docName }}</span>(代码:Application.ActivePresentation.Name)
16
+ </div>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { ref } from 'vue';
21
+ const putShapeValue = () => {
22
+ let doc = Application.ActivePresentation
23
+ if (doc){
24
+ if (doc.Slides.Item(1)){
25
+ let shapes = doc.Slides.Item(1).Shapes
26
+ let shape = null
27
+ if (shapes.Count > 0){
28
+ shape = shapes.Item(1)
29
+ }else{
30
+ shape = shapes.AddTextbox(3, 25,30,350,350)
31
+ }
32
+ if (shape){
33
+ shape.TextFrame.TextRange.Text="Hello, uudev!" + shape.TextFrame.TextRange.Text
34
+ }
35
+ }
36
+ }
37
+
38
+ }
39
+
40
+ var docName = ref('');
41
+ const getDocInfo=() => {
42
+ const doc = Application.ActivePresentation;
43
+ if (doc) {
44
+ docName.value = `文档名称: ${doc.Name}`;
45
+ const info = `文档名称: ${doc.Name}\n文档路径: ${doc.FullName}`;
46
+ console.log(info);
47
+ } else {
48
+ docName.value = '';
49
+ alert('没有打开的文档');
50
+ }
51
+ }
52
+ const clearDocInfo = () => {
53
+ docName.value = '';
54
+ }
55
+ </script>
56
+ <style scoped>
57
+ .demoHref {
58
+ color: #42b983;
59
+ cursor: pointer;
60
+ text-decoration: underline;
61
+ margin-right: 50px;
62
+ }
63
+ </style>
@@ -0,0 +1,13 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+
5
+ const app = createApp(App)
6
+
7
+ app.use(router)
8
+
9
+ app.mount('#app')
10
+
11
+ //Application.WorkBooks.Open(openConstants.xlCn23);
12
+ //Application.WorkBooks.TestOpen(xlBMP);
13
+ Application.Range('A1').Address
@@ -0,0 +1,19 @@
1
+ import { createRouter, createWebHistory } from 'vue-router'
2
+
3
+ const router = createRouter({
4
+ history: createWebHistory(import.meta.env.BASE_URL),
5
+ routes: [
6
+ {
7
+ path: '/',
8
+ name: 'home',
9
+ redirect: 'demo'
10
+ },
11
+ {
12
+ path: '/demo',
13
+ name: 'demo',
14
+ component: () => import('../demo/demo.vue')
15
+ }
16
+ ],
17
+ })
18
+
19
+ export default router
@@ -0,0 +1,13 @@
1
+
2
+
3
+ <template>
4
+ <RouterView />
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { RouterView, useRoute } from 'vue-router'
9
+ const route = useRoute()
10
+ </script>
11
+ <style scoped>
12
+
13
+ </style>
@@ -0,0 +1,51 @@
1
+
2
+
3
+ <template>
4
+ <h1>欢迎使用uudev系列工具</h1>
5
+ <p>
6
+ uudev是一个基于TypeScript的Office开发工具集,提供了丰富的类型定义和开发支持,帮助开发者更高效地构建Office插件和应用。
7
+ </p>
8
+ <h3>Word运行示例</h3>
9
+ <div>
10
+ <a class="demoHref" @click="putRangeValue">给文档开头赋值</a>(代码:Application.ActiveDocument.Range(0).Text = "Hello, uudev!')
11
+ </div>
12
+ <div>
13
+ <a class="demoHref" @click="getDocInfo">取文档信息</a>
14
+ <a class="demoHref" @click="clearDocInfo">清除文档信息</a>
15
+ <span>{{ docName }}</span>(代码:Application.ActiveDocument.Name)
16
+ </div>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { ref } from 'vue';
21
+ const putRangeValue = () => {
22
+ const doc = Application.ActiveDocument;
23
+ if (doc) {
24
+ doc.Range(0).Text = "Hello, uudev!";
25
+ }
26
+ }
27
+
28
+ var docName = ref('');
29
+ const getDocInfo=() => {
30
+ const doc = Application.ActiveDocument
31
+ if (doc) {
32
+ docName.value = `文档名称: ${doc.Name}`;
33
+ const info = `文档名称: ${doc.Name}\n文档路径: ${doc.FullName}`;
34
+ console.log(info);
35
+ } else {
36
+ docName.value = '';
37
+ alert('没有打开的文档');
38
+ }
39
+ }
40
+ const clearDocInfo = () => {
41
+ docName.value = '';
42
+ }
43
+ </script>
44
+ <style scoped>
45
+ .demoHref {
46
+ color: #42b983;
47
+ cursor: pointer;
48
+ text-decoration: underline;
49
+ margin-right: 50px;
50
+ }
51
+ </style>
@@ -0,0 +1,13 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+
5
+ const app = createApp(App)
6
+
7
+ app.use(router)
8
+
9
+ app.mount('#app')
10
+
11
+ //Application.WorkBooks.Open(openConstants.xlCn23);
12
+ //Application.WorkBooks.TestOpen(xlBMP);
13
+ Application.Range('A1').Address
@@ -0,0 +1,19 @@
1
+ import { createRouter, createWebHistory } from 'vue-router'
2
+
3
+ const router = createRouter({
4
+ history: createWebHistory(import.meta.env.BASE_URL),
5
+ routes: [
6
+ {
7
+ path: '/',
8
+ name: 'home',
9
+ redirect: 'demo'
10
+ },
11
+ {
12
+ path: '/demo',
13
+ name: 'demo',
14
+ component: () => import('../demo/demo.vue')
15
+ }
16
+ ],
17
+ })
18
+
19
+ export default router
@@ -6,6 +6,8 @@
6
6
  // Extra safety for array and object lookups, but may have false positives.
7
7
  "noUncheckedIndexedAccess": true,
8
8
 
9
+ "types": ["uudev"],
10
+
9
11
  // Path mapping for cleaner imports.
10
12
  "paths": {
11
13
  "@/*": ["./src/*"]
@@ -0,0 +1,5 @@
1
+ interface Application {
2
+ shell: {
3
+ openExternal: (url: string) => void;
4
+ };
5
+ }