@gm-mobile/c-react 3.9.4-alpha.1 → 3.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-mobile/c-react",
3
- "version": "3.9.4-alpha.1",
3
+ "version": "3.9.5",
4
4
  "description": "> TODO: description",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-mobile#readme",
@@ -21,9 +21,9 @@
21
21
  "url": "https://github.com/gmfe/gm-mobile/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@gm-mobile/c-font": "^3.9.4-alpha.1",
25
- "@gm-mobile/c-tool": "^3.9.4-alpha.1",
26
- "@gm-mobile/locales": "^3.9.4-alpha.1"
24
+ "@gm-mobile/c-font": "^3.9.5",
25
+ "@gm-mobile/c-tool": "^3.9.5",
26
+ "@gm-mobile/locales": "^3.9.5"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@tarojs/components": "3.0.18",
@@ -33,5 +33,5 @@
33
33
  "prop-types": "^15.7.2",
34
34
  "react": "^16.13.1"
35
35
  },
36
- "gitHead": "f1a569a69183bcbf9503f1903569db1cf329714a"
36
+ "gitHead": "1176f3bd0ebcb47ef118f261af6db248f7037c68"
37
37
  }
@@ -12,6 +12,7 @@ import {
12
12
  DialogStaticsTypes,
13
13
  RenderOptions,
14
14
  } from './types'
15
+ import classNames from 'classnames'
15
16
 
16
17
  const ErrorInput: FC<ErrorInputProps> = ({
17
18
  getError,
@@ -170,9 +171,11 @@ const DialogBase: FC<DialogBaseProps> = ({
170
171
  onOther,
171
172
  hideBottom,
172
173
  children,
174
+ className,
175
+ ...rest
173
176
  }) => {
174
177
  return (
175
- <View className='m-dialog-container'>
178
+ <View className={classNames('m-dialog-container', className)} {...rest}>
176
179
  <Mask
177
180
  onClick={() => {
178
181
  /**
@@ -1,4 +1,4 @@
1
- import React, { InputHTMLAttributes } from 'react'
1
+ import React, { HTMLAttributes, InputHTMLAttributes } from 'react'
2
2
  import { InputProps as TaroInputProps } from '@tarojs/components/types/Input'
3
3
  import { CommonEventFunction } from '@tarojs/components'
4
4
 
@@ -7,7 +7,7 @@ interface ErrorInputProps extends InputProps {
7
7
  defaultValue?: string
8
8
  }
9
9
 
10
- interface DialogBaseProps {
10
+ interface DialogBaseProps extends HTMLAttributes<HTMLDivElement> {
11
11
  onConfirm?: (value?: string) => Promise<void>
12
12
  title?: string
13
13
  confirmText?: string
@@ -32,7 +32,7 @@ interface PromptOptions {
32
32
  onConfirm?: (value: string) => void | boolean
33
33
  }
34
34
 
35
- interface RenderOptions extends PromptOptions {
35
+ interface RenderOptions extends PromptOptions, HTMLAttributes<HTMLDivElement> {
36
36
  children?: string | React.ReactNode
37
37
  confirmText?: React.ReactNode
38
38
  onCancel?: () => void
@@ -32,7 +32,7 @@ const Item: FC<VListItemProps> = memo(
32
32
  const doLazy = (event: CustomEvent<{ scrollTop: number }>): void => {
33
33
  const { scrollTop } = event.detail
34
34
  if (
35
- (itemIndex + 1) * itemHeight < scrollTop - distance ||
35
+ (itemIndex + 2) * itemHeight < scrollTop - distance ||
36
36
  itemIndex * itemHeight > scrollTop + listHeight + distance
37
37
  ) {
38
38
  // unshow