its_ui_vite 1.0.7 → 1.0.9
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
package/src/assets/js/helpers.js
CHANGED
|
@@ -46,8 +46,6 @@ export function isMobile() {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
let MapTargets = new Map()
|
|
50
|
-
|
|
51
49
|
export const CClasses = {
|
|
52
50
|
scrollContainer: 'scroll-container',
|
|
53
51
|
}
|
|
@@ -61,27 +59,6 @@ export function addTracingElement(target, moveFn = () => {}) {
|
|
|
61
59
|
let timer
|
|
62
60
|
let debounceTimer
|
|
63
61
|
|
|
64
|
-
function isMovableTarget() {
|
|
65
|
-
if (target.value === null) return false
|
|
66
|
-
|
|
67
|
-
const currentPosition = target.value.getBoundingClientRect()
|
|
68
|
-
|
|
69
|
-
if (MapTargets.has(target.value)) {
|
|
70
|
-
const oldPosition = MapTargets.get(target.value)
|
|
71
|
-
|
|
72
|
-
const isMovingTargetX = oldPosition.x - currentPosition.x
|
|
73
|
-
const isMovingTargetY = oldPosition.y - currentPosition.y
|
|
74
|
-
|
|
75
|
-
MapTargets.set(target.value, currentPosition)
|
|
76
|
-
|
|
77
|
-
return isMovingTargetX !== 0 || isMovingTargetY !== 0
|
|
78
|
-
} else {
|
|
79
|
-
MapTargets.set(target.value, currentPosition)
|
|
80
|
-
|
|
81
|
-
return false
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
62
|
function isVisible(position) {
|
|
86
63
|
if (!position) return false
|
|
87
64
|
|
|
@@ -104,8 +81,6 @@ export function addTracingElement(target, moveFn = () => {}) {
|
|
|
104
81
|
}
|
|
105
82
|
|
|
106
83
|
function dispatch() {
|
|
107
|
-
if (!isMovableTarget()) return;
|
|
108
|
-
|
|
109
84
|
const position = target.value.getBoundingClientRect()
|
|
110
85
|
|
|
111
86
|
if (!position) return;
|
|
@@ -273,6 +273,7 @@ const handleOption: TDebounceEvent = function(option, evt) {
|
|
|
273
273
|
setOption(option, evt);
|
|
274
274
|
|
|
275
275
|
if (!isMultiple.value) dispatchEmit()
|
|
276
|
+
setActivePlaceholder()
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
const setOption: TDebounceEvent = function(option, evt) {
|
|
@@ -363,14 +364,15 @@ function setListPosition() {
|
|
|
363
364
|
|
|
364
365
|
function handleClick(evt: MouseEvent) {
|
|
365
366
|
const target = (evt.target as HTMLElement);
|
|
366
|
-
const classesStr = `.${classes.input},.c-input__custom-icon${isMultiple.value ? ',.c-input__custom-icon,.c-
|
|
367
|
+
const classesStr = `.${classes.input},.c-input__custom-icon${isMultiple.value ? ',.c-input__custom-icon,.c-select__list' : ''}`
|
|
367
368
|
const currentRoot = target.closest(`.${classes.root}`)
|
|
368
369
|
const domElements = target.closest(classesStr)
|
|
369
370
|
|
|
370
371
|
const isRoot = currentRoot === root.value
|
|
372
|
+
const isList = domElements === list.value.$el
|
|
371
373
|
const isToggle = target.closest('.c-input__custom-icon')
|
|
372
374
|
|
|
373
|
-
if (isRoot && domElements) {
|
|
375
|
+
if ((isRoot || isList) && domElements) {
|
|
374
376
|
setListPosition()
|
|
375
377
|
isOpen.value = isToggle ? !isOpen.value : true
|
|
376
378
|
emit('update:isOpen', isOpen.value)
|
package/src/pages/index.vue
CHANGED
|
@@ -727,7 +727,7 @@
|
|
|
727
727
|
<!-- ./col -->
|
|
728
728
|
|
|
729
729
|
<!-- col -->
|
|
730
|
-
<div class="table__col scroll-sm">
|
|
730
|
+
<div class="table__col scroll-sm scroll-container">
|
|
731
731
|
<div class="table__item">
|
|
732
732
|
<CSelect @change_cselect="(evt) => log(['CSelect default', ...evt])" :autocomplete="true" size="md" :options="[
|
|
733
733
|
{
|