index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="content">
  3. <block v-for="(item, index) in list" :key="index">
  4. <view class="list-box" @tap="gotourl(item.url)">{{item.name}}</view>
  5. </block>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. list: [
  13. {name:"全端uCharts渲染图表",url:"../ucharts/ucharts"},
  14. {name:"H5、App用ECharts,其他端用uCharts",url:"../echarts/echarts"},
  15. {name:"uniCloud数据渲染图表",url:"../unicloud/unicloud"},
  16. {name:"动态更新数据示例",url:"../updata/updata"},
  17. {name:"图表交互示例",url:"../other/other"},
  18. {name:"uCharts的formatter用法",url:"../format-u/format-u"},
  19. {name:"ECharts的formatter用法",url:"../format-e/format-e"},
  20. {name:"Tab选项卡切换示例",url:"../tab/tab"},
  21. {name:"特殊布局示例",url:"../layout/layout"},
  22. {name:"原生用法示例(非组件)",url:"../canvas/canvas"},
  23. ],
  24. }
  25. },
  26. onReady() {
  27. },
  28. methods: {
  29. gotourl(url) {
  30. uni.navigateTo({
  31. url: url
  32. });
  33. },
  34. }
  35. };
  36. </script>
  37. <style>
  38. .content {
  39. display: flex;
  40. flex-direction: column;
  41. flex: 1;
  42. align-items: center;
  43. padding-bottom: 40px;
  44. }
  45. .list-box{
  46. text-align: center;
  47. margin-top: 40px;
  48. line-height: 40px;
  49. width: 80%;
  50. border: 1 px solid #317ac3;
  51. border-radius: 5px;
  52. background: #409EFF;
  53. font-size: 20px;
  54. color: #FFFFFF;
  55. }
  56. </style>