@tplc/business 0.4.118 → 0.4.119

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/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.4.119](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.115...v0.4.119) (2025-05-21)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.4.115 ([15cc0e1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/15cc0e19900cf11bb7e8ac16cfc9c5e67e1b1bf6))
11
+ * **release:** 0.4.116 ([55d9a73](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/55d9a737f40a44ea1170a4b63e8c6cba0f03e535))
12
+ * **release:** 0.4.117 ([3b53e8e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3b53e8eb27df03cfe005f41ef899141021ecf9e4))
13
+ * **release:** 0.4.118 ([c953fde](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c953fdefd8171082bc6e7c265905cbcd423f2cdd))
14
+
15
+
16
+ ### ✨ Features | 新功能
17
+
18
+ * button 预览图片修改 ([1e27b47](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1e27b4719962edb6d1223f159b75c7784aea4066))
19
+ * 修改脚本 ([fa308af](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/fa308afcd6221c79d32947881b81c13288d6bc72))
20
+ * 反选判断 ([6dea74e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6dea74e65d9843766f7911eff2b01b00d72320d6))
21
+ * 新增button enablePreview ([ab91670](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ab91670293731aa12ce7f76a6dc2e8f63c77a3dd))
22
+ * 暂时提交 ([0921daa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0921daa2e8226bbedafeb64a5e3c2e0522228c82))
23
+ * 暂时提交area支持list 还差样式 ([a815d4b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a815d4be226a97ef91a63cbce90cdb51feb4540d))
24
+ * 补充文档 ([45cffbd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/45cffbd548e36ac779c44e6caee637c0b858a432))
25
+ * 调整button位置 ([f13c6ee](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f13c6ee1d678b7e24d1d71286ee10ea82a27d7d3))
26
+ * 调整数据 ([f5e0fd2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f5e0fd2ccd9153d089949ce24620cd222bfc47ea))
27
+ * 调整配置 ([426199e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/426199e2b441a2bf17288add847874218d0f2032))
28
+
5
29
  ### [0.4.118](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.117...v0.4.118) (2025-05-19)
6
30
 
7
31
 
@@ -1,16 +1,34 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props" v-if="showArea">
3
- <view v-for="(item, index) in renderList" :key="index">
4
- <lcb-area-item v-bind="$props" :data="item" />
3
+ <view
4
+ class="h-full"
5
+ :style="{
6
+ display: display,
7
+ gap: transformValueUnit(gap),
8
+ overflowX: scrollX ? 'auto' : 'initial',
9
+ ...innerStyle,
10
+ }"
11
+ >
12
+ <view
13
+ v-for="(item, index) in list"
14
+ :key="item.id"
15
+ class="slot-wrapper"
16
+ :style="{
17
+ ...getStyle(index),
18
+ overflowX,
19
+ }"
20
+ >
21
+ <slot :item="item" />
22
+ </view>
5
23
  </view>
6
24
  </lcb-block>
7
25
  </template>
8
26
 
9
27
  <script setup lang="ts">
10
- import { computed, inject, Ref, watchEffect, ref } from 'vue'
28
+ import { computed, inject, Ref } from 'vue'
11
29
  import { LcbAreaProps } from './types'
30
+ import { transformValueUnit } from '@tplc/business/utils/transform'
12
31
  import { get } from 'lodash-es'
13
- import LcbAreaItem from './components/LcbAreaItem/index.vue'
14
32
  import { PAGE_PROVIDE_KEY } from '@tplc/business/constants'
