@neatui/vue 2.5.0 → 2.6.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="full-x" ui-flex="row xt">
|
|
3
|
-
<div class="mr-mm-sub my-sm-sub" ui-flex="row lm
|
|
3
|
+
<div class="flex-block mr-mm-sub my-sm-sub" ui-flex="row lm wrap">
|
|
4
4
|
<template v-for="(item, idx) in state.limit" :key="idx">
|
|
5
5
|
<div v-if="!item._close" ui-flex="row lm" v-bind="{ ...(item.attrs || {}) }">
|
|
6
6
|
<span class="nr-sm flex-fixed o-ls">{{ item.label }}{{ item.label ? ':' : '' }}</span>
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
|
-
<div class="mr-sl-sub my-sm-sub nowrap" ui-flex="row rm" ui-hide="<pad">
|
|
26
|
-
<IFollowView tipBoxClass="nr-no">
|
|
27
|
-
<button ui-btn="@a s case :border">
|
|
28
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="co-read" style="width: 1em; height: 1em">
|
|
25
|
+
<div class="flex-fixed mr-sl-sub my-sm-sub nowrap" ui-flex="row rm" ui-hide="<pad">
|
|
26
|
+
<IFollowView v-if="tools" tipBoxClass="nr-no">
|
|
27
|
+
<button class="bg-fore" ui-btn="@a s case :border :square">
|
|
28
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="co-read fs-ss" style="width: 1em; height: 1em">
|
|
29
29
|
<path
|
|
30
30
|
d="M372 981.6c-80 0-154.4-43.2-195.2-112L35.2 624.8c-40-68.8-40-155.2 0-224.8l141.6-244.8c40-69.6 115.2-112 195.2-112h282.4c80 0 154.4 43.2 195.2 112L991.2 400c40 68.8 40 155.2 0 224.8l-141.6 244.8c-40 69.6-115.2 112-195.2 112H372z m0-825.6c-39.2 0-76.8 21.6-96.8 56L134.4 456c-20 34.4-20 76.8 0 112l140.8 244.8c20 34.4 56.8 55.2 96.8 55.2h282.4c39.2 0 76.8-21.6 96.8-56l140.8-244.8c20-34.4 20-76.8 0-112L751.2 211.2c-20-34.4-56.8-55.2-96.8-55.2H372z m140.8 552.8c-108.8 0-196.8-88-196.8-196.8 0-108.8 88-196.8 196.8-196.8 108.8 0 196.8 88 196.8 196.8 0.8 108.8-88 196.8-196.8 196.8z m0-280c-45.6 0-83.2 37.6-83.2 83.2s37.6 83.2 83.2 83.2c22.4 0 43.2-8.8 59.2-24 16-16 24-36.8 24-59.2 0-45.6-37.6-83.2-83.2-83.2z"
|
|
31
|
-
|
|
31
|
+
/>
|
|
32
32
|
</svg>
|
|
33
33
|
</button>
|
|
34
34
|
<template v-if="state.limit.length" #tips>
|
|
35
|
-
<div class="w-mm h-ls
|
|
35
|
+
<div class="w-mm max-h-ls n-sl" ui-scroll="x:hidden :y">
|
|
36
36
|
<div v-for="(item, idx) in state.limit" :key="idx" class="item ux-hover nowrap r-ss">
|
|
37
37
|
<label class="ny-xs nx-sm" ui-form="@a type:checkbox">
|
|
38
38
|
<input :checked="!item._close" type="checkbox" @change="item._close = item._close ? 0 : 1" />
|
|
@@ -42,25 +42,9 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
</template>
|
|
44
44
|
</IFollowView>
|
|
45
|
-
<button ui-btn="@a s
|
|
45
|
+
<button class="bg-fore" ui-btn="@a s case :border" @click="fResetLimit">{{ words['common.reset'] || '重置' }}</button>
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
48
|
-
<div class="mr-sl-sub my-sm-sub nowrap" ui-hide=">mob">
|
|
49
|
-
<IFollowView tipBoxClass="nr-no">
|
|
50
|
-
<button ui-btn="@a s case :border"><i class="icon icon-add2 fs-xs"></i>添加条件</button>
|
|
51
|
-
<template v-if="state.limit.length" #tips>
|
|
52
|
-
<div class="w-mm h-ls nr-sl" ui-scroll="x:hidden :y">
|
|
53
|
-
<div v-for="(item, idx) in state.limit" :key="idx" class="item ux-hover nowrap r-ss">
|
|
54
|
-
<label class="ny-xs nx-sm" ui-form="@a type:checkbox">
|
|
55
|
-
<input :checked="!item._close" type="checkbox" @change="item._close = item._close ? 0 : 1" />
|
|
56
|
-
<span>{{ item.label }}</span>
|
|
57
|
-
</label>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|
|
61
|
-
</IFollowView>
|
|
62
|
-
<button ui-btn="@a s main" @click="fResetLimit">{{ words['common.reset'] || '重置' }}</button>
|
|
63
|
-
</div>
|
|
64
48
|
</template>
|
|
65
49
|
<script lang="ts" setup>
|
|
66
50
|
import { computed, reactive, watch } from 'vue';
|
|
@@ -97,12 +81,14 @@
|
|
|
97
81
|
words?: { [key: string | number]: any };
|
|
98
82
|
limit: Array<LimitProps>;
|
|
99
83
|
param: any;
|
|
84
|
+
tools?: boolean;
|
|
100
85
|
}
|
|
101
86
|
|
|
102
87
|
const props: any = withDefaults(defineProps<Props>(), {
|
|
103
88
|
words: () => ({}),
|
|
104
89
|
limit: () => [],
|
|
105
|
-
param: () => ({})
|
|
90
|
+
param: () => ({}),
|
|
91
|
+
tools: false
|
|
106
92
|
});
|
|
107
93
|
|
|
108
94
|
// 内部数据
|
|
@@ -111,6 +97,7 @@
|
|
|
111
97
|
limit: [],
|
|
112
98
|
param: {}
|
|
113
99
|
});
|
|
100
|
+
|
|
114
101
|
// 监听外部配置
|
|
115
102
|
watch(
|
|
116
103
|
() => props.limit,
|
|
@@ -152,6 +139,7 @@
|
|
|
152
139
|
},
|
|
153
140
|
{ deep: true, immediate: true }
|
|
154
141
|
);
|
|
142
|
+
|
|
155
143
|
// 缓存交互配置
|
|
156
144
|
watch(
|
|
157
145
|
[() => state.limit],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<table ui-hide="<pad" ui-table="@b sz:l" ref="tableRef">
|
|
5
5
|
<thead class="table-head-fixed">
|
|
6
6
|
<tr>
|
|
7
|
-
<th v-if="
|
|
7
|
+
<th v-if="selected" col-fixed="1" min-width>
|
|
8
8
|
<label class="mb-ss" ui-form="@a type:checkbox"><input type="checkbox" :checked="state.isAllSelect" @change="fSelectAll" /><span></span></label>
|
|
9
9
|
</th>
|
|
10
10
|
<template v-for="(col, idx) in state.table" :key="idx">
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<th v-if="slots.operate" col-fixed="r" class="fs-xs nowrap ar">
|
|
41
41
|
<div ui-flex="row rm">
|
|
42
42
|
<span class="mr-sm">{{ words['operate'] || '操作' }}</span>
|
|
43
|
-
<IFollowView tipBoxClass="n-no">
|
|
43
|
+
<IFollowView v-if="tools" tipBoxClass="n-no">
|
|
44
44
|
<button :ui-btn="`@a none s :square`">
|
|
45
45
|
<Icon name="tableloader-setting" class="co-read"></Icon>
|
|
46
46
|
</button>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<tbody :ui-tbody-load="state.load">
|
|
70
70
|
<template v-if="lists.length">
|
|
71
71
|
<tr v-for="(item, idx) in lists" :key="idx" v-bind="rows.attrs" v-on="event(rows.event, item, 'td')">
|
|
72
|
-
<td v-if="
|
|
72
|
+
<td v-if="selected" col-fixed="1" min-width>
|
|
73
73
|
<label class="mb-ss" ui-form="@a type:checkbox"><input type="checkbox" v-model="item.__selected" /><span></span></label>
|
|
74
74
|
</td>
|
|
75
75
|
<template v-for="(col, idx) in state.table" :key="idx">
|
|
@@ -179,7 +179,8 @@
|
|
|
179
179
|
words?: { [key: string]: any };
|
|
180
180
|
table: Array<JSONRules>;
|
|
181
181
|
lists: Array<any>;
|
|
182
|
-
|
|
182
|
+
selected?: boolean;
|
|
183
|
+
tools?: boolean;
|
|
183
184
|
rows?: {
|
|
184
185
|
attrs?: { [key: string]: any };
|
|
185
186
|
event?: { [key: string]: any };
|
|
@@ -190,7 +191,8 @@
|
|
|
190
191
|
words: () => ({}),
|
|
191
192
|
table: () => [],
|
|
192
193
|
lists: () => [],
|
|
193
|
-
|
|
194
|
+
selected: true,
|
|
195
|
+
tools: true,
|
|
194
196
|
rows: () => ({ attrs: {}, event: {} })
|
|
195
197
|
});
|
|
196
198
|
|