@tplc/business 0.0.16 → 0.0.17

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.
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <view
3
3
  class="select-tag"
4
+ @click="emit('click')"
4
5
  :class="[{ 'select-tag-checked': checked, 'select-tag-small': size === 'small' }]"
5
6
  >
6
7
  {{ title }}
@@ -8,6 +9,7 @@
8
9
  </template>
9
10
 
10
11
  <script setup lang="ts">
12
+ const emit = defineEmits(['click'])
11
13
  defineOptions({
12
14
  name: 'SelectTagView',
13
15
  options: {
@@ -16,7 +16,7 @@
16
16
  v-model="inputValue"
17
17
  @input="onInput(item, $event)"
18
18
  @blur="onBlur(item)"
19
- @confirm="onConfirm"
19
+ @confirm="onBlur(item)"
20
20
  />
21
21
  </view>
22
22
  <template v-else>
@@ -85,9 +85,6 @@ const onBlur = (item: Option) => {
85
85
  }
86
86
  showInput.value = false
87
87
  }
88
- const onConfirm = () => {
89
- showInput.value = false
90
- }
91
88
  const onInput = (item: Option, e) => {
92
89
  if (item.max && parseInt(e.detail.value) > item.max) {
93
90
  uni.showToast({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -10,7 +10,9 @@ declare const _default: import('vue').DefineComponent<
10
10
  {},
11
11
  import('vue').ComponentOptionsMixin,
12
12
  import('vue').ComponentOptionsMixin,
13
- {},
13
+ {
14
+ click: (...args: any[]) => void
15
+ },
14
16
  string,
15
17
  import('vue').PublicProps,
16
18
  Readonly<
@@ -21,7 +23,9 @@ declare const _default: import('vue').DefineComponent<
21
23
  size?: 'small' | 'normal'
22
24
  }>
23
25
  >
24
- >,
26
+ > & {
27
+ onClick?: ((...args: any[]) => any) | undefined
28
+ },
25
29
  {},
26
30
  {}
27
31
  >