15
33
  defineOptions({
16
34
  name: 'LcbArea',
@@ -20,15 +38,37 @@ defineOptions({
20
38
  styleIsolation: 'shared',
21
39
  },
22
40
  })
23
- const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
24
- const userStore = uni.$lcb.userStore?.()
25
41
  const props = withDefaults(defineProps<LcbAreaProps>(), {
26
42
  displayFlex: 'row',
27
43
  display: 'flex',
28
44
  overflowX: 'initial',
29
- mode: 'single',
45
+ })
46
+ const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
47
+ const innerStyle = computed(() => {
48
+ // col-span-2
49
+ if (props.display === 'grid') {
50
+ return {
51
+ gridTemplateColumns: `repeat(${props.gridColumns}, minmax(0, 1fr))`,
52
+ }
53
+ }
54
+ return {
55
+ flexDirection: props.displayFlex,
56
+ alignItems: 'stretch',
57
+ }
30
58
  })
31
59
 
60
+ const getStyle = (index: number) => {
61
+ const flex = props.areaFlexs?.[index]?.flex ?? 1
62
+ return {
63
+ gridColumn:
64
+ props.areaItems?.[index]?.colSpan && props.display === 'grid'
65
+ ? `span ${props.areaItems?.[index]?.colSpan} / span ${props.areaItems?.[index]?.colSpan}`
66
+ : undefined,
67
+ flex: props.display === 'flex' ? flex || 'auto' : undefined,
68
+ flexShrink: props.display === 'flex' ? (props.flexShrink ?? 1) : undefined,
69
+ }
70
+ }
71
+
32
72
  const showArea = computed(() => {
33
73
  if (props.dependKey) {
34
74
  const userStore = uni.$lcb.userStore?.()
@@ -43,28 +83,16 @@ const showArea = computed(() => {
43
83
  }
44
84
  return true
45
85
  })
86
+ </script>
46
87
 
47
- const renderList = ref<unknown[]>([])
48
-
49
- watchEffect(async () => {
50
- if (props.mode === 'single') {
51
- renderList.value = [props.list]
52
- } else {
53
- if (props.dataSource?.source === 'remote') {
54
- if (props.dataSource.requestInfo?.requestUrl) {
55
- const { data } = await uni.$lcb.http.post(
56
- props.dataSource.requestInfo.requestUrl,
57
- props.dataSource.requestInfo.requestParams,
58
- )
59
- renderList.value = data as unknown[]
60
- }
61
- } else if (props.dataSource?.dependKey) {
62
- renderList.value = get(
63
- props.dataSource?.source === 'context' ? pageInfo.value : userStore?.userInfo,
64
- props.dataSource?.dependKey,
65
- [],
66
- )
67
- }
88
+ <style lang="scss" scoped>
89
+ // 小程序的情况
90
+ // #ifdef MP-WEIXIN
91
+ .slot-wrapper {
92
+ :deep(> view) {
93
+ width: 100%;
94
+ height: 100%;
68
95
  }
69
- })
70
- </script>
96
+ }
97
+ // #endif
98
+ </style>
@@ -1,8 +1,5 @@
1
- import { DataSource } from '../../action'
2
1
  import { LcbBlockProps } from '../lcb-block/types'
3
2
  export interface LcbAreaProps extends LcbBlockProps {
4
- mode?: 'single' | 'multiple'
5
- dataSource?: DataSource
6
3
  id?: number
7
4
  fixed?: boolean
8
5
  unDraggable?: boolean
@@ -8,7 +8,7 @@
8
8
  v-else-if="dynamicKey && hideWhenDynamicKeyNotExist ? dynamicValue : true"
9
9
  >
10
10
  <lcb-block
11
- v-bind="$props"
11
+ v-bind="styleOptions[0]"
12
12
  :customClass="`${customClass} border-solid`"
13
13
  :customStyle="{
14
14
  width: props.fillWidth ? '100%' : 'fit-content',
@@ -16,7 +16,12 @@
16
16
  ...innerItemStyle,
17
17
  }"
18
18
  >
19
- <lcb-action-view v-bind="actionProps" @avatar="onAvatar" @click="handleClick">
19
+ <lcb-action-view
20
+ v-bind="actionProps"
21
+ @avatar="onAvatar"
22
+ @click="handleClick"
23
+ :customStyle="styleOptions[1]"
24
+ >
20
25
  <view class="!flex items-center justify-center" :style="`gap: ${iconGap}rpx`">
21
26
  <wd-icon
22
27
  v-if="icon"
@@ -118,7 +123,23 @@ const onAvatar = (headImgUrl) => {
118
123
  const innerStyle = computed(() => {
119
124
  return getFlexStyle(props.align)
120
125
  })
126
+
121
127
  const innerItemStyle = computed(() => {
122
128
  return getFlexStyle(props.itemAlign)
123
129
  })
130
+
131
+ const styleOptions = computed<[Record<string, any>, string]>(() => {
132
+ const {
133
+ paddingVertical,
134
+ paddingHorizontal,
135
+ paddingTop,
136
+ paddingBottom,
137
+ paddingLeft,
138
+ paddingRight,
139
+ ...other
140
+ } = props
141
+
142
+ const actionStyle = `width: 100%; padding:${transformValueUnit(paddingTop || paddingVertical)} ${transformValueUnit(paddingRight || paddingHorizontal)} ${transformValueUnit(paddingBottom || paddingVertical)} ${transformValueUnit(paddingLeft || paddingHorizontal)}`
143
+ return [other, actionStyle]
144
+ })
124
145
  </script>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <slot />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import { WRAPPER_ITEM_KEY } from '../../../../constants'
7
+ import { provide, ref, watch } from 'vue'
8
+
9
+ defineOptions({
10
+ name: 'LcbWrapperItem',
11
+ options: {
12
+ addGlobalClass: true,
13
+ virtualHost: true,
14
+ styleIsolation: 'shared',
15
+ },
16
+ })
17
+ const props = defineProps<{
18
+ data?: unknown
19
+ }>()
20
+ const data = ref(props.data)
21
+ provide(WRAPPER_ITEM_KEY, data)
22
+
23
+ watch(
24
+ () => props.data,
25
+ (newVal) => {
26
+ data.value = newVal
27
+ },
28
+ {
29
+ deep: true,
30
+ },
31
+ )
32
+ </script>
33
+
34
+ <style lang="scss" scoped></style>
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <lcb-block v-bind="$props" :custom-style="listStyle">
3
+ <view
4
+ v-for="(item, index) in renderList"
5
+ :key="index"
6
+ :style="{
7
+ width: width ? transformValueUnit(width) : '100%',
8
+ }"
9
+ >
10
+ <WrapperItem :data="item">
11
+ <slot />
12
+ </WrapperItem>
13
+ </view>
14
+ </lcb-block>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import { computed, inject, Ref, ref, watchEffect } from 'vue'
19
+ import { LcbWrapperListProps } from './types'
20
+ import { get } from 'lodash-es'
21
+ import { PAGE_PROVIDE_KEY } from '@tplc/business/constants'
22
+ import { transformValueUnit } from '@tplc/business/utils/transform'
23
+ import WrapperItem from './components/WrapperItem/index.vue'
24
+ defineOptions({
25
+ name: 'LcbWrapperList',
26
+ options: {
27
+ addGlobalClass: true,
28
+ virtualHost: true,
29
+ styleIsolation: 'shared',
30
+ },
31
+ })
32
+ const props = withDefaults(defineProps<LcbWrapperListProps>(), {
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ })
36
+ const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
37
+ const userStore = uni.$lcb.userStore?.()
38
+ const renderList = ref<unknown[]>([])
39
+
40
+ watchEffect(async () => {
41
+ if (props.dataSource?.source === 'remote') {
42
+ if (props.dataSource.requestInfo?.requestUrl) {
43
+ const { data } = await uni.$lcb.http.post(
44
+ props.dataSource.requestInfo.requestUrl,
45
+ props.dataSource.requestInfo.requestParams,
46
+ )
47
+ renderList.value = data as unknown[]
48
+ }
49
+ } else if (props.dataSource?.dependKey) {
50
+ renderList.value = get(
51
+ props.dataSource?.source === 'context' ? pageInfo.value : userStore?.userInfo,
52
+ props.dataSource?.dependKey,
53
+ [],
54
+ )
55
+ }
56
+ })
57
+ const listStyle = computed(() => {
58
+ const style = {
59
+ width: '100%',
60
+ display: props.display,
61
+ flexDirection: props.flexDirection,
62
+ gap: transformValueUnit(props.gap),
63
+ alignItems: 'stretch',
64
+ gridTemplateColumns: `repeat(${props.gridColumns}, minmax(0, 1fr))`,
65
+ }
66
+ return Object.keys(style)
67
+ .filter((key) => style[key])
68
+ .map((key) => `${key}:${style[key]}`)
69
+ .join(';')
70
+ })
71
+ </script>
72
+
73
+ <style lang="scss" scoped></style>
@@ -0,0 +1,10 @@
1
+ import { DataSource } from '../../action'
2
+ import { LcbBlockProps } from '../lcb-block/types'
3
+ export interface LcbWrapperListProps extends LcbBlockProps {
4
+ dataSource?: DataSource
5
+ gap?: number
6
+ width?: number
7
+ display?: 'flex' | 'grid'
8
+ flexDirection?: 'row' | 'column'
9
+ gridColumns?: number
10
+ }
package/constants.ts CHANGED
@@ -11,3 +11,5 @@ export const USER_BASIC_INFO = 'user_basic_info'
11
11
  export const LIST_FORM_CHOOSER_VALUES = 'list_form_chooser_values'
12
12
  /** 页面动态数据 */
13
13
  export const PAGE_DYNAMIC_DATA = 'page_dynamic_data'
14
+ /** 列表页表单选择项 */
15
+ export const WRAPPER_ITEM_KEY = 'wrapper_item_key'
package/global.d.ts CHANGED
@@ -47,6 +47,7 @@ declare module 'vue' {
47
47
  'lcb-vip': (typeof import('@tplc/business/components/lcb-vip/lcb-vip.vue'))['default']
48
48
  'lcb-waterfall-item': (typeof import('@tplc/business/components/lcb-waterfall/lcb-waterfall-item.vue'))['default']
49
49
  'lcb-waterfall': (typeof import('@tplc/business/components/lcb-waterfall/lcb-waterfall.vue'))['default']
50
+ 'lcb-wrapper-list': (typeof import('@tplc/business/components/lcb-wrapper-list/lcb-wrapper-list.vue'))['default']
50
51
  }
51
52
  }
52
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.118",
3
+ "version": "0.4.119",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,12 +1,14 @@
1
1
  import { LcbAreaProps } from './types'
2
- declare const _default: import('vue').DefineComponent<
2
+ declare function __VLS_template(): {
3
+ default?(_: { item: LcbAreaProps }): any
4
+ }
5
+ declare const __VLS_component: import('vue').DefineComponent<
3
6
  __VLS_WithDefaults<
4
7
  __VLS_TypePropsToOption<LcbAreaProps>,
5
8
  {
6
9
  displayFlex: string
7
10
  display: string
8
11
  overflowX: string
9
- mode: string
10
12
  }
11
13
  >,
12
14
  {},
@@ -26,19 +28,21 @@ declare const _default: import('vue').DefineComponent<
26
28
  displayFlex: string
27
29
  display: string
28
30
  overflowX: string
29
- mode: string
30
31
  }
31
32
  >
32
33
  >
33
34
  >,
34
35
  {
35
- mode: 'single' | 'multiple'
36
36
  display: 'flex' | 'grid'
37
37
  displayFlex: 'row' | 'column'
38
38
  overflowX: 'hidden' | 'initial' | 'auto'
39
39
  },
40
40
  {}
41
41
  >
42
+ declare const _default: __VLS_WithTemplateSlots<
43
+ typeof __VLS_component,
44
+ ReturnType<typeof __VLS_template>
45
+ >
42
46
  export default _default
43
47
  type __VLS_WithDefaults<P, D> = {
44
48
  [K in keyof Pick<P, keyof P>]: K extends keyof D
@@ -52,6 +56,11 @@ type __VLS_WithDefaults<P, D> = {
52
56
  type __VLS_Prettify<T> = {
53
57
  [K in keyof T]: T[K]
54
58
  } & {}
59
+ type __VLS_WithTemplateSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S
62
+ }
63
+ }
55
64
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
56
65
  type __VLS_TypePropsToOption<T> = {
57
66
  [K in keyof T]-?: {} extends Pick<T, K>
@@ -1,8 +1,5 @@
1
- import { DataSource } from '../../action'
2
1
  import { LcbBlockProps } from '../lcb-block/types'
3
2
  export interface LcbAreaProps extends LcbBlockProps {
4
- mode?: 'single' | 'multiple'
5
- dataSource?: DataSource
6
3
  id?: number
7
4
  fixed?: boolean
8
5
  unDraggable?: boolean
@@ -0,0 +1,47 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any
3
+ }
4
+ declare const __VLS_component: import('vue').DefineComponent<
5
+ __VLS_TypePropsToOption<{
6
+ data?: unknown
7
+ }>,
8
+ {},
9
+ unknown,
10
+ {},
11
+ {},
12
+ import('vue').ComponentOptionsMixin,
13
+ import('vue').ComponentOptionsMixin,
14
+ {},
15
+ string,
16
+ import('vue').PublicProps,
17
+ Readonly<
18
+ import('vue').ExtractPropTypes<
19
+ __VLS_TypePropsToOption<{
20
+ data?: unknown
21
+ }>
22
+ >
23
+ >,
24
+ {},
25
+ {}
26
+ >
27
+ declare const _default: __VLS_WithTemplateSlots<
28
+ typeof __VLS_component,
29
+ ReturnType<typeof __VLS_template>
30
+ >
31
+ export default _default
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S
35
+ }
36
+ }
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
38
+ type __VLS_TypePropsToOption<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K>
40
+ ? {
41
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
42
+ }
43
+ : {
44
+ type: import('vue').PropType<T[K]>
45
+ required: true
46
+ }
47
+ }
@@ -1,15 +1,14 @@
1
- import { LcbAreaProps } from '../../types'
1
+ import { LcbWrapperListProps } from './types'
2
2
  declare function __VLS_template(): {
3
- default?(_: { item: LcbAreaProps }): any
3
+ default?(_: {}): any
4
4
  }
