Skip to content

Commit

Permalink
feat: v15 适配demo页面
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyatong committed Dec 27, 2024
1 parent a91e0e2 commit 5c6068e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/nutui-taro-demo/src/pages/index/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ body {
}
&-components {
background: #f7f8fa;
border-radius: 30px 30px 0 0;
border-radius: 12px 12px 0 0;
padding: 30px 25px;
&-item {
margin-bottom: 17px;
Expand All @@ -116,7 +116,7 @@ body {
height: 45px;
line-height: 45px;
background: rgba(255, 255, 255, 1);
border-radius: 22px;
border-radius: 8px;
box-shadow: 0px 1px 4px 0px rgba(102, 102, 102, 0.06);
margin-bottom: 13px;
&-content {
Expand Down
2 changes: 1 addition & 1 deletion packages/nutui-taro-demo/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Index = () => {

<View className='index-components'>
{process.env.NODE_ENV === 'development' ? <>
<SearchBar style={{ background: '#fff' }} placeholder='' value={search} onChange={(e) => {
<SearchBar style={{ background: '#fff',borderRadius:'8px' }} placeholder='' value={search} onChange={(e) => {
setSearch(e)
}} />
<View style={{ height: 25 }}></View>
Expand Down
4 changes: 2 additions & 2 deletions scripts/rn/copy-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ console.log('rn copy-file.js args', args)
const adaptedArray = []
config.nav.map((item) => {
item.packages.forEach((element) => {
const { name, version } = element
if (version !== '3.0.0') return // 未适配不导出
const { name, version,v15 } = element
if (!v15) return // 未适配不导出
adaptedArray.push({
...element,
lowercaseName: element.name.toLowerCase(),
Expand Down
4 changes: 2 additions & 2 deletions scripts/rn/update-taro-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function specialComponent(name) {
const adaptedArray = []
config.nav.map((item) => {
item.packages.forEach((element) => {
const { name, version } = element
if (version !== '3.0.0') return // 未适配不导出
const { name, version,v15 } = element
if (!v15) return // 未适配不导出
if (specialComponent(name)) return
adaptedArray.push({
...element,
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync-to-taro-playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function main() {
pages: [],
})
nav.packages.forEach((package) => {
if (package.version === '3.0.0' && package.show) {
if (package.v15 && package.show) {
const name = package.name.toLowerCase()
v3.push(name)
subPackages[subPackages.length - 1].pages.push(`pages/${name}/index`)
Expand Down
4 changes: 2 additions & 2 deletions scripts/taro/generate-taro-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const config = require('../../src/config.json')
const adaptedArray = []
config.nav.map((item) => {
item.packages.forEach((element) => {
const { name, version } = element
if (version !== '3.0.0') return // 未适配不导出
const { name, version,v15 } = element
if (!v15) return // 未适配不导出
adaptedArray.push(element.name.toLowerCase())
})
})
Expand Down
27 changes: 25 additions & 2 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"sort": 1,
"show": true,
"taro": true,
"v15": true,
"author": ""
},
{
Expand All @@ -90,6 +91,7 @@
"sort": 2,
"show": true,
"taro": true,
"v15": true,
"author": "songsong"
},
{
Expand All @@ -102,6 +104,7 @@
"show": false,
"taro": true,
"exportEmpty": true,
"v15": true,
"author": "songsong"
},
{
Expand All @@ -114,6 +117,7 @@
"show": true,
"exportEmpty": true,
"taro": true,
"v15": true,
"author": "hanyuxinting"
},
{
Expand All @@ -126,6 +130,7 @@
"show": true,
"taro": true,
"exclude": true,
"v15": true,
"author": "oasis-cloud"
},
{
Expand All @@ -138,6 +143,7 @@
"sort": 8,
"show": true,
"taro": true,
"v15": true,
"author": "vickyYE"
},
{
Expand All @@ -149,6 +155,7 @@
"sort": 5,
"show": true,
"taro": true,
"v15": true,
"author": "junjun"
}
]
Expand Down Expand Up @@ -177,6 +184,7 @@
"sort": 7,
"show": true,
"taro": true,
"v15": true,
"author": "vickyYE"
},
{
Expand All @@ -201,6 +209,7 @@
"show": false,
"taro": true,
"exportEmpty": true,
"v15": true,
"author": "yangxiaolu"
},
{
Expand Down Expand Up @@ -308,6 +317,7 @@
"sort": 5,
"show": true,
"taro": true,
"v15": true,
"author": "Ymm0008"
},
{
Expand All @@ -320,6 +330,7 @@
"sort": 5,
"show": false,
"taro": true,
"v15": true,
"author": "Ymm0008"
},
{
Expand Down Expand Up @@ -376,6 +387,7 @@
"sort": 2,
"show": true,
"taro": true,
"v15": true,
"author": "dsj"
},
{
Expand All @@ -386,6 +398,7 @@
"type": "component",
"show": false,
"taro": true,
"v15": true,
"exportEmpty": true,
"desc": "标签栏子组件",
"author": "dsj"
Expand All @@ -397,6 +410,7 @@
"cName": "选项卡切换子组件",
"type": "component",
"show": false,
"v15": true,
"exportEmpty": true,
"desc": "选项卡切换子组件",
"author": "张晶发"
Expand All @@ -410,6 +424,7 @@
"sort": 12,
"show": true,
"taro": true,
"v15": true,
"author": "oasis"
}
]
Expand Down Expand Up @@ -493,6 +508,7 @@
"desc": "多选按钮组",
"sort": 11,
"show": false,
"v15": true,
"exportEmpty": true,
"author": "oasis"
},
Expand Down Expand Up @@ -551,6 +567,7 @@
"sort": 3,
"show": true,
"taro": true,
"v15": true,
"author": "swag~jun"
}
]
Expand Down Expand Up @@ -625,6 +642,7 @@
"sort": 10,
"exportEmpty": true,
"show": false,
"v15": true,
"author": "oasis"
},
{
Expand Down Expand Up @@ -757,17 +775,19 @@
"sort": 12,
"show": true,
"taro": true,
"v15": true,
"author": "yangjinjun3"
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "Drag",
"type": "component",
"cName": "拖拽",
"desc": "实现可拖拽的任意元素",
"sort": 1,
"show": true,
"taro": true,
"v15": true,
"author": "songsong"
},
{
Expand Down Expand Up @@ -816,6 +836,7 @@
"sort": 15,
"show": true,
"taro": true,
"v15": true,
"author": "mike8625"
},
{
Expand All @@ -842,14 +863,15 @@
"author": "vickyYE"
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "Popover",
"type": "component",
"cName": "气泡弹出框",
"desc": "气泡弹出框",
"sort": 19,
"show": true,
"taro": true,
"v15": true,
"author": "lzz"
},
{
Expand All @@ -874,6 +896,7 @@
"sort": 10,
"show": true,
"taro": true,
"v15": true,
"author": "oasis"
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/sites/mobile/Links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
&-components {
background: #f7f8fa;
border-radius: 30px 30px 0 0;
border-radius: 12px 12px 0 0;
padding: 30px 25px;
> ol {
margin-bottom: 17px;
Expand All @@ -52,7 +52,7 @@
height: 45px;
line-height: 45px;
background: rgba(255, 255, 255, 1);
border-radius: 22px;
border-radius: 8px;
box-shadow: 0px 1px 4px 0px rgba(102, 102, 102, 0.06);
margin-bottom: 13px;
a {
Expand Down

0 comments on commit 5c6068e

Please sign in to comment.