Skip to content

Commit

Permalink
feat: 为京东小程序添加 Editor、PageContainer、RootPortal组件和属性
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEJIA-LIU committed Aug 20, 2024
1 parent 3f07b6b commit f53db06
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/taro-platform-jd/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'node:path'
import { fileURLToPath } from 'node:url'

import { nodeResolve } from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import externals from 'rollup-plugin-node-externals'

Expand All @@ -9,6 +10,7 @@ const cwd = path.dirname(__filename)

const base = {
plugins: [
nodeResolve(),
externals({
peerDeps: true,
}),
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-platform-jd/src/components-react.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// For React.createElement's type
export * from '@tarojs/components/mini'
export const Editor = 'editor'

export const PageContainer = 'page-container'
export const RootPortal = 'root-portal'
35 changes: 35 additions & 0 deletions packages/taro-platform-jd/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,39 @@ export const components = {
'adjust-position': 'true',
'disable-default-padding': 'false',
},
RootPortal: {
enable: 'true'
},
Editor: {
'read-only': 'false',
placeholder: '',
'show-img-size': 'false',
'show-img-toolbar': 'false',
'show-img-resize': 'false',
focus: 'false',
bindReady: '',
bindFocus: '',
bindBlur: '',
bindInput: '',
bindStatusChange: '',
name: ''
},
PageContainer: {
show: 'false',
duration: '300',
'z-index': '100',
overlay: 'true',
position: "'bottom'",
round: 'false',
'close-on-slide-down': 'false',
'overlay-style': '',
'custom-style': '',
bindBeforeEnter: '',
bindEnter: '',
bindAfterEnter: '',
bindBeforeLeave: '',
bindLeave: '',
bindAfterLeave: '',
bindClickOverlay: ''
},
}

0 comments on commit f53db06

Please sign in to comment.