5
5
  declare const __VLS_component: import('vue').DefineComponent<
6
6
  __VLS_WithDefaults<
7
- __VLS_TypePropsToOption<
8
- LcbAreaProps & {
9
- data?: unknown
10
- }
11
- >,
12
- {}
7
+ __VLS_TypePropsToOption<LcbWrapperListProps>,
8
+ {
9
+ display: string
10
+ flexDirection: string
11
+ }
13
12
  >,
14
13
  {},
15
14
  unknown,
@@ -23,16 +22,18 @@ declare const __VLS_component: import('vue').DefineComponent<
23
22
  Readonly<
24
23
  import('vue').ExtractPropTypes<
25
24
  __VLS_WithDefaults<
26
- __VLS_TypePropsToOption<
27
- LcbAreaProps & {
28
- data?: unknown
29
- }
30
- >,
31
- {}
25
+ __VLS_TypePropsToOption<LcbWrapperListProps>,
26
+ {
27
+ display: string
28
+ flexDirection: string
29
+ }
32
30
  >
33
31
  >
34
32
  >,
35
- {},
33
+ {
34
+ display: 'flex' | 'grid'
35
+ flexDirection: 'row' | 'column'
36
+ },
36
37
  {}
37
38
  >
38
39
  declare const _default: __VLS_WithTemplateSlots<
