@kengic/uni 0.3.2-beta.9 → 0.3.3-beta.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.
Files changed (195) hide show
  1. package/dist/api/WMS/Controllers/LoginController/Logout.ts +28 -0
  2. package/dist/api/WMS/Controllers/LoginController/index.ts +1 -0
  3. package/dist/api/WMS/Controllers/WhController/ListVO.ts +89 -0
  4. package/dist/api/WMS/Controllers/WhController/index.ts +1 -0
  5. package/dist/api/WMS/Controllers/index.ts +2 -0
  6. package/dist/api/WMS/index.ts +2 -0
  7. package/dist/api/WMS/models.ts +189 -0
  8. package/dist/api/api.ts +1 -0
  9. package/dist/api/def.ts +1 -0
  10. package/dist/api/index.ts +2 -0
  11. package/dist/const/index.ts +11 -0
  12. package/dist/index.css +1 -0
  13. package/dist/index.ts +5 -0
  14. package/dist/kengic-uni.js +1 -5
  15. package/dist/service/http-client.ts +205 -0
  16. package/dist/service/index.ts +1 -0
  17. package/dist/src/index.d.ts +0 -1
  18. package/dist/store/app.store.ts +62 -0
  19. package/dist/uni/index.ts +1 -0
  20. package/dist/uni/uni-ui/index.ts +62 -0
  21. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +41 -0
  22. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +125 -0
  23. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +565 -0
  24. package/dist/{uni-ui → uni/uni-ui}/uni-col/uni-col.vue +1 -1
  25. package/dist/{uni-ui → uni/uni-ui}/uni-data-checkbox/uni-data-checkbox.vue +2 -2
  26. package/dist/{uni-ui → uni/uni-ui}/uni-data-select/uni-data-select.vue +1 -1
  27. package/dist/uni/uni-ui/uni-popup/i18n/en.json +7 -0
  28. package/dist/uni/uni-ui/uni-popup/i18n/index.js +9 -0
  29. package/dist/uni/uni-ui/uni-popup/i18n/zh-Hans.json +7 -0
  30. package/dist/uni/uni-ui/uni-popup/i18n/zh-Hant.json +7 -0
  31. package/dist/uni/uni-ui/uni-popup/keypress.js +45 -0
  32. package/dist/uni/uni-ui/uni-popup/popup.js +23 -0
  33. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +464 -0
  34. package/dist/{uni-ui → uni/uni-ui}/uni-row/uni-row.vue +2 -2
  35. package/dist/uni/uni-ui/uni-scss/index.scss +1 -0
  36. package/dist/uni/uni-ui/uni-scss/styles/index.scss +7 -0
  37. package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_variables.scss +1 -1
  38. package/dist/{uni-ui → uni/uni-ui}/uni-scss/variables.scss +1 -1
  39. package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/uni-swipe-action-item.vue +1 -1
  40. package/dist/{uni-ui → uni/uni-ui}/uni-transition/uni-transition.vue +1 -1
  41. package/package.json +69 -19
  42. package/dist/src/consts/i18n/en.d.ts +0 -45
  43. package/dist/src/consts/i18n/index.d.ts +0 -90
  44. package/dist/src/consts/i18n/zh_CN.d.ts +0 -45
  45. package/dist/src/consts/index.d.ts +0 -1
  46. package/dist/src/helpers/tsx.helper.d.ts +0 -13
  47. package/dist/src/utils/index.d.ts +0 -1
  48. package/dist/src/utils/kg.util.d.ts +0 -5
  49. package/dist/uni-ui/index.ts +0 -11
  50. package/dist/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +0 -41
  51. package/dist/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +0 -121
  52. package/dist/uni-ui/uni-calendar/uni-calendar.vue +0 -566
  53. package/dist/uni-ui/uni-popup/i18n/en.json +0 -7
  54. package/dist/uni-ui/uni-popup/i18n/zh-Hans.json +0 -7
  55. package/dist/uni-ui/uni-popup/i18n/zh-Hant.json +0 -7
  56. package/dist/uni-ui/uni-popup/keypress.js +0 -45
  57. package/dist/uni-ui/uni-popup/popup.js +0 -26
  58. package/dist/uni-ui/uni-popup/uni-popup.vue +0 -473
  59. package/dist/uni-ui/uni-scss/index.scss +0 -1
  60. package/dist/uni-ui/uni-scss/styles/index.scss +0 -7
  61. package/dist/uni-ui/uni-search-bar/i18n/index.js +0 -8
  62. /package/dist/{uni-ui → uni/uni-ui}/uni-badge/uni-badge.vue +0 -0
  63. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/calendar.js +0 -0
  64. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/i18n/en.json +0 -0
  65. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/i18n/index.js +0 -0
  66. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/i18n/zh-Hans.json +0 -0
  67. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/i18n/zh-Hant.json +0 -0
  68. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/uni-calendar-item.vue +0 -0
  69. /package/dist/{uni-ui → uni/uni-ui}/uni-calendar/util.js +0 -0
  70. /package/dist/{uni-ui → uni/uni-ui}/uni-card/uni-card.vue +0 -0
  71. /package/dist/{uni-ui → uni/uni-ui}/uni-collapse/uni-collapse.vue +0 -0
  72. /package/dist/{uni-ui → uni/uni-ui}/uni-collapse-item/uni-collapse-item.vue +0 -0
  73. /package/dist/{uni-ui → uni/uni-ui}/uni-combox/uni-combox.vue +0 -0
  74. /package/dist/{uni-ui → uni/uni-ui}/uni-countdown/i18n/en.json +0 -0
  75. /package/dist/{uni-ui → uni/uni-ui}/uni-countdown/i18n/index.js +0 -0
  76. /package/dist/{uni-ui → uni/uni-ui}/uni-countdown/i18n/zh-Hans.json +0 -0
  77. /package/dist/{uni-ui → uni/uni-ui}/uni-countdown/i18n/zh-Hant.json +0 -0
  78. /package/dist/{uni-ui → uni/uni-ui}/uni-countdown/uni-countdown.vue +0 -0
  79. /package/dist/{uni-ui → uni/uni-ui}/uni-data-picker/keypress.js +0 -0
  80. /package/dist/{uni-ui → uni/uni-ui}/uni-data-picker/uni-data-picker.vue +0 -0
  81. /package/dist/{uni-ui → uni/uni-ui}/uni-data-pickerview/uni-data-picker.js +0 -0
  82. /package/dist/{uni-ui → uni/uni-ui}/uni-data-pickerview/uni-data-pickerview.vue +0 -0
  83. /package/dist/{uni-ui → uni/uni-ui}/uni-dateformat/date-format.js +0 -0
  84. /package/dist/{uni-ui → uni/uni-ui}/uni-dateformat/uni-dateformat.vue +0 -0
  85. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/calendar-item.vue +0 -0
  86. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/calendar.vue +0 -0
  87. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/i18n/en.json +0 -0
  88. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/i18n/index.js +0 -0
  89. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/i18n/zh-Hans.json +0 -0
  90. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/i18n/zh-Hant.json +0 -0
  91. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/time-picker.vue +0 -0
  92. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/uni-datetime-picker.vue +0 -0
  93. /package/dist/{uni-ui → uni/uni-ui}/uni-datetime-picker/util.js +0 -0
  94. /package/dist/{uni-ui → uni/uni-ui}/uni-drawer/keypress.js +0 -0
  95. /package/dist/{uni-ui → uni/uni-ui}/uni-drawer/uni-drawer.vue +0 -0
  96. /package/dist/{uni-ui → uni/uni-ui}/uni-easyinput/common.js +0 -0
  97. /package/dist/{uni-ui → uni/uni-ui}/uni-easyinput/uni-easyinput.vue +0 -0
  98. /package/dist/{uni-ui → uni/uni-ui}/uni-fab/uni-fab.vue +0 -0
  99. /package/dist/{uni-ui → uni/uni-ui}/uni-fav/i18n/en.json +0 -0
  100. /package/dist/{uni-ui → uni/uni-ui}/uni-fav/i18n/index.js +0 -0
  101. /package/dist/{uni-ui → uni/uni-ui}/uni-fav/i18n/zh-Hans.json +0 -0
  102. /package/dist/{uni-ui → uni/uni-ui}/uni-fav/i18n/zh-Hant.json +0 -0
  103. /package/dist/{uni-ui → uni/uni-ui}/uni-fav/uni-fav.vue +0 -0
  104. /package/dist/{uni-ui → uni/uni-ui}/uni-file-picker/choose-and-upload-file.js +0 -0
  105. /package/dist/{uni-ui → uni/uni-ui}/uni-file-picker/uni-file-picker.vue +0 -0
  106. /package/dist/{uni-ui → uni/uni-ui}/uni-file-picker/upload-file.vue +0 -0
  107. /package/dist/{uni-ui → uni/uni-ui}/uni-file-picker/upload-image.vue +0 -0
  108. /package/dist/{uni-ui → uni/uni-ui}/uni-file-picker/utils.js +0 -0
  109. /package/dist/{uni-ui → uni/uni-ui}/uni-forms/uni-forms.vue +0 -0
  110. /package/dist/{uni-ui → uni/uni-ui}/uni-forms/utils.js +0 -0
  111. /package/dist/{uni-ui → uni/uni-ui}/uni-forms/validate.js +0 -0
  112. /package/dist/{uni-ui → uni/uni-ui}/uni-forms-item/uni-forms-item.vue +0 -0
  113. /package/dist/{uni-ui → uni/uni-ui}/uni-goods-nav/i18n/en.json +0 -0
  114. /package/dist/{uni-ui → uni/uni-ui}/uni-goods-nav/i18n/index.js +0 -0
  115. /package/dist/{uni-ui → uni/uni-ui}/uni-goods-nav/i18n/zh-Hans.json +0 -0
  116. /package/dist/{uni-ui → uni/uni-ui}/uni-goods-nav/i18n/zh-Hant.json +0 -0
  117. /package/dist/{uni-ui → uni/uni-ui}/uni-goods-nav/uni-goods-nav.vue +0 -0
  118. /package/dist/{uni-ui → uni/uni-ui}/uni-grid/uni-grid.vue +0 -0
  119. /package/dist/{uni-ui → uni/uni-ui}/uni-grid-item/uni-grid-item.vue +0 -0
  120. /package/dist/{uni-ui → uni/uni-ui}/uni-group/uni-group.vue +0 -0
  121. /package/dist/{uni-ui → uni/uni-ui}/uni-icons/icons.js +0 -0
  122. /package/dist/{uni-ui → uni/uni-ui}/uni-icons/uni-icons.vue +0 -0
  123. /package/dist/{uni-ui → uni/uni-ui}/uni-icons/uniicons.css +0 -0
  124. /package/dist/{uni-ui → uni/uni-ui}/uni-icons/uniicons.ttf +0 -0
  125. /package/dist/{uni-ui → uni/uni-ui}/uni-indexed-list/uni-indexed-list-item.vue +0 -0
  126. /package/dist/{uni-ui → uni/uni-ui}/uni-indexed-list/uni-indexed-list.vue +0 -0
  127. /package/dist/{uni-ui → uni/uni-ui}/uni-link/uni-link.vue +0 -0
  128. /package/dist/{uni-ui → uni/uni-ui}/uni-list/uni-list.vue +0 -0
  129. /package/dist/{uni-ui → uni/uni-ui}/uni-list/uni-refresh.vue +0 -0
  130. /package/dist/{uni-ui → uni/uni-ui}/uni-list/uni-refresh.wxs +0 -0
  131. /package/dist/{uni-ui → uni/uni-ui}/uni-list-ad/uni-list-ad.vue +0 -0
  132. /package/dist/{uni-ui → uni/uni-ui}/uni-list-chat/uni-list-chat.scss +0 -0
  133. /package/dist/{uni-ui → uni/uni-ui}/uni-list-chat/uni-list-chat.vue +0 -0
  134. /package/dist/{uni-ui → uni/uni-ui}/uni-list-item/uni-list-item.vue +0 -0
  135. /package/dist/{uni-ui → uni/uni-ui}/uni-load-more/i18n/en.json +0 -0
  136. /package/dist/{uni-ui → uni/uni-ui}/uni-load-more/i18n/index.js +0 -0
  137. /package/dist/{uni-ui → uni/uni-ui}/uni-load-more/i18n/zh-Hans.json +0 -0
  138. /package/dist/{uni-ui → uni/uni-ui}/uni-load-more/i18n/zh-Hant.json +0 -0
  139. /package/dist/{uni-ui → uni/uni-ui}/uni-load-more/uni-load-more.vue +0 -0
  140. /package/dist/{uni-ui → uni/uni-ui}/uni-nav-bar/uni-nav-bar.vue +0 -0
  141. /package/dist/{uni-ui → uni/uni-ui}/uni-nav-bar/uni-status-bar.vue +0 -0
  142. /package/dist/{uni-ui → uni/uni-ui}/uni-notice-bar/uni-notice-bar.vue +0 -0
  143. /package/dist/{uni-ui → uni/uni-ui}/uni-number-box/uni-number-box.vue +0 -0
  144. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/en.json +0 -0
  145. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/es.json +0 -0
  146. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/fr.json +0 -0
  147. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/index.js +0 -0
  148. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/zh-Hans.json +0 -0
  149. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/i18n/zh-Hant.json +0 -0
  150. /package/dist/{uni-ui → uni/uni-ui}/uni-pagination/uni-pagination.vue +0 -0
  151. /package/dist/{uni-ui → uni/uni-ui}/uni-popup-dialog/keypress.js +0 -0
  152. /package/dist/{uni-ui → uni/uni-ui}/uni-popup-dialog/uni-popup-dialog.vue +0 -0
  153. /package/dist/{uni-ui → uni/uni-ui}/uni-popup-message/uni-popup-message.vue +0 -0
  154. /package/dist/{uni-ui → uni/uni-ui}/uni-popup-share/uni-popup-share.vue +0 -0
  155. /package/dist/{uni-ui → uni/uni-ui}/uni-rate/uni-rate.vue +0 -0
  156. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/changelog.md +0 -0
  157. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/package.json +0 -0
  158. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/readme.md +0 -0
  159. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_border.scss +0 -0
  160. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_color.scss +0 -0
  161. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_radius.scss +0 -0
  162. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_space.scss +0 -0
  163. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_styles.scss +0 -0
  164. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/setting/_text.scss +0 -0
  165. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/styles/tools/functions.scss +0 -0
  166. /package/dist/{uni-ui → uni/uni-ui}/uni-scss/theme.scss +0 -0
  167. /package/dist/{uni-ui → uni/uni-ui}/uni-search-bar/i18n/en.json +0 -0
  168. /package/dist/{uni-ui/uni-popup → uni/uni-ui/uni-search-bar}/i18n/index.js +0 -0
  169. /package/dist/{uni-ui → uni/uni-ui}/uni-search-bar/i18n/zh-Hans.json +0 -0
  170. /package/dist/{uni-ui → uni/uni-ui}/uni-search-bar/i18n/zh-Hant.json +0 -0
  171. /package/dist/{uni-ui → uni/uni-ui}/uni-search-bar/uni-search-bar.vue +0 -0
  172. /package/dist/{uni-ui → uni/uni-ui}/uni-section/uni-section.vue +0 -0
  173. /package/dist/{uni-ui → uni/uni-ui}/uni-segmented-control/uni-segmented-control.vue +0 -0
  174. /package/dist/{uni-ui → uni/uni-ui}/uni-steps/uni-steps.vue +0 -0
  175. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action/uni-swipe-action.vue +0 -0
  176. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/bindingx.js +0 -0
  177. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/isPC.js +0 -0
  178. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/mpalipay.js +0 -0
  179. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/mpother.js +0 -0
  180. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/mpwxs.js +0 -0
  181. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/render.js +0 -0
  182. /package/dist/{uni-ui → uni/uni-ui}/uni-swipe-action-item/wx.wxs +0 -0
  183. /package/dist/{uni-ui → uni/uni-ui}/uni-swiper-dot/uni-swiper-dot.vue +0 -0
  184. /package/dist/{uni-ui → uni/uni-ui}/uni-table/uni-table.vue +0 -0
  185. /package/dist/{uni-ui → uni/uni-ui}/uni-tag/uni-tag.vue +0 -0
  186. /package/dist/{uni-ui → uni/uni-ui}/uni-tbody/uni-tbody.vue +0 -0
  187. /package/dist/{uni-ui → uni/uni-ui}/uni-td/uni-td.vue +0 -0
  188. /package/dist/{uni-ui → uni/uni-ui}/uni-th/filter-dropdown.vue +0 -0
  189. /package/dist/{uni-ui → uni/uni-ui}/uni-th/uni-th.vue +0 -0
  190. /package/dist/{uni-ui → uni/uni-ui}/uni-thead/uni-thead.vue +0 -0
  191. /package/dist/{uni-ui → uni/uni-ui}/uni-title/uni-title.vue +0 -0
  192. /package/dist/{uni-ui → uni/uni-ui}/uni-tooltip/uni-tooltip.vue +0 -0
  193. /package/dist/{uni-ui → uni/uni-ui}/uni-tr/table-checkbox.vue +0 -0
  194. /package/dist/{uni-ui → uni/uni-ui}/uni-tr/uni-tr.vue +0 -0
  195. /package/dist/{uni-ui → uni/uni-ui}/uni-transition/createAnimation.js +0 -0
