|
@@ -2,7 +2,7 @@
|
|
* @Author: wjc
|
|
* @Author: wjc
|
|
* @Date: 2024-07-12 10:46:19
|
|
* @Date: 2024-07-12 10:46:19
|
|
* @LastEditors: wjc
|
|
* @LastEditors: wjc
|
|
- * @LastEditTime: 2024-07-12 15:02:10
|
|
|
|
|
|
+ * @LastEditTime: 2024-07-15 15:54:19
|
|
* @Description:
|
|
* @Description:
|
|
*/
|
|
*/
|
|
import { Fragment } from 'vue'
|
|
import { Fragment } from 'vue'
|
|
@@ -68,7 +68,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
render() {
|
|
render() {
|
|
- const { spaceClass, rounded, padding, bgColor, spacer } = this
|
|
|
|
|
|
+ const { spaceClass, rounded, padding, bgColor, spacer, direction } = this
|
|
const children = this.$slots.default()
|
|
const children = this.$slots.default()
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -80,7 +80,11 @@ export default defineComponent({
|
|
return (
|
|
return (
|
|
<>
|
|
<>
|
|
<view class={['m-card-item']}>{child}</view>
|
|
<view class={['m-card-item']}>{child}</view>
|
|
- {i % 2 === 0 && spacer ? <view class="m-card-spacer"></view> : null}
|
|
|
|
|
|
+ {i !== arr.length - 1 && spacer ? (
|
|
|
|
+ <view
|
|
|
|
+ class={[direction === 'horizontal' ? 'm-card-spacer-horiz' : 'm-card-spacer']}
|
|
|
|
+ ></view>
|
|
|
|
+ ) : null}
|
|
</>
|
|
</>
|
|
)
|
|
)
|
|
})}
|
|
})}
|