Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
})
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)
})
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)
})
}
}
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
}
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) {
popupPrompt () {
promptManager.info('Please tell us your age:', 'Prompt').then(value => {
console.log(value)
})
}
}
import Icon from 'veui/components/Icon'
Icon.register({
'basketball-clothes': {
raw: '',
width: '48',
height: '48'
}
})
import Icon from 'veui/components/Icon'
Icon.register({
calculator: {
raw: '',
width: '48',
height: '48'
}
})
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'
}
})
import Icon from 'veui/components/Icon'
Icon.register({
'shield-check': {
raw: '',
width: '48',
height: '48'
}
})