af-mobile-client-vue3 1.3.70 → 1.3.72
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,9 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import cameraIcon from '@af-mobile-client-vue3/assets/img/component/camera.png'
|
|
2
|
+
// import cameraIcon from '@af-mobile-client-vue3/assets/img/component/camera.png'
|
|
3
3
|
import { deleteFile, upload } from '@af-mobile-client-vue3/services/api/common'
|
|
4
4
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
5
5
|
import {
|
|
6
6
|
ActionSheet,
|
|
7
|
+
Icon as VanIcon,
|
|
7
8
|
Uploader as vanUploader,
|
|
8
9
|
} from 'vant'
|
|
9
10
|
import { ref } from 'vue'
|
|
@@ -379,28 +380,30 @@ function handleActionSelect(option: any) {
|
|
|
379
380
|
style="display:none"
|
|
380
381
|
@change="(e:any) => handleBrowserFiles(e.target.files)"
|
|
381
382
|
>
|
|
382
|
-
<div
|
|
383
|
-
v-if="!props.readonly && props.mode !== '预览' && (imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly')"
|
|
384
|
-
class="custom-upload-area"
|
|
385
|
-
@click="handleUploadAreaClick"
|
|
386
|
-
>
|
|
387
|
-
<img :src="cameraIcon" alt="camera" class="upload-camera-img">
|
|
388
|
-
<div class="upload-title">
|
|
389
|
-
上传附件
|
|
390
|
-
</div>
|
|
391
|
-
<div v-if="props.attr?.acceptCount" class="upload-desc">
|
|
392
|
-
上传限制: {{ imageList.length }} / {{ props.attr?.acceptCount }}
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
383
|
<van-uploader
|
|
396
384
|
ref="uploaderRef"
|
|
397
385
|
v-model="imageList"
|
|
398
|
-
|
|
386
|
+
class="custom-trigger-uploader"
|
|
387
|
+
:show-upload="true"
|
|
399
388
|
:deletable="!props.readonly && (props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin') && props.mode !== '预览'"
|
|
400
389
|
:multiple="!props.readonly && props.authority === 'admin'"
|
|
401
390
|
:preview-image="true"
|
|
402
391
|
:before-delete="!props.readonly && props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin' ? deleteFileFunction : undefined"
|
|
403
|
-
|
|
392
|
+
:before-read="() => false"
|
|
393
|
+
>
|
|
394
|
+
<template #default>
|
|
395
|
+
<div
|
|
396
|
+
v-if="!props.readonly && props.mode !== '预览' && (imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly')"
|
|
397
|
+
class="custom-upload-area"
|
|
398
|
+
@click="handleUploadAreaClick"
|
|
399
|
+
>
|
|
400
|
+
<VanIcon name="plus" size="35" color="#d9d9d9" />
|
|
401
|
+
<div v-if="props.attr?.acceptCount" class="upload-desc">
|
|
402
|
+
{{ imageList.length }} / {{ props.attr?.acceptCount }}
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</template>
|
|
406
|
+
</van-uploader>
|
|
404
407
|
<ActionSheet
|
|
405
408
|
v-model:show="showActionSheet"
|
|
406
409
|
:actions="actionOptions"
|
|
@@ -420,10 +423,13 @@ function handleActionSelect(option: any) {
|
|
|
420
423
|
// 该属性会影响表单布局
|
|
421
424
|
// gap: 16px;
|
|
422
425
|
}
|
|
426
|
+
/* 让自定义上传按钮可点击:关闭 Vant 覆盖在上方的透明 input 的事件捕获 */
|
|
427
|
+
:deep(.custom-trigger-uploader .van-uploader__input) {
|
|
428
|
+
pointer-events: none;
|
|
429
|
+
}
|
|
423
430
|
.custom-upload-area {
|
|
424
|
-
width:
|
|
425
|
-
height:
|
|
426
|
-
min-height: 80px;
|
|
431
|
+
width: 82px;
|
|
432
|
+
height: 82px;
|
|
427
433
|
box-sizing: border-box;
|
|
428
434
|
border: 1px dashed #d9d9d9;
|
|
429
435
|
border-radius: 10px;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XBadge from '@af-mobile-client-vue3/components/data/XBadge/index.vue'
|
|
3
3
|
import XCellListFilter from '@af-mobile-client-vue3/components/data/XCellListFilter/index.vue'
|
|
4
|
+
import { isDark } from '@af-mobile-client-vue3/composables/dark'
|
|
4
5
|
import { getConfigByName, query } from '@af-mobile-client-vue3/services/api/common'
|
|
5
6
|
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
6
7
|
import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
|
|
@@ -724,7 +725,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
724
725
|
|
|
725
726
|
<template>
|
|
726
727
|
<div id="XCellList">
|
|
727
|
-
<VanRow class="filter-condition">
|
|
728
|
+
<VanRow class="filter-condition" :class="{ dark: isDark }">
|
|
728
729
|
<!-- 左侧动态插槽区域 -->
|
|
729
730
|
<template v-for="(_, name) in slots" :key="name">
|
|
730
731
|
<template v-if="typeof name === 'string' && name.startsWith('search-left-')">
|
|
@@ -1290,7 +1291,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
1290
1291
|
}
|
|
1291
1292
|
|
|
1292
1293
|
.van-popover__content {
|
|
1293
|
-
background-color: #ffffff !important;
|
|
1294
|
+
//background-color: #ffffff !important;
|
|
1294
1295
|
border: none !important;
|
|
1295
1296
|
outline: none !important;
|
|
1296
1297
|
border-radius: 8px !important;
|
|
@@ -1298,7 +1299,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
1298
1299
|
|
|
1299
1300
|
.van-popover__arrow,
|
|
1300
1301
|
.van-popover_arrow {
|
|
1301
|
-
background-color: #ffffff !important;
|
|
1302
|
+
//background-color: #ffffff !important;
|
|
1302
1303
|
border: none !important;
|
|
1303
1304
|
outline: none !important;
|
|
1304
1305
|
}
|
|
@@ -1306,9 +1307,9 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
1306
1307
|
.van-popover__action {
|
|
1307
1308
|
color: #333 !important;
|
|
1308
1309
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1310
|
+
//&:hover {
|
|
1311
|
+
// //background-color: #f5f5f5 !important;
|
|
1312
|
+
//}
|
|
1312
1313
|
}
|
|
1313
1314
|
}
|
|
1314
1315
|
|
|
@@ -1406,6 +1407,9 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
1406
1407
|
}
|
|
1407
1408
|
}
|
|
1408
1409
|
}
|
|
1410
|
+
.filter-condition.dark {
|
|
1411
|
+
background-color: #222222;
|
|
1412
|
+
}
|
|
1409
1413
|
|
|
1410
1414
|
.multi-select-hint {
|
|
1411
1415
|
display: flex;
|
package/src/styles/var.less
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
.van-popover,
|
|
19
19
|
.van-popover.van-popover--light,
|
|
20
20
|
.van-popover.van-popover--dark {
|
|
21
|
-
background-color: #ffffff !important;
|
|
21
|
+
//background-color: #ffffff !important;
|
|
22
22
|
border: none !important;
|
|
23
23
|
outline: none !important;
|
|
24
24
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|