You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
50 lines
1.6 KiB
|
6 years ago
|
<script type="text/jsx">
|
||
|
6 years ago
|
const animations = [
|
||
|
|
{name: '无', value: ''},
|
||
|
|
{name: '烟花', value: 'firework'},
|
||
|
|
{name: '上帝之光', value: 'godrays'},
|
||
|
|
{name: '简单粒子', value: 'moveFollowMouse'},
|
||
|
|
{name: '球', value: 'particleBall'},
|
||
|
|
{name: '网络', value: 'particleNetwork'},
|
||
|
|
{name: '波浪', value: 'particleWave'},
|
||
|
|
{name: '雨', value: 'reflectRain'},
|
||
|
|
{name: '流星雨', value: 'sparkRain'},
|
||
|
|
{name: '阳光', value: 'sunlight'},
|
||
|
|
]
|
||
|
6 years ago
|
|
||
|
6 years ago
|
export default {
|
||
|
|
name: "SetAnimation",
|
||
|
6 years ago
|
|
||
|
6 years ago
|
functional: true,
|
||
|
6 years ago
|
|
||
|
6 years ago
|
props: {
|
||
|
|
value: String,
|
||
|
|
customClass: String
|
||
|
|
},
|
||
|
6 years ago
|
|
||
|
6 years ago
|
render(h, context) {
|
||
|
|
const {value, customClass} = context.props
|
||
|
|
return (
|
||
|
|
<el-dropdown class={customClass} size="medium" trigger="click" onCommand={context.listeners.select}>
|
||
|
|
<el-button type="text" title="选择背景动画">
|
||
|
6 years ago
|
<v-icon icon="svg-show"/>
|
||
|
6 years ago
|
</el-button>
|
||
|
|
<el-dropdown-menu slot="dropdown">
|
||
|
|
{
|
||
|
|
animations.map(animation => (
|
||
|
|
<el-dropdown-item
|
||
|
|
key={animation.value}
|
||
|
|
disabled={animation.value === value}
|
||
|
|
command={animation.value}
|
||
|
|
>
|
||
|
|
{animation.name}
|
||
|
|
</el-dropdown-item>
|
||
|
|
))
|
||
|
|
}
|
||
|
|
</el-dropdown-menu>
|
||
|
|
</el-dropdown>
|
||
|
|
)
|
||
|
6 years ago
|
}
|
||
|
6 years ago
|
}
|
||
|
6 years ago
|
</script>
|