@coze-arch/cli 0.0.1-alpha.a17d4b → 0.0.1-alpha.a2a210
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.
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +1 -1
- package/lib/__templates__/expo/client/metro.config.js +3 -0
- package/lib/__templates__/native-static/.coze +11 -0
- package/lib/__templates__/native-static/index.html +33 -0
- package/lib/__templates__/native-static/styles/main.css +136 -0
- package/lib/__templates__/native-static/template.config.js +22 -0
- package/lib/__templates__/nextjs/.babelrc +3 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +107 -37
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -1
- package/lib/__templates__/taro/README.md +79 -17
- package/lib/__templates__/taro/config/index.ts +1 -1
- package/lib/__templates__/taro/eslint.config.mjs +25 -3
- package/lib/__templates__/taro/package.json +7 -4
- package/lib/__templates__/taro/pnpm-lock.yaml +270 -7
- package/lib/__templates__/taro/src/app.css +0 -11
- package/lib/__templates__/taro/src/app.tsx +9 -0
- package/lib/__templates__/taro/src/presets/h5-navbar.tsx +171 -0
- package/lib/__templates__/taro/src/{utils → presets}/h5-styles.ts +15 -4
- package/lib/__templates__/taro/src/presets/index.tsx +18 -0
- package/lib/__templates__/templates.json +11 -0
- package/lib/__templates__/vite/vite.config.ts +1 -0
- package/lib/cli.js +14 -4
- package/package.json +2 -1
- package/lib/__templates__/taro/src/app.ts +0 -14
- /package/lib/__templates__/taro/src/{utils → presets}/wx-debug.ts +0 -0
|
@@ -4,22 +4,24 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Coze Mini Program Application",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "pnpm exec concurrently -n lint,tsc,web,weapp,server -c red,blue,green,yellow,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:weapp\" \"pnpm build:server\"",
|
|
7
|
+
"build": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc,web,weapp,server -c red,blue,green,yellow,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:weapp\" \"pnpm build:server\"",
|
|
8
8
|
"build:server": "pnpm --filter server build",
|
|
9
9
|
"build:weapp": "taro build --type weapp",
|
|
10
10
|
"build:web": "taro build --type h5",
|
|
11
|
-
"dev": "pnpm exec concurrently -n web,server -c blue,green \"pnpm dev:web\" \"pnpm dev:server\"",
|
|
11
|
+
"dev": "pnpm exec concurrently --kill-others --kill-signal SIGKILL -n web,server -c blue,green \"pnpm dev:web\" \"pnpm dev:server\"",
|
|
12
12
|
"dev:server": "pnpm --filter server dev",
|
|
13
13
|
"dev:weapp": "taro build --type weapp --watch",
|
|
14
14
|
"dev:web": "taro build --type h5 --watch",
|
|
15
15
|
"preinstall": "npx only-allow pnpm",
|
|
16
16
|
"postinstall": "weapp-tw patch",
|
|
17
|
+
"kill:all": "pkill -9 -f 'concurrently' 2>/dev/null || true; pkill -9 -f 'nest start' 2>/dev/null || true; pkill -9 -f 'taro build' 2>/dev/null || true; pkill -9 -f 'node.*dev' 2>/dev/null || true; echo 'All dev processes cleaned'",
|
|
17
18
|
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
18
19
|
"lint:build": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --max-warnings=0",
|
|
19
20
|
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
20
21
|
"new": "taro new",
|
|
21
22
|
"preview:weapp": "taro build --type weapp --preview",
|
|
22
|
-
"tsc": "npx tsc --noEmit --skipLibCheck"
|
|
23
|
+
"tsc": "npx tsc --noEmit --skipLibCheck",
|
|
24
|
+
"validate": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc -c red,blue \"pnpm lint:build\" \"pnpm tsc\""
|
|
23
25
|
},
|
|
24
26
|
"lint-staged": {
|
|
25
27
|
"src/**/*.{js,jsx,ts,tsx}": [
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
"@tarojs/shared": "4.1.9",
|
|
44
46
|
"@tarojs/taro": "4.1.9",
|
|
45
47
|
"drizzle-kit": "^0.31.8",
|
|
46
|
-
"lucide-react": "^
|
|
48
|
+
"lucide-react-taro": "^1.1.1",
|
|
47
49
|
"react": "^18.0.0",
|
|
48
50
|
"react-dom": "^18.0.0",
|
|
49
51
|
"zustand": "^5.0.9"
|
|
@@ -63,6 +65,7 @@
|
|
|
63
65
|
"@vitejs/plugin-react": "^4.3.0",
|
|
64
66
|
"babel-preset-taro": "4.1.9",
|
|
65
67
|
"concurrently": "^9.2.1",
|
|
68
|
+
"dotenv": "^17.2.3",
|
|
66
69
|
"eslint": "^8.57.0",
|
|
67
70
|
"eslint-config-taro": "4.1.9",
|
|
68
71
|
"eslint-plugin-react": "^7.34.1",
|
|
@@ -41,9 +41,9 @@ importers:
|
|
|
41
41
|
drizzle-kit:
|
|
42
42
|
specifier: ^0.31.8
|
|
43
43
|
version: 0.31.8
|
|
44
|
-
lucide-react:
|
|
45
|
-
specifier: ^
|
|
46
|
-
version: 0.
|
|
44
|
+
lucide-react-taro:
|
|
45
|
+
specifier: ^1.1.1
|
|
46
|
+
version: 1.1.1(@tarojs/components@4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96)(esbuild@0.25.12)))(react@18.3.1)
|
|
47
47
|
react:
|
|
48
48
|
specifier: ^18.0.0
|
|
49
49
|
version: 18.3.1
|
|
@@ -96,6 +96,9 @@ importers:
|
|
|
96
96
|
concurrently:
|
|
97
97
|
specifier: ^9.2.1
|
|
98
98
|
version: 9.2.1
|
|
99
|
+
dotenv:
|
|
100
|
+
specifier: ^17.2.3
|
|
101
|
+
version: 17.2.3
|
|
99
102
|
eslint:
|
|
100
103
|
specifier: ^8.57.0
|
|
101
104
|
version: 8.57.1
|
|
@@ -2055,6 +2058,9 @@ packages:
|
|
|
2055
2058
|
'@dual-bundle/import-meta-resolve@4.2.1':
|
|
2056
2059
|
resolution: {integrity: sha512-id+7YRUgoUX6CgV0DtuhirQWodeeA7Lf4i2x71JS/vtA5pRb/hIGWlw+G6MeXvsM+MXrz0VAydTGElX1rAfgPg==}
|
|
2057
2060
|
|
|
2061
|
+
'@emnapi/runtime@1.8.1':
|
|
2062
|
+
resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==}
|
|
2063
|
+
|
|
2058
2064
|
'@esbuild-kit/core-utils@3.3.2':
|
|
2059
2065
|
resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==}
|
|
2060
2066
|
deprecated: 'Merged into tsx: https://tsx.is'
|
|
@@ -2539,6 +2545,111 @@ packages:
|
|
|
2539
2545
|
resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
|
|
2540
2546
|
deprecated: Use @eslint/object-schema instead
|
|
2541
2547
|
|
|
2548
|
+
'@img/sharp-darwin-arm64@0.33.5':
|
|
2549
|
+
resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}
|
|
2550
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2551
|
+
cpu: [arm64]
|
|
2552
|
+
os: [darwin]
|
|
2553
|
+
|
|
2554
|
+
'@img/sharp-darwin-x64@0.33.5':
|
|
2555
|
+
resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==}
|
|
2556
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2557
|
+
cpu: [x64]
|
|
2558
|
+
os: [darwin]
|
|
2559
|
+
|
|
2560
|
+
'@img/sharp-libvips-darwin-arm64@1.0.4':
|
|
2561
|
+
resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==}
|
|
2562
|
+
cpu: [arm64]
|
|
2563
|
+
os: [darwin]
|
|
2564
|
+
|
|
2565
|
+
'@img/sharp-libvips-darwin-x64@1.0.4':
|
|
2566
|
+
resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==}
|
|
2567
|
+
cpu: [x64]
|
|
2568
|
+
os: [darwin]
|
|
2569
|
+
|
|
2570
|
+
'@img/sharp-libvips-linux-arm64@1.0.4':
|
|
2571
|
+
resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==}
|
|
2572
|
+
cpu: [arm64]
|
|
2573
|
+
os: [linux]
|
|
2574
|
+
|
|
2575
|
+
'@img/sharp-libvips-linux-arm@1.0.5':
|
|
2576
|
+
resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==}
|
|
2577
|
+
cpu: [arm]
|
|
2578
|
+
os: [linux]
|
|
2579
|
+
|
|
2580
|
+
'@img/sharp-libvips-linux-s390x@1.0.4':
|
|
2581
|
+
resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==}
|
|
2582
|
+
cpu: [s390x]
|
|
2583
|
+
os: [linux]
|
|
2584
|
+
|
|
2585
|
+
'@img/sharp-libvips-linux-x64@1.0.4':
|
|
2586
|
+
resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==}
|
|
2587
|
+
cpu: [x64]
|
|
2588
|
+
os: [linux]
|
|
2589
|
+
|
|
2590
|
+
'@img/sharp-libvips-linuxmusl-arm64@1.0.4':
|
|
2591
|
+
resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==}
|
|
2592
|
+
cpu: [arm64]
|
|
2593
|
+
os: [linux]
|
|
2594
|
+
|
|
2595
|
+
'@img/sharp-libvips-linuxmusl-x64@1.0.4':
|
|
2596
|
+
resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==}
|
|
2597
|
+
cpu: [x64]
|
|
2598
|
+
os: [linux]
|
|
2599
|
+
|
|
2600
|
+
'@img/sharp-linux-arm64@0.33.5':
|
|
2601
|
+
resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==}
|
|
2602
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2603
|
+
cpu: [arm64]
|
|
2604
|
+
os: [linux]
|
|
2605
|
+
|
|
2606
|
+
'@img/sharp-linux-arm@0.33.5':
|
|
2607
|
+
resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==}
|
|
2608
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2609
|
+
cpu: [arm]
|
|
2610
|
+
os: [linux]
|
|
2611
|
+
|
|
2612
|
+
'@img/sharp-linux-s390x@0.33.5':
|
|
2613
|
+
resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==}
|
|
2614
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2615
|
+
cpu: [s390x]
|
|
2616
|
+
os: [linux]
|
|
2617
|
+
|
|
2618
|
+
'@img/sharp-linux-x64@0.33.5':
|
|
2619
|
+
resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==}
|
|
2620
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2621
|
+
cpu: [x64]
|
|
2622
|
+
os: [linux]
|
|
2623
|
+
|
|
2624
|
+
'@img/sharp-linuxmusl-arm64@0.33.5':
|
|
2625
|
+
resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==}
|
|
2626
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2627
|
+
cpu: [arm64]
|
|
2628
|
+
os: [linux]
|
|
2629
|
+
|
|
2630
|
+
'@img/sharp-linuxmusl-x64@0.33.5':
|
|
2631
|
+
resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==}
|
|
2632
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2633
|
+
cpu: [x64]
|
|
2634
|
+
os: [linux]
|
|
2635
|
+
|
|
2636
|
+
'@img/sharp-wasm32@0.33.5':
|
|
2637
|
+
resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==}
|
|
2638
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2639
|
+
cpu: [wasm32]
|
|
2640
|
+
|
|
2641
|
+
'@img/sharp-win32-ia32@0.33.5':
|
|
2642
|
+
resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==}
|
|
2643
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2644
|
+
cpu: [ia32]
|
|
2645
|
+
os: [win32]
|
|
2646
|
+
|
|
2647
|
+
'@img/sharp-win32-x64@0.33.5':
|
|
2648
|
+
resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==}
|
|
2649
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
2650
|
+
cpu: [x64]
|
|
2651
|
+
os: [win32]
|
|
2652
|
+
|
|
2542
2653
|
'@inquirer/external-editor@1.0.3':
|
|
2543
2654
|
resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==}
|
|
2544
2655
|
engines: {node: '>=18'}
|
|
@@ -5275,10 +5386,17 @@ packages:
|
|
|
5275
5386
|
color-name@1.1.4:
|
|
5276
5387
|
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
|
5277
5388
|
|
|
5389
|
+
color-string@1.9.1:
|
|
5390
|
+
resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}
|
|
5391
|
+
|
|
5278
5392
|
color-support@1.1.3:
|
|
5279
5393
|
resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==}
|
|
5280
5394
|
hasBin: true
|
|
5281
5395
|
|
|
5396
|
+
color@4.2.3:
|
|
5397
|
+
resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==}
|
|
5398
|
+
engines: {node: '>=12.5.0'}
|
|
5399
|
+
|
|
5282
5400
|
colord@2.9.3:
|
|
5283
5401
|
resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==}
|
|
5284
5402
|
|
|
@@ -6892,6 +7010,9 @@ packages:
|
|
|
6892
7010
|
is-arrayish@0.2.1:
|
|
6893
7011
|
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
|
|
6894
7012
|
|
|
7013
|
+
is-arrayish@0.3.4:
|
|
7014
|
+
resolution: {integrity: sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==}
|
|
7015
|
+
|
|
6895
7016
|
is-async-function@2.1.1:
|
|
6896
7017
|
resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==}
|
|
6897
7018
|
engines: {node: '>= 0.4'}
|
|
@@ -7582,10 +7703,12 @@ packages:
|
|
|
7582
7703
|
lru-cache@5.1.1:
|
|
7583
7704
|
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
|
|
7584
7705
|
|
|
7585
|
-
lucide-react@
|
|
7586
|
-
resolution: {integrity: sha512-
|
|
7706
|
+
lucide-react-taro@1.1.1:
|
|
7707
|
+
resolution: {integrity: sha512-pR3PDj50MfQVFdgGzGtHRbtmZF1bkejGeYEPUGgTNVFLwxYYYElPOeRSJ0eZcohqgpZFKTlX6ohRe/iktLAumw==}
|
|
7708
|
+
hasBin: true
|
|
7587
7709
|
peerDependencies:
|
|
7588
|
-
|
|
7710
|
+
'@tarojs/components': '>=3.0.0'
|
|
7711
|
+
react: '>=16.8.0'
|
|
7589
7712
|
|
|
7590
7713
|
magic-string@0.30.21:
|
|
7591
7714
|
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
|
|
@@ -8186,6 +8309,9 @@ packages:
|
|
|
8186
8309
|
performance-now@2.1.0:
|
|
8187
8310
|
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
|
|
8188
8311
|
|
|
8312
|
+
pg-cloudflare@1.3.0:
|
|
8313
|
+
resolution: {integrity: sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==}
|
|
8314
|
+
|
|
8189
8315
|
pg-connection-string@2.10.1:
|
|
8190
8316
|
resolution: {integrity: sha512-iNzslsoeSH2/gmDDKiyMqF64DATUCWj3YJ0wP14kqcsf2TUklwimd+66yYojKwZCA7h2yRNLGug71hCBA2a4sw==}
|
|
8191
8317
|
|
|
@@ -9271,6 +9397,10 @@ packages:
|
|
|
9271
9397
|
resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==}
|
|
9272
9398
|
engines: {node: '>=8'}
|
|
9273
9399
|
|
|
9400
|
+
sharp@0.33.5:
|
|
9401
|
+
resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==}
|
|
9402
|
+
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
9403
|
+
|
|
9274
9404
|
shebang-command@2.0.0:
|
|
9275
9405
|
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
|
9276
9406
|
engines: {node: '>=8'}
|
|
@@ -9320,6 +9450,9 @@ packages:
|
|
|
9320
9450
|
simple-plist@1.3.1:
|
|
9321
9451
|
resolution: {integrity: sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==}
|
|
9322
9452
|
|
|
9453
|
+
simple-swizzle@0.2.4:
|
|
9454
|
+
resolution: {integrity: sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==}
|
|
9455
|
+
|
|
9323
9456
|
simple-wcswidth@1.1.2:
|
|
9324
9457
|
resolution: {integrity: sha512-j7piyCjAeTDSjzTSQ7DokZtMNwNlEAyxqSZeCS+CXH7fJ4jx3FuJ/mTW3mE+6JLs4VJBbcll0Kjn+KXI5t21Iw==}
|
|
9325
9458
|
|
|
@@ -12794,6 +12927,11 @@ snapshots:
|
|
|
12794
12927
|
|
|
12795
12928
|
'@dual-bundle/import-meta-resolve@4.2.1': {}
|
|
12796
12929
|
|
|
12930
|
+
'@emnapi/runtime@1.8.1':
|
|
12931
|
+
dependencies:
|
|
12932
|
+
tslib: 2.8.1
|
|
12933
|
+
optional: true
|
|
12934
|
+
|
|
12797
12935
|
'@esbuild-kit/core-utils@3.3.2':
|
|
12798
12936
|
dependencies:
|
|
12799
12937
|
esbuild: 0.18.20
|
|
@@ -13087,6 +13225,81 @@ snapshots:
|
|
|
13087
13225
|
|
|
13088
13226
|
'@humanwhocodes/object-schema@2.0.3': {}
|
|
13089
13227
|
|
|
13228
|
+
'@img/sharp-darwin-arm64@0.33.5':
|
|
13229
|
+
optionalDependencies:
|
|
13230
|
+
'@img/sharp-libvips-darwin-arm64': 1.0.4
|
|
13231
|
+
optional: true
|
|
13232
|
+
|
|
13233
|
+
'@img/sharp-darwin-x64@0.33.5':
|
|
13234
|
+
optionalDependencies:
|
|
13235
|
+
'@img/sharp-libvips-darwin-x64': 1.0.4
|
|
13236
|
+
optional: true
|
|
13237
|
+
|
|
13238
|
+
'@img/sharp-libvips-darwin-arm64@1.0.4':
|
|
13239
|
+
optional: true
|
|
13240
|
+
|
|
13241
|
+
'@img/sharp-libvips-darwin-x64@1.0.4':
|
|
13242
|
+
optional: true
|
|
13243
|
+
|
|
13244
|
+
'@img/sharp-libvips-linux-arm64@1.0.4':
|
|
13245
|
+
optional: true
|
|
13246
|
+
|
|
13247
|
+
'@img/sharp-libvips-linux-arm@1.0.5':
|
|
13248
|
+
optional: true
|
|
13249
|
+
|
|
13250
|
+
'@img/sharp-libvips-linux-s390x@1.0.4':
|
|
13251
|
+
optional: true
|
|
13252
|
+
|
|
13253
|
+
'@img/sharp-libvips-linux-x64@1.0.4':
|
|
13254
|
+
optional: true
|
|
13255
|
+
|
|
13256
|
+
'@img/sharp-libvips-linuxmusl-arm64@1.0.4':
|
|
13257
|
+
optional: true
|
|
13258
|
+
|
|
13259
|
+
'@img/sharp-libvips-linuxmusl-x64@1.0.4':
|
|
13260
|
+
optional: true
|
|
13261
|
+
|
|
13262
|
+
'@img/sharp-linux-arm64@0.33.5':
|
|
13263
|
+
optionalDependencies:
|
|
13264
|
+
'@img/sharp-libvips-linux-arm64': 1.0.4
|
|
13265
|
+
optional: true
|
|
13266
|
+
|
|
13267
|
+
'@img/sharp-linux-arm@0.33.5':
|
|
13268
|
+
optionalDependencies:
|
|
13269
|
+
'@img/sharp-libvips-linux-arm': 1.0.5
|
|
13270
|
+
optional: true
|
|
13271
|
+
|
|
13272
|
+
'@img/sharp-linux-s390x@0.33.5':
|
|
13273
|
+
optionalDependencies:
|
|
13274
|
+
'@img/sharp-libvips-linux-s390x': 1.0.4
|
|
13275
|
+
optional: true
|
|
13276
|
+
|
|
13277
|
+
'@img/sharp-linux-x64@0.33.5':
|
|
13278
|
+
optionalDependencies:
|
|
13279
|
+
'@img/sharp-libvips-linux-x64': 1.0.4
|
|
13280
|
+
optional: true
|
|
13281
|
+
|
|
13282
|
+
'@img/sharp-linuxmusl-arm64@0.33.5':
|
|
13283
|
+
optionalDependencies:
|
|
13284
|
+
'@img/sharp-libvips-linuxmusl-arm64': 1.0.4
|
|
13285
|
+
optional: true
|
|
13286
|
+
|
|
13287
|
+
'@img/sharp-linuxmusl-x64@0.33.5':
|
|
13288
|
+
optionalDependencies:
|
|
13289
|
+
'@img/sharp-libvips-linuxmusl-x64': 1.0.4
|
|
13290
|
+
optional: true
|
|
13291
|
+
|
|
13292
|
+
'@img/sharp-wasm32@0.33.5':
|
|
13293
|
+
dependencies:
|
|
13294
|
+
'@emnapi/runtime': 1.8.1
|
|
13295
|
+
optional: true
|
|
13296
|
+
|
|
13297
|
+
'@img/sharp-win32-ia32@0.33.5':
|
|
13298
|
+
optional: true
|
|
13299
|
+
|
|
13300
|
+
'@img/sharp-win32-x64@0.33.5':
|
|
13301
|
+
optional: true
|
|
13302
|
+
|
|
13090
13303
|
'@inquirer/external-editor@1.0.3(@types/node@22.19.6)':
|
|
13091
13304
|
dependencies:
|
|
13092
13305
|
chardet: 2.1.1
|
|
@@ -16677,8 +16890,18 @@ snapshots:
|
|
|
16677
16890
|
|
|
16678
16891
|
color-name@1.1.4: {}
|
|
16679
16892
|
|
|
16893
|
+
color-string@1.9.1:
|
|
16894
|
+
dependencies:
|
|
16895
|
+
color-name: 1.1.4
|
|
16896
|
+
simple-swizzle: 0.2.4
|
|
16897
|
+
|
|
16680
16898
|
color-support@1.1.3: {}
|
|
16681
16899
|
|
|
16900
|
+
color@4.2.3:
|
|
16901
|
+
dependencies:
|
|
16902
|
+
color-convert: 2.0.1
|
|
16903
|
+
color-string: 1.9.1
|
|
16904
|
+
|
|
16682
16905
|
colord@2.9.3: {}
|
|
16683
16906
|
|
|
16684
16907
|
colorette@2.0.20: {}
|
|
@@ -18654,6 +18877,8 @@ snapshots:
|
|
|
18654
18877
|
|
|
18655
18878
|
is-arrayish@0.2.1: {}
|
|
18656
18879
|
|
|
18880
|
+
is-arrayish@0.3.4: {}
|
|
18881
|
+
|
|
18657
18882
|
is-async-function@2.1.1:
|
|
18658
18883
|
dependencies:
|
|
18659
18884
|
async-function: 1.0.0
|
|
@@ -19299,9 +19524,12 @@ snapshots:
|
|
|
19299
19524
|
dependencies:
|
|
19300
19525
|
yallist: 3.1.1
|
|
19301
19526
|
|
|
19302
|
-
lucide-react@0.
|
|
19527
|
+
lucide-react-taro@1.1.1(@tarojs/components@4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96)(esbuild@0.25.12)))(react@18.3.1):
|
|
19303
19528
|
dependencies:
|
|
19529
|
+
'@tarojs/components': 4.1.9(@tarojs/helper@4.1.9)(@types/react@18.3.27)(postcss@8.5.6)(rollup@3.29.5)(webpack@5.97.1(@swc/core@1.3.96)(esbuild@0.25.12))
|
|
19530
|
+
commander: 14.0.2
|
|
19304
19531
|
react: 18.3.1
|
|
19532
|
+
sharp: 0.33.5
|
|
19305
19533
|
|
|
19306
19534
|
magic-string@0.30.21:
|
|
19307
19535
|
dependencies:
|
|
@@ -20037,6 +20265,9 @@ snapshots:
|
|
|
20037
20265
|
|
|
20038
20266
|
performance-now@2.1.0: {}
|
|
20039
20267
|
|
|
20268
|
+
pg-cloudflare@1.3.0:
|
|
20269
|
+
optional: true
|
|
20270
|
+
|
|
20040
20271
|
pg-connection-string@2.10.1: {}
|
|
20041
20272
|
|
|
20042
20273
|
pg-int8@1.0.1: {}
|
|
@@ -20062,6 +20293,8 @@ snapshots:
|
|
|
20062
20293
|
pg-protocol: 1.11.0
|
|
20063
20294
|
pg-types: 2.2.0
|
|
20064
20295
|
pgpass: 1.0.5
|
|
20296
|
+
optionalDependencies:
|
|
20297
|
+
pg-cloudflare: 1.3.0
|
|
20065
20298
|
|
|
20066
20299
|
pgpass@1.0.5:
|
|
20067
20300
|
dependencies:
|
|
@@ -21270,6 +21503,32 @@ snapshots:
|
|
|
21270
21503
|
dependencies:
|
|
21271
21504
|
kind-of: 6.0.3
|
|
21272
21505
|
|
|
21506
|
+
sharp@0.33.5:
|
|
21507
|
+
dependencies:
|
|
21508
|
+
color: 4.2.3
|
|
21509
|
+
detect-libc: 2.1.2
|
|
21510
|
+
semver: 7.7.3
|
|
21511
|
+
optionalDependencies:
|
|
21512
|
+
'@img/sharp-darwin-arm64': 0.33.5
|
|
21513
|
+
'@img/sharp-darwin-x64': 0.33.5
|
|
21514
|
+
'@img/sharp-libvips-darwin-arm64': 1.0.4
|
|
21515
|
+
'@img/sharp-libvips-darwin-x64': 1.0.4
|
|
21516
|
+
'@img/sharp-libvips-linux-arm': 1.0.5
|
|
21517
|
+
'@img/sharp-libvips-linux-arm64': 1.0.4
|
|
21518
|
+
'@img/sharp-libvips-linux-s390x': 1.0.4
|
|
21519
|
+
'@img/sharp-libvips-linux-x64': 1.0.4
|
|
21520
|
+
'@img/sharp-libvips-linuxmusl-arm64': 1.0.4
|
|
21521
|
+
'@img/sharp-libvips-linuxmusl-x64': 1.0.4
|
|
21522
|
+
'@img/sharp-linux-arm': 0.33.5
|
|
21523
|
+
'@img/sharp-linux-arm64': 0.33.5
|
|
21524
|
+
'@img/sharp-linux-s390x': 0.33.5
|
|
21525
|
+
'@img/sharp-linux-x64': 0.33.5
|
|
21526
|
+
'@img/sharp-linuxmusl-arm64': 0.33.5
|
|
21527
|
+
'@img/sharp-linuxmusl-x64': 0.33.5
|
|
21528
|
+
'@img/sharp-wasm32': 0.33.5
|
|
21529
|
+
'@img/sharp-win32-ia32': 0.33.5
|
|
21530
|
+
'@img/sharp-win32-x64': 0.33.5
|
|
21531
|
+
|
|
21273
21532
|
shebang-command@2.0.0:
|
|
21274
21533
|
dependencies:
|
|
21275
21534
|
shebang-regex: 3.0.0
|
|
@@ -21330,6 +21589,10 @@ snapshots:
|
|
|
21330
21589
|
bplist-parser: 0.3.1
|
|
21331
21590
|
plist: 3.1.0
|
|
21332
21591
|
|
|
21592
|
+
simple-swizzle@0.2.4:
|
|
21593
|
+
dependencies:
|
|
21594
|
+
is-arrayish: 0.3.4
|
|
21595
|
+
|
|
21333
21596
|
simple-wcswidth@1.1.2: {}
|
|
21334
21597
|
|
|
21335
21598
|
slash@1.0.0: {}
|
|
@@ -50,14 +50,3 @@ taro-button-core::after,
|
|
|
50
50
|
button::after {
|
|
51
51
|
border: none;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
/* Vite 错误覆盖层无法选择文本的问题 */
|
|
55
|
-
vite-error-overlay {
|
|
56
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
57
|
-
-webkit-user-select: text !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
vite-error-overlay::part(window) {
|
|
61
|
-
max-width: 90vw;
|
|
62
|
-
padding: 10px;
|
|
63
|
-
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { View, Text } from '@tarojs/components';
|
|
2
|
+
import Taro, { useDidShow, usePageScroll } from '@tarojs/taro';
|
|
3
|
+
import { useState, useEffect, PropsWithChildren, useCallback } from 'react';
|
|
4
|
+
import { ChevronLeft, House } from 'lucide-react-taro';
|
|
5
|
+
|
|
6
|
+
interface NavConfig {
|
|
7
|
+
navigationBarTitleText?: string;
|
|
8
|
+
navigationBarBackgroundColor?: string;
|
|
9
|
+
navigationBarTextStyle?: 'black' | 'white';
|
|
10
|
+
navigationStyle?: 'default' | 'custom';
|
|
11
|
+
transparentTitle?: 'none' | 'always' | 'auto';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
enum LeftIcon {
|
|
15
|
+
Back = 'back',
|
|
16
|
+
Home = 'home',
|
|
17
|
+
None = 'none',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface NavState {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
title: string;
|
|
23
|
+
bgColor: string;
|
|
24
|
+
textStyle: 'black' | 'white';
|
|
25
|
+
navStyle: 'default' | 'custom';
|
|
26
|
+
transparent: 'none' | 'always' | 'auto';
|
|
27
|
+
leftIcon: LeftIcon;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const DEFAULT_NAV_STATE: NavState = {
|
|
31
|
+
visible: false,
|
|
32
|
+
title: '',
|
|
33
|
+
bgColor: '#ffffff',
|
|
34
|
+
textStyle: 'black',
|
|
35
|
+
navStyle: 'default',
|
|
36
|
+
transparent: 'none',
|
|
37
|
+
leftIcon: LeftIcon.None,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getTabBarPages = (): Set<string> => {
|
|
41
|
+
const tabBar = Taro.getApp()?.config?.tabBar;
|
|
42
|
+
return new Set(
|
|
43
|
+
tabBar?.list?.map((item: { pagePath: string }) => item.pagePath) || [],
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const computeLeftIcon = (
|
|
48
|
+
route: string,
|
|
49
|
+
tabBarPages: Set<string>,
|
|
50
|
+
historyLength: number,
|
|
51
|
+
): LeftIcon => {
|
|
52
|
+
if (!route) return LeftIcon.None;
|
|
53
|
+
|
|
54
|
+
const isHomePage =
|
|
55
|
+
route === 'pages/index/index' || route === '/pages/index/index';
|
|
56
|
+
const isTabBarPage = tabBarPages.has(route);
|
|
57
|
+
const hasHistory = historyLength > 1;
|
|
58
|
+
|
|
59
|
+
if (isTabBarPage || isHomePage) return LeftIcon.None;
|
|
60
|
+
if (hasHistory) return LeftIcon.Back;
|
|
61
|
+
return LeftIcon.Home;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const H5NavBar = ({ children }: PropsWithChildren) => {
|
|
65
|
+
const [navState, setNavState] = useState<NavState>(DEFAULT_NAV_STATE);
|
|
66
|
+
const [scrollOpacity, setScrollOpacity] = useState(0);
|
|
67
|
+
|
|
68
|
+
const updateNavState = useCallback(() => {
|
|
69
|
+
const pages = Taro.getCurrentPages();
|
|
70
|
+
const currentPage = pages[pages.length - 1];
|
|
71
|
+
const route = currentPage?.route || '';
|
|
72
|
+
const config: NavConfig = (currentPage as any)?.config || {};
|
|
73
|
+
const tabBarPages = getTabBarPages();
|
|
74
|
+
|
|
75
|
+
const isSinglePageApp = tabBarPages.size <= 1 && pages.length <= 1;
|
|
76
|
+
|
|
77
|
+
setNavState({
|
|
78
|
+
visible: !isSinglePageApp,
|
|
79
|
+
title: config.navigationBarTitleText || '',
|
|
80
|
+
bgColor: config.navigationBarBackgroundColor || '#ffffff',
|
|
81
|
+
textStyle: config.navigationBarTextStyle || 'black',
|
|
82
|
+
navStyle: config.navigationStyle || 'default',
|
|
83
|
+
transparent: config.transparentTitle || 'none',
|
|
84
|
+
leftIcon: isSinglePageApp
|
|
85
|
+
? LeftIcon.None
|
|
86
|
+
: computeLeftIcon(route, tabBarPages, pages.length),
|
|
87
|
+
});
|
|
88
|
+
}, []);
|
|
89
|
+
|
|
90
|
+
useDidShow(() => {
|
|
91
|
+
updateNavState();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
usePageScroll(({ scrollTop }) => {
|
|
95
|
+
if (navState.transparent === 'auto') {
|
|
96
|
+
setScrollOpacity(Math.min(scrollTop / 100, 1));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (TARO_ENV !== 'h5') return;
|
|
102
|
+
|
|
103
|
+
const titleEl = document.querySelector('title') || document.head;
|
|
104
|
+
const observer = new MutationObserver(() => updateNavState());
|
|
105
|
+
observer.observe(titleEl, {
|
|
106
|
+
subtree: true,
|
|
107
|
+
childList: true,
|
|
108
|
+
characterData: true,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return () => observer.disconnect();
|
|
112
|
+
}, [updateNavState]);
|
|
113
|
+
|
|
114
|
+
if (
|
|
115
|
+
TARO_ENV !== 'h5' ||
|
|
116
|
+
navState.navStyle === 'custom' ||
|
|
117
|
+
!navState.visible
|
|
118
|
+
) {
|
|
119
|
+
return <>{children}</>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const iconColor = navState.textStyle === 'white' ? '#fff' : '#333';
|
|
123
|
+
const textColorClass =
|
|
124
|
+
navState.textStyle === 'white' ? 'text-white' : 'text-gray-800';
|
|
125
|
+
|
|
126
|
+
const getBgStyle = () => {
|
|
127
|
+
if (navState.transparent === 'always') {
|
|
128
|
+
return { backgroundColor: 'transparent' };
|
|
129
|
+
}
|
|
130
|
+
if (navState.transparent === 'auto') {
|
|
131
|
+
return { backgroundColor: navState.bgColor, opacity: scrollOpacity };
|
|
132
|
+
}
|
|
133
|
+
return { backgroundColor: navState.bgColor };
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const handleBack = () => Taro.navigateBack();
|
|
137
|
+
const handleGoHome = () => Taro.switchTab({ url: '/pages/index/index' });
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<View className="flex flex-col h-full">
|
|
141
|
+
<View
|
|
142
|
+
className={`fixed top-0 left-0 right-0 h-11 flex items-center justify-center z-1000 ${navState.transparent === 'none' ? 'border-b border-gray-200' : ''}`}
|
|
143
|
+
style={getBgStyle()}
|
|
144
|
+
>
|
|
145
|
+
{navState.leftIcon === LeftIcon.Back && (
|
|
146
|
+
<View
|
|
147
|
+
className="absolute left-2 top-1/2 -translate-y-1/2 p-1 flex items-center justify-center"
|
|
148
|
+
onClick={handleBack}
|
|
149
|
+
>
|
|
150
|
+
<ChevronLeft size={24} color={iconColor} />
|
|
151
|
+
</View>
|
|
152
|
+
)}
|
|
153
|
+
{navState.leftIcon === LeftIcon.Home && (
|
|
154
|
+
<View
|
|
155
|
+
className="absolute left-2 top-1/2 -translate-y-1/2 p-1 flex items-center justify-center"
|
|
156
|
+
onClick={handleGoHome}
|
|
157
|
+
>
|
|
158
|
+
<House size={22} color={iconColor} />
|
|
159
|
+
</View>
|
|
160
|
+
)}
|
|
161
|
+
<Text
|
|
162
|
+
className={`text-base font-medium max-w-3/5 truncate ${textColorClass}`}
|
|
163
|
+
>
|
|
164
|
+
{navState.title}
|
|
165
|
+
</Text>
|
|
166
|
+
</View>
|
|
167
|
+
<View className="h-11 shrink-0" />
|
|
168
|
+
<View className="pb-11 h-full">{children}</View>
|
|
169
|
+
</View>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* 如无必要,请勿修改本文件
|
|
4
4
|
*/
|
|
5
5
|
export function injectH5Styles() {
|
|
6
|
-
if (TARO_ENV !== 'h5') return
|
|
6
|
+
if (TARO_ENV !== 'h5') return;
|
|
7
7
|
|
|
8
|
-
const style = document.createElement('style')
|
|
8
|
+
const style = document.createElement('style');
|
|
9
9
|
style.innerHTML = `
|
|
10
10
|
/* H5 端隐藏 TabBar 空图标(只隐藏没有 src 的图标) */
|
|
11
11
|
.weui-tabbar__icon:not([src]),
|
|
@@ -17,6 +17,17 @@ export function injectH5Styles() {
|
|
|
17
17
|
.weui-tabbar__item:has(.weui-tabbar__icon[src='']) .weui-tabbar__label {
|
|
18
18
|
margin-top: 0 !important;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
|
|
21
|
+
/* Vite 错误覆盖层无法选择文本的问题 */
|
|
22
|
+
vite-error-overlay {
|
|
23
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
24
|
+
-webkit-user-select: text !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
vite-error-overlay::part(window) {
|
|
28
|
+
max-width: 90vw;
|
|
29
|
+
padding: 10px;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
document.head.appendChild(style);
|
|
22
33
|
}
|