@@ -0,0 +1,10 @@
1
+ import { DataSource } from '../../action'
2
+ import { LcbBlockProps } from '../lcb-block/types'
3
+ export interface LcbWrapperListProps extends LcbBlockProps {
4
+ dataSource?: DataSource
5
+ gap?: number
6
+ width?: number
7
+ display?: 'flex' | 'grid'
8
+ flexDirection?: 'row' | 'column'
9
+ gridColumns?: number
10
+ }
@@ -11,3 +11,5 @@ export declare const USER_BASIC_INFO = 'user_basic_info'
11
11
  export declare const LIST_FORM_CHOOSER_VALUES = 'list_form_chooser_values'
12
12
  /** 页面动态数据 */
13
13
  export declare const PAGE_DYNAMIC_DATA = 'page_dynamic_data'
14
+ /** 列表页表单选择项 */
15
+ export declare const WRAPPER_ITEM_KEY = 'wrapper_item_key'
@@ -1,81 +0,0 @@
1
- <template>
2
- <view
3
- class="h-full"
4
- :style="{
5
- display: display,
6
- gap: transformValueUnit(gap),
7
- overflowX: scrollX ? 'auto' : 'initial',
8
- ...innerStyle,
9
- }"
10
- >
11
- <view
12
- v-for="(item, index) in list"
13
- :key="item.id"
14
- class="slot-wrapper"
15
- :style="{
16
- ...getStyle(index),
17
- overflowX,
18
- }"
19
- >
20
- <slot :item="item" />
21
- </view>
22
- </view>
23
- </template>
24
-
25
- <script setup lang="ts">
26
- import { computed } from 'vue'
27
- import { LcbAreaProps } from '../../types'
28
- import { transformValueUnit } from '@tplc/business/utils/transform'
29
- defineOptions({
30
- name: 'LcbAreaItem',
31
- options: {
32
- addGlobalClass: true,
33
- virtualHost: true,
34
- styleIsolation: 'shared',
35
- },
36
- })
37
- const props = withDefaults(
38
- defineProps<
39
- LcbAreaProps & {
40
- data?: unknown
41
- }
42
- >(),
43
- {},
44
- )
45
-
46
- const getStyle = (index: number) => {
47
- const flex = props.areaFlexs?.[index]?.flex ?? 1
48
- return {
49
- gridColumn:
50
- props.areaItems?.[index]?.colSpan && props.display === 'grid'
51
- ? `span ${props.areaItems?.[index]?.colSpan} / span ${props.areaItems?.[index]?.colSpan}`
52
- : undefined,
53
- flex: props.display === 'flex' ? flex || 'auto' : undefined,
54
- flexShrink: props.display === 'flex' ? (props.flexShrink ?? 1) : undefined,
55
- }
56
- }
57
- const innerStyle = computed(() => {
58
- // col-span-2
59
- if (props.display === 'grid') {
60
- return {
61
- gridTemplateColumns: `repeat(${props.gridColumns}, minmax(0, 1fr))`,
62
- }
63
- }
64
- return {
65
- flexDirection: props.displayFlex,
66
- alignItems: 'stretch',
67
- }
68
- })
69
- </script>
70
-
71
- <style lang="scss" scoped>
72
- // 小程序的情况
73
- // #ifdef MP-WEIXIN
74
- .slot-wrapper {
75
- :deep(> view) {
76
- width: 100%;
77
- height: 100%;
78
- }
79
- }
80
- // #endif
81
- </style>