@didaoktv/didaoui-uniapp 2.0.1 → 2.1.0

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.
@@ -22,8 +22,9 @@
22
22
  <view v-if="closeable" class="dd-popup__close" :class="`dd-popup__close--${closeIconPosition}`" :style="{ zIndex: zIndexConfig.base + 1 }" @click="onCloseIcon">
23
23
  <dd-icon name="cross" />
24
24
  </view>
25
- <view v-if="position === 'bottom' && safeAreaInsetBottom" class="dd-popup__safe-bottom"></view>
25
+ <view v-if="title || $slots.title" class="dd-popup__title"><slot name="title">{{ title }}</slot></view>
26
26
  <slot></slot>
27
+ <view v-if="position === 'bottom' && safeAreaInsetBottom" class="dd-popup__safe-bottom"></view>
27
28
  </view>
28
29
  </view>
29
30
  </dd-portal>
@@ -38,6 +39,7 @@ import zIndexConfig from '../../libs/config/zIndex.js'
38
39
 
39
40
  interface Props {
40
41
  modelValue?: boolean
42
+ title?: string
41
43
  position?: 'top' | 'bottom' | 'left' | 'right' | 'center'
42
44
  round?: boolean
43
45
  overlay?: boolean
@@ -52,6 +54,7 @@ interface Props {
52
54
 
53
55
  const props = withDefaults(defineProps<Props>(), {
54
56
  modelValue: false,
57
+ title: '',
55
58
  position: 'bottom',
56
59
  round: false,
57
60
  overlay: true,
@@ -225,6 +228,16 @@ onUnmounted(() => {
225
228
  }
226
229
  }
227
230
 
231
+ &__title {
232
+ @include dd-flex-between;
233
+ padding: $dd-space-4 $dd-space-5;
234
+ box-sizing: border-box;
235
+ font-size: $dd-font-size-h4;
236
+ font-weight: $dd-font-weight-h4;
237
+ color: var(--dd-text-primary, #{$dd-text-primary});
238
+ @include dd-hairline-bottom(var(--dd-border-default, #{$dd-border-default}));
239
+ }
240
+
228
241
  &__close {
229
242
  position: absolute;
230
243
  width: 56rpx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didaoktv/didaoui-uniapp",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "帝到KTV UniApp 组件库",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",