@@ -1,473 +0,0 @@
1
- <template>
2
- <view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
3
- <view @touchstart="touchstart">
4
- <uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
5
- :duration="duration" :show="showTrans" @click="onTap" />
6
- <uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
7
- :show="showTrans" @click="onTap">
8
- <view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
9
- <slot />
10
- </view>
11
- </uni-transition>
12
- </view>
13
- <!-- #ifdef H5 -->
14
- <keypress v-if="maskShow" @esc="onTap" />
15
- <!-- #endif -->
16
- </view>
17
- </template>
18
-
19
- <script>
20
- // #ifdef H5
21
- import keypress from './keypress.js'
22
- // #endif
23
-
24
- /**
25
- * PopUp 弹出层
26
- * @description 弹出层组件,为了解决遮罩弹层的问题
27
- * @tutorial https://ext.dcloud.net.cn/plugin?id=329
28
- * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
29
- * @value top 顶部弹出
30
- * @value center 中间弹出
31
- * @value bottom 底部弹出
32
- * @value left 左侧弹出
33
- * @value right 右侧弹出
34
- * @value message 消息提示
35
- * @value dialog 对话框
36
- * @value share 底部分享示例
37
- * @property {Boolean} animation = [true|false] 是否开启动画
38
- * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
39
- * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
40
- * @property {String} backgroundColor 主窗口背景色
41
- * @property {String} maskBackgroundColor 蒙版颜色
42
- * @property {Boolean} safeArea 是否适配底部安全区
43
- * @event {Function} change 打开关闭弹窗触发,e={show: false}
44
- * @event {Function} maskClick 点击遮罩触发
45
- */
46
-
47
- export default {
48
- name: 'UniPopup',
49
- components: {
50
- // #ifdef H5
51
- keypress
52
- // #endif
53
- },
54
- emits: ['change', 'maskClick'],
55
- props: {
56
- // 开启动画
57
- animation: {
58
- type: Boolean,
59
- default: true
60
- },
61
- // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
62
- // message: 消息提示 ; dialog : 对话框
63
- type: {
64
- type: String,
65
- default: 'center'
66
- },
67
- // maskClick
68
- isMaskClick: {
69
- type: Boolean,
70
- default: null
71
- },
72
- // TODO 2 个版本后废弃属性 ,使用 isMaskClick
73
- maskClick: {
74
- type: Boolean,
75
- default: null
76
- },
77
- backgroundColor: {
78
- type: String,
79
- default: 'none'
80
- },
81
- safeArea: {
82
- type: Boolean,
83
- default: true
84
- },
85
- maskBackgroundColor: {
86
- type: String,
87
- default: 'rgba(0, 0, 0, 0.4)'
88
- },
89
- },
90
-
91
- watch: {
92
- /**
93
- * 监听type类型
94
- */
95
- type: {
96
- handler: function(type) {
97
- if (!this.config[type]) return
98
- this[this.config[type]](true)
99
- },
100
- immediate: true
101
- },
102
- isDesktop: {
103
- handler: function(newVal) {
104
- if (!this.config[newVal]) return
105
- this[this.config[this.type]](true)
106
- },
107
- immediate: true
108
- },
109
- /**
110
- * 监听遮罩是否可点击
111
- * @param {Object} val
112
- */
113
- maskClick: {
114
- handler: function(val) {
115
- this.mkclick = val
116
- },
117
- immediate: true
118
- },
119
- isMaskClick: {
120
- handler: function(val) {
121
- this.mkclick = val
122
- },
123
- immediate: true
124
- },
125
- // H5 下禁止底部滚动
126
- showPopup(show) {
127
- // #ifdef H5
128
- // fix by mehaotian 处理 h5 滚动穿透的问题
129
- document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
130
- // #endif
131
- }
132
- },
133
- data() {
134
- return {
135
- duration: 300,
136
- ani: [],
137
- showPopup: false,
138
- showTrans: false,
139
- popupWidth: 0,
140
- popupHeight: 0,
141
- config: {
142
- top: 'top',
143
- bottom: 'bottom',
144
- center: 'center',
145
- left: 'left',
146
- right: 'right',
147
- message: 'top',
148
- dialog: 'center',
149
- share: 'bottom'
150
- },
151
- maskClass: {
152
- position: 'fixed',
153
- bottom: 0,
154
- top: 0,
155
- left: 0,
156
- right: 0,
157
- backgroundColor: 'rgba(0, 0, 0, 0.4)'
158
- },
159
- transClass: {
160
- position: 'fixed',
161
- left: 0,
162
- right: 0
163
- },
164
- maskShow: true,
165
- mkclick: true,
166
- popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
167
- }
168
- },
169
- computed: {
170
- isDesktop() {
171
- return this.popupWidth >= 500 && this.popupHeight >= 500
172
- },
173
- bg() {
174
- if (this.backgroundColor === '' || this.backgroundColor === 'none') {
175
- return 'transparent'
176
- }
177
- return this.backgroundColor
178
- }
179
- },
180
- mounted() {
181
- const fixSize = () => {
182
- const {
183
- windowWidth,
184
- windowHeight,
185
- windowTop,
186
- safeArea,
187
- screenHeight,
188
- safeAreaInsets
189
- } = uni.getSystemInfoSync()
190
- this.popupWidth = windowWidth
191
- this.popupHeight = windowHeight + (windowTop || 0)
192
- // TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
193
- if (safeArea && this.safeArea) {
194
- // #ifdef MP-WEIXIN
195
- this.safeAreaInsets = screenHeight - safeArea.bottom
196
- // #endif
197
- // #ifndef MP-WEIXIN
198
- this.safeAreaInsets = safeAreaInsets.bottom
199
- // #endif
200
- } else {
201
- this.safeAreaInsets = 0
202
- }
203
- }
204
- fixSize()
205
- // #ifdef H5
206
- // window.addEventListener('resize', fixSize)
207
- // this.$once('hook:beforeDestroy', () => {
208
- // window.removeEventListener('resize', fixSize)
209
- // })
210
- // #endif
211
- },
212
- // #ifndef VUE3
213
- // TODO vue2
214
- destroyed() {
215
- this.setH5Visible()
216
- },
217
- // #endif
218
- // #ifdef VUE3
219
- // TODO vue3
220
- unmounted() {
221
- this.setH5Visible()
222
- },
223
- // #endif
224
- created() {
225
- // this.mkclick = this.isMaskClick || this.maskClick
226
- if (this.isMaskClick === null && this.maskClick === null) {
227
- this.mkclick = true
228
- } else {
229
- this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
230
- }
231
- if (this.animation) {
232
- this.duration = 300
233
- } else {
234
- this.duration = 0
235
- }
236
- // TODO 处理 message 组件生命周期异常的问题
237
- this.messageChild = null
238
- // TODO 解决头条冒泡的问题
239
- this.clearPropagation = false
240
- this.maskClass.backgroundColor = this.maskBackgroundColor
241
- },
242
- methods: {
243
- setH5Visible() {
244
- // #ifdef H5
245
- // fix by mehaotian 处理 h5 滚动穿透的问题
246
- document.getElementsByTagName('body')[0].style.overflow = 'visible'
247
- // #endif
248
- },
249
- /**
250
- * 公用方法,不显示遮罩层
251
- */
252
- closeMask() {
253
- this.maskShow = false
254
- },
255
- /**
256
- * 公用方法,遮罩层禁止点击
257
- */
258
- disableMask() {
259
- this.mkclick = false
260
- },
261
- // TODO nvue 取消冒泡
262
- clear(e) {
263
- // #ifndef APP-NVUE
264
- e.stopPropagation()
265
- // #endif
266
- this.clearPropagation = true
267
- },
268
-
269
- open(direction) {
270
- // fix by mehaotian 处理快速打开关闭的情况
271
- if (this.showPopup) {
272
- return
273
- }
274
- let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
275
- if (!(direction && innerType.indexOf(direction) !== -1)) {
276
- direction = this.type
277
- }
278
- if (!this.config[direction]) {
279
- console.error('缺少类型:', direction)
280
- return
281
- }
282
- this[this.config[direction]]()
283
- this.$emit('change', {
284
- show: true,
285
- type: direction
286
- })
287
- },
288
- close(type) {
289
- this.showTrans = false
290
- this.$emit('change', {
291
- show: false,
292
- type: this.type
293
- })
294
- clearTimeout(this.timer)
295
- // // 自定义关闭事件
296
- // this.customOpen && this.customClose()
297
- this.timer = setTimeout(() => {
298
- this.showPopup = false
299
- }, 300)
300
- },
301
- // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
302
- touchstart() {
303
- this.clearPropagation = false
304
- },
305
-
306
- onTap() {
307
- if (this.clearPropagation) {
308
- // fix by mehaotian 兼容 nvue
309
- this.clearPropagation = false
310
- return
311
- }
312
- this.$emit('maskClick')
313
- if (!this.mkclick) return
314
- this.close()
315
- },
316
- /**
317
- * 顶部弹出样式处理
318
- */
319
- top(type) {
320
- this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
321
- this.ani = ['slide-top']
322
- this.transClass = {
323
- position: 'fixed',
324
- left: 0,
325
- right: 0,
326
- backgroundColor: this.bg
327
- }
328
- // TODO 兼容 type 属性 ,后续会废弃
329
- if (type) return
330
- this.showPopup = true
331
- this.showTrans = true
332
- this.$nextTick(() => {
333
- if (this.messageChild && this.type === 'message') {
334
- this.messageChild.timerClose()
335
- }
336
- })
337
- },
338
- /**
339
- * 底部弹出样式处理
340
- */
341
- bottom(type) {
342
- this.popupstyle = 'bottom'
343
- this.ani = ['slide-bottom']
344
- this.transClass = {
345
- position: 'fixed',
346
- left: 0,
347
- right: 0,
348
- bottom: 0,
349
- paddingBottom: this.safeAreaInsets + 'px',
350
- backgroundColor: this.bg
351
- }
352
- // TODO 兼容 type 属性 ,后续会废弃
353
- if (type) return
354
- this.showPopup = true
355
- this.showTrans = true
356
- },
357
- /**
358
- * 中间弹出样式处理
359
- */
360
- center(type) {
361
- this.popupstyle = 'center'
362
- this.ani = ['zoom-out', 'fade']
363
- this.transClass = {
364
- position: 'fixed',
365
- /* #ifndef APP-NVUE */
366
- display: 'flex',
367
- flexDirection: 'column',
368
- /* #endif */
369
- bottom: 0,
370
- left: 0,
371
- right: 0,
372
- top: 0,
373
- justifyContent: 'center',
374
- alignItems: 'center'
375
- }
376
- // TODO 兼容 type 属性 ,后续会废弃
377
- if (type) return
378
- this.showPopup = true
379
- this.showTrans = true
380
- },
381
- left(type) {
382
- this.popupstyle = 'left'
383
- this.ani = ['slide-left']
384
- this.transClass = {
385
- position: 'fixed',
386
- left: 0,
387
- bottom: 0,
388
- top: 0,
389
- backgroundColor: this.bg,
390
- /* #ifndef APP-NVUE */
391
- display: 'flex',
392
- flexDirection: 'column'
393
- /* #endif */
394
- }
395
- // TODO 兼容 type 属性 ,后续会废弃
396
- if (type) return
397
- this.showPopup = true
398
- this.showTrans = true
399
- },
400
- right(type) {
401
- this.popupstyle = 'right'
402
- this.ani = ['slide-right']
403
- this.transClass = {
404
- position: 'fixed',
405
- bottom: 0,
406
- right: 0,
407
- top: 0,
408
- backgroundColor: this.bg,
409
- /* #ifndef APP-NVUE */
410
- display: 'flex',
411
- flexDirection: 'column'
412
- /* #endif */
413
- }
414
- // TODO 兼容 type 属性 ,后续会废弃
415
- if (type) return
416
- this.showPopup = true
417
- this.showTrans = true
418
- }
419
- }
420
- }
421
- </script>
422
- <style lang="scss">
423
- .uni-popup {
424
- position: fixed;
425
- /* #ifndef APP-NVUE */
426
- z-index: 99;
427
-
428
- /* #endif */
429
- &.top,
430
- &.left,
431
- &.right {
432
- /* #ifdef H5 */
433
- top: var(--window-top);
434
- /* #endif */
435
- /* #ifndef H5 */
436
- top: 0;
437
- /* #endif */
438
- }
439
-
440
- .uni-popup__wrapper {
441
- /* #ifndef APP-NVUE */
442
- display: block;
443
- /* #endif */
444
- position: relative;
445
-
446
- /* iphonex 等安全区设置,底部安全区适配 */
447
- /* #ifndef APP-NVUE */
448
- // padding-bottom: constant(safe-area-inset-bottom);
449
- // padding-bottom: env(safe-area-inset-bottom);
450
- /* #endif */
451
- &.left,
452
- &.right {
453
- /* #ifdef H5 */
454
- padding-top: var(--window-top);
455
- /* #endif */
456
- /* #ifndef H5 */
457
- padding-top: 0;
458
- /* #endif */
459
- flex: 1;
460
- }
461
- }
462
- }
463
-
464
- .fixforpc-z-index {
465
- /* #ifndef APP-NVUE */
466
- z-index: 999;
467
- /* #endif */
468
- }
469
-
470
- .fixforpc-top {
471
- top: 0;
472
- }
473
- </style>
@@ -1 +0,0 @@
1
- @import 'index';
@@ -1,7 +0,0 @@
1
- @import 'variables';
2
- @import 'border';
3
- @import 'color';
4
- @import 'space';
5
- @import 'radius';
6
- @import 'text';
7
- @import 'styles';
@@ -1,8 +0,0 @@
1
- import en from './en.json'
2
- import zhHans from './zh-Hans.json'
3
- import zhHant from './zh-Hant.json'
4
- export default {
5
- en,
6
- 'zh-Hans': zhHans,
7
- 'zh-Hant': zhHant
8
- }
File without changes
File without changes
File without changes
File without changes