Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
"@nutui/icons-react-taro": "^3.0.1",
"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
"@nutui/touch-emulator": "^1.0.0",
"@nutui/lottie-miniprogram": "^1.0.1",
"@react-spring/web": "~9.6.1",
"@swc/helpers": "^0.5.7",
"@use-gesture/react": "10.2.20",
"async-validator": "^4.2.5",
"classnames": "^2.5.1",
"codesandbox": "^2.2.3",
"lodash.kebabcase": "^4.1.1",
"lottie-miniprogram": "^1.0.12",
"lottie-react": "^2.4.0",
"react-fast-compare": "^3.2.2",
"react-transition-group": "^4.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/nutui-taro-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@jdtaro/plugin-platform-jdharmony-cpp": "0.1.29-beta.0",
"@nutui/replace-icons": "^1.0.0",
"@nutui/touch-emulator": "^1.0.0",
"@nutui/lottie-miniprogram": "^1.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@tarojs/components": "4.0.8-beta.1",
"@tarojs/helper": "4.0.8-beta.1",
Expand All @@ -84,7 +85,6 @@
"babel-plugin-import": "^1.13.8",
"lodash.isequal": "^4.5.0",
"lodash.kebabcase": "^4.1.1",
"lottie-miniprogram": "^1.0.12",
"lottie-react": "^2.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions scripts/harmony/update-taro-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
const fse = require('fs-extra')
const config = require('../../src/config.json')
const param = process.env.C
// G=nav pnpm dev:jdtaro:jdharmonycpp
// base | layout | nav | dentry | dataentry | feedback | exhibition | business
// G=nav pnpm dev:jdtaro:jdharmonycpp
// base | layout | nav | dentry | dataentry | feedback | exhibition | business
const paramG = process.env.G

// C=radio pnpm dev:jdtaro:jdharmonycpp or C=radio,button,cell pnpm dev:jdtaro:jdharmonycpp
const specialComponent = (name) => {
if (!param) return true
Expand Down Expand Up @@ -36,7 +36,7 @@ const createConfig = async () => {
co.pages.push(`pages/${it.name.toLowerCase()}/index`)
}
})
}
}
} else {
item.packages.map((it) => {
if (isShow(it)) {
Expand Down Expand Up @@ -68,6 +68,7 @@ export default defineAppConfig({
navigationBarTitleText: 'NutUI-React',
navigationBarTextStyle: 'black'
},
renderingMode: 'mixed',
components: ['pages/index/index', ...(subPackages.map(subPackage => {
return subPackage.pages.map(page => \`\${subPackage.root}/\${page}\`)
}).flat())]
Expand Down
1 change: 1 addition & 0 deletions scripts/taro/generate-taro-route.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default defineAppConfig ({
navigationBarTitleText: 'NutUI-React',
navigationBarTextStyle: 'black'
},
renderingMode: 'mixed',
components: ['pages/index/index', ...(subPackages.map(subPackage => {
return subPackage.pages.map(page => \`\${subPackage.root}/\${page}\`)
}).flat())]
Expand Down
2 changes: 2 additions & 0 deletions src/packages/lottie/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import { Lottie } from '@nutui/nutui-react-taro'

:::

> 提示:京东小程序开发工作无法展示,可使用真机预览

## Lottie

### Props
Expand Down
6 changes: 3 additions & 3 deletions src/packages/lottie/index.taro.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentType } from 'react'
import { Lottie as LottieWeb } from './web.taro'
import { Lottie as LottieMp } from './mp.taro'
import { Lottie as LottieWeb } from './lottieweb.taro'
import { Lottie as LottieMp } from './lottiemp.taro'
import { TaroLottieProps } from '@/types'

export type { TaroLottieProps as LottieProps } from '@/types'
Expand All @@ -9,7 +9,7 @@ let implementation
if (process.env.TARO_ENV === 'h5') {
// @ts-ignore
implementation = LottieWeb
} else if (process.env.TARO_ENV === 'weapp') {
} else if (process.env.TARO_ENV === 'weapp' || process.env.TARO_ENV === 'jd') {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { miniprogram } from '@/utils/platform-taro' 是不是可以直接用这个判断

// @ts-ignore
implementation = LottieMp
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/lottie/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Lottie } from './web'
import { Lottie } from './lottie'

export type { WebLottieProps as LottieProps } from '@/types'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useImperativeHandle, useRef } from 'react'
import { createSelectorQuery, getEnv, useReady, useUnload } from '@tarojs/taro'
import lottie from 'lottie-miniprogram'
import lottie from '@nutui/lottie-miniprogram'
import { getWindowInfo } from '@/utils/get-system-info'
import useUuid from '@/hooks/use-uuid'
import { TaroLottieProps } from '@/types'
Expand Down