@neatui/vue 4.2.5 → 4.4.0
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 +3 -3
- package/src/components/basic/IFollowView.vue +10 -1
- package/src/components/form/Upload.vue +1 -1
- package/src/components/loader/LayerLoader/LayerLoader.vue +2 -2
- package/src/components/loader/MoveLoader/MoveLoader.vue +1 -1
- package/src/components/loader/TableLoader/TableLoader.vue +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neatui/vue",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "basic component ui",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@fekit/floor": "^3.0.1",
|
|
30
|
-
"@fekit/follow": "^1.
|
|
30
|
+
"@fekit/follow": "^1.8.0",
|
|
31
31
|
"@fekit/itable": "^1.1.6",
|
|
32
32
|
"@fekit/pullload": "^1.3.5",
|
|
33
33
|
"@fekit/scale": "^2.0.1",
|
|
34
34
|
"@fekit/scrollto": "^3.0.3",
|
|
35
35
|
"@fekit/toast": "^2.7.2",
|
|
36
36
|
"@fekit/utils": "^6.0.0",
|
|
37
|
-
"@neatui/css": "^4.
|
|
37
|
+
"@neatui/css": "^4.4.1",
|
|
38
38
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
39
39
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
40
40
|
"@vue/compiler-sfc": "^3.4.30",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
clickTipHide?: boolean;
|
|
57
57
|
mobile?: boolean;
|
|
58
58
|
title?: string;
|
|
59
|
+
zIndex?: string | number | null;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
// 入参
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
clickTipHide: false,
|
|
74
75
|
mobile: true,
|
|
75
76
|
title: '',
|
|
77
|
+
zIndex: undefined,
|
|
76
78
|
});
|
|
77
79
|
|
|
78
80
|
const dom: any = ref(null);
|
|
@@ -214,13 +216,20 @@
|
|
|
214
216
|
}
|
|
215
217
|
}
|
|
216
218
|
},
|
|
217
|
-
{ hideOnScrollOut: false },
|
|
219
|
+
{ hideOnScrollOut: false, zIndex: props.zIndex },
|
|
218
220
|
);
|
|
219
221
|
} else {
|
|
220
222
|
ex.value = null;
|
|
221
223
|
}
|
|
222
224
|
});
|
|
223
225
|
|
|
226
|
+
watch(
|
|
227
|
+
() => props.zIndex,
|
|
228
|
+
(zIndex) => {
|
|
229
|
+
ex.value?.setOptions({ zIndex });
|
|
230
|
+
},
|
|
231
|
+
);
|
|
232
|
+
|
|
224
233
|
onUnmounted(() => {
|
|
225
234
|
document.removeEventListener('click', cancel, true);
|
|
226
235
|
// 移除触摸事件监听器
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="w-full pr" :style="`box-sizing: content-box; padding-top: ${ratio}%`">
|
|
5
5
|
<div class="pa full ot-no ol-no bg-fore n-sm b-solid b-case b-xs r-sm" ui-flex="col cm">
|
|
6
6
|
<!-- 删除按钮 -->
|
|
7
|
-
<div v-if="!disabled" class="pa w-sl h-sl ot-ss or-ss bg-fore co-risk lh-xs r-xl
|
|
7
|
+
<div v-if="!disabled" class="pa w-sl h-sl ot-ss or-ss bg-fore co-risk lh-xs r-xl sub-hover z-ls" ui-flex="row cm" @click="remove(idx)">
|
|
8
8
|
<svg class="block" style="width: 1.2em; height: 1.2em" viewBox="0 0 1024 1024">
|
|
9
9
|
<path
|
|
10
10
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66 0.3L512 563.4l-99.3 118.4-66.1-0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359c-1.2-1.5-1.9-3.3-1.9-5.2 0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<slot name="suffix" :item="item" :path="paths(idx)"></slot>
|
|
25
25
|
</div>
|
|
26
26
|
<slot name="tools" :data="data" :item="item" :path="paths(idx)">
|
|
27
|
-
<div ui-flex="row rm" class="layer-loader-tool
|
|
27
|
+
<div ui-flex="row rm" class="layer-loader-tool sub-hover fs-sm" :data-model="item.model">
|
|
28
28
|
<div ui-tips="@a co:well ux:hover">
|
|
29
29
|
<button ui-btn="@a none s :square">
|
|
30
30
|
<i class="icon icon-add"></i>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
<button ui-btn="@a none s :square" @click="fDelNode(item, data, idx)"><i class="icon icon-delete"></i></button>
|
|
49
49
|
</div>
|
|
50
|
-
<button ui-btn="@a none s :square" class="layer-loader-tool fs-sm" :class="item?.attrs?.hide ? '' : '
|
|
50
|
+
<button ui-btn="@a none s :square" class="layer-loader-tool fs-sm" :class="item?.attrs?.hide ? '' : 'sub-hover'" @click="fhideNode(item)">
|
|
51
51
|
<i class="icon" :class="item?.attrs?.hide ? 'icon-hide' : 'icon-view'"></i>
|
|
52
52
|
</button>
|
|
53
53
|
</slot>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<label class="mb-ss" ui-form="@a type:checkbox"><input type="checkbox" v-model="all" /><span></span></label>
|
|
9
9
|
</th>
|
|
10
10
|
<template v-for="(col, idx) in state.table" :key="idx">
|
|
11
|
-
<th v-if="!col.__close"
|
|
11
|
+
<th v-if="!col.__close" v-bind="colSizeAttrs(col)" :col-fixed="col.fixed" :col-fixed-side="col.fixed || 'l'" :data-field="col.field">
|
|
12
12
|
<slot :name="`thead-${col.field}`" :col="col" :idx="idx">
|
|
13
13
|
<div :class="!slots.operate && idx === state.__last ? 'ar' : ''" v-bind="col.thead">
|
|
14
14
|
<span class="ux-none" ui-flex="row rm" v-if="col.order === 0 || col.order === 1 || col.order === 2" @click="fSetOrder(col)">
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<td
|
|
83
83
|
v-if="!col.__close"
|
|
84
84
|
:class="`${!slots.operate && cid === state.__last ? 'ar' : ''}`"
|
|
85
|
-
|
|
85
|
+
v-bind="colSizeAttrs(col)"
|
|
86
86
|
:col-fixed="col.fixed"
|
|
87
87
|
:col-fixed-side="col.fixed || 'l'"
|
|
88
88
|
:data-field="col.field"
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
interface JSONRules {
|
|
166
166
|
label: string | (() => string);
|
|
167
167
|
field: string | (() => string);
|
|
168
|
-
width?: string | (() => string);
|
|
168
|
+
width?: 'min' | 'max' | string | (() => string);
|
|
169
169
|
fixed?: string | (() => string);
|
|
170
170
|
paths?: string | (() => string);
|
|
171
171
|
thead?: Record<string, any> | ((data: any) => Record<string, any>);
|
|
@@ -232,6 +232,16 @@
|
|
|
232
232
|
|
|
233
233
|
const name = computed(() => 'confs' + route.path?.replace(/\//g, '_')) || '';
|
|
234
234
|
|
|
235
|
+
const colSizeAttrs = (col: TableColumn) => {
|
|
236
|
+
const raw = isFunction(col.width) ? col.width() : col.width;
|
|
237
|
+
const width = raw == null ? '' : String(raw).trim();
|
|
238
|
+
const attrs: Record<string, any> = {};
|
|
239
|
+
if (width === 'min' || (!width && col.fixed)) attrs['min-width'] = '';
|
|
240
|
+
if (width === 'max') attrs['max-width'] = '';
|
|
241
|
+
if (width && width !== 'min' && width !== 'max') attrs.style = { width, minWidth: width, maxWidth: width };
|
|
242
|
+
return attrs;
|
|
243
|
+
};
|
|
244
|
+
|
|
235
245
|
// 全选状态
|
|
236
246
|
const all = computed({
|
|
237
247
|
get() {
|