1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| <template>
| <uni-shadow-root class="vant-goods-action-index"><view :class="'custom-class '+(utils.bem('goods-action', { safe: safeAreaInsetBottom }))">
| <slot></slot>
| </view></uni-shadow-root>
| </template>
| <wxs src="../wxs/utils.wxs" module="utils"></wxs>
| <script>
|
| global['__wxRoute'] = 'vant/goods-action/index'
| import { VantComponent } from '../common/component';
| VantComponent({
| relation: {
| type: 'descendant',
| name: 'goods-action-button',
| current: 'goods-action',
| linked() {
| this.updateStyle();
| },
| unlinked() {
| this.updateStyle();
| },
| linkChanged() {
| this.updateStyle();
| },
| },
| props: {
| safeAreaInsetBottom: {
| type: Boolean,
| value: true,
| },
| },
| methods: {
| updateStyle() {
| wx.nextTick(() => {
| this.children.forEach((child) => {
| child.updateStyle();
| });
| });
| },
| },
| });
| export default global['__wxComponents']['vant/goods-action/index']
| </script>
| <style platform="mp-weixin">
| @import '../common/index.css';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
| </style>
|
|