cbvirtua 1.0.61 → 1.0.63
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/FireShot Capture 008 - Vue /351/241/271/347/233/256/347/272/277/344/270/212/346/233/264/346/226/260/346/227/240/351/234/200/345/274/272/345/210/266/345/210/267/346/226/260/347/232/204/346/226/271/346/241/210Vue /351/241/271/347/233/256/347/272/277/344/270/212/346/233/264/346/226/260/346/227/240/351/234/200/345/274/272/345/210/266/345/210/267/346/226/260/347/232/204/346/226/271/346/241/210 /345/234/250 Vue /351/241/271/347/233/256/344/270/255/357/274/214/345/275/223/345/217/221/345/270/203/346/226/260/347/211/210/346/234/254/345/220/216/357/274/214/347/224/250/346/210/267/345/217/257 - /346/216/230/351/207/221_ - [juejin.cn].png +0 -0
- package/FireShot Capture 009 - /345/276/256/344/277/241/345/260/217/347/250/213/345/272/217/351/230/273/346/255/242/346/210/226/347/233/221/345/220/254/346/211/213/346/234/272/350/277/224/345/233/236/344/270/212/344/270/200/344/270/252/347/225/214/351/235/242/357/274/214/350/277/224/345/233/236/344/270/212/351/241/265/345/211/215/345/274/271/345/207/272/350/257/242/351/227/256/345/257/271/350/257/235/346/241/206/345/276/256/344/277/241/345/260/217/347/250/213/345/272/217/351/230/273/346/255/242/346/210/226/347/233/221/345/220/254/346/211/213/346/234/272/350/277/224/345/233/236/344/270/212/344/270/200/344/270/252/347/225/214/351/235/242/357/274/214/345/256/236/347/216/260/346/213/246/346/210/252/351/241/265/351/235/242/350/277/224/345/233/236 - /346/216/230/351/207/221_ - [juejin.cn].png +0 -0
- package/FireShot Capture 010 - GitHub - KimKeepLearning_build-own-react - [github.com].png +0 -0
- package/build-own-react-main.zip +0 -0
- package/package.json +1 -1
- package//346/226/260/345/273/272 /346/226/207/346/234/254/346/226/207/346/241/243 (2).txt" +272 -0
- package//346/226/260/345/273/272 /346/226/207/346/234/254/346/226/207/346/241/24311.txt" +113 -0
- package/fabric.js-master.zip +0 -0
- package/vant-2.x.zip +0 -0
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
vue自定义指令v-input:限制输入框只能输入数字、字母、中文等规则【附源码】
|
|
2
|
+
指令封装
|
|
3
|
+
directives/input/index.js
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
限制输入框只能输入数字、字母、中文等规则
|
|
7
|
+
|
|
8
|
+
使用指令:v-input
|
|
9
|
+
|
|
10
|
+
修饰符参数说明:
|
|
11
|
+
v-input.num 只能输入数字,默认不传修饰符,会自动限制只能输入数字
|
|
12
|
+
v-input.intp 只能输入正整数
|
|
13
|
+
v-input.num_alp 只能输入数字和字母
|
|
14
|
+
v-input.num_alp_blank 只能输入数字、字母、空格
|
|
15
|
+
v-input.num_alp_sym 只能输入数字和字母、英文符号、空格
|
|
16
|
+
v-input.float 只能输入数字和小数点 v-input.float="2" 表示小数位数为2,默认小数位数为2,v-input.float="2"可以简写为v-input.float
|
|
17
|
+
v-input.no_emoji 不能输入表情符号
|
|
18
|
+
|
|
19
|
+
*/
|
|
20
|
+
// 只能输入数字
|
|
21
|
+
function num(el) {
|
|
22
|
+
el.value = el.value.replace(/\D+/g, '')
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 只能输入正整数
|
|
26
|
+
function intp(el) {
|
|
27
|
+
const value = el.value.replace(/\D+/g, '') // 去掉非数字字符
|
|
28
|
+
el.value = /^[1-9][0-9]*$/.test(value) ? value : value.replace(/^0+/, '') // 确保为正整数,去掉前导零
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 只能输入数字和字母
|
|
32
|
+
function num_alp(el) {
|
|
33
|
+
el.value = el.value.replace(/[^A-Za-z0-9]/g, '')
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 只能输入数字、字母、空格
|
|
37
|
+
function num_alp_blank(el) {
|
|
38
|
+
const regex = /[^a-zA-Z0-9 ]/g
|
|
39
|
+
el.value = el.value.replace(regex, '')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 只能输入数字、字母、英文符号、空格
|
|
43
|
+
function num_alp_sym(el) {
|
|
44
|
+
const regex = /[^a-zA-Z0-9`~!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]/g
|
|
45
|
+
el.value = el.value.replace(regex, '')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 只能输入数字和小数点,n表示小数位数
|
|
49
|
+
function float(el, n) {
|
|
50
|
+
let value = el.value
|
|
51
|
+
value = value.replace(/[^\d.]/g, '') // 能数字和小数点
|
|
52
|
+
value = value.replace(/^\./g, '') // 去掉开头的点
|
|
53
|
+
value = value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') // 处理多个点的情况
|
|
54
|
+
if (n && Number(n) > 0) {
|
|
55
|
+
const d = new Array(Number(n)).fill('\\d').join('') // 构建正则表达式
|
|
56
|
+
const reg = new RegExp(`^(\\-)*(\\d+)\\.(${d}).*$`, 'ig')
|
|
57
|
+
value = value.replace(reg, '$1$2.$3') // 限制小数位数
|
|
58
|
+
}
|
|
59
|
+
// if (value && !value.includes('.')) {
|
|
60
|
+
// value = Number(value).toString() // 去掉开头多个0
|
|
61
|
+
// }
|
|
62
|
+
el.value = value
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 限制表情:😀😂❤️🌟🎉🌍🐶☺
|
|
66
|
+
function no_emoji(el) {
|
|
67
|
+
const regex =
|
|
68
|
+
/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E6}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{263A}]+/gu
|
|
69
|
+
el.value = el.value.replace(regex, '')
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 这里扩展限制的类型
|
|
73
|
+
const map = { num, intp, num_alp, num_alp_blank, num_alp_sym, float, no_emoji }
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
bind(el, binding, vnode) {
|
|
77
|
+
el = el.querySelector('.el-input__inner') || el.querySelector('.el-textarea__inner') || el
|
|
78
|
+
let lock = false // 标记是否需要锁定输入框
|
|
79
|
+
let isHandling = false // 标记是否正在处理
|
|
80
|
+
let lastValue = null
|
|
81
|
+
// input事件处理函数
|
|
82
|
+
const handler = () => {
|
|
83
|
+
if (lock) return // 如果当前为锁定状态,则不进行处理
|
|
84
|
+
if (isHandling) return // 如果已经在处理中,则不进行处理
|
|
85
|
+
if (el.value === lastValue) return // 输入内容没有变化,则不进行处理
|
|
86
|
+
isHandling = true // 设置标记为处理中
|
|
87
|
+
const modifiers = Object.keys(binding.modifiers)
|
|
88
|
+
const newModifier = modifiers[0] || 'num'
|
|
89
|
+
map[newModifier](el, binding.value || 2)
|
|
90
|
+
lastValue = el.value // 记录当前输入框的值
|
|
91
|
+
Promise.resolve().then(() => {
|
|
92
|
+
// 异步处理,场景:火狐浏览器中,需要在最后派发input事件
|
|
93
|
+
el.dispatchEvent(new Event('input'))
|
|
94
|
+
})
|
|
95
|
+
isHandling = false // 处理完毕后设置标记为非处理状态
|
|
96
|
+
}
|
|
97
|
+
el.addEventListener('input', handler)
|
|
98
|
+
// compositionstart和compositionend事件解决的bug场景:限制只能输入数字的输入框,先输入数字,再切换为中文输入法,输入字母时,会将原来的数字删掉
|
|
99
|
+
el.addEventListener('compositionstart', () => {
|
|
100
|
+
lock = true
|
|
101
|
+
})
|
|
102
|
+
el.addEventListener('compositionend', () => {
|
|
103
|
+
lock = false
|
|
104
|
+
el.dispatchEvent(new Event('input'))
|
|
105
|
+
})
|
|
106
|
+
// 当指令与元素解绑时,移除事件监听器
|
|
107
|
+
vnode.context.$once('hook:destroyed', () => {
|
|
108
|
+
el.removeEventListener('input', handler)
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
directives/index.js
|
|
114
|
+
|
|
115
|
+
import input from './input'
|
|
116
|
+
|
|
117
|
+
const directives = { input }
|
|
118
|
+
|
|
119
|
+
Object.keys(directives).forEach(key => {
|
|
120
|
+
Vue.directive(key, directives[key])
|
|
121
|
+
})
|
|
122
|
+
main.js
|
|
123
|
+
|
|
124
|
+
import './directives'
|
|
125
|
+
注意事项:
|
|
126
|
+
指令的封装不要用keyup事件,当限制只能输入数字时,中文输入法下,输入字母,鼠标点击输入法提示的中文,会将中文输入至文本框中,原因是鼠标点击事件不会触发keyup,用input事件会规避掉这个问题
|
|
127
|
+
使用input事件时,控制台会提示堆栈溢出,需要借助isHandling,执行handler时,先判断是否需要处理
|
|
128
|
+
当限制只能输入数字时,先输入数字,在切换为中文输入法,输入字母时,会将原来的数字删掉,这个问题可以借助compositionstart和compositionend事件解决
|
|
129
|
+
使用
|
|
130
|
+
image.png
|
|
131
|
+
|
|
132
|
+
组件封装
|
|
133
|
+
CustomInput/index.vue
|
|
134
|
+
|
|
135
|
+
<!--
|
|
136
|
+
使用时,直接用 <CustomInput /> 替代 <el-input />
|
|
137
|
+
|
|
138
|
+
limit:限制输入类型,可选值:num、intp、numAlp、numAlpBlank、numAlpSym、float、noEmoji,默认为num
|
|
139
|
+
decimals:当limit为float类型时,限制小数位数
|
|
140
|
+
|
|
141
|
+
支持插槽:
|
|
142
|
+
<CustomInput v-model="subItem.regionHigh" limit="float" maxlength="12" placeholder="请输入" clearable>
|
|
143
|
+
<template slot="prepend">H</template>
|
|
144
|
+
<template slot="append">cm</template>
|
|
145
|
+
</CustomInput>
|
|
146
|
+
|
|
147
|
+
支持拓展:
|
|
148
|
+
1. 定义限制类型的函数
|
|
149
|
+
2. 在map对象中添加此类型
|
|
150
|
+
3. 完善新类型的注释
|
|
151
|
+
-->
|
|
152
|
+
|
|
153
|
+
<template>
|
|
154
|
+
<el-input v-model="inputValue" v-bind="$attrs" v-on="$listeners" @input="handleInput">
|
|
155
|
+
<span v-for="{ name, text } of slotList" :slot="name" :key="text">{{ text }}</span>
|
|
156
|
+
</el-input>
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
<script>
|
|
160
|
+
const map = {
|
|
161
|
+
num,
|
|
162
|
+
intp,
|
|
163
|
+
numAlp,
|
|
164
|
+
numAlpBlank,
|
|
165
|
+
numAlpSym,
|
|
166
|
+
float,
|
|
167
|
+
noEmoji
|
|
168
|
+
}
|
|
169
|
+
export default {
|
|
170
|
+
name: 'CustomInput',
|
|
171
|
+
model: { prop: 'value', event: 'changeValue' },
|
|
172
|
+
props: {
|
|
173
|
+
value: { type: [String, Number], default: '' },
|
|
174
|
+
limit: { type: String, default: 'num' }, // 限制输入类型,可选值:num、intp、numAlp、numAlpBlank、numAlpSym、float、noEmoji,默认为num
|
|
175
|
+
decimals: { type: Number, default: 2 } // float类型限制小数位数
|
|
176
|
+
},
|
|
177
|
+
data() {
|
|
178
|
+
const { value } = this
|
|
179
|
+
return { inputValue: value || value === 0 ? String(value) : '', slotList: [] }
|
|
180
|
+
},
|
|
181
|
+
watch: {
|
|
182
|
+
// 手动设置value时,触发handleInput,将不符合限制的字符过滤掉
|
|
183
|
+
value: {
|
|
184
|
+
handler(val) {
|
|
185
|
+
this.handleInput(String(val))
|
|
186
|
+
},
|
|
187
|
+
immediate: true
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
created() {
|
|
191
|
+
this.initSlot()
|
|
192
|
+
},
|
|
193
|
+
methods: {
|
|
194
|
+
handleInput(val) {
|
|
195
|
+
if (!this.limit) return
|
|
196
|
+
const filteredInput = map[this.limit](val, this.decimals)
|
|
197
|
+
this.$emit('changeValue', filteredInput)
|
|
198
|
+
this.inputValue = filteredInput
|
|
199
|
+
},
|
|
200
|
+
initSlot() {
|
|
201
|
+
this.$nextTick(() => {
|
|
202
|
+
const { prepend = [], append = [] } = this.$slots
|
|
203
|
+
const prependList = prepend.map((item) => ({ name: 'prepend', text: item.text }))
|
|
204
|
+
const appendList = append.map((item) => ({ name: 'append', text: item.text }))
|
|
205
|
+
const slotList = prependList.concat(appendList)
|
|
206
|
+
this.slotList = slotList
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// 只能输入数字
|
|
212
|
+
function num(val) {
|
|
213
|
+
const newVal = val.replace(/[^0-9]/g, '')
|
|
214
|
+
return newVal
|
|
215
|
+
}
|
|
216
|
+
// 只能输入正整数
|
|
217
|
+
function intp(val) {
|
|
218
|
+
let newVal = val.replace(/[^0-9]/g, '') // 去掉非数字字符
|
|
219
|
+
newVal = /^[1-9][0-9]*$/.test(newVal) ? newVal : newVal.replace(/^0+/, '') // 确保为正整数,去掉前导零
|
|
220
|
+
return newVal
|
|
221
|
+
}
|
|
222
|
+
// 只能输入数字和字母
|
|
223
|
+
function numAlp(val) {
|
|
224
|
+
const newVal = val.replace(/[^A-Za-z0-9]/g, '')
|
|
225
|
+
return newVal
|
|
226
|
+
}
|
|
227
|
+
// 只能输入数字、字母、空格
|
|
228
|
+
function numAlpBlank(val) {
|
|
229
|
+
const newVal = val.replace(/[^a-zA-Z0-9 ]/g, '')
|
|
230
|
+
return newVal
|
|
231
|
+
}
|
|
232
|
+
// 只能输入数字、字母、英文符号、空格
|
|
233
|
+
function numAlpSym(val) {
|
|
234
|
+
const regex = /[^a-zA-Z0-9`~!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]/g
|
|
235
|
+
const newVal = val.replace(regex, '')
|
|
236
|
+
return newVal
|
|
237
|
+
}
|
|
238
|
+
// 只能输入数字和小数点,n表示小数位数
|
|
239
|
+
function float(val, n) {
|
|
240
|
+
let newVal = val.replace(/[^\d.]/g, '') // 能数字和小数点
|
|
241
|
+
newVal = newVal.replace(/^\./g, '') // 去掉开头的点
|
|
242
|
+
newVal = newVal.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') // 处理多个点的情况
|
|
243
|
+
if (n && Number(n) > 0) {
|
|
244
|
+
const d = new Array(Number(n)).fill('\\d').join('') // 构建正则表达式
|
|
245
|
+
const reg = new RegExp(`^(\\-)*(\\d+)\\.(${d}).*$`, 'ig')
|
|
246
|
+
newVal = newVal.replace(reg, '$1$2.$3') // 限制小数位数
|
|
247
|
+
}
|
|
248
|
+
if (newVal && !newVal.includes('.')) {
|
|
249
|
+
// value = value.replace(/^0+/, '')
|
|
250
|
+
// value = Number(value).toString() // 去掉开头多个0
|
|
251
|
+
}
|
|
252
|
+
return newVal
|
|
253
|
+
}
|
|
254
|
+
// 限制不可输入表情
|
|
255
|
+
function noEmoji(val) {
|
|
256
|
+
// 限制表情:😀😂❤️🌟🎉🌍🐶☺
|
|
257
|
+
const regex = /[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E6}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{263A}]+/gu
|
|
258
|
+
const newVal = val.replace(regex, '')
|
|
259
|
+
return newVal
|
|
260
|
+
}
|
|
261
|
+
</script>
|
|
262
|
+
|
|
263
|
+
注意事项
|
|
264
|
+
使用时需要传入limit,限制类型;当limit为float时,需要传入decimals,限制小数位数
|
|
265
|
+
支持插槽
|
|
266
|
+
使用
|
|
267
|
+
image.png
|
|
268
|
+
|
|
269
|
+
源码
|
|
270
|
+
www.npmjs.com/package/xtt…
|
|
271
|
+
|
|
272
|
+
/xtt-tools/directives-v2/input/index.js
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
最近开发小程序期间,有一个较大的表单页面,用户编辑期间若误触返回键或误触发滑动返回,再次进入页面表单数据会丢失,当然可以实现记住表单状态,但会增加代码复杂度,感觉不够优雅。遂去搜索小程序返回拦截的实现,大部分文章并没有很好的达到效果,找到了一个个人感觉还较好的实现,微信小程序 / UNIAPP --- 阻止小程序返回(顶部导航栏返回、左 / 右滑手势、安卓物理返回键和调用 navigateBack 接口) - 简书,但感觉还是不符合我的需求,我想要实现类似我们在退出一些app首页时会弹出一个toast那种效果,于是我参考以上代码做了如下实现,也是封装为了一个组件。
|
|
2
|
+
代码实现
|
|
3
|
+
html 代码解读复制代码<!--components/back-confirmation/back-confirmation.wxml-->
|
|
4
|
+
<page-container show="{{show}}" overlay="{{false}}" bind:leave="leave" message="{{message}}"> </page-container>
|
|
5
|
+
|
|
6
|
+
首先页面代码就是一个无显示无遮罩的page-container,这样我们把这个组件引入到页面中时对显示没有任何影响。新加了一个message属性用于自定义toast消息。
|
|
7
|
+
javascript 代码解读复制代码// components/back-confirmation/back-confirmation.js
|
|
8
|
+
let interval = null
|
|
9
|
+
|
|
10
|
+
Component({
|
|
11
|
+
properties: {
|
|
12
|
+
show: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
value: false
|
|
15
|
+
},
|
|
16
|
+
message: {
|
|
17
|
+
type: String,
|
|
18
|
+
value: '再按一次退出编辑'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
data: {},
|
|
23
|
+
|
|
24
|
+
lifetimes: {
|
|
25
|
+
detached() {
|
|
26
|
+
if (interval) {
|
|
27
|
+
clearInterval(interval)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
observers: {
|
|
33
|
+
'show': function (show) {
|
|
34
|
+
if (!show) {
|
|
35
|
+
if (interval) {
|
|
36
|
+
clearInterval(interval)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
methods: {
|
|
43
|
+
async leave() {
|
|
44
|
+
if (interval) {
|
|
45
|
+
clearInterval(interval)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (this.data.show) {
|
|
49
|
+
await wx.showToast({
|
|
50
|
+
title: this.data.message,
|
|
51
|
+
icon: 'none',
|
|
52
|
+
})
|
|
53
|
+
interval = setInterval(() => {
|
|
54
|
+
this.setData({
|
|
55
|
+
show: true
|
|
56
|
+
})
|
|
57
|
+
}, 2000)
|
|
58
|
+
} else {
|
|
59
|
+
await wx.navigateBack()
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
对比参考文章,js代码的主要区别就是弹窗改为了toast,另外加了一个interval,如果用户只是误触,不进行二次确认则会在一定时长后重新恢复为需要二次确认。另外我对取消show加了一个observer,有什么作用在后面应用时再讲。
|
|
66
|
+
使用方法
|
|
67
|
+
html 代码解读复制代码<back-confirmation show="{{useBackConfirmation}}"/>
|
|
68
|
+
|
|
69
|
+
把useBackConfirmation的值设为true,一个退出页面的二次确认就实现了,使用效果如下,在第一下滑动返回时弹出toast消息,2秒内再次滑动才会退出页面,超过两秒则会恢复原状态,需要重新二次确认。
|
|
70
|
+
|
|
71
|
+
滑动返回是一个比较容易误触发的操作,但若我们的程序有顶部导航栏,顶部导航栏则相对很少误触,那我们希望若是点击导航栏就直接退出。但是我们在代码调用wx.navigateBack()时还是会被我们的二次确认拦截,这就需要先手动把组件的show值关闭,然后在调用wx.navigateBack(),也就是如下代码
|
|
72
|
+
javascript 代码解读复制代码async goBack() {
|
|
73
|
+
this.setData({
|
|
74
|
+
useBackConfirmation: false,
|
|
75
|
+
})
|
|
76
|
+
// 立即退出无效
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
wx.navigateBack()
|
|
79
|
+
}, 10)
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
在返回按钮上绑定该方法,改变show值时前面提到的observer会把interval关掉,避免手动改变后马上又被恢复的情况出现,另外set值后等一定时间再调用wx.navigateBack(),不然可能会有bug。
|
|
83
|
+
需要注意不要在小程序首页使用该封装后的组件,不符合小程序开发规范,另外因为首页本身是无法调用wx.navigateBack()的,我也没有测试到底可不可用。
|
|
84
|
+
理解page-container的原理
|
|
85
|
+
page-container组件的所有属性,最重要的是show值。在页面上引入这个组件后,若show值为true,页面上所有各种方式触发的返回操作都会被这个组件所拦截,然后自动将值置为false。当值为false后,这个组件就没有作用了,但是我们可以重新赋值,就能让它重新恢复拦截。
|
|
86
|
+
在官方文档中,示例代码在page-container中是有具体组件的,这可能误导我们忽略了让它去实现返回二次确认这种无任何显示的最纯粹的功能。当然,基于page-container其实还能实现各种复杂的覆盖在页面之上的组件。
|
|
87
|
+
写在最后
|
|
88
|
+
以上是我在互联网发布的第一个技术分享,其实比较简单,但因为在网上没能找到比较好的方案,所以选择了发布出来。最近开发中其实还遇到了很多问题,本来还想自己建个博客的,但是实在是没有时间,就先写这一篇发布在掘金上了,希望能帮助到一些人。 标签: 微信小程序 评论 0 0 / 1000
|
|
89
|
+
标点符号、链接等不计算在有效字数内
|
|
90
|
+
|
|
91
|
+
Ctrl + Enter
|
|
92
|
+
|
|
93
|
+
发送
|
|
94
|
+
暂无评论数据
|
|
95
|
+
3
|
|
96
|
+
评论
|
|
97
|
+
收藏
|
|
98
|
+
加个关注,精彩更新不错过~
|
|
99
|
+
关注
|
|
100
|
+
|
|
101
|
+
雨润田上
|
|
102
|
+
|
|
103
|
+
1
|
|
104
|
+
文章
|
|
105
|
+
821
|
|
106
|
+
阅读
|
|
107
|
+
0
|
|
108
|
+
粉丝 加个关注,精彩更新不错过~
|
|
109
|
+
|
|
110
|
+
作者:雨润田上
|
|
111
|
+
链接:https://juejin.cn/post/7456058116972478474
|
|
112
|
+
来源:稀土掘金
|
|
113
|
+
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
|
package/fabric.js-master.zip
DELETED
|
Binary file
|
package/vant-2.x.zip
DELETED
|
Binary file
|