@didaoktv/didaoui-uniapp 1.2.0 → 1.2.1

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.
@@ -6,9 +6,8 @@
6
6
  class="dd-badge__sup"
7
7
  :class="[`dd-badge__sup--${type}`, `dd-badge__sup--${variant}`]"
8
8
  >
9
- <template v-if="type === 'dot'"></template>
10
- <text v-else-if="type === 'number'" class="dd-badge__num">{{ displayContent }}</text>
11
- <text v-else class="dd-badge__txt"><slot>{{ content }}</slot></text>
9
+ <text v-if="type === 'number'" class="dd-badge__num">{{ displayContent }}</text>
10
+ <text v-else-if="type === 'text'" class="dd-badge__txt">{{ content }}</text>
12
11
  </view>
13
12
  </view>
14
13
  </template>
@@ -54,9 +53,8 @@ const visible = computed(() => {
54
53
  if (n === 0 && !props.showZero) return false
55
54
  return true
56
55
  }
57
- // text
58
- const hasSlot = false // slot 默认内容由父级传入, 此处依赖 content prop
59
- return hasSlot || String(props.content).length > 0
56
+ // text: content 为空时隐藏
57
+ return String(props.content).length > 0
60
58
  })
61
59
  </script>
62
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didaoktv/didaoui-uniapp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "帝到KTV UniApp 组件库",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",