vant
This commit is contained in:
1
utils/dist/index-anchor/index.d.ts
vendored
Normal file
1
utils/dist/index-anchor/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
22
utils/dist/index-anchor/index.js
vendored
Normal file
22
utils/dist/index-anchor/index.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
relation: {
|
||||
name: 'index-bar',
|
||||
type: 'ancestor',
|
||||
linked(target) {
|
||||
this.parent = target;
|
||||
},
|
||||
unlinked() {
|
||||
this.parent = null;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
useSlot: Boolean,
|
||||
index: null
|
||||
},
|
||||
data: {
|
||||
active: false,
|
||||
wrapperStyle: '',
|
||||
anchorStyle: ''
|
||||
}
|
||||
});
|
||||
3
utils/dist/index-anchor/index.json
vendored
Normal file
3
utils/dist/index-anchor/index.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
14
utils/dist/index-anchor/index.wxml
vendored
Normal file
14
utils/dist/index-anchor/index.wxml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<view
|
||||
class="van-index-anchor-wrapper"
|
||||
style="{{ wrapperStyle }}"
|
||||
>
|
||||
<view
|
||||
class="van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}"
|
||||
style="{{ anchorStyle }}"
|
||||
>
|
||||
<slot wx:if="{{ useSlot }}"/>
|
||||
<block wx:else>
|
||||
<text>{{ index }}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
1
utils/dist/index-anchor/index.wxss
vendored
Normal file
1
utils/dist/index-anchor/index.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
@import '../common/index.wxss';.van-index-anchor{padding:0 16px;padding:var(--index-anchor-padding,0 16px);color:#323233;color:var(--index-anchor-text-color,#323233);font-weight:500;font-weight:var(--index-anchor-font-weight,500);font-size:14px;font-size:var(--index-anchor-font-size,14px);line-height:32px;line-height:var(--index-anchor-line-height,32px);background-color:initial;background-color:var(--index-anchor-background-color,transparent)}.van-index-anchor--active{right:0;left:0;color:#07c160;color:var(--index-anchor-active-text-color,#07c160);background-color:#fff;background-color:var(--index-anchor-active-background-color,#fff)}
|
||||
Reference in New Issue
Block a user