@mythpe/quasar-ui-qui 0.0.77 → 0.0.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -2043,7 +2043,7 @@ defineOptions({
2043
2043
  <q-separator />
2044
2044
  <q-card-section
2045
2045
  :style="`height: ${($q.screen.height || 100) - 3 - (($refs.showActionsRef as any)?.$el?.offsetHeight || 60) - (($refs.showTitleRef as any)?.$el?.offsetHeight || 80)}px`"
2046
- class="scroll"
2046
+ class="scroll m--datatable__dialog-show-container"
2047
2047
  >
2048
2048
  <slot
2049
2049
  :dt="datatableItemsScope"
@@ -63,7 +63,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
63
63
  return k
64
64
  })
65
65
  const getLabel = computed<string | undefined>(() => {
66
- const k = props.label === undefined ? props.name : props.label
66
+ const k = nameLabel.value
67
67
  return k ? (__(k) || undefined) : undefined
68
68
  })
69
69
  const getPlaceholder = computed<string | undefined>(() => {
@@ -198,7 +198,7 @@ export const Helpers = {
198
198
  }
199
199
  })
200
200
  },
201
- async scrollToElement (el: HTMLElement | string, opt?: { target?: HTMLElement | string, duration?: number; }) {
201
+ async scrollToElement (el: Element | HTMLElement | string, opt?: { target?: HTMLElement | string, duration?: number; }) {
202
202
  await nextTick()
203
203
  const { getScrollTarget, setVerticalScrollPosition, getVerticalScrollPosition } = scroll
204
204
  const scrollTo = typeof el === 'string' ? document.querySelector(el) as HTMLElement : el
@@ -242,7 +242,7 @@ export const Helpers = {
242
242
  } while (parent)
243
243
  } catch (e) {
244
244
  console.log(e)
245
- offset = scrollTo?.offsetTop || 0
245
+ offset = 'offsetTop' in scrollTo ? scrollTo?.offsetTop as number || 0 : 0
246
246
  }
247
247
  // console.log(offset, parent, current)
248
248
  // const position = offset
@@ -279,6 +279,17 @@ export const Helpers = {
279
279
  }
280
280
  }
281
281
  },
282
+ async scrollToBottom (scrollTarget?: HTMLElement | Element | Window | string, duration?: number, offset?: number) {
283
+ const { setVerticalScrollPosition, getScrollHeight } = scroll
284
+ if (!scrollTarget) {
285
+ scrollTarget = window
286
+ }
287
+ const str = scrollTarget && typeof scrollTarget === 'string'
288
+ const target = str ? document.querySelector(scrollTarget as string) as HTMLElement || window : scrollTarget as any
289
+ offset = offset || getScrollHeight(target)
290
+ duration = duration || 600
291
+ setVerticalScrollPosition(target, offset, duration)
292
+ },
282
293
  makeUrl (path: string) {
283
294
  path = path || ''
284
295
  if (path.slice(0, 1) === '/') {