@neatui/nuxt 1.6.11 → 1.6.12
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/.prettierrc +12 -0
- package/package.json +1 -1
- package/src/components/basic/IFollowView.vue +35 -27
package/.prettierrc
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/prettierrc",
|
|
3
|
+
"semi": true,
|
|
4
|
+
"arrowParens": "always",
|
|
5
|
+
"trailingComma": "all",
|
|
6
|
+
"singleQuote": true,
|
|
7
|
+
"printWidth": 180,
|
|
8
|
+
"tabWidth": 2,
|
|
9
|
+
"bracketSameLine": false,
|
|
10
|
+
"vueIndentScriptAndStyle": true,
|
|
11
|
+
"htmlWhitespaceSensitivity": "ignore"
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div ref="dom" :class="btnClass" :style="btnStyle" @click="toggle" @mouseover="hovershow" @mouseout="hoverhide">
|
|
3
3
|
<slot>
|
|
4
|
-
<button ui-btn="@a s case :border"
|
|
4
|
+
<button ui-btn="@a s case :border">
|
|
5
|
+
<i class="icon icon-dropdown"></i>
|
|
6
|
+
</button>
|
|
5
7
|
</slot>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
<Teleport v-if="teleportReady && $slots.tips" to="#ifollow">
|
|
9
|
+
<div
|
|
10
|
+
ref="tip"
|
|
11
|
+
:class="`${tipClass}${mobile ? ' fekit-follow-mobile' : ''}`"
|
|
12
|
+
:style="`position: fixed; pointer-events: none; ${tipStyle}`"
|
|
13
|
+
ui-tips="@a"
|
|
14
|
+
:ui-tips-view="state.show ? 1 : 0"
|
|
15
|
+
@mouseover="hovershow"
|
|
16
|
+
@mouseout="hoverhide"
|
|
17
|
+
@click="clickhide"
|
|
18
|
+
>
|
|
19
|
+
<div ref="box" :ui-tips-box="state.pos" :class="tipBoxClass" :style="tipBoxStyle">
|
|
20
|
+
<div ui-hide=">mob" class="mob-follow-tips w-full n-ss" ui-flex="row xm">
|
|
21
|
+
<div class="w-sm"></div>
|
|
22
|
+
<div>
|
|
23
|
+
<h5 class="bold">{{ title }}</h5>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="w-sm" ui-flex="row rm">
|
|
26
|
+
<button ui-btn="@a none s :square" @click="toggle">
|
|
27
|
+
<i class="icon icon-close"></i>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
26
30
|
</div>
|
|
31
|
+
<slot name="tips"></slot>
|
|
32
|
+
<div v-if="arrow" ui-tips-arrow="" v-bind="arrow"></div>
|
|
27
33
|
</div>
|
|
28
|
-
<slot name="tips"></slot>
|
|
29
|
-
<div v-if="arrow" ui-tips-arrow="" v-bind="arrow"></div>
|
|
30
34
|
</div>
|
|
31
|
-
</
|
|
32
|
-
</
|
|
35
|
+
</Teleport>
|
|
36
|
+
</div>
|
|
33
37
|
</template>
|
|
34
38
|
<script setup lang="ts">
|
|
35
39
|
import { reactive, ref, onMounted, onUnmounted, watch } from 'vue';
|
|
@@ -179,8 +183,12 @@
|
|
|
179
183
|
ensureTeleportTarget();
|
|
180
184
|
document.addEventListener('click', cancel, true);
|
|
181
185
|
// 添加触摸事件监听器以防止页面滚动
|
|
182
|
-
document.addEventListener('touchstart', preventTouchScroll, {
|
|
183
|
-
|
|
186
|
+
document.addEventListener('touchstart', preventTouchScroll, {
|
|
187
|
+
passive: false,
|
|
188
|
+
});
|
|
189
|
+
document.addEventListener('touchmove', preventTouchScroll, {
|
|
190
|
+
passive: false,
|
|
191
|
+
});
|
|
184
192
|
// 判断是否为移动端
|
|
185
193
|
state.isMobile = window.innerWidth < 800;
|
|
186
194
|
});
|