stellar-ui-plus 1.24.24 → 1.24.26
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/components/ste-dropdown-menu/props.ts +1 -0
- package/components/ste-dropdown-menu/ste-dropdown-menu.vue +1 -0
- package/components/ste-filter-tool/ATTRIBUTES.md +1 -0
- package/components/ste-filter-tool/props.ts +1 -0
- package/components/ste-filter-tool/ste-filter-tool.easycom.json +6 -0
- package/components/ste-filter-tool/ste-filter-tool.vue +6 -2
- package/components/ste-filter-tool/useData.ts +8 -0
- package/components/ste-media-preview/ATTRIBUTES.md +1 -0
- package/components/ste-media-preview/README.md +7 -0
- package/components/ste-media-preview/props.ts +1 -0
- package/components/ste-media-preview/ste-media-preview.easycom.json +6 -0
- package/components/ste-media-preview/ste-media-preview.vue +1 -1
- package/components/ste-upload/ATTRIBUTES.md +1 -0
- package/components/ste-upload/README.md +9 -0
- package/components/ste-upload/ste-upload.easycom.json +5 -0
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ export default dropDownMenuProps;
|
|
|
26
26
|
export const dropDownMenuEmits = {
|
|
27
27
|
close: () => true,
|
|
28
28
|
open: () => true,
|
|
29
|
+
maskClick: () => true,
|
|
29
30
|
change: (value: Array<any>) => Array.isArray(value),
|
|
30
31
|
'item-choose': (item: any) => item,
|
|
31
32
|
'update:modelValue': (value: Array<any>) => Array.isArray(value),
|
|
@@ -35,6 +35,7 @@ export const filterToolEmits = {
|
|
|
35
35
|
// 值变化(实时)
|
|
36
36
|
'update:value': (values: FilterValue[]) => Array.isArray(values),
|
|
37
37
|
itemClick: (item: FilterValue) => item instanceof Object,
|
|
38
|
+
maskClose: () => true,
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
export type FilterToolProps = ExtractPropTypes<typeof props>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ste-filter-tool--root" :style="[rootStyleVar, { '--category-count': categoryData.length }]">
|
|
3
|
-
<ste-dropdown-menu ref="steDropMenu" class="filter-box-menu" :activeColor="activeColor" dropDownIconColor="#000" v-model:showPopup="showMenu">
|
|
3
|
+
<ste-dropdown-menu ref="steDropMenu" class="filter-box-menu" :activeColor="activeColor" dropDownIconColor="#000" v-model:showPopup="showMenu" @maskClick="handleMaskClick">
|
|
4
4
|
<template #title>
|
|
5
5
|
<slot>
|
|
6
6
|
<view></view>
|
|
@@ -146,7 +146,7 @@ const rootStyleVar = computed(() => ({
|
|
|
146
146
|
}));
|
|
147
147
|
|
|
148
148
|
// 使用简化的筛选逻辑组合式函数
|
|
149
|
-
const { handleFilterClick, handleCheckboxChange, handleReset, handleConfirm } = useData(props, emits, filtersData);
|
|
149
|
+
const { handleFilterClick, handleCheckboxChange, handleReset, handleConfirm, handleMaskClose } = useData(props, emits, filtersData);
|
|
150
150
|
|
|
151
151
|
// 工具类实例
|
|
152
152
|
const calculator = new ScrollCalculator(instance, filtersData);
|
|
@@ -217,6 +217,10 @@ const toggleExpand = (item: FilterItem) => {
|
|
|
217
217
|
item.expand = !item.expand;
|
|
218
218
|
};
|
|
219
219
|
|
|
220
|
+
function handleMaskClick() {
|
|
221
|
+
handleMaskClose();
|
|
222
|
+
}
|
|
223
|
+
|
|
220
224
|
// 监听器
|
|
221
225
|
watch(
|
|
222
226
|
() => props.data,
|
|
@@ -138,6 +138,13 @@ export default function useSimpleFilterLogic(props: FilterToolProps, emits: Setu
|
|
|
138
138
|
emits('confirm', currentValues);
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
+
/**
|
|
142
|
+
* 点击蒙层关闭了弹窗后触发
|
|
143
|
+
*/
|
|
144
|
+
const handleMaskClose = () => {
|
|
145
|
+
emits('maskClose');
|
|
146
|
+
};
|
|
147
|
+
|
|
141
148
|
// 监听props.value变化,同步到组件内部状态
|
|
142
149
|
watch(
|
|
143
150
|
() => props.value,
|
|
@@ -156,6 +163,7 @@ export default function useSimpleFilterLogic(props: FilterToolProps, emits: Setu
|
|
|
156
163
|
handleCheckboxChange,
|
|
157
164
|
handleReset,
|
|
158
165
|
handleConfirm,
|
|
166
|
+
handleMaskClose,
|
|
159
167
|
collectCurrentValues,
|
|
160
168
|
setValuesFromProps,
|
|
161
169
|
};
|
|
@@ -140,7 +140,7 @@ const onClick = () => {
|
|
|
140
140
|
};
|
|
141
141
|
</script>
|
|
142
142
|
<template>
|
|
143
|
-
<view class="ste-media-preview-root" data-test="media-preview" v-if="dataShow">
|
|
143
|
+
<view class="ste-media-preview-root" :style="{ zIndex }" data-test="media-preview" v-if="dataShow">
|
|
144
144
|
<view class="media-preview-content">
|
|
145
145
|
<template v-if="isScale">
|
|
146
146
|
<view
|
|
@@ -32,5 +32,6 @@
|
|
|
32
32
|
| `beforeDelete` | 文件删除前触发 | `index`:正在删除的文件下标<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
33
33
|
| `delete` | 文件删除后触发 | `index`:删除的文件下标<br/>`fileList`:删除后的文件列表 | - |
|
|
34
34
|
| `open-preview` | 打开预览时触发 | - | - |
|
|
35
|
+
| `preview-change` | 预览图片变化触发 | - | - |
|
|
35
36
|
| `close-preview` | 关闭预览时触发 | - | - |
|
|
36
37
|
| `click-item` | 点击文件触发 | `index`:文件下标 | - |
|
|
@@ -248,5 +248,14 @@
|
|
|
248
248
|
|
|
249
249
|
<!-- props -->
|
|
250
250
|
|
|
251
|
+
#### 组件插槽(Slots)
|
|
252
|
+
|
|
253
|
+
| 插槽名 | 说明 | 插槽参数 | 支持版本 |
|
|
254
|
+
| ------- | ------------ | -------- | -------- |
|
|
255
|
+
| default | 上传按钮 | - | - |
|
|
256
|
+
| preview-cover | 每一份文件的预览图层样式 | 当前文件 | - |
|
|
257
|
+
| media-preview | 图片放大预览(媒体预览组件带默认插槽) | - | - |
|
|
258
|
+
|
|
259
|
+
|
|
251
260
|
---$
|
|
252
261
|
{{xuyajun}}
|
|
@@ -258,6 +258,11 @@
|
|
|
258
258
|
"description": "打开预览时触发",
|
|
259
259
|
"type": "()=>void"
|
|
260
260
|
},
|
|
261
|
+
{
|
|
262
|
+
"name": "[event]preview-change",
|
|
263
|
+
"description": "预览图片变化触发",
|
|
264
|
+
"type": "(index:number | null)=>void"
|
|
265
|
+
},
|
|
261
266
|
{
|
|
262
267
|
"name": "[event]close-preview",
|
|
263
268
|
"description": "关闭预览时触发",
|