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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< view class = "u-demo" >
< view class = "u-demo-wrap" >
< view class = "u-demo-title" > 演示效果 < / view >
< view class = "u-demo-area" >
< view class = "u-no-demo-here" >
源数组为 : [ 1 , 2 , 3 , 4 , 5 ]
< / view >
< view class = "u-demo-result-line" >
{ { ` [ ${ result . join ( ', ' ) } ] ` } }
< / view >
< / view >
< / view >
< view class = "u-config-wrap" >
< view class = "u-config-title u-border-bottom" >
参数配置
< / view >
< view class = "u-config-item" >
< view class = "u-item-title" > 操作 < / view >
< u -button @click ="getResult" > 执 行 < / u -button >
< / view >
< / view >
< / view >
< / template >
< script >
export default {
data ( ) {
return {
orginArray : [ 1 , 2 , 3 , 4 , 5 ] ,
result : [ ] ,
}
} ,
onLoad ( ) {
this . getResult ( ) ;
} ,
methods : {
getResult ( ) {
this . result = this . $u . randomArray ( this . orginArray ) ;
}
}
}
< / script >
< style lang = "scss" scoped >
. u - demo { }
< / style >