demo.vue 752 Bytes
<template lang="html">
  <div class="">
    <alert
    :title="title"
    :value="show"
    :button_text="button_text"
    @on-show="onShow"
    @on-hide="onHide">
    自定义插入内容
  </alert>
  <group>
    <x-switch title="测试开关" v-model="show"></x-switch>
  </group>
  </div>
</template>

<script>
import alert from 'components/alert/index'
import { Group, XSwitch } from 'vux'

export default {
  components: { alert, Group, XSwitch },
  data () {
    return {
      title: '温馨提示',
      button_text: '确定',
      show: false
    }
  },
  mounted () {
  },
  methods: {
    onHide () {
      console.warn('on-hide');
    },
    onShow () {
      console.warn('on-show');
    }
  }
}
</script>

<style lang="less">
</style>