换ubuntu

This commit is contained in:
asd
2019-12-23 14:13:27 +08:00
parent 2688882a3e
commit 888b4ee55c
485 changed files with 12277 additions and 12196 deletions

View File

@@ -1 +1 @@
export {};
export {};

View File

@@ -1,36 +1,36 @@
import { VantComponent } from '../common/component';
VantComponent({
classes: [
'active-class',
'disabled-class',
],
relation: {
type: 'ancestor',
name: 'sidebar',
linked(target) {
this.parent = target;
}
},
props: {
dot: Boolean,
info: null,
title: String,
disabled: Boolean
},
methods: {
onClick() {
const { parent } = this;
if (!parent || this.data.disabled) {
return;
}
const index = parent.children.indexOf(this);
parent.setActive(index).then(() => {
this.$emit('click', index);
parent.$emit('change', index);
});
},
setActive(selected) {
return this.setData({ selected });
}
}
});
import { VantComponent } from '../common/component';
VantComponent({
classes: [
'active-class',
'disabled-class',
],
relation: {
type: 'ancestor',
name: 'sidebar',
linked(target) {
this.parent = target;
}
},
props: {
dot: Boolean,
info: null,
title: String,
disabled: Boolean
},
methods: {
onClick() {
const { parent } = this;
if (!parent || this.data.disabled) {
return;
}
const index = parent.children.indexOf(this);
parent.setActive(index).then(() => {
this.$emit('click', index);
parent.$emit('change', index);
});
},
setActive(selected) {
return this.setData({ selected });
}
}
});

View File

@@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"van-info": "../info/index"
}
}
{
"component": true,
"usingComponents": {
"van-info": "../info/index"
}
}

View File

@@ -1,18 +1,18 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class"
hover-class="van-sidebar-item--hover"
hover-stay-time="70"
bind:tap="onClick"
>
<view class="van-sidebar-item__text">
<van-info
wx:if="{{ info !== null || dot }}"
dot="{{ dot }}"
info="{{ info }}"
custom-style="right: 4px"
/>
{{ title }}
</view>
</view>
<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class"
hover-class="van-sidebar-item--hover"
hover-stay-time="70"
bind:tap="onClick"
>
<view class="van-sidebar-item__text">
<van-info
wx:if="{{ info !== null || dot }}"
dot="{{ dot }}"
info="{{ info }}"
custom-style="right: 4px"
/>
{{ title }}
</view>
</view>