@mptw/skylens-ui 1.4.64 → 1.4.66

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.
@@ -7,10 +7,10 @@ button(:type='type', :class='btnClass' :disabled="disabled")
7
7
  SLIcon.btn-icon(v-if='postIcon !== ""', :icon='postIcon')
8
8
  .btn-loading
9
9
  .loading
10
- div
11
- div
12
- div
13
- div
10
+ div
11
+ div
12
+ div
13
+ div
14
14
  </template>
15
15
 
16
16
  <script lang="ts">
@@ -40,6 +40,7 @@ export default defineComponent({
40
40
  "pgray-5",
41
41
  "pgray-2",
42
42
  "secondary",
43
+ "secondary-200",
43
44
  "secondary-600",
44
45
  "blue-1",
45
46
  "insight-title-line",
@@ -237,6 +238,17 @@ export default defineComponent({
237
238
  div
238
239
  border-color theme('colors.secondary.500') transparent transparent transparent
239
240
 
241
+ &-secondary-200
242
+ @apply bg-secondary-200 border-secondary-200 text-secondary s("hover:bg-secondary") s("hover:border-secondary") s("hover:text-white")
243
+
244
+ &.btn-outline
245
+ @apply text-secondary-200 s("hover:text-secondary")
246
+
247
+ .btn-loading
248
+ .loading
249
+ div
250
+ border-color theme('colors.secondary.500') transparent transparent transparent
251
+
240
252
  &-secondary-600
241
253
  @apply bg-secondary-600 border-secondary-600 text-white s("hover:bg-secondary") s("hover:border-secondary")
242
254
 
@@ -5,7 +5,7 @@
5
5
  ref="toggleEl"
6
6
  @click="onToggleSelect"
7
7
  )
8
- .toggle-title {{ placeholder }}
8
+ .toggle-title {{ placeholderProxy }}
9
9
  SLIcon(icon="caret-down")
10
10
  ClientOnly
11
11
  Teleport(to="body")
@@ -56,10 +56,14 @@ export default defineComponent({
56
56
  type: Object as PropType<{ gender: string[]; age: number[] }>,
57
57
  default: null,
58
58
  },
59
+ placeholder: {
60
+ type: String,
61
+ default: "所有受眾",
62
+ },
59
63
  },
60
64
  emits: ["update:modelValue", "update:selecting"],
61
65
  setup(props, { emit }) {
62
- const { modelValue, placement } = toRefs(props);
66
+ const { modelValue, placement, placeholder } = toRefs(props);
63
67
 
64
68
  const el = shallowRef<HTMLElement | null>(null);
65
69
  const toggleEl = shallowRef<HTMLElement | null>(null);
@@ -70,13 +74,13 @@ export default defineComponent({
70
74
  let popperInstance: PopperInstance | null = null;
71
75
  let clickSubscriber: Subscription | null = null;
72
76
 
73
- const placeholder = computed(() => {
77
+ const placeholderProxy = computed(() => {
74
78
  if (
75
79
  !modelValue.value ||
76
80
  ((!modelValue.value.gender || modelValue.value.gender.length === 0) &&
77
81
  (!modelValue.value.age || modelValue.value.age.length === 0))
78
82
  )
79
- return "所有受眾";
83
+ return placeholder.value;
80
84
 
81
85
  return "已篩選受眾";
82
86
  });
@@ -219,7 +223,7 @@ export default defineComponent({
219
223
  toggleEl,
220
224
  popupEl,
221
225
  maxPopupWidth,
222
- placeholder,
226
+ placeholderProxy,
223
227
  genderOptions,
224
228
  ageOptions,
225
229
  genderProxy,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.64",
4
+ "version": "1.4.66",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",