@neatui/vue 4.3.0 → 4.5.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 +1 -10
- package/src/components/form/Cascader.vue +3 -3
- package/src/components/form/DatePicker.vue +1 -1
- package/src/components/form/DateRangePicker.vue +1 -1
- package/src/components/form/ImgUpload.vue +3 -1
- package/src/components/form/MoreSelect.vue +5 -5
- package/src/components/form/MoreSelectList.vue +1 -1
- package/src/components/form/MoreSelectPanel.vue +4 -4
- package/src/components/form/MoreSelectPicker.vue +2 -2
- package/src/components/form/PageMoreSelect.vue +5 -5
- package/src/components/form/PageSelect.vue +3 -3
- package/src/components/form/SearchMoreSelect.vue +4 -4
- package/src/components/form/SearchSelect.vue +2 -2
- package/src/components/form/Select.vue +3 -2
- package/src/components/form/SelectList.vue +1 -1
- package/src/components/form/SelectPicker.vue +2 -2
- package/src/components/form/SelectTree/SelectTree.vue +2 -2
- package/src/components/form/Switch.vue +1 -1
- package/src/components/form/Upload.vue +3 -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.5.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.7.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.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,7 +56,6 @@
|
|
|
56
56
|
clickTipHide?: boolean;
|
|
57
57
|
mobile?: boolean;
|
|
58
58
|
title?: string;
|
|
59
|
-
zIndex?: string | number | null;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
// 入参
|
|
@@ -74,7 +73,6 @@
|
|
|
74
73
|
clickTipHide: false,
|
|
75
74
|
mobile: true,
|
|
76
75
|
title: '',
|
|
77
|
-
zIndex: undefined,
|
|
78
76
|
});
|
|
79
77
|
|
|
80
78
|
const dom: any = ref(null);
|
|
@@ -216,20 +214,13 @@
|
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
},
|
|
219
|
-
{ hideOnScrollOut: false
|
|
217
|
+
{ hideOnScrollOut: false },
|
|
220
218
|
);
|
|
221
219
|
} else {
|
|
222
220
|
ex.value = null;
|
|
223
221
|
}
|
|
224
222
|
});
|
|
225
223
|
|
|
226
|
-
watch(
|
|
227
|
-
() => props.zIndex,
|
|
228
|
-
(zIndex) => {
|
|
229
|
-
ex.value?.setOptions({ zIndex });
|
|
230
|
-
},
|
|
231
|
-
);
|
|
232
|
-
|
|
233
224
|
onUnmounted(() => {
|
|
234
225
|
document.removeEventListener('click', cancel, true);
|
|
235
226
|
// 移除触摸事件监听器
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : ''" class="mc-cascader">
|
|
3
3
|
<IFollowView
|
|
4
4
|
ref="ifollow"
|
|
5
5
|
:tipBoxStyle="`${state.flatOpts.length && state.flatOpts[0]?.length > 0 ? 'min-width: 10em;' : 'min-width: 100%'}`"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<template v-if="multiple">
|
|
18
18
|
<li v-for="(item, idx) of opt" :key="idx" class="ux-hover nx-sm r-ss nowrap" @click="multiSelect(item, optIndex)">
|
|
19
19
|
<div ui-flex="row xm">
|
|
20
|
-
<div ui-form="
|
|
20
|
+
<div :ui-form="`${theme} type:checkbox :block`">
|
|
21
21
|
<input
|
|
22
22
|
:checked="item.checkedStatus === 'all'"
|
|
23
23
|
:class="`mr-sm ${item.checkedStatus === 'part' ? 'part-style' : ''}`"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<span>单选</span>
|
|
72
72
|
</p>
|
|
73
73
|
</div>
|
|
74
|
-
<label v-else class="nx-sm r-ss nowrap" ui-form="
|
|
74
|
+
<label v-else class="nx-sm r-ss nowrap" :ui-form="`${theme} type:checkbox :block`">
|
|
75
75
|
<input :checked="state.checkAll" name="checkAll" type="checkbox" @change="checkAllChange" />
|
|
76
76
|
<span :class="`${state.checkAll ? 'co-main' : ''}`">全选</span>
|
|
77
77
|
</label>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" ui-tips="@a co:well" :ui-tips-view="state.show">
|
|
3
3
|
<IFollowView ref="ifollow">
|
|
4
4
|
<Input
|
|
5
5
|
v-bind="{ placeholder, rules, theme, sz, co, block, ready, type, tips, maxlength, minlength, disabled, readonly, clearable, verify, prefix, suffix, interacted }"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" ui-tips="@a co:well" :ui-tips-view="state.show">
|
|
3
3
|
<IFollowView ref="ifollow">
|
|
4
4
|
<InputRange
|
|
5
5
|
v-bind="{ placeholder, rules, theme, sz, co, block, ready, type, tips, maxlength, minlength, disabled, readonly, clearable, verify, prefix, suffix, interacted }"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
<template v-if="(!multiple && files && files.length === 0) || (multiple && (!limit || (limit && files && files.length < limit)))">
|
|
13
13
|
<slot>
|
|
14
|
-
<div ui-flex="row cm" ui-form="
|
|
14
|
+
<div ui-flex="row cm" :ui-form="`${theme} type:upload tips:hover`" :class="`upload bg-fore b-solid b-case b-xs mb-sl ${uploadClass}`" :style="uploadStyle">
|
|
15
15
|
<div v-if="tips" ui-form-tips>
|
|
16
16
|
{{ tips }}
|
|
17
17
|
</div>
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
multiple?: boolean; // 是否可以上传多个文件
|
|
53
53
|
crop?: boolean; // 是否需要抠图处理
|
|
54
54
|
action?: string; // 上传路径
|
|
55
|
+
theme?: string;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
multiple: false,
|
|
65
66
|
crop: false,
|
|
66
67
|
action: '/common/updateFile',
|
|
68
|
+
theme: '@a',
|
|
67
69
|
});
|
|
68
70
|
|
|
69
71
|
const emit = defineEmits(['update:modelValue', 'change']);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select ${sz ? 'sz:' + sz : ''}`">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%">
|
|
4
4
|
<slot>
|
|
5
5
|
<Input
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</slot>
|
|
15
15
|
<template #tips>
|
|
16
16
|
<div v-if="search" class="ny-sm nx-sl">
|
|
17
|
-
<Input v-model="state.search" sz="s">
|
|
17
|
+
<Input v-model="state.search" :theme="theme" sz="s">
|
|
18
18
|
<template #suffix>
|
|
19
19
|
<i ui-form-search="" class="co-note"></i>
|
|
20
20
|
</template>
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
<ul v-if="state.filter?.length" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
|
|
24
24
|
<template v-for="(item, idx) of state.filter" :key="idx">
|
|
25
25
|
<li v-if="item.disabled" class="ux-hover nx-sm r-ss o-ms nowrap">
|
|
26
|
-
<label style="pointer-events: none" ui-form="
|
|
26
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
27
27
|
<input type="checkbox" :name="state.name" :checked="state.processedValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
28
28
|
<del class="ml-sm">{{ item.label || item }}</del>
|
|
29
29
|
</label>
|
|
30
30
|
</li>
|
|
31
31
|
<li v-else class="ux-hover nx-sm r-ss nowrap" @click.stop="select(item.value)">
|
|
32
|
-
<label style="pointer-events: none" ui-form="
|
|
32
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
33
33
|
<input type="checkbox" :name="state.name" :checked="state.processedValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
34
34
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
35
35
|
</label>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<li class="my-ss"><div class="o-mm" ui-line="@a"></div></li>
|
|
42
42
|
<li ui-flex="row xm">
|
|
43
43
|
<div class="ux-hover nx-sm ny-ss r-ss nowrap co-main" @click.stop="allselect()">
|
|
44
|
-
<label style="pointer-events: none" ui-form="
|
|
44
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
45
45
|
<input type="checkbox" :name="state.name" :checked="state.all" />
|
|
46
46
|
<span class="ml-sm">全选({{ state.selectedCount }}/{{ state.availableCount }})</span>
|
|
47
47
|
</label>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
class="n-sm r-ss b-solid b-xs"
|
|
9
9
|
@click.stop="select(item.value)"
|
|
10
10
|
>
|
|
11
|
-
<label ui-form="
|
|
11
|
+
<label :ui-form="`${theme} type:checkbox :block`" style="pointer-events: none">
|
|
12
12
|
<input :checked="mv?.some((i: any) => `${i}` === `${item.value}`)" :name="field" type="checkbox" />
|
|
13
13
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
14
14
|
</label>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select ${sz ? 'sz:' + sz : ''}`">
|
|
3
3
|
<IPickerView ref="ipicker" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%">
|
|
4
4
|
<slot>
|
|
5
5
|
<Input
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
<ul v-if="props.options?.length" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
|
|
17
17
|
<template v-for="(item, idx) of props.options" :key="idx">
|
|
18
18
|
<li v-if="item.disable" class="ux-hover nx-sm r-ss o-ms">
|
|
19
|
-
<label style="pointer-events: none" ui-form="
|
|
19
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
20
20
|
<input type="checkbox" :name="state.name" :checked="modelValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
21
21
|
<del class="ml-sm">{{ item.label || item }}</del>
|
|
22
22
|
</label>
|
|
23
23
|
</li>
|
|
24
24
|
<li v-else class="ux-hover nx-sm r-ss" @click.stop="select(item.value)">
|
|
25
|
-
<label style="pointer-events: none" ui-form="
|
|
25
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
26
26
|
<input type="checkbox" :name="state.name" :checked="modelValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
27
27
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
28
28
|
</label>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<li class="my-ss"><div class="o-mm" ui-line="@a"></div></li>
|
|
35
35
|
<li ui-flex="row xm">
|
|
36
36
|
<div class="ux-hover nx-sm r-ss nowrap co-main" @click.stop="allselect()">
|
|
37
|
-
<label style="pointer-events: none" ui-form="
|
|
37
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
38
38
|
<input type="checkbox" :name="state.name" :checked="state.all" />
|
|
39
39
|
<span class="ml-sm">全选({{ props.options?.length || 0 }})</span>
|
|
40
40
|
</label>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" ref="dom">
|
|
3
3
|
<IPickerView ref="ipicker">
|
|
4
4
|
<Input v-bind="$props" :clearable="false" readonly v-model="state.value">
|
|
5
5
|
<template #suffix><i ui-form-select=""></i></template>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<IScrollView class="full n-ms" :pull="false" :load="false">
|
|
15
15
|
<ul v-if="props.options?.length" class="my-sm-sub">
|
|
16
16
|
<li class="ux-hover n-sm r-ss nowrap b-solid b-case b-xs" v-for="(item, idx) of props.options" :key="idx" @click.stop="select(item.value)">
|
|
17
|
-
<label style="pointer-events: none" ui-form="
|
|
17
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
18
18
|
<input type="checkbox" :name="field" :checked="mv?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
19
19
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
20
20
|
</label>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select ${sz ? 'sz:' + sz : ''}`" :ui-form-open="state.show ? 'show' : ''" ref="dom">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%">
|
|
4
4
|
<slot>
|
|
5
5
|
<Input v-bind="$props" :clearable="false" readonly v-model="state.selectd">
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</slot>
|
|
9
9
|
<template #tips>
|
|
10
10
|
<div v-if="filterable" class="ny-sm nx-sl" style="height: 3em">
|
|
11
|
-
<div :ui-form="
|
|
11
|
+
<div :ui-form="`${theme} type:input sz:s :block`">
|
|
12
12
|
<input type="text" :placeholder="props.placeholder" v-model="state.search" />
|
|
13
13
|
<div ui-form-suffix="">
|
|
14
14
|
<i ui-form-clean="" v-if="state.search" @click.stop="state.search = ''"></i>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<ul v-if="props.options?.length" ui-form-dropdown="" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
|
|
20
20
|
<li class="ux-hover nx-sm r-ss nowrap" v-for="(item, idx) of props.options" :key="idx" @click.stop="select(item.value)">
|
|
21
|
-
<label style="pointer-events: none" ui-form="
|
|
21
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
22
22
|
<input type="checkbox" :name="formName" :checked="modelValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
23
23
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
24
24
|
</label>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<li class="my-ss"><div class="o-mm" ui-line="@a"></div></li>
|
|
30
30
|
<li ui-flex="row xm">
|
|
31
31
|
<div class="ux-hover nx-sm r-ss nowrap co-main" @click.stop="allselect()">
|
|
32
|
-
<label style="pointer-events: none" ui-form="
|
|
32
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
33
33
|
<input type="checkbox" :name="formName" :checked="state.all" />
|
|
34
34
|
<!-- <span class="ml-sm">全选({{ props.options?.length || 0 }})</span> -->
|
|
35
35
|
<span class="ml-sm">全选</span>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
<div ui-flex="row cm" class="nx-sm">
|
|
39
39
|
<button :ui-btn="`@a xs read :border :square ${state.pageInfo.page > 1 ? '' : ':disabled'}`" @click="prev"><i class="icon icon-prev"></i></button>
|
|
40
|
-
<div :ui-form="
|
|
40
|
+
<div :ui-form="`${theme} type:input sz:xs`" class="page-input mx-ss">
|
|
41
41
|
<input type="number" class="ac" :placeholder="props.placeholder" v-model="state.pageInfo.page" @change="pageChange" />
|
|
42
42
|
</div>
|
|
43
43
|
<button :ui-btn="`@a xs read :border :square ${state.pageInfo.page < pageInfo.pages ? '' : ':disabled'}`" @click="next"><i class="icon icon-next"></i></button>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : ''" ref="dom">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%">
|
|
4
4
|
<Input v-bind="$props" :clearable="false" readonly v-model="state.selectd.label" :interacted="interacted">
|
|
5
5
|
<template #suffix><i ui-form-select=""></i></template>
|
|
6
6
|
</Input>
|
|
7
7
|
<template #tips>
|
|
8
8
|
<div v-if="filterable" class="ny-sm nx-sl" style="height: 3em">
|
|
9
|
-
<div :ui-form="
|
|
9
|
+
<div :ui-form="`${theme} type:input sz:s :block`">
|
|
10
10
|
<input type="text" :placeholder="props.placeholder" v-model="state.search" />
|
|
11
11
|
<div ui-form-suffix="">
|
|
12
12
|
<i ui-form-clean="" v-if="state.search" @click.stop="state.search = ''"></i>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<li ui-flex="row xm">
|
|
26
26
|
<div ui-flex="row cm" class="nx-sm">
|
|
27
27
|
<button :ui-btn="`@a s read :border :square ${state.pageInfo.page > 1 ? '' : ':disabled'}`" @click="prev"><i class="icon icon-prev"></i></button>
|
|
28
|
-
<div :ui-form="
|
|
28
|
+
<div :ui-form="`${theme} type:input sz:s`" class="page-input mx-ss">
|
|
29
29
|
<input type="number" class="ac" :placeholder="props.placeholder" v-model="state.pageInfo.page" @change="pageChange" />
|
|
30
30
|
</div>
|
|
31
31
|
<button :ui-btn="`@a s read :border :square ${state.pageInfo.page < pageInfo.pages ? '' : ':disabled'}`" @click="next"><i class="icon icon-next"></i></button>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : ''">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%" @onshow="onshow" @onhide="onhide">
|
|
4
4
|
<Input v-bind="$props" :clearable="false" readonly v-model="state.selectd" @click="toggle" :interacted="interacted">
|
|
5
5
|
<template #suffix><i ui-form-select=""></i></template>
|
|
6
6
|
</Input>
|
|
7
7
|
<template #tips>
|
|
8
8
|
<div class="ny-sm nx-sl" style="height: 3em">
|
|
9
|
-
<div :ui-form="
|
|
9
|
+
<div :ui-form="`${theme} type:input sz:s :block`">
|
|
10
10
|
<input type="text" :placeholder="props.placeholder" v-model="state.search" />
|
|
11
11
|
<div ui-form-suffix="">
|
|
12
12
|
<i ui-form-clean="" v-if="state.search" @click.stop="state.search = ''"></i>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<ul v-if="props.options?.length" ui-form-dropdown="" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
|
|
18
18
|
<li class="ux-hover nx-sm r-ss nowrap" v-for="(item, idx) of state.filter" :key="idx" @click.stop="select(item.value)">
|
|
19
|
-
<label style="pointer-events: none" ui-form="
|
|
19
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
20
20
|
<input type="checkbox" :name="formName" :checked="modelValue?.some((i: any) => `${i}` === `${item.value}`)" />
|
|
21
21
|
<span class="ml-sm">{{ item.label || item }}</span>
|
|
22
22
|
</label>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<li class="my-ss"><div class="o-mm" ui-line="@a"></div></li>
|
|
28
28
|
<li ui-flex="row xm">
|
|
29
29
|
<div class="ux-hover nx-sm r-ss nowrap co-main" @click.stop="allselect()">
|
|
30
|
-
<label style="pointer-events: none" ui-form="
|
|
30
|
+
<label style="pointer-events: none" :ui-form="`${theme} type:checkbox :block`">
|
|
31
31
|
<input type="checkbox" :name="formName" :checked="state.all" />
|
|
32
32
|
<span class="ml-sm">全选({{ state.filter?.length || 0 }})</span>
|
|
33
33
|
</label>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : ''">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%" @onshow="onshow" @onhide="onhide">
|
|
4
4
|
<Input
|
|
5
5
|
v-bind="{ placeholder, rules, theme, sz, co, block, ready, type, tips, disabled, readonly: true, clearable: false, verify, prefix, suffix, interacted }"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</Input>
|
|
11
11
|
<template #tips v-if="!readonly || !disabled">
|
|
12
12
|
<div v-if="search" class="ny-sm nx-sl">
|
|
13
|
-
<Input v-model="state.search" sz="s">
|
|
13
|
+
<Input v-model="state.search" :theme="theme" sz="s">
|
|
14
14
|
<template #suffix>
|
|
15
15
|
<i ui-form-search="" class="co-note"></i>
|
|
16
16
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : ''">
|
|
3
3
|
<IFollowView ref="ifollow" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%" @onshow="onshow" @onhide="onhide">
|
|
4
4
|
<Input
|
|
5
5
|
v-bind="{ placeholder, rules, theme, sz, co, block, ready, type, tips, disabled, readonly: true, clearable: false, verify, prefix, suffix, interacted }"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</Input>
|
|
14
14
|
<template #tips v-if="!readonly && !disabled">
|
|
15
15
|
<div v-if="search" class="ny-sm nx-sl">
|
|
16
|
-
<Input v-model="state.search" :sz="sz">
|
|
16
|
+
<Input v-model="state.search" :theme="theme" :sz="sz">
|
|
17
17
|
<template #suffix>
|
|
18
18
|
<i ui-form-search="" class="co-note"></i>
|
|
19
19
|
</template>
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
v-model="customInputValue"
|
|
39
39
|
v-bind="other.config || {}"
|
|
40
40
|
:placeholder="other.config?.placeholder || '请输入自定义内容'"
|
|
41
|
+
:theme="theme"
|
|
41
42
|
sz="s"
|
|
42
43
|
@keyup.enter="confirmCustomInput"
|
|
43
44
|
@blur="confirmCustomInput"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:key="idx"
|
|
8
8
|
@click="mv = item.value === mv ? '' : item.value"
|
|
9
9
|
>
|
|
10
|
-
<label ui-form="
|
|
10
|
+
<label :ui-form="`${theme} type:radio`" style="pointer-events: none">
|
|
11
11
|
<input type="radio" :name="field" :data-name="field" :checked="item.value === mv" /><span class="lh-ss">{{ item.label || item }}</span>
|
|
12
12
|
</label>
|
|
13
13
|
</li>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" ref="dom">
|
|
3
3
|
<IPickerView ref="ipicker">
|
|
4
4
|
<Input v-bind="$props" :clearable="false" readonly v-model="state.selectd.label">
|
|
5
5
|
<template #suffix><i ui-form-select=""></i></template>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<IScrollView class="full n-ms" :pull="false" :load="false">
|
|
15
15
|
<ul v-if="props.options?.length" class="my-sm-sub">
|
|
16
16
|
<li class="ux-hover n-sm r-ss b-solid b-case b-xs" v-for="(item, idx) of props.options" :key="idx" @click="mv = item.value">
|
|
17
|
-
<label ui-form="
|
|
17
|
+
<label :ui-form="`${theme} type:radio`">
|
|
18
18
|
<input type="radio" :name="item.field" :checked="item.value === mv" /><span>{{ item.label || item }}</span>
|
|
19
19
|
</label>
|
|
20
20
|
</li>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ui-form="
|
|
2
|
+
<div :ui-form="`${theme} type:select sz:${sz}`" :ui-form-open="state.show ? 'show' : 'hide'">
|
|
3
3
|
<IFollowView ref="ifollow" v-model="state.show" tipBoxClass="ny-sm nx-no" tipBoxStyle="min-width: 100%" @onshow="onshow" @onhide="onhide">
|
|
4
4
|
<Input
|
|
5
5
|
v-bind="{ placeholder, rules, theme, sz, co, block, ready, type, tips, disabled, readonly: true, clearable: false, verify, prefix, suffix, interacted }"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</Input>
|
|
11
11
|
<template #tips v-if="!readonly || !disabled">
|
|
12
12
|
<div v-if="search" class="nb-sm nx-sl">
|
|
13
|
-
<Input v-model="state.search" sz="s">
|
|
13
|
+
<Input v-model="state.search" :theme="theme" sz="s">
|
|
14
14
|
<template #suffix>
|
|
15
15
|
<i ui-form-search="" class="co-note"></i>
|
|
16
16
|
</template>
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
<label
|
|
165
165
|
class="pr flex-block"
|
|
166
166
|
:class="{ 'ux-disable': disabled }"
|
|
167
|
-
ui-form="
|
|
167
|
+
:ui-form="`${theme} type:upload tips:hover`"
|
|
168
168
|
:style="`width: ${isNumber(width) ? width + 'em' : width}`"
|
|
169
169
|
v-bind="itemAttrs"
|
|
170
170
|
>
|
|
@@ -209,6 +209,7 @@
|
|
|
209
209
|
disabled?: boolean;
|
|
210
210
|
width?: number | string;
|
|
211
211
|
ratio?: number;
|
|
212
|
+
theme?: string;
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -226,6 +227,7 @@
|
|
|
226
227
|
disabled: false,
|
|
227
228
|
width: 10,
|
|
228
229
|
ratio: 100,
|
|
230
|
+
theme: '@a',
|
|
229
231
|
});
|
|
230
232
|
|
|
231
233
|
interface UploadFile {
|
|
@@ -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() {
|