@kengic/uni 0.3.2-beta.10

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 (166) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +1 -0
  3. package/dist/kengic-uni.js +5 -0
  4. package/dist/src/consts/i18n/en.d.ts +45 -0
  5. package/dist/src/consts/i18n/index.d.ts +90 -0
  6. package/dist/src/consts/i18n/zh_CN.d.ts +45 -0
  7. package/dist/src/consts/index.d.ts +1 -0
  8. package/dist/src/index.d.ts +2 -0
  9. package/dist/src/utils/index.d.ts +1 -0
  10. package/dist/src/utils/kg.util.d.ts +5 -0
  11. package/dist/uni-ui/index.ts +11 -0
  12. package/dist/uni-ui/uni-badge/uni-badge.vue +253 -0
  13. package/dist/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +41 -0
  14. package/dist/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +121 -0
  15. package/dist/uni-ui/uni-calendar/calendar.js +546 -0
  16. package/dist/uni-ui/uni-calendar/i18n/en.json +12 -0
  17. package/dist/uni-ui/uni-calendar/i18n/index.js +8 -0
  18. package/dist/uni-ui/uni-calendar/i18n/zh-Hans.json +12 -0
  19. package/dist/uni-ui/uni-calendar/i18n/zh-Hant.json +12 -0
  20. package/dist/uni-ui/uni-calendar/uni-calendar-item.vue +187 -0
  21. package/dist/uni-ui/uni-calendar/uni-calendar.vue +566 -0
  22. package/dist/uni-ui/uni-calendar/util.js +360 -0
  23. package/dist/uni-ui/uni-card/uni-card.vue +281 -0
  24. package/dist/uni-ui/uni-col/uni-col.vue +317 -0
  25. package/dist/uni-ui/uni-collapse/uni-collapse.vue +147 -0
  26. package/dist/uni-ui/uni-collapse-item/uni-collapse-item.vue +402 -0
  27. package/dist/uni-ui/uni-combox/uni-combox.vue +294 -0
  28. package/dist/uni-ui/uni-countdown/i18n/en.json +6 -0
  29. package/dist/uni-ui/uni-countdown/i18n/index.js +8 -0
  30. package/dist/uni-ui/uni-countdown/i18n/zh-Hans.json +6 -0
  31. package/dist/uni-ui/uni-countdown/i18n/zh-Hant.json +6 -0
  32. package/dist/uni-ui/uni-countdown/uni-countdown.vue +267 -0
  33. package/dist/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +821 -0
  34. package/dist/uni-ui/uni-data-picker/keypress.js +45 -0
  35. package/dist/uni-ui/uni-data-picker/uni-data-picker.vue +551 -0
  36. package/dist/uni-ui/uni-data-pickerview/uni-data-picker.js +622 -0
  37. package/dist/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +323 -0
  38. package/dist/uni-ui/uni-data-select/uni-data-select.vue +517 -0
  39. package/dist/uni-ui/uni-dateformat/date-format.js +200 -0
  40. package/dist/uni-ui/uni-dateformat/uni-dateformat.vue +88 -0
  41. package/dist/uni-ui/uni-datetime-picker/calendar-item.vue +177 -0
  42. package/dist/uni-ui/uni-datetime-picker/calendar.vue +928 -0
  43. package/dist/uni-ui/uni-datetime-picker/i18n/en.json +22 -0
  44. package/dist/uni-ui/uni-datetime-picker/i18n/index.js +8 -0
  45. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +22 -0
  46. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +22 -0
  47. package/dist/uni-ui/uni-datetime-picker/time-picker.vue +934 -0
  48. package/dist/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1026 -0
  49. package/dist/uni-ui/uni-datetime-picker/util.js +403 -0
  50. package/dist/uni-ui/uni-drawer/keypress.js +45 -0
  51. package/dist/uni-ui/uni-drawer/uni-drawer.vue +181 -0
  52. package/dist/uni-ui/uni-easyinput/common.js +56 -0
  53. package/dist/uni-ui/uni-easyinput/uni-easyinput.vue +660 -0
  54. package/dist/uni-ui/uni-fab/uni-fab.vue +491 -0
  55. package/dist/uni-ui/uni-fav/i18n/en.json +4 -0
  56. package/dist/uni-ui/uni-fav/i18n/index.js +8 -0
  57. package/dist/uni-ui/uni-fav/i18n/zh-Hans.json +4 -0
  58. package/dist/uni-ui/uni-fav/i18n/zh-Hant.json +4 -0
  59. package/dist/uni-ui/uni-fav/uni-fav.vue +161 -0
  60. package/dist/uni-ui/uni-file-picker/choose-and-upload-file.js +224 -0
  61. package/dist/uni-ui/uni-file-picker/uni-file-picker.vue +667 -0
  62. package/dist/uni-ui/uni-file-picker/upload-file.vue +325 -0
  63. package/dist/uni-ui/uni-file-picker/upload-image.vue +292 -0
  64. package/dist/uni-ui/uni-file-picker/utils.js +109 -0
  65. package/dist/uni-ui/uni-forms/uni-forms.vue +398 -0
  66. package/dist/uni-ui/uni-forms/utils.js +293 -0
  67. package/dist/uni-ui/uni-forms/validate.js +486 -0
  68. package/dist/uni-ui/uni-forms-item/uni-forms-item.vue +601 -0
  69. package/dist/uni-ui/uni-goods-nav/i18n/en.json +6 -0
  70. package/dist/uni-ui/uni-goods-nav/i18n/index.js +8 -0
  71. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hans.json +6 -0
  72. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hant.json +6 -0
  73. package/dist/uni-ui/uni-goods-nav/uni-goods-nav.vue +229 -0
  74. package/dist/uni-ui/uni-grid/uni-grid.vue +143 -0
  75. package/dist/uni-ui/uni-grid-item/uni-grid-item.vue +129 -0
  76. package/dist/uni-ui/uni-group/uni-group.vue +134 -0
  77. package/dist/uni-ui/uni-icons/icons.js +1169 -0
  78. package/dist/uni-ui/uni-icons/uni-icons.vue +96 -0
  79. package/dist/uni-ui/uni-icons/uniicons.css +663 -0
  80. package/dist/uni-ui/uni-icons/uniicons.ttf +0 -0
  81. package/dist/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +144 -0
  82. package/dist/uni-ui/uni-indexed-list/uni-indexed-list.vue +367 -0
  83. package/dist/uni-ui/uni-link/uni-link.vue +128 -0
  84. package/dist/uni-ui/uni-list/uni-list.vue +123 -0
  85. package/dist/uni-ui/uni-list/uni-refresh.vue +65 -0
  86. package/dist/uni-ui/uni-list/uni-refresh.wxs +87 -0
  87. package/dist/uni-ui/uni-list-ad/uni-list-ad.vue +107 -0
  88. package/dist/uni-ui/uni-list-chat/uni-list-chat.scss +58 -0
  89. package/dist/uni-ui/uni-list-chat/uni-list-chat.vue +593 -0
  90. package/dist/uni-ui/uni-list-item/uni-list-item.vue +534 -0
  91. package/dist/uni-ui/uni-load-more/i18n/en.json +5 -0
  92. package/dist/uni-ui/uni-load-more/i18n/index.js +8 -0
  93. package/dist/uni-ui/uni-load-more/i18n/zh-Hans.json +5 -0
  94. package/dist/uni-ui/uni-load-more/i18n/zh-Hant.json +5 -0
  95. package/dist/uni-ui/uni-load-more/uni-load-more.vue +399 -0
  96. package/dist/uni-ui/uni-nav-bar/uni-nav-bar.vue +357 -0
  97. package/dist/uni-ui/uni-nav-bar/uni-status-bar.vue +24 -0
  98. package/dist/uni-ui/uni-notice-bar/uni-notice-bar.vue +426 -0
  99. package/dist/uni-ui/uni-number-box/uni-number-box.vue +221 -0
  100. package/dist/uni-ui/uni-pagination/i18n/en.json +5 -0
  101. package/dist/uni-ui/uni-pagination/i18n/es.json +5 -0
  102. package/dist/uni-ui/uni-pagination/i18n/fr.json +5 -0
  103. package/dist/uni-ui/uni-pagination/i18n/index.js +12 -0
  104. package/dist/uni-ui/uni-pagination/i18n/zh-Hans.json +5 -0
  105. package/dist/uni-ui/uni-pagination/i18n/zh-Hant.json +5 -0
  106. package/dist/uni-ui/uni-pagination/uni-pagination.vue +465 -0
  107. package/dist/uni-ui/uni-popup/i18n/en.json +7 -0
  108. package/dist/uni-ui/uni-popup/i18n/index.js +9 -0
  109. package/dist/uni-ui/uni-popup/i18n/zh-Hans.json +7 -0
  110. package/dist/uni-ui/uni-popup/i18n/zh-Hant.json +7 -0
  111. package/dist/uni-ui/uni-popup/keypress.js +45 -0
  112. package/dist/uni-ui/uni-popup/popup.js +23 -0
  113. package/dist/uni-ui/uni-popup/uni-popup.vue +464 -0
  114. package/dist/uni-ui/uni-popup-dialog/keypress.js +45 -0
  115. package/dist/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +275 -0
  116. package/dist/uni-ui/uni-popup-message/uni-popup-message.vue +143 -0
  117. package/dist/uni-ui/uni-popup-share/uni-popup-share.vue +187 -0
  118. package/dist/uni-ui/uni-rate/uni-rate.vue +365 -0
  119. package/dist/uni-ui/uni-row/uni-row.vue +190 -0
  120. package/dist/uni-ui/uni-scss/changelog.md +8 -0
  121. package/dist/uni-ui/uni-scss/index.scss +1 -0
  122. package/dist/uni-ui/uni-scss/package.json +82 -0
  123. package/dist/uni-ui/uni-scss/readme.md +4 -0
  124. package/dist/uni-ui/uni-scss/styles/index.scss +7 -0
  125. package/dist/uni-ui/uni-scss/styles/setting/_border.scss +3 -0
  126. package/dist/uni-ui/uni-scss/styles/setting/_color.scss +66 -0
  127. package/dist/uni-ui/uni-scss/styles/setting/_radius.scss +55 -0
  128. package/dist/uni-ui/uni-scss/styles/setting/_space.scss +56 -0
  129. package/dist/uni-ui/uni-scss/styles/setting/_styles.scss +167 -0
  130. package/dist/uni-ui/uni-scss/styles/setting/_text.scss +24 -0
  131. package/dist/uni-ui/uni-scss/styles/setting/_variables.scss +146 -0
  132. package/dist/uni-ui/uni-scss/styles/tools/functions.scss +19 -0
  133. package/dist/uni-ui/uni-scss/theme.scss +31 -0
  134. package/dist/uni-ui/uni-scss/variables.scss +62 -0
  135. package/dist/uni-ui/uni-search-bar/i18n/en.json +4 -0
  136. package/dist/uni-ui/uni-search-bar/i18n/index.js +8 -0
  137. package/dist/uni-ui/uni-search-bar/i18n/zh-Hans.json +4 -0
  138. package/dist/uni-ui/uni-search-bar/i18n/zh-Hant.json +4 -0
  139. package/dist/uni-ui/uni-search-bar/uni-search-bar.vue +298 -0
  140. package/dist/uni-ui/uni-section/uni-section.vue +167 -0
  141. package/dist/uni-ui/uni-segmented-control/uni-segmented-control.vue +145 -0
  142. package/dist/uni-ui/uni-steps/uni-steps.vue +269 -0
  143. package/dist/uni-ui/uni-swipe-action/uni-swipe-action.vue +60 -0
  144. package/dist/uni-ui/uni-swipe-action-item/bindingx.js +302 -0
  145. package/dist/uni-ui/uni-swipe-action-item/isPC.js +12 -0
  146. package/dist/uni-ui/uni-swipe-action-item/mpalipay.js +195 -0
  147. package/dist/uni-ui/uni-swipe-action-item/mpother.js +260 -0
  148. package/dist/uni-ui/uni-swipe-action-item/mpwxs.js +84 -0
  149. package/dist/uni-ui/uni-swipe-action-item/render.js +270 -0
  150. package/dist/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +347 -0
  151. package/dist/uni-ui/uni-swipe-action-item/wx.wxs +341 -0
  152. package/dist/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +218 -0
  153. package/dist/uni-ui/uni-table/uni-table.vue +455 -0
  154. package/dist/uni-ui/uni-tag/uni-tag.vue +252 -0
  155. package/dist/uni-ui/uni-tbody/uni-tbody.vue +29 -0
  156. package/dist/uni-ui/uni-td/uni-td.vue +90 -0
  157. package/dist/uni-ui/uni-th/filter-dropdown.vue +511 -0
  158. package/dist/uni-ui/uni-th/uni-th.vue +285 -0
  159. package/dist/uni-ui/uni-thead/uni-thead.vue +129 -0
  160. package/dist/uni-ui/uni-title/uni-title.vue +171 -0
  161. package/dist/uni-ui/uni-tooltip/uni-tooltip.vue +68 -0
  162. package/dist/uni-ui/uni-tr/table-checkbox.vue +179 -0
  163. package/dist/uni-ui/uni-tr/uni-tr.vue +171 -0
  164. package/dist/uni-ui/uni-transition/createAnimation.js +131 -0
  165. package/dist/uni-ui/uni-transition/uni-transition.vue +281 -0
  166. package/package.json +90 -0
