Skip to content

如何一次引用所有组件的样式。 #19

@laurensmartz

Description

@laurensmartz

main.js:

import Vue from 'vue/dist/vue'
import router from './router'
import Cube from 'cube-ui'
import 'cube-ui/lib/style.css'

Vue.use(Cube)

new Vue({
  el: '#app',
  router,
})

index.vue:

<template>
  <div id="index">
    <cube-button @click="showDiaog" :disabled="true" icon="cubeic-right">show dialog</cube-button>
    <cube-button type="submit" :active="true">submit</cube-button>
    <div class="scroll-wrapper">
      <cube-scroll :data="items"></cube-scroll>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        items: [1, 2, 3, 4, 5],
      }
    },
    methods: {
      showDiaog() {
        this.$createDialog({
          type: 'alert',
          title: 'Alert',
          content: 'dialog content'
        }).show()
      }
    }
  }
</script>

wechat image_20171113111218

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions