Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
// Configures the subject props
propsData = {
...dateInputFixture.props,
}
vuetify = new Vuetify()
})
export const renderWithVuetify = (component, options, callback) => {
return render(
// anonymous component
{
// Vue's render function
render(createElement) {
// wrap the component with a <div data-app="true"> node and render the test component
return createElement('div', {attrs: {'data-app': true}}, [
createElement(component),
])
},
},
// for Vuetify components that use the $vuetify instance property
{vuetify: new Vuetify(), ...options},
callback,
)
}
</div>
const opts = {
icons: {
iconfont: 'mdiSvg', // 'mdi' || 'mdiSvg' || 'md' || 'fa' || 'fa4' || 'faSvg'
},
breakpoint: {
thresholds: {
xs: 340,
sm: 540,
md: 540,
lg: 540,
},
scrollBarWidth: 24,
},
}
export default new Vuetify(opts)
export default previewComponent => {
// https://vuejs.org/v2/guide/render-function.html
return {
vuetify: new Vuetify(),
i18n,
render(createElement) {
return createElement(
'v-app',
{
props: {
id: 'v-app'
}
},
[createElement(Languages), createElement(Object.assign(previewComponent))]
)
}
}
}
Vue.use(UserPlugin);
Vue.use(VueProgressBar, {
color: window.theme.light.primary,
failedColor: window.theme.light.error,
height: '2px'
});
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
vuetify: new Vuetify({
icons: {
iconfont: 'mdi'
},
theme: {
dark: false,
themes: window.theme
}
}),
components: { App },
template: ''
});
beforeEach(() => {
propsData = authFixture({ username, password }).props
vuetify = new Vuetify()
vaPropSpy = {
login: jest.spyOn(propsData.va, 'login'),
}
_mount({ propsData, vuetify })
})
Wails.Init(() => {
new Vue({
vuetify: new Vuetify({
icons: {
iconfont: 'mdi'
},
theme: {
dark: true
}
}),
render: h => h(App)
}).$mount('#app');
});
Vue.config.productionTip = false
Vue.use(Vuetify)
Vue.filter("date", dateFilter)
Vue.filter("percent", percentFilter)
Vue.filter("round", roundFilter)
const LOCALE = navigator.language.split('-')[0] || navigator.userLanguage.split('-')[0]
new Vue({
router,
store,
i18n,
vuetify: new Vuetify({
lang: {
locales: { en, ru },
current: LOCALE,
}
}),
render: h => h(App)
}).$mount('#app')
document.addEventListener("DOMContentLoaded", function () {
if (document.getElementById('app')) {
new Vue({
el: '#app',
vuetify: new Vuetify(),
render: function (h) {
return (
<div>
</div>
)
}
})
}
})
import Swatches from 'vue-swatches'
import 'vue-swatches/dist/vue-swatches.min.css'
import { Sketch } from 'vue-color'
Vue.use(Vuetify)
Vue.use(VueAxios, axios)
Vue.component('swatches', Swatches)
Vue.component('draggable', Draggable)
Vue.component('color-picker', Sketch)
new Vue({
el: '#app',
components: { DemoApp },
render: h => h('demo-app'),
vuetify: new Vuetify({
icons: {
iconfont: 'mdi'
}
})
})