@tplc/wot 0.1.58 → 0.1.59

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.59](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.27...v0.1.59) (2025-02-09)
6
+
5
7
  ### [0.1.58](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.26...v0.1.58) (2025-02-09)
6
8
 
7
9
  ### [0.1.57](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.10...v0.1.57) (2025-02-05)
@@ -203,6 +203,10 @@ export const calendarProps = {
203
203
  * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。
204
204
  */
205
205
  immediateChange: makeBooleanProp(false),
206
+ /**
207
+ * 打开前执行的函数
208
+ */
209
+ initFun: Function as PropType<() => void>,
206
210
  }
207
211
 
208
212
  export type CalendarDisplayFormat = (value: number | number[], type: CalendarType) => string
@@ -220,7 +220,7 @@ const formatRange = (value: number, rangeType: 'start' | 'end', type: CalendarTy
220
220
  }
221
221
 
222
222
  const props = defineProps(calendarProps)
223
- const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm', 'open', 'beforeOpen'])
223
+ const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm', 'open'])
224
224
 
225
225
  const pickerShow = ref<boolean>(false)
226
226
  const calendarValue = ref<null | number | number[]>(null)
@@ -344,7 +344,7 @@ function scrollIntoView() {
344
344
  }
345
345
  // 对外暴露方法
346
346
  async function open() {
347
- emit('beforeOpen')
347
+ await props.initFun?.()
348
348
  const { disabled, readonly } = props
349
349
 
350
350
  if (disabled || readonly) return
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.58",
4
+ "version": "0.1.59",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -254,6 +254,10 @@ export declare const calendarProps: {
254
254
  type: BooleanConstructor
255
255
  default: boolean
256
256
  }
257
+ /**
258
+ * 打开前执行的函数
259
+ */
260
+ initFun: PropType<() => void>
257
261
  customStyle: {
258
262
  type: PropType<string>
259
263
  default: string
@@ -129,6 +129,7 @@ declare const _default: __VLS_WithTemplateSlots<
129
129
  type: BooleanConstructor
130
130
  default: boolean
131
131
  }
132
+ initFun: import('vue').PropType<() => void>
132
133
  customStyle: {
133
134
  type: import('vue').PropType<string>
134
135
  default: string
@@ -153,7 +154,6 @@ declare const _default: __VLS_WithTemplateSlots<
153
154
  'update:modelValue': (...args: any[]) => void
154
155
  change: (...args: any[]) => void
155
156
  confirm: (...args: any[]) => void
156
- beforeOpen: (...args: any[]) => void
157
157
  },
158
158
  string,
159
159
  import('vue').PublicProps,
@@ -285,6 +285,7 @@ declare const _default: __VLS_WithTemplateSlots<
285
285
  type: BooleanConstructor
286
286
  default: boolean
287
287
  }
288
+ initFun: import('vue').PropType<() => void>
288
289
  customStyle: {
289
290
  type: import('vue').PropType<string>
290
291
  default: string
@@ -300,7 +301,6 @@ declare const _default: __VLS_WithTemplateSlots<
300
301
  'onUpdate:modelValue'?: ((...args: any[]) => any) | undefined
301
302
  onChange?: ((...args: any[]) => any) | undefined
302
303
  onConfirm?: ((...args: any[]) => any) | undefined
303
- onBeforeOpen?: ((...args: any[]) => any) | undefined
304
304
  },
305
305
  {
306
306
  closeOnClickModal: boolean