@mptw/skylens-ui 1.4.3 → 1.4.5

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,11 @@
6
6
  href="javascript:;"
7
7
  @click="onToggleCollapse"
8
8
  ).flex.items-center.justify-between
9
- .text-base.text-gray-1.font-bold {{ blockTitle }}
9
+ .inline-flex.items-center.space-x-2
10
+ SLIcon(v-if='blockTitleIcon', :icon='blockTitleIcon' class='collapse-block-title-icon')
11
+ .collapse-block-title {{ blockTitle }}
10
12
  .toggle-collapse-button
11
- .button-title {{ isCollapsed ? '展開' : '收合' }}
13
+ .button-title(v-if='isShowCollapseButtonTitle') {{ isCollapsed ? '展開' : '收合' }}
12
14
  SLIcon(icon="chevron-down")
13
15
  .sl-collapsable-block-body(:style="`height: ${bodyHeight}px;`")
14
16
  .collapsable-block-wrapper(ref="wrapperEl")
@@ -20,10 +22,18 @@ export default defineComponent({
20
22
  name: "SLCollapsableBlock",
21
23
  components: {},
22
24
  props: {
25
+ blockTitleIcon: {
26
+ type: String,
27
+ default: '',
28
+ },
23
29
  blockTitle: {
24
30
  type: String,
25
31
  default: "",
26
32
  },
33
+ isShowCollapseButtonTitle: {
34
+ type: Boolean,
35
+ default: true,
36
+ },
27
37
  defaultCollapsed: {
28
38
  type: Boolean,
29
39
  default: true,
@@ -99,6 +109,12 @@ export default defineComponent({
99
109
  @apply pt-0
100
110
 
101
111
  &-header
112
+ .collapse-block-title-icon
113
+ @apply text-sm text-primary
114
+
115
+ .collapse-block-title
116
+ @apply text-base text-gray-1 font-bold
117
+
102
118
  .toggle-collapse-button
103
119
  @apply inline-flex items-center space-x-2
104
120
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.3",
4
+ "version": "1.4.5",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",