From 953d3d44267d2c1f9f85bc4e51fbddcc72ae7476 Mon Sep 17 00:00:00 2001 From: oasis Date: Thu, 14 Nov 2024 18:37:13 +0800 Subject: [PATCH 1/5] docs: components can be searched --- packages/nutui-taro-demo/src/pages/index/index.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/nutui-taro-demo/src/pages/index/index.tsx b/packages/nutui-taro-demo/src/pages/index/index.tsx index 54de2dd9b4..2bd2fecd60 100644 --- a/packages/nutui-taro-demo/src/pages/index/index.tsx +++ b/packages/nutui-taro-demo/src/pages/index/index.tsx @@ -1,21 +1,17 @@ import Taro from '@tarojs/taro' +import { useState } from 'react' import { View, Image, Text, ScrollView, Button, Input, Video } from '@tarojs/components' import pkg from '@/packages/../config.json' import packageJson from '@/packages/../../package.json' import './index.scss' -// import Schema from 'async-validator' const navs = pkg.nav -// console.log(navs) - // hack taro load button xml console.log(Button, Input, Video ) -// try { -// console.log('xxx', Schema) -// } catch (e) {} const Index = () => { + const [search, setSearch] = useState() const gotoNext = (name: string, enName: string) => { // 跳转到目的页面,打开新页面 Taro.navigateTo({ @@ -55,6 +51,9 @@ const Index = () => { + { + setSearch(e.detail.value) + }} /> {navs.map((nav) => ( @@ -63,7 +62,7 @@ const Index = () => { )} {nav.packages.map((com) => - com.show && com.taro && com.version === '3.0.0' ? ( + com.show && com.taro && com.version === '3.0.0' && (!search || search == com.name.toLowerCase()) ? ( Date: Mon, 2 Dec 2024 15:52:21 +0800 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20=E4=BB=85=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=87=BA=E7=8E=B0=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nutui-taro-demo/src/pages/index/index.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/nutui-taro-demo/src/pages/index/index.tsx b/packages/nutui-taro-demo/src/pages/index/index.tsx index fb59ad8b5d..e4fc4db883 100644 --- a/packages/nutui-taro-demo/src/pages/index/index.tsx +++ b/packages/nutui-taro-demo/src/pages/index/index.tsx @@ -1,7 +1,7 @@ import Taro from '@tarojs/taro' import { useState } from 'react' import { Button, Image, Input, ScrollView, Swiper, SwiperItem, Text, Video, View } from '@tarojs/components' -import {SearchBar} from '@/packages/searchbar/searchbar' +import { SearchBar } from '@/packages/searchbar/searchbar' import pkg from '@/packages/../config.json' import packageJson from '@/packages/../../package.json' import './index.scss' @@ -54,10 +54,12 @@ const Index = () => { - { - setSearch(e) - }} /> - + {process.env.NODE_ENV === 'development' ? <> + { + setSearch(e) + }} /> + + : null} {navs.map((nav) => ( {nav.enName === 'dataentry' ? null : ( From 83cc24c0b14e9bd82bb9dceb7b694403134f7b93 Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Wed, 4 Dec 2024 18:28:04 +0800 Subject: [PATCH 3/5] fix: merge conflict --- packages/nutui-taro-demo/src/pages/index/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nutui-taro-demo/src/pages/index/index.tsx b/packages/nutui-taro-demo/src/pages/index/index.tsx index e5ce78bc1c..efd8664296 100644 --- a/packages/nutui-taro-demo/src/pages/index/index.tsx +++ b/packages/nutui-taro-demo/src/pages/index/index.tsx @@ -73,6 +73,7 @@ const Index = () => { setSearch(e) }} /> + : null} {navs.map((nav) => ( {nav.enName === 'dataentry' ? null : ( @@ -93,7 +94,7 @@ const Index = () => { {com.name} - ) : null, + ) : null )} From 8061c803722aa2a67b357e812dcecbe738817dbe Mon Sep 17 00:00:00 2001 From: oasis Date: Wed, 4 Dec 2024 20:21:23 +0800 Subject: [PATCH 4/5] chore: update --- packages/nutui-taro-demo/src/pages/index/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nutui-taro-demo/src/pages/index/index.tsx b/packages/nutui-taro-demo/src/pages/index/index.tsx index efd8664296..2252ac79f1 100644 --- a/packages/nutui-taro-demo/src/pages/index/index.tsx +++ b/packages/nutui-taro-demo/src/pages/index/index.tsx @@ -12,7 +12,7 @@ import { Video, Textarea, } from '@tarojs/components' -import { SearchBar } from '@/packages/searchbar/searchbar' +import { SearchBar } from '@/packages/searchbar/searchbar.taro' import pkg from '@/packages/../config.json' import packageJson from '@/packages/../../package.json' import './index.scss' From 6e00250d7f9f81cf316ac492a3bdf50afa9d8f1b Mon Sep 17 00:00:00 2001 From: oasis Date: Thu, 5 Dec 2024 16:41:57 +0800 Subject: [PATCH 5/5] fix: review --- packages/nutui-taro-demo/config/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nutui-taro-demo/config/index.js b/packages/nutui-taro-demo/config/index.js index b3968fc8e6..2e1144013f 100644 --- a/packages/nutui-taro-demo/config/index.js +++ b/packages/nutui-taro-demo/config/index.js @@ -71,7 +71,12 @@ const config = { sourceRoot: 'src', outputRoot: `dist/${process.env.TARO_ENV === 'h5' ? 'demo' : process.env.TARO_ENV}`, plugins: [...plugins], - compiler: 'webpack5', + compiler: { + type: 'webpack5', + prebundle: { + exclude: ['@nutui/icons-react-taro'] + }, + }, alias: process.env.TARO_ENV === 'rn' || process.env.TARO_ENV === 'jdrn' ? {