How to use veui - 10 common examples

To help you get started, we’ve selected a few veui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ecomfe / veui / packages / veui / demo / main.js View on Github external
import Vue from 'vue'
import App from './App'
import router from './router'
import 'classlist-polyfill'
import 'focus-visible'
import 'svg-innerhtml'
import i18n from 'veui/managers/i18n'

i18n.locale = 'en-US'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  name: 'app',
  router,
  render: h => h(App)
})
github ecomfe / veui / packages / veui / demo / main.js View on Github external
import 'classlist-polyfill'
import 'focus-visible'
import 'promise-polyfill/src/polyfill'

import Vue from 'vue'
import App from './App'
import router from './router'
import i18n from 'veui/managers/i18n'

i18n.locale = 'en-US'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  name: 'app',
  router,
  render: h => h(App)
})
github ecomfe / veui / packages / veui / demo / cases / Dialog.vue View on Github external
popupPrompt () {
      promptManager
        .info('Please tell us your age:', 'Prompt', {
          ok: async val => {
            await wait(1000)
            let num = Number(val)
            if (`${num}` !== val || num <= 0) {
              this.$toast.error('Please enter a valid age.')
              return false
            }
          }
        })
        .then(value => {
          console.log(value)
        })
    }
  }
github ecomfe / veui / packages / veui-loader / src / index.js View on Github external
function getComponentName (componentPath) {
  if (!componentPath) {
    return null
  }
  let component = COMPONENTS.find(({ path }) => {
    path = normalize(path)
    return path === componentPath || path.split('.')[0] === componentPath
  })

  return component ? component.name : null
}
github ecomfe / veui / packages / veui / demo / cases / Dialog.vue View on Github external
popupConfirms () {
      confirmManager
        .warn('Do you really want to delete it?', 'Confirm', {
          ok: async () => {
            await wait(1000)

            if (Math.random() < 0.5) {
              this.$toast.error('Not lucky enough :(')
              return false
            }
          }
        })
        .then(ok => {
          this.$alert(`You chose [${ok ? 'ok' : 'cancel'}]`)
        })
    },
    popupToasts (type) {
github ecomfe / veui / packages / veui / demo / cases / Dialog.vue View on Github external
popupPrompt () {
      promptManager.info('Please tell us your age:', 'Prompt').then(value => {
        console.log(value)
      })
    }
  }
github ecomfe / veui / packages / veui-theme-one-icons / icons / basketball-clothes.js View on Github external
import Icon from 'veui/components/Icon'

Icon.register({
  'basketball-clothes': {
    raw: '',
    width: '48',
    height: '48'
  }
})
github ecomfe / veui / packages / veui-theme-one-icons / icons / calculator.js View on Github external
import Icon from 'veui/components/Icon'

Icon.register({
  calculator: {
    raw: '',
    width: '48',
    height: '48'
  }
})
github ecomfe / veui / packages / veui-theme-one-icons / icons / undo.js View on Github external
import Icon from 'veui/components/Icon'

Icon.register({
  undo: {
    paths: [
      {
        d: 'M4.4 14a22 22 0 1 1 0 20M4 14V4',
        fill: 'none',
        'stroke-linecap': 'round',
        'stroke-linejoin': 'round',
        stroke: 'currentColor',
        'stroke-width': '4'
      }
    ],
    width: '48',
    height: '48'
  }
})
github ecomfe / veui / packages / veui-theme-one-icons / icons / shield-check.js View on Github external
import Icon from 'veui/components/Icon'

Icon.register({
  'shield-check': {
    raw: '',
    width: '48',
    height: '48'
  }
})