cbvirtua 1.0.101 → 1.0.103
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/5111.zip +0 -0
- package/package.json +1 -1
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/.hbuilderx/launch.json +11 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/App.vue +17 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/README.md +13 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/components/xiaolu-tree/code.js +408 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/components/xiaolu-tree/css/icon.css +342 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/components/xiaolu-tree/css/style.scss +119 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/components/xiaolu-tree/search/index.vue +66 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/components/xiaolu-tree/tree.vue +70 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/main.js +11 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/manifest.json +78 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/pages/chooseUser/chooseUser.vue +69 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/pages/chooseUser/data.js +96 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/pages/index/index.vue +122 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/pages.json +25 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/changelog.md +80 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/i18n/en.json +7 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/i18n/index.js +8 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json +7 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json +7 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/keypress.js +45 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/popup.js +26 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue +90 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup/uni-popup.vue +496 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js +45 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue +313 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue +143 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue +187 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/package.json +87 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-popup/readme.md +17 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/changelog.md +8 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/index.scss +1 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/package.json +82 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/readme.md +4 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/index.scss +7 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_border.scss +3 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_color.scss +66 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_radius.scss +55 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_space.scss +56 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_styles.scss +167 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_text.scss +24 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/setting/_variables.scss +146 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/styles/tools/functions.scss +19 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/theme.scss +31 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-scss/variables.scss +62 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-transition/changelog.md +22 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-transition/components/uni-transition/createAnimation.js +131 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-transition/components/uni-transition/uni-transition.vue +286 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-transition/package.json +84 -0
- package/xiaolu-tree-plugin-main/xiaolu-tree-plugin-main/uni_modules/uni-transition/readme.md +11 -0
|
@@ -0,0 +1,313 @@
|
|
|
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" :maxlength="maxlength" v-model="val" :type="inputType"
|
|
14
|
+
:placeholder="placeholderText" :focus="focus">
|
|
15
|
+
</slot>
|
|
16
|
+
</view>
|
|
17
|
+
<view class="uni-dialog-button-group">
|
|
18
|
+
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
|
|
19
|
+
<text class="uni-dialog-button-text">{{closeText}}</text>
|
|
20
|
+
</view>
|
|
21
|
+
<view class="uni-dialog-button uni-border-left" @click="onOk">
|
|
22
|
+
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
|
|
23
|
+
</view>
|
|
24
|
+
</view>
|
|
25
|
+
|
|
26
|
+
</view>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import popup from '../uni-popup/popup.js'
|
|
31
|
+
import {
|
|
32
|
+
initVueI18n
|
|
33
|
+
} from '@dcloudio/uni-i18n'
|
|
34
|
+
import messages from '../uni-popup/i18n/index.js'
|
|
35
|
+
const {
|
|
36
|
+
t
|
|
37
|
+
} = initVueI18n(messages)
|
|
38
|
+
/**
|
|
39
|
+
* PopUp 弹出层-对话框样式
|
|
40
|
+
* @description 弹出层-对话框样式
|
|
41
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
|
42
|
+
* @property {String} value input 模式下的默认值
|
|
43
|
+
* @property {String} placeholder input 模式下输入提示
|
|
44
|
+
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
|
|
45
|
+
* @property {String} type = [success|warning|info|error] 主题样式
|
|
46
|
+
* @value success 成功
|
|
47
|
+
* @value warning 提示
|
|
48
|
+
* @value info 消息
|
|
49
|
+
* @value error 错误
|
|
50
|
+
* @property {String} mode = [base|input] 模式、
|
|
51
|
+
* @value base 基础对话框
|
|
52
|
+
* @value input 可输入对话框
|
|
53
|
+
* @showClose {Boolean} 是否显示关闭按钮
|
|
54
|
+
* @property {String} content 对话框内容
|
|
55
|
+
* @property {Boolean} beforeClose 是否拦截取消事件
|
|
56
|
+
* @property {Number} maxlength 输入
|
|
57
|
+
* @event {Function} confirm 点击确认按钮触发
|
|
58
|
+
* @event {Function} close 点击取消按钮触发
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "uniPopupDialog",
|
|
63
|
+
mixins: [popup],
|
|
64
|
+
emits: ['confirm', 'close', 'update:modelValue', 'input'],
|
|
65
|
+
props: {
|
|
66
|
+
inputType: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: 'text'
|
|
69
|
+
},
|
|
70
|
+
showClose: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
// #ifdef VUE2
|
|
75
|
+
value: {
|
|
76
|
+
type: [String, Number],
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
// #endif
|
|
80
|
+
// #ifdef VUE3
|
|
81
|
+
modelValue: {
|
|
82
|
+
type: [Number, String],
|
|
83
|
+
default: ''
|
|
84
|
+
},
|
|
85
|
+
// #endif
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
placeholder: {
|
|
89
|
+
type: [String, Number],
|
|
90
|
+
default: ''
|
|
91
|
+
},
|
|
92
|
+
type: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: 'error'
|
|
95
|
+
},
|
|
96
|
+
mode: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: 'base'
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: ''
|
|
103
|
+
},
|
|
104
|
+
content: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: ''
|
|
107
|
+
},
|
|
108
|
+
beforeClose: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
cancelText: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: ''
|
|
115
|
+
},
|
|
116
|
+
confirmText: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: ''
|
|
119
|
+
},
|
|
120
|
+
maxlength: {
|
|
121
|
+
type: Number,
|
|
122
|
+
default: -1,
|
|
123
|
+
},
|
|
124
|
+
focus: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: true,
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
data() {
|
|
130
|
+
return {
|
|
131
|
+
dialogType: 'error',
|
|
132
|
+
val: ""
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
computed: {
|
|
136
|
+
okText() {
|
|
137
|
+
return this.confirmText || t("uni-popup.ok")
|
|
138
|
+
},
|
|
139
|
+
closeText() {
|
|
140
|
+
return this.cancelText || t("uni-popup.cancel")
|
|
141
|
+
},
|
|
142
|
+
placeholderText() {
|
|
143
|
+
return this.placeholder || t("uni-popup.placeholder")
|
|
144
|
+
},
|
|
145
|
+
titleText() {
|
|
146
|
+
return this.title || t("uni-popup.title")
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
watch: {
|
|
150
|
+
type(val) {
|
|
151
|
+
this.dialogType = val
|
|
152
|
+
},
|
|
153
|
+
mode(val) {
|
|
154
|
+
if (val === 'input') {
|
|
155
|
+
this.dialogType = 'info'
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
value(val) {
|
|
159
|
+
if (this.maxlength != -1 && this.mode === 'input') {
|
|
160
|
+
this.val = val.slice(0, this.maxlength);
|
|
161
|
+
} else {
|
|
162
|
+
this.val = val
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
val(val) {
|
|
166
|
+
// #ifdef VUE2
|
|
167
|
+
// TODO 兼容 vue2
|
|
168
|
+
this.$emit('input', val);
|
|
169
|
+
// #endif
|
|
170
|
+
// #ifdef VUE3
|
|
171
|
+
// TODO 兼容 vue3
|
|
172
|
+
this.$emit('update:modelValue', val);
|
|
173
|
+
// #endif
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
created() {
|
|
177
|
+
// 对话框遮罩不可点击
|
|
178
|
+
this.popup.disableMask()
|
|
179
|
+
// this.popup.closeMask()
|
|
180
|
+
if (this.mode === 'input') {
|
|
181
|
+
this.dialogType = 'info'
|
|
182
|
+
this.val = this.value
|
|
183
|
+
} else {
|
|
184
|
+
this.dialogType = this.type
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
methods: {
|
|
188
|
+
/**
|
|
189
|
+
* 点击确认按钮
|
|
190
|
+
*/
|
|
191
|
+
onOk() {
|
|
192
|
+
if (this.mode === 'input') {
|
|
193
|
+
this.$emit('confirm', this.val)
|
|
194
|
+
} else {
|
|
195
|
+
this.$emit('confirm')
|
|
196
|
+
}
|
|
197
|
+
if (this.beforeClose) return
|
|
198
|
+
this.popup.close()
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* 点击取消按钮
|
|
202
|
+
*/
|
|
203
|
+
closeDialog() {
|
|
204
|
+
this.$emit('close')
|
|
205
|
+
if (this.beforeClose) return
|
|
206
|
+
this.popup.close()
|
|
207
|
+
},
|
|
208
|
+
close() {
|
|
209
|
+
this.popup.close()
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
</script>
|
|
214
|
+
|
|
215
|
+
<style lang="scss">
|
|
216
|
+
.uni-popup-dialog {
|
|
217
|
+
width: 300px;
|
|
218
|
+
border-radius: 11px;
|
|
219
|
+
background-color: #fff;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.uni-dialog-title {
|
|
223
|
+
/* #ifndef APP-NVUE */
|
|
224
|
+
display: flex;
|
|
225
|
+
/* #endif */
|
|
226
|
+
flex-direction: row;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
padding-top: 25px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.uni-dialog-title-text {
|
|
232
|
+
font-size: 16px;
|
|
233
|
+
font-weight: 500;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.uni-dialog-content {
|
|
237
|
+
/* #ifndef APP-NVUE */
|
|
238
|
+
display: flex;
|
|
239
|
+
/* #endif */
|
|
240
|
+
flex-direction: row;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
align-items: center;
|
|
243
|
+
padding: 20px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.uni-dialog-content-text {
|
|
247
|
+
font-size: 14px;
|
|
248
|
+
color: #6C6C6C;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.uni-dialog-button-group {
|
|
252
|
+
/* #ifndef APP-NVUE */
|
|
253
|
+
display: flex;
|
|
254
|
+
/* #endif */
|
|
255
|
+
flex-direction: row;
|
|
256
|
+
border-top-color: #f5f5f5;
|
|
257
|
+
border-top-style: solid;
|
|
258
|
+
border-top-width: 1px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.uni-dialog-button {
|
|
262
|
+
/* #ifndef APP-NVUE */
|
|
263
|
+
display: flex;
|
|
264
|
+
/* #endif */
|
|
265
|
+
|
|
266
|
+
flex: 1;
|
|
267
|
+
flex-direction: row;
|
|
268
|
+
justify-content: center;
|
|
269
|
+
align-items: center;
|
|
270
|
+
height: 45px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.uni-border-left {
|
|
274
|
+
border-left-color: #f0f0f0;
|
|
275
|
+
border-left-style: solid;
|
|
276
|
+
border-left-width: 1px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.uni-dialog-button-text {
|
|
280
|
+
font-size: 16px;
|
|
281
|
+
color: #333;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.uni-button-color {
|
|
285
|
+
color: #007aff;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.uni-dialog-input {
|
|
289
|
+
flex: 1;
|
|
290
|
+
font-size: 14px;
|
|
291
|
+
border: 1px #eee solid;
|
|
292
|
+
height: 40px;
|
|
293
|
+
padding: 0 10px;
|
|
294
|
+
border-radius: 5px;
|
|
295
|
+
color: #555;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.uni-popup__success {
|
|
299
|
+
color: #4cd964;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.uni-popup__warn {
|
|
303
|
+
color: #f0ad4e;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.uni-popup__error {
|
|
307
|
+
color: #dd524d;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.uni-popup__info {
|
|
311
|
+
color: #909399;
|
|
312
|
+
}
|
|
313
|
+
</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/index.js'
|
|
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: 'ali'
|
|
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>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "uni-popup",
|
|
3
|
+
"displayName": "uni-popup 弹出层",
|
|
4
|
+
"version": "1.8.9",
|
|
5
|
+
"description": " Popup 组件,提供常用的弹层",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"uni-ui",
|
|
8
|
+
"弹出层",
|
|
9
|
+
"弹窗",
|
|
10
|
+
"popup",
|
|
11
|
+
"弹框"
|
|
12
|
+
],
|
|
13
|
+
"repository": "https://github.com/dcloudio/uni-ui",
|
|
14
|
+
"engines": {
|
|
15
|
+
"HBuilderX": ""
|
|
16
|
+
},
|
|
17
|
+
"directories": {
|
|
18
|
+
"example": "../../temps/example_temps"
|
|
19
|
+
},
|
|
20
|
+
"dcloudext": {
|
|
21
|
+
"sale": {
|
|
22
|
+
"regular": {
|
|
23
|
+
"price": "0.00"
|
|
24
|
+
},
|
|
25
|
+
"sourcecode": {
|
|
26
|
+
"price": "0.00"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"contact": {
|
|
30
|
+
"qq": ""
|
|
31
|
+
},
|
|
32
|
+
"declaration": {
|
|
33
|
+
"ads": "无",
|
|
34
|
+
"data": "无",
|
|
35
|
+
"permissions": "无"
|
|
36
|
+
},
|
|
37
|
+
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
|
38
|
+
"type": "component-vue"
|
|
39
|
+
},
|
|
40
|
+
"uni_modules": {
|
|
41
|
+
"dependencies": [
|
|
42
|
+
"uni-scss",
|
|
43
|
+
"uni-transition"
|
|
44
|
+
],
|
|
45
|
+
"encrypt": [],
|
|
46
|
+
"platforms": {
|
|
47
|
+
"cloud": {
|
|
48
|
+
"tcb": "y",
|
|
49
|
+
"aliyun": "y"
|
|
50
|
+
},
|
|
51
|
+
"client": {
|
|
52
|
+
"App": {
|
|
53
|
+
"app-vue": "y",
|
|
54
|
+
"app-nvue": "y"
|
|
55
|
+
},
|
|
56
|
+
"H5-mobile": {
|
|
57
|
+
"Safari": "y",
|
|
58
|
+
"Android Browser": "y",
|
|
59
|
+
"微信浏览器(Android)": "y",
|
|
60
|
+
"QQ浏览器(Android)": "y"
|
|
61
|
+
},
|
|
62
|
+
"H5-pc": {
|
|
63
|
+
"Chrome": "y",
|
|
64
|
+
"IE": "y",
|
|
65
|
+
"Edge": "y",
|
|
66
|
+
"Firefox": "y",
|
|
67
|
+
"Safari": "y"
|
|
68
|
+
},
|
|
69
|
+
"小程序": {
|
|
70
|
+
"微信": "y",
|
|
71
|
+
"阿里": "y",
|
|
72
|
+
"百度": "y",
|
|
73
|
+
"字节跳动": "y",
|
|
74
|
+
"QQ": "y"
|
|
75
|
+
},
|
|
76
|
+
"快应用": {
|
|
77
|
+
"华为": "u",
|
|
78
|
+
"联盟": "u"
|
|
79
|
+
},
|
|
80
|
+
"Vue": {
|
|
81
|
+
"vue2": "y",
|
|
82
|
+
"vue3": "y"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|