Commit de8eb42f0f11be7e76cd9b3ce0ad16766b93921a

Authored by 张志伟
1 parent cfc13669

🐱 feat(*): 更新组件库版本

package.json
... ... @@ -23,7 +23,7 @@
23 23 "dist/"
24 24 ],
25 25 "dependencies": {
26   - "@feewee/h5app-common": "^0.1.5",
  26 + "@feewee/h5app-common": "^0.1.7",
27 27 "@modern-js/plugin-tailwindcss": "2.48.5",
28 28 "@modern-js/runtime": "2.48.5",
29 29 "ahooks": "^3.7.11",
... ...
pnpm-lock.yaml
... ... @@ -6,8 +6,8 @@ settings:
6 6  
7 7 dependencies:
8 8 '@feewee/h5app-common':
9   - specifier: ^0.1.5
10   - version: 0.1.5(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.4.3)
  9 + specifier: ^0.1.7
  10 + version: 0.1.7(react-dom@18.2.0)(react@18.2.0)
11 11 '@modern-js/plugin-tailwindcss':
12 12 specifier: 2.48.5
13 13 version: 2.48.5(@modern-js/runtime@2.48.5)(tailwindcss@3.4.3)
... ... @@ -1829,20 +1829,18 @@ packages:
1829 1829 - supports-color
1830 1830 dev: true
1831 1831  
1832   - /@feewee/h5app-common@0.1.5(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.4.3):
1833   - resolution: {integrity: sha512-x2ow9qBrPZcQfFKI83XHD1vIOsPNcn6vzqb6t2DrDNVUCsnzufpk+a1BNSLVgCndHxhfCt2QHpPfwb5gXnMteg==}
  1832 + /@feewee/h5app-common@0.1.7(react-dom@18.2.0)(react@18.2.0):
  1833 + resolution: {integrity: sha512-GCah1XFT46nePzysKdAOGHAmG7Z2k8w5ZICBnbqofceBODeUGXjDKCaziOqVHEWQH4ZUyrfUCtagvRdfY4z8Sw==}
1834 1834 engines: {node: '>=18', npm: '>=6.9.0'}
1835 1835 peerDependencies:
1836 1836 react: '>=18'
1837 1837 react-dom: '>=18'
1838   - tailwindcss: ~3.3.3
1839 1838 dependencies:
1840 1839 '@nutui/icons-react': 1.0.4
1841 1840 '@nutui/nutui-react': 2.6.0(react-dom@18.2.0)(react@18.2.0)
1842 1841 clsx: 2.1.0
1843 1842 react: 18.2.0
1844 1843 react-dom: 18.2.0(react@18.2.0)
1845   - tailwindcss: 3.4.3
1846 1844 dev: false
1847 1845  
1848 1846 /@humanwhocodes/config-array@0.11.14:
... ...
src/routes/demo/page.tsx
1 1 import { Helmet } from '@modern-js/runtime/head';
2   -import { ListRow } from '@feewee/h5app-common';
  2 +import { ListRow, Button } from '@feewee/h5app-common';
3 3  
4 4 const Index = () => (
5 5 <>
... ... @@ -9,6 +9,7 @@ const Index = () =&gt; (
9 9 <main className="p-4">
10 10 <div>demo 页面</div>
11 11 <ListRow title="标题" description="副标题" extra="描述文字" radius={6} align="center" onClick={() => console.info('点击事件')} />
  12 + <Button type="primary">默认</Button>
12 13 </main>
13 14 </>
14 15 );
... ...
src/routes/index.css deleted
1   -html,
2   -body {
3   - padding: 0;
4   - margin: 0;
5   - font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
6   - background: linear-gradient(to bottom, transparent, #fff) #eceeef;
7   -}
8   -
9   -p {
10   - margin: 0;
11   -}
12   -
13   -* {
14   - -webkit-font-smoothing: antialiased;
15   - -moz-osx-font-smoothing: grayscale;
16   - box-sizing: border-box;
17   -}
18   -
19   -.container-box {
20   - min-height: 100vh;
21   - max-width: 100%;
22   - display: flex;
23   - flex-direction: column;
24   - justify-content: center;
25   - align-items: center;
26   - padding-top: 10px;
27   -}
28   -
29   -main {
30   - flex: 1;
31   - display: flex;
32   - flex-direction: column;
33   - justify-content: center;
34   - align-items: center;
35   -}
36   -
37   -.title {
38   - display: flex;
39   - margin: 4rem 0 4rem;
40   - align-items: center;
41   - font-size: 4rem;
42   - font-weight: 600;
43   -}
44   -
45   -.logo {
46   - width: 6rem;
47   - margin: 7px 0 0 1rem;
48   -}
49   -
50   -.name {
51   - color: #4ecaff;
52   -}
53   -
54   -.description {
55   - text-align: center;
56   - line-height: 1.5;
57   - font-size: 1.3rem;
58   - color: #1b3a42;
59   - margin-bottom: 5rem;
60   -}
61   -
62   -.code {
63   - background: #fafafa;
64   - border-radius: 12px;
65   - padding: 0.6rem 0.9rem;
66   - font-size: 1.05rem;
67   - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
68   - Bitstream Vera Sans Mono, Courier New, monospace;
69   -}
70   -
71   -.container-box .grid {
72   - display: flex;
73   - align-items: center;
74   - justify-content: center;
75   - width: 1100px;
76   - margin-top: 3rem;
77   -}
78   -
79   -.card {
80   - padding: 1.5rem;
81   - display: flex;
82   - flex-direction: column;
83   - justify-content: center;
84   - height: 100px;
85   - color: inherit;
86   - text-decoration: none;
87   - transition: 0.15s ease;
88   - width: 45%;
89   -}
90   -
91   -.card:hover,
92   -.card:focus {
93   - transform: scale(1.05);
94   -}
95   -
96   -.card h2 {
97   - display: flex;
98   - align-items: center;
99   - font-size: 1.5rem;
100   - margin: 0;
101   - padding: 0;
102   -}
103   -
104   -.card p {
105   - opacity: 0.6;
106   - font-size: 0.9rem;
107   - line-height: 1.5;
108   - margin-top: 1rem;
109   -}
110   -
111   -.arrow-right {
112   - width: 1.3rem;
113   - margin-left: 0.5rem;
114   - margin-top: 3px;
115   -}
src/routes/page.tsx
1 1 import { Helmet } from '@modern-js/runtime/head';
2   -import './index.css';
3 2  
4 3 const Index = () => (
5   - <div className="container-box">
  4 + <>
6 5 <Helmet>
7 6 <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" />
8 7 </Helmet>
9   - <main>
10   - <div className="title">
11   - Welcome to
12   - <img
13   - className="logo"
14   - src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
15   - alt="Modern.js Logo"
16   - />
17   - <p className="name">Modern.js</p>
18   - </div>
19   - <p className="description">
20   - Get started by editing <code className="code">src/routes/page.tsx</code>
21   - </p>
22   - <div className="grid">
23   - <a href="https://modernjs.dev/guides/get-started/introduction.html" target="_blank" rel="noopener noreferrer" className="card">
24   - <h2>
25   - Guide
26   - <img className="arrow-right" src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg" />
27   - </h2>
28   - <p>Follow the guides to use all features of Modern.js.</p>
29   - </a>
30   - <a href="https://modernjs.dev/tutorials/foundations/introduction.html" target="_blank" className="card" rel="noreferrer">
31   - <h2>
32   - Tutorials
33   - <img className="arrow-right" src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg" />
34   - </h2>
35   - <p>Learn to use Modern.js to create your first application.</p>
36   - </a>
37   - <a href="https://modernjs.dev/configure/app/usage.html" target="_blank" className="card" rel="noreferrer">
38   - <h2>
39   - Config
40   - <img className="arrow-right" src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg" />
41   - </h2>
42   - <p>Find all configuration options provided by Modern.js.</p>
43   - </a>
44   - <a href="https://github.com/web-infra-dev/modern.js" target="_blank" rel="noopener noreferrer" className="card">
45   - <h2>
46   - Github
47   - <img className="arrow-right" src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg" />
48   - </h2>
49   - <p>View the source code of Github, feel free to contribute.</p>
50   - </a>
51   - </div>
  8 + <main className="p-4">
  9 + <div>这是首页 页面</div>
52 10 </main>
53   - </div>
  11 + </>
54 12 );
55 13  
56 14 export default Index;
... ...