@mpxjs/webpack-plugin 2.8.63 → 2.8.64
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/lib/platform/template/wx/index.js +12 -4
- package/lib/runtime/components/web/mpx-movable-view.vue +1 -1
- package/lib/runtime/components/web/mpx-picker-view-column.vue +10 -2
- package/lib/runtime/components/web/mpx-picker.vue +9 -1
- package/lib/runtime/components/web/mpx-swiper.vue +2 -2
- package/lib/utils/get-entry-name.js +6 -4
- package/package.json +2 -2
|
@@ -203,12 +203,20 @@ module.exports = function getSpec ({ warn, error }) {
|
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
// 样式类名绑定
|
|
206
|
-
test: /^wx:
|
|
207
|
-
web ({ value }) {
|
|
208
|
-
|
|
206
|
+
test: /^(class|wx:class)$/,
|
|
207
|
+
web ({ value }, { el }) {
|
|
208
|
+
if (el.isClassParsed) {
|
|
209
|
+
return false
|
|
210
|
+
}
|
|
211
|
+
const classBinding = []
|
|
212
|
+
el.isClassParsed = true
|
|
213
|
+
el.attrsList.filter(item => this.test.test(item.name)).forEach((item) => {
|
|
214
|
+
const parsed = parseMustache(item.value)
|
|
215
|
+
classBinding.push(parsed.result)
|
|
216
|
+
})
|
|
209
217
|
return {
|
|
210
218
|
name: ':class',
|
|
211
|
-
value:
|
|
219
|
+
value: `[${classBinding}]`
|
|
212
220
|
}
|
|
213
221
|
}
|
|
214
222
|
},
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
this.refresh()
|
|
179
179
|
})
|
|
180
180
|
const elementToObserve = document.querySelector('.mpx-movable-scroll-content')
|
|
181
|
-
this.resizeObserver.observe(elementToObserve)
|
|
181
|
+
elementToObserve && this.resizeObserver.observe(elementToObserve)
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
refresh () {
|
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'mpx-picker-view-column',
|
|
17
17
|
props: {
|
|
18
|
-
value: Array
|
|
18
|
+
value: Array,
|
|
19
|
+
scrollOptions: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => {
|
|
22
|
+
return {}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
},
|
|
20
26
|
data() {
|
|
21
27
|
return {
|
|
@@ -64,7 +70,9 @@
|
|
|
64
70
|
rotate: -5,
|
|
65
71
|
wheelWrapperClass: 'wheel-scroll'
|
|
66
72
|
},
|
|
67
|
-
probeType: 3
|
|
73
|
+
probeType: 3,
|
|
74
|
+
bindToWrapper: true,
|
|
75
|
+
...this.scrollOptions
|
|
68
76
|
})
|
|
69
77
|
this.wheels[0].on('scrollStart', function () {
|
|
70
78
|
if (this.pickerView) {
|
|
@@ -138,6 +138,12 @@
|
|
|
138
138
|
fields: {
|
|
139
139
|
type: String,
|
|
140
140
|
default: 'day'
|
|
141
|
+
},
|
|
142
|
+
scrollOptions: {
|
|
143
|
+
type: Object,
|
|
144
|
+
default: () => {
|
|
145
|
+
return {}
|
|
146
|
+
}
|
|
141
147
|
}
|
|
142
148
|
},
|
|
143
149
|
data () {
|
|
@@ -311,7 +317,9 @@
|
|
|
311
317
|
wheelWrapperClass: 'wheel-scroll',
|
|
312
318
|
wheelItemClass: 'wheel-item'
|
|
313
319
|
},
|
|
314
|
-
probeType: 3
|
|
320
|
+
probeType: 3,
|
|
321
|
+
bindToWrapper: true,
|
|
322
|
+
...this.scrollOptions
|
|
315
323
|
})
|
|
316
324
|
if (this.mode === 'time' || this.mode === 'date') {
|
|
317
325
|
this.wheels[i].on('scrollStart', function (i) {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
default: () => {
|
|
48
48
|
return {}
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
},
|
|
52
52
|
data () {
|
|
53
53
|
return {
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
this.bs.scroller.hooks.on('beforeRefresh', () => {
|
|
213
213
|
this.initLayerComputed()
|
|
214
214
|
})
|
|
215
|
-
this.bs.on('
|
|
215
|
+
this.bs.on('slidePageChanged', (page) => {
|
|
216
216
|
this.currentIndex = this.vertical ? page.pageY : page.pageX
|
|
217
217
|
this.$emit('change', getCustomEvent('change', {
|
|
218
218
|
current: this.currentIndex,
|
|
@@ -3,10 +3,12 @@ module.exports = function (loaderContext) {
|
|
|
3
3
|
const moduleGraph = loaderContext._compilation.moduleGraph
|
|
4
4
|
let entryName = ''
|
|
5
5
|
for (const [name, { dependencies }] of loaderContext._compilation.entries) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (const dep of dependencies) {
|
|
7
|
+
const entryModule = moduleGraph.getModule(dep)
|
|
8
|
+
if (entryModule && entryModule.resource === loaderContext.resource) {
|
|
9
|
+
entryName = name
|
|
10
|
+
break
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
return entryName
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.64",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=14.14.0"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "d9d35fa50c64e84963b535446682bfa3c7e7e25a"
|
|
86
86
|
}
|