@kengic/uni 0.6.3-beta.5 → 0.6.3-beta.50
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/{dist/api → api}/WMS/Controllers/CommonController/index.ts +1 -1
- package/{dist/api → api}/WMS/Controllers/WhController/ListVO.ts +14 -14
- package/{dist/api → api}/WMS/Controllers/WhController/index.ts +1 -1
- package/{dist/api → api}/WMS/Controllers/WorkstationController/List.ts +1 -1
- package/{dist/api → api}/WMS/index.ts +2 -2
- package/{dist/api → api}/WMS/models.ts +59 -35
- package/{dist/api → api}/api.ts +1 -1
- package/{dist/api → api}/def.ts +1 -1
- package/{dist/api → api}/index.ts +2 -2
- package/{dist/component → component}/KgStation/KgStation.vue +120 -9
- package/{dist/component → component}/KgStation/index.hooks.ts +1 -1
- package/{dist/component → component}/KgUpdatePopup/KgUpdatePopup.vue +1 -1
- package/{dist/component → component}/KgWarehouse/KgWarehouse.vue +1 -1
- package/{dist/index.css → index.css} +30 -0
- package/lodash-es.ts +1 -0
- package/package.json +13 -44
- package/{dist/service → service}/http-client.ts +103 -58
- package/{dist/store → store}/app.store.ts +12 -0
- package/{dist/uni → uni}/uni-ui/uni-data-select/uni-data-select.vue +4 -3
- package/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1071 -0
- package/{dist/uni → uni}/uni-ui/uni-easyinput/uni-easyinput.vue +1 -4
- package/{dist/uni → uni}/uni-ui/uni-pagination/uni-pagination.vue +8 -4
- package/{dist/uni → uni}/uni-ui/uni-segmented-control/uni-segmented-control.vue +4 -4
- package/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +403 -0
- package/{dist/util → util}/kg.ts +62 -14
- package/CHANGELOG.md +0 -15
- package/README.md +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +0 -1026
- package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +0 -347
- package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +0 -341
- /package/{dist/api → api}/WMS/Controllers/CommonController/GetLatestApkVersion.ts +0 -0
- /package/{dist/api → api}/WMS/Controllers/LoginController/GetUserInfo.ts +0 -0
- /package/{dist/api → api}/WMS/Controllers/LoginController/Logout.ts +0 -0
- /package/{dist/api → api}/WMS/Controllers/LoginController/index.ts +0 -0
- /package/{dist/api → api}/WMS/Controllers/WorkstationController/index.ts +0 -0
- /package/{dist/api → api}/WMS/Controllers/index.ts +0 -0
- /package/{dist/component → component}/KgNavBar/KgNavBar.vue +0 -0
- /package/{dist/component → component}/KgNavBar/index.ts +0 -0
- /package/{dist/component → component}/KgStation/index.store.ts +0 -0
- /package/{dist/component → component}/KgStation/index.ts +0 -0
- /package/{dist/component → component}/KgTabBar/KgTabBar.vue +0 -0
- /package/{dist/component → component}/KgTabBar/index.ts +0 -0
- /package/{dist/component → component}/KgUpdatePopup/index.ts +0 -0
- /package/{dist/component → component}/KgWarehouse/index.hooks.ts +0 -0
- /package/{dist/component → component}/KgWarehouse/index.store.ts +0 -0
- /package/{dist/component → component}/KgWarehouse/index.ts +0 -0
- /package/{dist/component → component}/index.ts +0 -0
- /package/{dist/config → config}/index.ts +0 -0
- /package/{dist/config → config}/setup.ts +0 -0
- /package/{dist/const → const}/index.ts +0 -0
- /package/{dist/const → const}/index.vm.ts +0 -0
- /package/{dist/index.ts → index.ts} +0 -0
- /package/{dist/service → service}/index.ts +0 -0
- /package/{dist/uni → uni}/index.ts +0 -0
- /package/{dist/uni → uni}/uni-ui/README.md +0 -0
- /package/{dist/uni → uni}/uni-ui/index.ts +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-badge/uni-badge.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/calendar.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/uni-calendar-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/uni-calendar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-calendar/util.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-card/uni-card.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-col/uni-col.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-collapse/uni-collapse.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-collapse-item/uni-collapse-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-combox/uni-combox.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-countdown/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-countdown/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-countdown/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-countdown/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-countdown/uni-countdown.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-data-picker/keypress.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-data-picker/uni-data-picker.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-data-pickerview/uni-data-picker.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-dateformat/date-format.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-dateformat/uni-dateformat.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/calendar-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/calendar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/time-picker.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-datetime-picker/util.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-drawer/keypress.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-drawer/uni-drawer.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-easyinput/common.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fab/uni-fab.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fav/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fav/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fav/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fav/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-fav/uni-fav.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-file-picker/choose-and-upload-file.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-file-picker/uni-file-picker.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-file-picker/upload-file.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-file-picker/upload-image.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-file-picker/utils.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-forms/uni-forms.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-forms/utils.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-forms/validate.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-forms-item/uni-forms-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-goods-nav/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-goods-nav/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-goods-nav/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-goods-nav/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-goods-nav/uni-goods-nav.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-grid/uni-grid.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-grid-item/uni-grid-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-group/uni-group.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/icons.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/uni-icons.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/uniicons.css +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/uniicons.ttf +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/uniicons_file.ts +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-icons/uniicons_file_vue.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-indexed-list/uni-indexed-list.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-link/uni-link.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list/uni-list.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list/uni-refresh.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list/uni-refresh.wxs +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list-ad/uni-list-ad.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list-chat/uni-list-chat.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list-chat/uni-list-chat.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-list-item/uni-list-item.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-load-more/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-load-more/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-load-more/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-load-more/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-load-more/uni-load-more.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-nav-bar/uni-nav-bar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-nav-bar/uni-status-bar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-notice-bar/uni-notice-bar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-number-box/uni-number-box.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/es.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/fr.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-pagination/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/keypress.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/popup.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup/uni-popup.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup-dialog/keypress.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup-message/uni-popup-message.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-popup-share/uni-popup-share.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-rate/uni-rate.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-row/uni-row.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/changelog.md +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/index.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/package.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/readme.md +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/index.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_border.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_color.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_radius.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_space.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_styles.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_text.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/setting/_variables.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/styles/tools/functions.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/theme.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-scss/variables.scss +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-search-bar/i18n/en.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-search-bar/i18n/index.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-search-bar/i18n/zh-Hans.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-search-bar/i18n/zh-Hant.json +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-search-bar/uni-search-bar.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-section/uni-section.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-steps/uni-steps.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action/uni-swipe-action.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/bindingx.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/isPC.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/mpalipay.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/mpother.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/mpwxs.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swipe-action-item/render.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-table/uni-table.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-tag/uni-tag.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-tbody/uni-tbody.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-td/uni-td.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-th/filter-dropdown.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-th/uni-th.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-thead/uni-thead.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-title/uni-title.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-tooltip/uni-tooltip.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-tr/table-checkbox.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-tr/uni-tr.vue +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-transition/createAnimation.js +0 -0
- /package/{dist/uni → uni}/uni-ui/uni-transition/uni-transition.vue +0 -0
- /package/{dist/util → util}/index.ts +0 -0
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
|
|
149
149
|
export default {
|
|
150
150
|
name: 'UniEasyinput',
|
|
151
|
-
emits: ['click', 'iconClick', 'update:modelValue', '
|
|
151
|
+
emits: ['click', 'iconClick', 'update:modelValue', 'focus', 'blur', 'confirm', 'clear', 'eyes', 'change', 'keyboardheightchange'],
|
|
152
152
|
model: {
|
|
153
153
|
prop: 'modelValue',
|
|
154
154
|
event: 'update:modelValue',
|
|
@@ -419,9 +419,6 @@
|
|
|
419
419
|
}
|
|
420
420
|
if (this.errMsg) this.errMsg = '';
|
|
421
421
|
this.val = value;
|
|
422
|
-
// TODO 兼容 vue2
|
|
423
|
-
this.$emit('input', value);
|
|
424
|
-
// TODO 兼容 vue3
|
|
425
422
|
this.$emit('update:modelValue', value);
|
|
426
423
|
},
|
|
427
424
|
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
</view>
|
|
27
27
|
<view class="uni-pagination__num uni-pagination__num-flex-none">
|
|
28
28
|
<view class="uni-pagination__num-current">
|
|
29
|
-
<text class="uni-pagination__num-current-text is-pc-hide current-index-text">{{ currentIndex }}
|
|
30
|
-
<text class="uni-pagination__num-current-text is-pc-hide"
|
|
29
|
+
<text class="uni-pagination__num-current-text is-pc-hide current-index-text">{{ currentIndex }} </text>
|
|
30
|
+
<text class="uni-pagination__num-current-text is-pc-hide">/ {{ maxPage || 0 }}</text>
|
|
31
31
|
<!-- #ifndef APP-NVUE -->
|
|
32
32
|
<view v-for="(item, index) in paper" :key="index" :class="{ 'page--active': item === currentIndex }"
|
|
33
33
|
class="uni-pagination__num-tag tag--active is-phone-hide" @click.top="selectPage(item, index)">
|
|
@@ -341,10 +341,14 @@
|
|
|
341
341
|
justify-content: center;
|
|
342
342
|
align-items: center;
|
|
343
343
|
text-align: center;
|
|
344
|
-
border-radius:
|
|
344
|
+
border-radius: 3px;
|
|
345
345
|
// border-width: 1px;
|
|
346
346
|
// border-style: solid;
|
|
347
347
|
// border-color: $uni-border-color;
|
|
348
|
+
border: 1px solid #ececec !important;
|
|
349
|
+
border-radius: 3px !important;
|
|
350
|
+
border-bottom: 1px solid #d3d3d3 !important;
|
|
351
|
+
background: #fefefe !important;
|
|
348
352
|
}
|
|
349
353
|
|
|
350
354
|
.uni-pagination__child-btn {
|
|
@@ -387,7 +391,7 @@
|
|
|
387
391
|
line-height: 30px;
|
|
388
392
|
// border: 1px red solid;
|
|
389
393
|
color: #999;
|
|
390
|
-
border-radius:
|
|
394
|
+
border-radius: 3px;
|
|
391
395
|
// border-width: 1px;
|
|
392
396
|
// border-style: solid;
|
|
393
397
|
// border-color: $uni-border-color;
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
|
|
123
123
|
.segmented-control__item--button--first {
|
|
124
124
|
border-left-width: 1px;
|
|
125
|
-
border-top-left-radius:
|
|
126
|
-
border-bottom-left-radius:
|
|
125
|
+
border-top-left-radius: 3px;
|
|
126
|
+
border-bottom-left-radius: 3px;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.segmented-control__item--button--last {
|
|
130
|
-
border-top-right-radius:
|
|
131
|
-
border-bottom-right-radius:
|
|
130
|
+
border-top-right-radius: 3px;
|
|
131
|
+
border-bottom-right-radius: 3px;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.segmented-control__item--text {
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
3
|
+
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
|
|
4
|
+
<view class="uni-swipe">
|
|
5
|
+
<!-- #ifdef MP-WEIXIN || VUE3 -->
|
|
6
|
+
<view
|
|
7
|
+
class="uni-swipe_box"
|
|
8
|
+
:change:prop="wxsswipe.showWatch"
|
|
9
|
+
:prop="is_show"
|
|
10
|
+
:data-threshold="threshold"
|
|
11
|
+
:data-disabled="disabled"
|
|
12
|
+
@touchstart="wxsswipe.touchstart"
|
|
13
|
+
@touchmove="wxsswipe.touchmove"
|
|
14
|
+
@touchend="wxsswipe.touchend"
|
|
15
|
+
>
|
|
16
|
+
<!-- #endif -->
|
|
17
|
+
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
|
18
|
+
<view
|
|
19
|
+
class="uni-swipe_box"
|
|
20
|
+
:change:prop="renderswipe.showWatch"
|
|
21
|
+
:prop="is_show"
|
|
22
|
+
:data-threshold="threshold"
|
|
23
|
+
:data-disabled="disabled + ''"
|
|
24
|
+
@touchstart="renderswipe.touchstart"
|
|
25
|
+
@touchmove="renderswipe.touchmove"
|
|
26
|
+
@touchend="renderswipe.touchend"
|
|
27
|
+
>
|
|
28
|
+
<!-- #endif -->
|
|
29
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
30
|
+
<view class="uni-swipe_button-group button-group--left">
|
|
31
|
+
<slot name="left">
|
|
32
|
+
<view
|
|
33
|
+
v-for="(item, index) in leftOptions"
|
|
34
|
+
:key="index"
|
|
35
|
+
:style="{
|
|
36
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
37
|
+
}"
|
|
38
|
+
class="uni-swipe_button button-hock"
|
|
39
|
+
@touchstart="appTouchStart"
|
|
40
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
41
|
+
@click.stop="onClickForPC(index, item, 'left')"
|
|
42
|
+
>
|
|
43
|
+
<text
|
|
44
|
+
class="uni-swipe_button-text"
|
|
45
|
+
:style="{
|
|
46
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
47
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
48
|
+
}"
|
|
49
|
+
>{{ item.text }}</text
|
|
50
|
+
>
|
|
51
|
+
</view>
|
|
52
|
+
</slot>
|
|
53
|
+
</view>
|
|
54
|
+
<view class="uni-swipe_text--center">
|
|
55
|
+
<slot></slot>
|
|
56
|
+
</view>
|
|
57
|
+
<view class="uni-swipe_button-group button-group--right">
|
|
58
|
+
<slot name="right">
|
|
59
|
+
<view
|
|
60
|
+
v-for="(item, index) in rightOptions"
|
|
61
|
+
:key="index"
|
|
62
|
+
:style="{
|
|
63
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
64
|
+
}"
|
|
65
|
+
class="uni-swipe_button button-hock"
|
|
66
|
+
@touchstart="appTouchStart"
|
|
67
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
68
|
+
@click.stop="onClickForPC(index, item, 'right')"
|
|
69
|
+
><text
|
|
70
|
+
class="uni-swipe_button-text"
|
|
71
|
+
:style="{
|
|
72
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
73
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
74
|
+
}"
|
|
75
|
+
>{{ item.text }}</text
|
|
76
|
+
>
|
|
77
|
+
</view>
|
|
78
|
+
</slot>
|
|
79
|
+
</view>
|
|
80
|
+
</view>
|
|
81
|
+
</view>
|
|
82
|
+
<!-- #endif -->
|
|
83
|
+
<!-- app nvue端 使用 bindingx -->
|
|
84
|
+
<!-- #ifdef APP-NVUE -->
|
|
85
|
+
<view ref="selector-box--hock" class="uni-swipe" @horizontalpan="touchstart" @touchend="touchend">
|
|
86
|
+
<view ref="selector-left-button--hock" class="uni-swipe_button-group button-group--left">
|
|
87
|
+
<slot name="left">
|
|
88
|
+
<view
|
|
89
|
+
v-for="(item, index) in leftOptions"
|
|
90
|
+
:key="index"
|
|
91
|
+
:style="{
|
|
92
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
93
|
+
}"
|
|
94
|
+
class="uni-swipe_button button-hock"
|
|
95
|
+
@click.stop="onClick(index, item, 'left')"
|
|
96
|
+
><text
|
|
97
|
+
class="uni-swipe_button-text"
|
|
98
|
+
:style="{
|
|
99
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
100
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
101
|
+
}"
|
|
102
|
+
>{{ item.text }}</text
|
|
103
|
+
>
|
|
104
|
+
</view>
|
|
105
|
+
</slot>
|
|
106
|
+
</view>
|
|
107
|
+
<view ref="selector-right-button--hock" class="uni-swipe_button-group button-group--right">
|
|
108
|
+
<slot name="right">
|
|
109
|
+
<view
|
|
110
|
+
v-for="(item, index) in rightOptions"
|
|
111
|
+
:key="index"
|
|
112
|
+
:style="{
|
|
113
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
114
|
+
}"
|
|
115
|
+
class="uni-swipe_button button-hock"
|
|
116
|
+
@click.stop="onClick(index, item, 'right')"
|
|
117
|
+
><text
|
|
118
|
+
class="uni-swipe_button-text"
|
|
119
|
+
:style="{
|
|
120
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
121
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
122
|
+
}"
|
|
123
|
+
>{{ item.text }}</text
|
|
124
|
+
>
|
|
125
|
+
</view>
|
|
126
|
+
</slot>
|
|
127
|
+
</view>
|
|
128
|
+
<view ref="selector-content--hock" class="uni-swipe_box">
|
|
129
|
+
<slot></slot>
|
|
130
|
+
</view>
|
|
131
|
+
</view>
|
|
132
|
+
<!-- #endif -->
|
|
133
|
+
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
|
|
134
|
+
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
|
|
135
|
+
<view class="uni-swipe">
|
|
136
|
+
<view
|
|
137
|
+
class="uni-swipe_box"
|
|
138
|
+
@touchstart="touchstart"
|
|
139
|
+
@touchmove="touchmove"
|
|
140
|
+
@touchend="touchend"
|
|
141
|
+
:style="{ transform: moveLeft }"
|
|
142
|
+
:class="{ ani: ani }"
|
|
143
|
+
>
|
|
144
|
+
<view class="uni-swipe_button-group button-group--left" :class="[elClass]">
|
|
145
|
+
<slot name="left">
|
|
146
|
+
<view
|
|
147
|
+
v-for="(item, index) in leftOptions"
|
|
148
|
+
:key="index"
|
|
149
|
+
:style="{
|
|
150
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
151
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
152
|
+
}"
|
|
153
|
+
class="uni-swipe_button button-hock"
|
|
154
|
+
@touchstart="appTouchStart"
|
|
155
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
156
|
+
><text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">{{
|
|
157
|
+
item.text
|
|
158
|
+
}}</text>
|
|
159
|
+
</view>
|
|
160
|
+
</slot>
|
|
161
|
+
</view>
|
|
162
|
+
<slot></slot>
|
|
163
|
+
<view class="uni-swipe_button-group button-group--right" :class="[elClass]">
|
|
164
|
+
<slot name="right">
|
|
165
|
+
<view
|
|
166
|
+
v-for="(item, index) in rightOptions"
|
|
167
|
+
:key="index"
|
|
168
|
+
:style="{
|
|
169
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
170
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
171
|
+
}"
|
|
172
|
+
@touchstart="appTouchStart"
|
|
173
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
174
|
+
class="uni-swipe_button button-hock"
|
|
175
|
+
><text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">{{
|
|
176
|
+
item.text
|
|
177
|
+
}}</text>
|
|
178
|
+
</view>
|
|
179
|
+
</slot>
|
|
180
|
+
</view>
|
|
181
|
+
</view>
|
|
182
|
+
</view>
|
|
183
|
+
</view>
|
|
184
|
+
<!-- #endif -->
|
|
185
|
+
</template>
|
|
186
|
+
|
|
187
|
+
<script>
|
|
188
|
+
import mpwxs from './mpwxs';
|
|
189
|
+
import bindingx from './bindingx.js';
|
|
190
|
+
import mpother from './mpother';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* SwipeActionItem 滑动操作子组件
|
|
194
|
+
* @description 通过滑动触发选项的容器
|
|
195
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
|
196
|
+
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
|
197
|
+
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
|
198
|
+
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
|
199
|
+
* @property {Number} threshold 滑动缺省值
|
|
200
|
+
* @property {Array} leftOptions 左侧选项内容及样式
|
|
201
|
+
* @property {Array} rgihtOptions 右侧选项内容及样式
|
|
202
|
+
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
|
203
|
+
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
export default {
|
|
207
|
+
mixins: [mpwxs, bindingx, mpother],
|
|
208
|
+
emits: ['click', 'change'],
|
|
209
|
+
props: {
|
|
210
|
+
// 控制开关
|
|
211
|
+
show: {
|
|
212
|
+
type: String,
|
|
213
|
+
default: 'none',
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
// 禁用
|
|
217
|
+
disabled: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
default: false,
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// 是否自动关闭
|
|
223
|
+
autoClose: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
default: true,
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
// 滑动缺省距离
|
|
229
|
+
threshold: {
|
|
230
|
+
type: Number,
|
|
231
|
+
default: 20,
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
// 左侧按钮内容
|
|
235
|
+
leftOptions: {
|
|
236
|
+
type: Array,
|
|
237
|
+
default() {
|
|
238
|
+
return [];
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
// 右侧按钮内容
|
|
243
|
+
rightOptions: {
|
|
244
|
+
type: Array,
|
|
245
|
+
default() {
|
|
246
|
+
return [];
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
// #ifndef VUE3
|
|
251
|
+
// TODO vue2
|
|
252
|
+
destroyed() {
|
|
253
|
+
if (this.__isUnmounted) return;
|
|
254
|
+
this.uninstall();
|
|
255
|
+
},
|
|
256
|
+
// #endif
|
|
257
|
+
// #ifdef VUE3
|
|
258
|
+
// TODO vue3
|
|
259
|
+
unmounted() {
|
|
260
|
+
this.__isUnmounted = true;
|
|
261
|
+
this.uninstall();
|
|
262
|
+
},
|
|
263
|
+
// #endif
|
|
264
|
+
|
|
265
|
+
methods: {
|
|
266
|
+
uninstall() {
|
|
267
|
+
if (this.swipeaction) {
|
|
268
|
+
this.swipeaction.children.forEach((item, index) => {
|
|
269
|
+
if (item === this) {
|
|
270
|
+
this.swipeaction.children.splice(index, 1);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* 获取父元素实例
|
|
277
|
+
*/
|
|
278
|
+
getSwipeAction(name = 'uniSwipeAction') {
|
|
279
|
+
let parent = this.$parent;
|
|
280
|
+
let parentName = parent.$options.name;
|
|
281
|
+
while (parentName !== name) {
|
|
282
|
+
parent = parent.$parent;
|
|
283
|
+
if (!parent) return false;
|
|
284
|
+
parentName = parent.$options.name;
|
|
285
|
+
}
|
|
286
|
+
return parent;
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
</script>
|
|
291
|
+
<style lang="scss">
|
|
292
|
+
.uni-swipe {
|
|
293
|
+
position: relative;
|
|
294
|
+
/* #ifndef APP-NVUE */
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
/* #endif */
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.uni-swipe_box {
|
|
300
|
+
/* #ifndef APP-NVUE */
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-shrink: 0;
|
|
303
|
+
// touch-action: none;
|
|
304
|
+
/* #endif */
|
|
305
|
+
position: relative;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.uni-swipe_content {
|
|
309
|
+
// border: 1px red solid;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.uni-swipe_text--center {
|
|
313
|
+
width: 100%;
|
|
314
|
+
/* #ifndef APP-NVUE */
|
|
315
|
+
cursor: grab;
|
|
316
|
+
/* #endif */
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.uni-swipe_button-group {
|
|
320
|
+
/* #ifndef APP-NVUE */
|
|
321
|
+
box-sizing: border-box;
|
|
322
|
+
display: flex;
|
|
323
|
+
/* #endif */
|
|
324
|
+
flex-direction: row;
|
|
325
|
+
position: absolute;
|
|
326
|
+
top: 0;
|
|
327
|
+
bottom: 0;
|
|
328
|
+
/* #ifdef H5 */
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
/* #endif */
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.button-group--left {
|
|
334
|
+
left: 0;
|
|
335
|
+
transform: translateX(-100%);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.button-group--right {
|
|
339
|
+
right: 0;
|
|
340
|
+
transform: translateX(100%);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.uni-swipe_button {
|
|
344
|
+
/* #ifdef APP-NVUE */
|
|
345
|
+
flex: 1;
|
|
346
|
+
/* #endif */
|
|
347
|
+
/* #ifndef APP-NVUE */
|
|
348
|
+
display: flex;
|
|
349
|
+
/* #endif */
|
|
350
|
+
flex-direction: row;
|
|
351
|
+
justify-content: center;
|
|
352
|
+
align-items: center;
|
|
353
|
+
padding: 0 20px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.uni-swipe_button-text {
|
|
357
|
+
/* #ifndef APP-NVUE */
|
|
358
|
+
flex-shrink: 0;
|
|
359
|
+
/* #endif */
|
|
360
|
+
font-size: 14px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.ani {
|
|
364
|
+
transition-property: transform;
|
|
365
|
+
transition-duration: 0.3s;
|
|
366
|
+
transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* #ifdef MP-ALIPAY */
|
|
370
|
+
.movable-area {
|
|
371
|
+
/* width: 100%; */
|
|
372
|
+
height: 45px;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.movable-view {
|
|
376
|
+
display: flex;
|
|
377
|
+
/* justify-content: center; */
|
|
378
|
+
position: relative;
|
|
379
|
+
flex: 1;
|
|
380
|
+
height: 45px;
|
|
381
|
+
z-index: 2;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.movable-view-button {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-shrink: 0;
|
|
387
|
+
flex-direction: row;
|
|
388
|
+
height: 100%;
|
|
389
|
+
background: #c0c0c0;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* .transition {
|
|
393
|
+
transition: all 0.3s;
|
|
394
|
+
} */
|
|
395
|
+
|
|
396
|
+
.movable-view-box {
|
|
397
|
+
flex-shrink: 0;
|
|
398
|
+
height: 100%;
|
|
399
|
+
background-color: #fff;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* #endif */
|
|
403
|
+
</style>
|
package/{dist/util → util}/kg.ts
RENAMED
|
@@ -4,6 +4,7 @@ import { API } from '../api';
|
|
|
4
4
|
import { useKgStation, useKgWarehouse } from '../component';
|
|
5
5
|
import { useAppStore } from '../store/app.store';
|
|
6
6
|
import { KG_DYNAMIC_QUERY_OPERATOR } from '../const';
|
|
7
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* 通用工具.
|
|
@@ -35,9 +36,10 @@ export class Kg {
|
|
|
35
36
|
* </li>
|
|
36
37
|
* </ol>
|
|
37
38
|
*
|
|
39
|
+
* @param $dayjs.
|
|
38
40
|
* @param params 请求参数.
|
|
39
41
|
*/
|
|
40
|
-
public static parseParams(params?: Record<string, any> | null): any {
|
|
42
|
+
public static parseParams($dayjs: typeof dayjs | null | undefined, params?: Record<string, any> | null): any {
|
|
41
43
|
let _params = toRaw(unref(params))!;
|
|
42
44
|
|
|
43
45
|
if (!_params || !isObjectLike(_params)) {
|
|
@@ -51,8 +53,13 @@ export class Kg {
|
|
|
51
53
|
const value = _params[key];
|
|
52
54
|
|
|
53
55
|
switch (true) {
|
|
56
|
+
case !!$dayjs && isArray(value) && value.length === 2 && $dayjs.isDayjs(value[0]) && $dayjs.isDayjs(value[1]): {
|
|
57
|
+
resultParams[key] = value;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
case isObjectLike(value):
|
|
55
|
-
resultParams[key] = this.parseParams(value);
|
|
62
|
+
resultParams[key] = this.parseParams($dayjs, value);
|
|
56
63
|
break;
|
|
57
64
|
|
|
58
65
|
case typeof value === 'string':
|
|
@@ -128,7 +135,7 @@ export class Kg {
|
|
|
128
135
|
const patch: number = Number(oldVersionSegments[2]);
|
|
129
136
|
|
|
130
137
|
try {
|
|
131
|
-
const newVersion = await API.WMS.CommonController.GetLatestApkVersion({}, { timeout: 5 * 1000 });
|
|
138
|
+
const newVersion = await API.WMS.CommonController.GetLatestApkVersion({}, { timeout: 5 * 1000, isSuppressSuccess: true });
|
|
132
139
|
|
|
133
140
|
// 最新版本
|
|
134
141
|
const newVersionSegments = newVersion.split('.');
|
|
@@ -195,11 +202,12 @@ export class Kg {
|
|
|
195
202
|
* @param param.params 请求参数.
|
|
196
203
|
*/
|
|
197
204
|
public static getQueryHeaders(param: {
|
|
205
|
+
$dayjs?: typeof dayjs;
|
|
198
206
|
dynamicQueryExcludeProperties: Array<string> | null | undefined;
|
|
199
207
|
dynamicQueryOperatorModel: Record<string, any> | null | undefined;
|
|
200
208
|
params: Record<string, any> | null | undefined;
|
|
201
209
|
}) {
|
|
202
|
-
const { params, dynamicQueryExcludeProperties, dynamicQueryOperatorModel } = param ?? {};
|
|
210
|
+
const { $dayjs, params, dynamicQueryExcludeProperties, dynamicQueryOperatorModel } = param ?? {};
|
|
203
211
|
|
|
204
212
|
let _params = cloneDeep(toRaw(unref(params ?? {})));
|
|
205
213
|
|
|
@@ -211,7 +219,8 @@ export class Kg {
|
|
|
211
219
|
// 特殊字段, 这些特殊字段的值不做处理, 保持原样
|
|
212
220
|
const SPECIAL_FIELD_KEYS = ['pageNo', 'pageSize', 'column', 'order'];
|
|
213
221
|
|
|
214
|
-
const
|
|
222
|
+
const _paramsForQueryWhereSql: Record<string, any> = {};
|
|
223
|
+
|
|
215
224
|
Object.keys(_params)
|
|
216
225
|
.sort()
|
|
217
226
|
.forEach((key) => {
|
|
@@ -235,16 +244,55 @@ export class Kg {
|
|
|
235
244
|
let operator: string = dynamicQueryOperatorModel?.[key] ?? KG_DYNAMIC_QUERY_OPERATOR.EQ;
|
|
236
245
|
|
|
237
246
|
switch (true) {
|
|
247
|
+
//region 日期范围
|
|
248
|
+
//----------------------------------------------------------------------------------------------------
|
|
249
|
+
case !!$dayjs && isArray(value) && value.length === 2 && $dayjs.isDayjs(value[0]) && $dayjs.isDayjs(value[1]): {
|
|
250
|
+
let _stringValue = '';
|
|
251
|
+
|
|
252
|
+
switch (operator) {
|
|
253
|
+
case 'BETWEEN':
|
|
254
|
+
default: {
|
|
255
|
+
const _leftValue = value[0] as Dayjs;
|
|
256
|
+
const _rightValue = value[1] as Dayjs;
|
|
257
|
+
|
|
258
|
+
// 左侧日期的字符串
|
|
259
|
+
let _leftStringValue = '';
|
|
260
|
+
if (_leftValue && _leftValue.isValid()) {
|
|
261
|
+
_leftStringValue = _leftValue.format('YYYY-MM-DD 00:00:00');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 右侧日期的字符串
|
|
265
|
+
let _rightStringValue = '';
|
|
266
|
+
if (_rightValue && _rightValue.isValid()) {
|
|
267
|
+
_rightStringValue = _rightValue.add(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (_leftStringValue) {
|
|
271
|
+
_stringValue += ` AND (${_key} >= '${_leftStringValue}')`;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (_rightStringValue) {
|
|
275
|
+
_stringValue += ` AND (${_key} < '${_rightStringValue}')`;
|
|
276
|
+
}
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
_paramsForQueryWhereSql[key] = _stringValue;
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
//endregion
|
|
285
|
+
|
|
238
286
|
// array
|
|
239
287
|
case Array.isArray(value): {
|
|
240
288
|
if (value.length === 0) {
|
|
241
|
-
|
|
289
|
+
_paramsForQueryWhereSql[key] = undefined;
|
|
242
290
|
break;
|
|
243
291
|
}
|
|
244
292
|
|
|
245
293
|
const _value = value.map((i: any) => `N'${String(i)}'`).join(', ');
|
|
246
294
|
|
|
247
|
-
|
|
295
|
+
_paramsForQueryWhereSql[key] = ` AND (${_key} IN (${_value}))`;
|
|
248
296
|
break;
|
|
249
297
|
}
|
|
250
298
|
|
|
@@ -257,7 +305,7 @@ export class Kg {
|
|
|
257
305
|
case typeof value === 'string': {
|
|
258
306
|
// 空白字符
|
|
259
307
|
if (value.trim() === '') {
|
|
260
|
-
|
|
308
|
+
_paramsForQueryWhereSql[key] = undefined;
|
|
261
309
|
break;
|
|
262
310
|
}
|
|
263
311
|
|
|
@@ -291,7 +339,7 @@ export class Kg {
|
|
|
291
339
|
}
|
|
292
340
|
}
|
|
293
341
|
|
|
294
|
-
|
|
342
|
+
_paramsForQueryWhereSql[key] = _strValue;
|
|
295
343
|
|
|
296
344
|
break;
|
|
297
345
|
}
|
|
@@ -333,7 +381,7 @@ export class Kg {
|
|
|
333
381
|
}
|
|
334
382
|
}
|
|
335
383
|
|
|
336
|
-
|
|
384
|
+
_paramsForQueryWhereSql[key] = _strValue;
|
|
337
385
|
|
|
338
386
|
break;
|
|
339
387
|
}
|
|
@@ -355,14 +403,14 @@ export class Kg {
|
|
|
355
403
|
}
|
|
356
404
|
}
|
|
357
405
|
|
|
358
|
-
|
|
406
|
+
_paramsForQueryWhereSql[key] = _strValue;
|
|
359
407
|
|
|
360
408
|
break;
|
|
361
409
|
}
|
|
362
410
|
|
|
363
411
|
// null, undefined
|
|
364
412
|
default: {
|
|
365
|
-
|
|
413
|
+
_paramsForQueryWhereSql[key] = value;
|
|
366
414
|
|
|
367
415
|
break;
|
|
368
416
|
}
|
|
@@ -370,7 +418,7 @@ export class Kg {
|
|
|
370
418
|
});
|
|
371
419
|
|
|
372
420
|
const whereSqlSegment = reduce(
|
|
373
|
-
|
|
421
|
+
_paramsForQueryWhereSql,
|
|
374
422
|
(sql, value) => {
|
|
375
423
|
if (!value) {
|
|
376
424
|
return sql;
|
|
@@ -383,7 +431,7 @@ export class Kg {
|
|
|
383
431
|
|
|
384
432
|
//region WHERE
|
|
385
433
|
// ----------------------------------------------------------------------------------------------------
|
|
386
|
-
let whereSql = `WHERE (1 = 1)${whereSqlSegment}
|
|
434
|
+
let whereSql = `WHERE (1 = 1)${whereSqlSegment}`.replace('(1 = 1) AND ', '');
|
|
387
435
|
whereSql = encodeURIComponent(whereSql);
|
|
388
436
|
//endregion
|
|
389
437
|
|
package/CHANGELOG.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# 0.6.0
|
|
2
|
-
|
|
3
|
-
1. 优化导入路径
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
// 旧
|
|
7
|
-
// --------------------------------------------------
|
|
8
|
-
import { UniEasyinput } from '@kengic/uni/dist';
|
|
9
|
-
|
|
10
|
-
// 新
|
|
11
|
-
// --------------------------------------------------
|
|
12
|
-
import { UniEasyinput } from '@kengic/uni';
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
---
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# @kengic/uni
|
package/dist/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|