File tree Expand file tree Collapse file tree 5 files changed +10
-4
lines changed
uni_modules/wot-design-uni/components Expand file tree Collapse file tree 5 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 6969
7070``` html
7171<wd-cell-group title =" 交易管理" border >
72- <wd-cell title =" 标题文字" value =" 内容" ></wd-cell >
72+ <wd-cell title =" 标题文字" value =" 内容" />
73+ <wd-cell :border =" false" title =" 标题文字" label =" 这一个cell不想要边框" value =" 内容" />
7374 <wd-cell title =" 标题文字" label =" 描述信息" value =" 内容" ></wd-cell >
7475</wd-cell-group >
7576```
Original file line number Diff line number Diff line change 3737 <demo-block title =" 展示边框线" transparent >
3838 <wd-cell-group title =" 交易管理" border >
3939 <wd-cell title =" 标题文字" value =" 内容" />
40+ <wd-cell :border =" false" title =" 标题文字" label =" 这一个cell不想要边框" value =" 内容" />
4041 <wd-cell title =" 标题文字" label =" 描述信息" value =" 内容" ></wd-cell >
4142 </wd-cell-group >
4243 </demo-block >
Original file line number Diff line number Diff line change @@ -358,6 +358,10 @@ export function isNotUndefined<T>(value: T): value is NotUndefined<T> {
358358 return ! isUndefined ( value )
359359}
360360
361+ export function isNone ( value : any ) : value is null | undefined {
362+ return value === null || value === void 0
363+ }
364+
361365/**
362366 * 检查给定的值是否为奇数
363367 * @param value 要检查的值
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export const cellProps = {
4444 /**
4545 * 是否展示边框线
4646 */
47- border : Boolean ,
47+ border : makeBooleanProp ( void 0 ) ,
4848 /**
4949 * 设置左侧标题宽度
5050 */
Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ import { useCell } from '../composables/useCell'
6363import { useParent } from ' ../composables/useParent'
6464import { FORM_KEY } from ' ../wd-form/types'
6565import { cellProps } from ' ./types'
66- import { isDef } from ' ../common/util'
66+ import { isNone } from ' ../common/util'
6767
6868const props = defineProps (cellProps )
6969const emit = defineEmits ([' click' ])
7070
7171const cell = useCell ()
7272
7373const isBorder = computed (() => {
74- return isDef ( cell .border . value ) ? cell .border . value : props .border
74+ return Boolean ( ! isNone ( props .border ) ? props .border : cell .border . value )
7575})
7676
7777const { parent : form } = useParent (FORM_KEY )
You can’t perform that action at this time.
0 commit comments