@@ -0,0 +1,275 @@
1
+ <template>
2
+ <view class="uni-popup-dialog">
3
+ <view class="uni-dialog-title">
4
+ <text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
5
+ </view>
6
+ <view v-if="mode === 'base'" class="uni-dialog-content">
7
+ <slot>
8
+ <text class="uni-dialog-content-text">{{content}}</text>
9
+ </slot>
10
+ </view>
11
+ <view v-else class="uni-dialog-content">
12
+ <slot>
13
+ <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
14
+ </slot>
15
+ </view>
16
+ <view class="uni-dialog-button-group">
17
+ <view class="uni-dialog-button" @click="closeDialog">
18
+ <text class="uni-dialog-button-text">{{closeText}}</text>
19
+ </view>
20
+ <view class="uni-dialog-button uni-border-left" @click="onOk">
21
+ <text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
22
+ </view>
23
+ </view>
24
+
25
+ </view>
26
+ </template>
27
+
28
+ <script>
29
+ import popup from '../uni-popup/popup.js'
30
+ import {
31
+ initVueI18n
32
+ } from '@dcloudio/uni-i18n'
33
+ import messages from '../uni-popup/i18n'
34
+ const { t } = initVueI18n(messages)
35
+ /**
36
+ * PopUp 弹出层-对话框样式
37
+ * @description 弹出层-对话框样式
38
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
39
+ * @property {String} value input 模式下的默认值
40
+ * @property {String} placeholder input 模式下输入提示
41
+ * @property {String} type = [success|warning|info|error] 主题样式
42
+ * @value success 成功
43
+ * @value warning 提示
44
+ * @value info 消息
45
+ * @value error 错误
46
+ * @property {String} mode = [base|input] 模式、
47
+ * @value base 基础对话框
48
+ * @value input 可输入对话框
49
+ * @property {String} content 对话框内容
50
+ * @property {Boolean} beforeClose 是否拦截取消事件
51
+ * @event {Function} confirm 点击确认按钮触发
52
+ * @event {Function} close 点击取消按钮触发
53
+ */
54
+
55
+ export default {
56
+ name: "uniPopupDialog",
57
+ mixins: [popup],
58
+ emits:['confirm','close'],
59
+ props: {
60
+ inputType:{
61
+ type: String,
62
+ default: 'text'
63
+ },
64
+ value: {
65
+ type: [String, Number],
66
+ default: ''
67
+ },
68
+ placeholder: {
69
+ type: [String, Number],
70
+ default: ''
71
+ },
72
+ type: {
73
+ type: String,
74
+ default: 'error'
75
+ },
76
+ mode: {
77
+ type: String,
78
+ default: 'base'
79
+ },
80
+ title: {
81
+ type: String,
82
+ default: ''
83
+ },
84
+ content: {
85
+ type: String,
86
+ default: ''
87
+ },
88
+ beforeClose: {
89
+ type: Boolean,
90
+ default: false
91
+ },
92
+ cancelText:{
93
+ type: String,
94
+ default: ''
95
+ },
96
+ confirmText:{
97
+ type: String,
98
+ default: ''
99
+ }
100
+ },
101
+ data() {
102
+ return {
103
+ dialogType: 'error',
104
+ focus: false,
105
+ val: ""
106
+ }
107
+ },
108
+ computed: {
109
+ okText() {
110
+ return this.confirmText || t("uni-popup.ok")
111
+ },
112
+ closeText() {
113
+ return this.cancelText || t("uni-popup.cancel")
114
+ },
115
+ placeholderText() {
116
+ return this.placeholder || t("uni-popup.placeholder")
117
+ },
118
+ titleText() {
119
+ return this.title || t("uni-popup.title")
120
+ }
121
+ },
122
+ watch: {
123
+ type(val) {
124
+ this.dialogType = val
125
+ },
126
+ mode(val) {
127
+ if (val === 'input') {
128
+ this.dialogType = 'info'
129
+ }
130
+ },
131
+ value(val) {
132
+ this.val = val
133
+ }
134
+ },
135
+ created() {
136
+ // 对话框遮罩不可点击
137
+ this.popup.disableMask()
138
+ // this.popup.closeMask()
139
+ if (this.mode === 'input') {
140
+ this.dialogType = 'info'
141
+ this.val = this.value
142
+ } else {
143
+ this.dialogType = this.type
144
+ }
145
+ },
146
+ mounted() {
147
+ this.focus = true
148
+ },
149
+ methods: {
150
+ /**
151
+ * 点击确认按钮
152
+ */
153
+ onOk() {
154
+ if (this.mode === 'input'){
155
+ this.$emit('confirm', this.val)
156
+ }else{
157
+ this.$emit('confirm')
158
+ }
159
+ if(this.beforeClose) return
160
+ this.popup.close()
161
+ },
162
+ /**
163
+ * 点击取消按钮
164
+ */
165
+ closeDialog() {
166
+ this.$emit('close')
167
+ if(this.beforeClose) return
168
+ this.popup.close()
169
+ },
170
+ close(){
171
+ this.popup.close()
172
+ }
173
+ }
174
+ }
175
+ </script>
176
+
177
+ <style lang="scss" >
178
+ .uni-popup-dialog {
179
+ width: 300px;
180
+ border-radius: 11px;
181
+ background-color: #fff;
182
+ }
183
+
184
+ .uni-dialog-title {
185
+ /* #ifndef APP-NVUE */
186
+ display: flex;
187
+ /* #endif */
188
+ flex-direction: row;
189
+ justify-content: center;
190
+ padding-top: 25px;
191
+ }
192
+
193
+ .uni-dialog-title-text {
194
+ font-size: 16px;
195
+ font-weight: 500;
196
+ }
197
+
198
+ .uni-dialog-content {
199
+ /* #ifndef APP-NVUE */
200
+ display: flex;
201
+ /* #endif */
202
+ flex-direction: row;
203
+ justify-content: center;
204
+ align-items: center;
205
+ padding: 20px;
206
+ }
207
+
208
+ .uni-dialog-content-text {
209
+ font-size: 14px;
210
+ color: #6C6C6C;
211
+ }
212
+
213
+ .uni-dialog-button-group {
214
+ /* #ifndef APP-NVUE */
215
+ display: flex;
216
+ /* #endif */
217
+ flex-direction: row;
218
+ border-top-color: #f5f5f5;
219
+ border-top-style: solid;
220
+ border-top-width: 1px;
221
+ }
222
+
223
+ .uni-dialog-button {
224
+ /* #ifndef APP-NVUE */
225
+ display: flex;
226
+ /* #endif */
227
+
228
+ flex: 1;
229
+ flex-direction: row;
230
+ justify-content: center;
231
+ align-items: center;
232
+ height: 45px;
233
+ }
234
+
235
+ .uni-border-left {
236
+ border-left-color: #f0f0f0;
237
+ border-left-style: solid;
238
+ border-left-width: 1px;
239
+ }
240
+
241
+ .uni-dialog-button-text {
242
+ font-size: 16px;
243
+ color: #333;
244
+ }
245
+
246
+ .uni-button-color {
247
+ color: #007aff;
248
+ }
249
+
250
+ .uni-dialog-input {
251
+ flex: 1;
252
+ font-size: 14px;
253
+ border: 1px #eee solid;
254
+ height: 40px;
255
+ padding: 0 10px;
256
+ border-radius: 5px;
257
+ color: #555;
258
+ }
259
+
260
+ .uni-popup__success {
261
+ color: #4cd964;
262
+ }
263
+
264
+ .uni-popup__warn {
265
+ color: #f0ad4e;
266
+ }
267
+
268
+ .uni-popup__error {
269
+ color: #dd524d;
270
+ }
271
+
272
+ .uni-popup__info {
273
+ color: #909399;
274
+ }
275
+ </style>
@@ -0,0 +1,143 @@
1
+ <template>
2
+ <view class="uni-popup-message">
3
+ <view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
4
+ <slot>
5
+ <text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
6
+ </slot>
7
+ </view>
8
+ </view>
9
+ </template>
10
+
11
+ <script>
12
+ import popup from '../uni-popup/popup.js'
13
+ /**
14
+ * PopUp 弹出层-消息提示
15
+ * @description 弹出层-消息提示
16
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
17
+ * @property {String} type = [success|warning|info|error] 主题样式
18
+ * @value success 成功
19
+ * @value warning 提示
20
+ * @value info 消息
21
+ * @value error 错误
22
+ * @property {String} message 消息提示文字
23
+ * @property {String} duration 显示时间,设置为 0 则不会自动关闭
24
+ */
25
+
26
+ export default {
27
+ name: 'uniPopupMessage',
28
+ mixins:[popup],
29
+ props: {
30
+ /**
31
+ * 主题 success/warning/info/error 默认 success
32
+ */
33
+ type: {
34
+ type: String,
35
+ default: 'success'
36
+ },
37
+ /**
38
+ * 消息文字
39
+ */
40
+ message: {
41
+ type: String,
42
+ default: ''
43
+ },
44
+ /**
45
+ * 显示时间,设置为 0 则不会自动关闭
46
+ */
47
+ duration: {
48
+ type: Number,
49
+ default: 3000
50
+ },
51
+ maskShow:{
52
+ type:Boolean,
53
+ default:false
54
+ }
55
+ },
56
+ data() {
57
+ return {}
58
+ },
59
+ created() {
60
+ this.popup.maskShow = this.maskShow
61
+ this.popup.messageChild = this
62
+ },
63
+ methods: {
64
+ timerClose(){
65
+ if(this.duration === 0) return
66
+ clearTimeout(this.timer)
67
+ this.timer = setTimeout(()=>{
68
+ this.popup.close()
69
+ },this.duration)
70
+ }
71
+ }
72
+ }
73
+ </script>
74
+ <style lang="scss" >
75
+ .uni-popup-message {
76
+ /* #ifndef APP-NVUE */
77
+ display: flex;
78
+ /* #endif */
79
+ flex-direction: row;
80
+ justify-content: center;
81
+ }
82
+
83
+ .uni-popup-message__box {
84
+ background-color: #e1f3d8;
85
+ padding: 10px 15px;
86
+ border-color: #eee;
87
+ border-style: solid;
88
+ border-width: 1px;
89
+ flex: 1;
90
+ }
91
+
92
+ @media screen and (min-width: 500px) {
93
+ .fixforpc-width {
94
+ margin-top: 20px;
95
+ border-radius: 4px;
96
+ flex: none;
97
+ min-width: 380px;
98
+ /* #ifndef APP-NVUE */
99
+ max-width: 50%;
100
+ /* #endif */
101
+ /* #ifdef APP-NVUE */
102
+ max-width: 500px;
103
+ /* #endif */
104
+ }
105
+ }
106
+
107
+ .uni-popup-message-text {
108
+ font-size: 14px;
109
+ padding: 0;
110
+ }
111
+
112
+ .uni-popup__success {
113
+ background-color: #e1f3d8;
114
+ }
115
+
116
+ .uni-popup__success-text {
117
+ color: #67C23A;
118
+ }
119
+
120
+ .uni-popup__warn {
121
+ background-color: #faecd8;
122
+ }
123
+
124
+ .uni-popup__warn-text {
125
+ color: #E6A23C;
126
+ }
127
+
128
+ .uni-popup__error {
129
+ background-color: #fde2e2;
130
+ }
131
+
132
+ .uni-popup__error-text {
133
+ color: #F56C6C;
134
+ }
135
+
136
+ .uni-popup__info {
137
+ background-color: #F2F6FC;
138
+ }
139
+
140
+ .uni-popup__info-text {
141
+ color: #909399;
142
+ }
143
+ </style>
@@ -0,0 +1,187 @@
1
+ <template>
2
+ <view class="uni-popup-share">
3
+ <view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
4
+ <view class="uni-share-content">
5
+ <view class="uni-share-content-box">
6
+ <view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
7
+ <image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
8
+ <text class="uni-share-text">{{item.text}}</text>
9
+ </view>
10
+
11
+ </view>
12
+ </view>
13
+ <view class="uni-share-button-box">
14
+ <button class="uni-share-button" @click="close">{{cancelText}}</button>
15
+ </view>
16
+ </view>
17
+ </template>
18
+
19
+ <script>
20
+ import popup from '../uni-popup/popup.js'
21
+ import {
22
+ initVueI18n
23
+ } from '@dcloudio/uni-i18n'
24
+ import messages from '../uni-popup/i18n'
25
+ const { t } = initVueI18n(messages)
26
+ export default {
27
+ name: 'UniPopupShare',
28
+ mixins:[popup],
29
+ emits:['select'],
30
+ props: {
31
+ title: {
32
+ type: String,
33
+ default: ''
34
+ },
35
+ beforeClose: {
36
+ type: Boolean,
37
+ default: false
38
+ }
39
+ },
40
+ data() {
41
+ return {
42
+ bottomData: [{
43
+ text: '微信',
44
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
45
+ name: 'wx'
46
+ },
47
+ {
48
+ text: '支付宝',
49
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
50
+ name: 'wx'
51
+ },
52
+ {
53
+ text: 'QQ',
54
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
55
+ name: 'qq'
56
+ },
57
+ {
58
+ text: '新浪',
59
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
60
+ name: 'sina'
61
+ },
62
+ // {
63
+ // text: '百度',
64
+ // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
65
+ // name: 'copy'
66
+ // },
67
+ // {
68
+ // text: '其他',
69
+ // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
70
+ // name: 'more'
71
+ // }
72
+ ]
73
+ }
74
+ },
75
+ created() {},
76
+ computed: {
77
+ cancelText() {
78
+ return t("uni-popup.cancel")
79
+ },
80
+ shareTitleText() {
81
+ return this.title || t("uni-popup.shareTitle")
82
+ }
83
+ },
84
+ methods: {
85
+ /**
86
+ * 选择内容
87
+ */
88
+ select(item, index) {
89
+ this.$emit('select', {
90
+ item,
91
+ index
92
+ })
93
+ this.close()
94
+
95
+ },
96
+ /**
97
+ * 关闭窗口
98
+ */
99
+ close() {
100
+ if(this.beforeClose) return
101
+ this.popup.close()
102
+ }
103
+ }
104
+ }
105
+ </script>
106
+ <style lang="scss" >
107
+ .uni-popup-share {
108
+ background-color: #fff;
109
+ border-top-left-radius: 11px;
110
+ border-top-right-radius: 11px;
111
+ }
112
+ .uni-share-title {
113
+ /* #ifndef APP-NVUE */
114
+ display: flex;
115
+ /* #endif */
116
+ flex-direction: row;
117
+ align-items: center;
118
+ justify-content: center;
119
+ height: 40px;
120
+ }
121
+ .uni-share-title-text {
122
+ font-size: 14px;
123
+ color: #666;
124
+ }
125
+ .uni-share-content {
126
+ /* #ifndef APP-NVUE */
127
+ display: flex;
128
+ /* #endif */
129
+ flex-direction: row;
130
+ justify-content: center;
131
+ padding-top: 10px;
132
+ }
133
+
134
+ .uni-share-content-box {
135
+ /* #ifndef APP-NVUE */
136
+ display: flex;
137
+ /* #endif */
138
+ flex-direction: row;
139
+ flex-wrap: wrap;
140
+ width: 360px;
141
+ }
142
+
143
+ .uni-share-content-item {
144
+ width: 90px;
145
+ /* #ifndef APP-NVUE */
146
+ display: flex;
147
+ /* #endif */
148
+ flex-direction: column;
149
+ justify-content: center;
150
+ padding: 10px 0;
151
+ align-items: center;
152
+ }
153
+
154
+ .uni-share-content-item:active {
155
+ background-color: #f5f5f5;
156
+ }
157
+
158
+ .uni-share-image {
159
+ width: 30px;
160
+ height: 30px;
161
+ }
162
+
163
+ .uni-share-text {
164
+ margin-top: 10px;
165
+ font-size: 14px;
166
+ color: #3B4144;
167
+ }
168
+
169
+ .uni-share-button-box {
170
+ /* #ifndef APP-NVUE */
171
+ display: flex;
172
+ /* #endif */
173
+ flex-direction: row;
174
+ padding: 10px 15px;
175
+ }
176
+
177
+ .uni-share-button {
178
+ flex: 1;
179
+ border-radius: 50px;
180
+ color: #666;
181
+ font-size: 16px;
182
+ }
183
+
184
+ .uni-share-button::after {
185
+ border-radius: 50px;
186
+ }
187
+ </style>