Skip to content

Commit

Permalink
chore(release): publish 3.6.0 (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuolung authored Feb 26, 2025
1 parent b43ab7f commit f7414c7
Show file tree
Hide file tree
Showing 101 changed files with 945 additions and 122 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# [](https://github.com/AntmJS/vantui/compare/v3.5.5...v) (2025-02-19)
# [](https://github.com/AntmJS/vantui/compare/v3.5.6...v) (2025-02-26)


### Bug Fixes

* 修复image组件加载报错,依旧展示loading图片问题 ([adfe471](https://github.com/AntmJS/vantui/commit/adfe471cdda0c4faaabc7faac2fbbb33d684afd9))
* 修复签名组件在微信基础库3.7.8的兼容性问题 ([#739](https://github.com/AntmJS/vantui/issues/739)) ([b43ab7f](https://github.com/AntmJS/vantui/commit/b43ab7f0a7c6db65372cc05bd92ab82585efbcb3))


### Features

* 新增default-props方法 ([afef560](https://github.com/AntmJS/vantui/commit/afef560e9a258db2b3eb57476e4df4b5147a5067))



## [3.5.6](https://github.com/AntmJS/vantui/compare/v3.5.5...v3.5.6) (2025-02-19)


### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"**/*.md",
"**/__test__/**"
],
"version": "3.5.6"
"version": "3.6.0"
}
2 changes: 1 addition & 1 deletion packages/vantui-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antmjs/vantui-cli",
"version": "3.5.6",
"version": "3.6.0",
"type": "module",
"main": "dest/cli.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vantui-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vantui-demo",
"version": "3.5.6",
"version": "3.6.0",
"private": true,
"description": "Taro应用模版",
"templateInfo": {
Expand Down
1 change: 1 addition & 0 deletions packages/vantui-demo/src/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export default {
'pages/space/index',
'pages/image-viewer/index',
'pages/image-cropper/index',
'pages/default-props/index',
],
window: {
navigationBarBackgroundColor: '#f8f8f8',
Expand Down
4 changes: 4 additions & 0 deletions packages/vantui-demo/src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"path": "config-provider",
"title": "ConfigProvider 全局配置"
},
{
"path": "default-props",
"title": "defaultProps 默认参数配置"
},
{
"path": "icon",
"title": "Icon 图标"
Expand Down
4 changes: 4 additions & 0 deletions packages/vantui-demo/src/pages/default-props/index.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
navigationBarTitleText: 'default-props 默认参数配置',
enableShareAppMessage: true,
}
5 changes: 5 additions & 0 deletions packages/vantui-demo/src/pages/default-props/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Demo from '../../../../vantui/src/default-props/demo/index'

export default function Index() {
return <Demo />
}
4 changes: 4 additions & 0 deletions packages/vantui/antm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ function getMenus() {
path: 'custom-style',
title: '样式覆盖',
},
{
path: 'default-props',
title: '默认参数配置',
},
{
path: 'theme',
title: '定制主题',
Expand Down
2 changes: 1 addition & 1 deletion packages/vantui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antmjs/vantui",
"version": "3.5.6",
"version": "3.6.0",
"main": "lib/index.js",
"module": "es/index.esm.js",
"style": "lib/index.css",
Expand Down
10 changes: 8 additions & 2 deletions packages/vantui/src/action-sheet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { View, Button, ITouchEvent } from '@tarojs/components'
import { useCallback } from 'react'
import { useCallback, useState } from 'react'
import * as utils from '../wxs/utils'
import { ActionSheetProps, ActionSheetItem } from '../../types/action-sheet'
import VanLoading from '../loading/index'
import VanPopup from '../popup/index'
import VanIcon from '../icon/index'
// import Button from './../button'
import { get } from '../default-props'

export function ActionSheet(props: ActionSheetProps) {
const [d] = useState(get().ActionSheet || {})
const {
round = true,
zIndex,
Expand All @@ -26,7 +29,10 @@ export function ActionSheet(props: ActionSheetProps) {
onClickOverlay,
className,
...others
} = props
} = {
...d,
...props,
}

const _onCancel = useCallback(() => {
onCancel?.()
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/area/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ import {
useState,
} from 'react'
import lodash from 'lodash'
import { get } from '../default-props'
import * as computed from './wxs'
import VanPicker from './../picker'
import { AreaProps } from './../../types/area'
import { PickerEvents } from './../../types/picker'

const d = get().Area || {}

const EMPTY_CODE = '000000'
function Index(props: AreaProps, ref?: React.Ref<unknown>) {
const {
Expand All @@ -34,7 +37,10 @@ function Index(props: AreaProps, ref?: React.Ref<unknown>) {
cancelButtonText = '取消',
confirmButtonText = '确认',
...others
} = props
} = {
...d,
...props,
}
const pickerRef = useRef<any>(null)
const codeRef = useRef<any>('')
const columns = useMemo(
Expand Down
9 changes: 8 additions & 1 deletion packages/vantui/src/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ import { BadgeProps } from '../../types/badge'

const classPrefix = `van-badge`

import { get } from '../default-props'

const d = get().Badge || {}

export function Badge(props: BadgeProps) {
const {
content = '',
children,
style,
wrapperClassName = '',
wrapperStyle,
} = props
} = {
...d,
...props,
}

const isDot = content === undefined || content === null || content === ''

Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import * as utils from '../wxs/utils'
import { Icon } from '../icon/index'
import { Loading } from '../loading/index'
import { Toast } from '../toast/index'
import { get } from '../default-props'
import * as computed from './wxs'

const d = get().Button || {}

let defaultConfig = {
asyncLoading: false,
}
Expand Down Expand Up @@ -38,7 +41,10 @@ function Button(props: ButtonProps) {
loadingMode = 'normal',
loadingMask = true,
...others
} = props
} = {
...d,
...props,
}

const [innerLoading, setInnerLoading] = useState<boolean | undefined>(false)
const [compIndex] = useState<number>(++index)
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { requestAnimationFrame } from '../common/utils'
import VanPopup from '../popup/index'
import VanButton from '../button/index'
import { CalendarProps, ICalendarInstance } from '../../types/calendar'
import { get } from '../default-props'
import {
ROW_HEIGHT,
getPrevDay,
Expand All @@ -38,6 +39,8 @@ import Month from './components/month/index'
import Header from './components/header/index'
import { LongSpan } from './components/longSpan'

const d = get().Calendar || {}

const initialMinDate = getToday().getTime()
let init = 0
const initialMaxDate = (() => {
Expand Down Expand Up @@ -96,7 +99,10 @@ function Index(
longspan = true,
zIndex,
...others
} = props
} = {
...d,
...props,
}

const [subtitle, setSubtitle] = useState('')
const [currentDate, setCurrentDate] = useState<any>()
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import * as utils from '../wxs/utils'
import { jumpLink } from '../common/jumpLink'
import { Tag } from '../tag'
import { CardProps } from '../../types/card'
import { get } from '../default-props'

const d = get().Card || {}

export function Card(props: CardProps) {
const {
Expand Down Expand Up @@ -33,7 +36,10 @@ export function Card(props: CardProps) {
style,
className,
...others
} = props
} = {
...d,
...props,
}
const [state, setState] = useState({
integerStr: '',
decimalStr: '',
Expand Down
5 changes: 4 additions & 1 deletion packages/vantui/src/cascader/cascader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import {
convertConfig,
CascaderProps,
} from '../../types/cascader'
import { get } from '../default-props'
import { CascaderItem } from './cascaderItem'
import { convertListToOptions } from './helper'
import ScrollViewTimeout from './scrollViewTimeout'
import Tree from './tree'

const d = get().Cascader || {}

export interface CascaderPane {
nodes: []
selectedNode: CascaderOption | null
Expand Down Expand Up @@ -62,7 +65,7 @@ const InternalCascader = (props: CascaderProps) => {
onChange,
scrollIntoView,
onPathChange,
} = { ...defaultProps, ...props }
} = { ...defaultProps, ...d, ...props }

const [tabvalue, setTabvalue] = useState('c1')
const [optiosData, setOptiosData] = useState<CascaderPane[]>([])
Expand Down
11 changes: 9 additions & 2 deletions packages/vantui/src/cell-group/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { View } from '@tarojs/components'
import * as utils from '../wxs/utils'
import { CellGroupProps } from '../../types/cell'
import { get } from '../default-props'

export function CellGroup(props: CellGroupProps) {
const d = get().CellGroup || {}

function CellGroup(props: CellGroupProps) {
const {
inset,
title,
Expand All @@ -11,7 +14,10 @@ export function CellGroup(props: CellGroupProps) {
style,
className,
...others
} = props
} = {
...d,
...props,
}

return (
<>
Expand Down Expand Up @@ -42,4 +48,5 @@ export function CellGroup(props: CellGroupProps) {
</>
)
}

export default CellGroup
8 changes: 7 additions & 1 deletion packages/vantui/src/cell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import * as utils from '../wxs/utils'
import { CellProps } from '../../types/cell'
import { jumpLink } from '../common/jumpLink'
import { Icon } from '../icon'
import { get } from '../default-props'
import * as computed from './wxs'

const d = get().Cell || {}

export function Cell(props: CellProps) {
const {
url,
Expand Down Expand Up @@ -33,7 +36,10 @@ export function Cell(props: CellProps) {
style,
className,
...others
} = props
} = {
...d,
...props,
}
const _click: (event: ITouchEvent) => void = useCallback(
function (event) {
onClick?.(event)
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/check-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import { CheckListProps } from '../../types/check-list'
import Loading from '../loading/index'
import Empty from '../empty/index'
import Icon from '../icon/index'
import { get } from '../default-props'

const d = get().CheckList

export function CheckList(props: CheckListProps) {
const {
Expand All @@ -38,7 +41,10 @@ export function CheckList(props: CheckListProps) {
showArrowDown = false,
showArrowRight = false,
...others
} = props
} = {
...d,
...props,
}
const [show, setShow] = useState<boolean>(false)
const [checked, setChecked] = useState<Array<number | string>>([])
const [checkedData, setCheckedData] = useState<Array<Record<string, any>>>([])
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/checkbox-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { View } from '@tarojs/components'

import * as utils from '../wxs/utils'
import { CheckboxGroupProps } from '../../types/checkbox'
import { get } from '../default-props'
import CheckboxGroupContext from './context'

const d = get().CheckboxGroup

export function CheckboxGroup(props: CheckboxGroupProps) {
const {
max,
Expand All @@ -15,7 +18,10 @@ export function CheckboxGroup(props: CheckboxGroupProps) {
className,
children,
...others
} = props
} = {
...d,
...props,
}

return (
<CheckboxGroupContext.Provider
Expand Down
8 changes: 7 additions & 1 deletion packages/vantui/src/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import VanIcon from '../icon/index'
import { CheckboxProps } from '../../types/checkbox'
import CheckboxGroupContext from '../checkbox-group/context'
import { isEmptyObject } from '../utils/type'
import { get } from '../default-props'
import * as computed from './wxs'

const d = get().Checkbox

export function Checkbox(
props: CheckboxProps & {
parent: any
Expand All @@ -32,7 +35,10 @@ export function Checkbox(
className,
children,
...others
} = props
} = {
...d,
...props,
}

const parentData = useContext(CheckboxGroupContext)

Expand Down
Loading

0 comments on commit f7414c7

Please sign in to comment.