Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import SocialSharing from 'vue-social-sharing'
import Icon from 'vue-awesome/components/Icon'
const _queue = new Queue(10, Infinity)
// Alias i18n function.
const __ = chrome.i18n.getMessage
Vue.prototype.__ = __
// Change docuemnt title manually. Coz title is assign on build stage.
document.title = __('extName')
Vue.config.productionTip = false
const mainLangName = chrome.i18n.getUILanguage().split('-')[0]
locale.use((mainLangName === 'zh') ? zhLocale : enLocale)
// Import element-ui components.
const elements = [
Slider,
Loading,
Button,
Table,
TableColumn,
Tag,
Tooltip,
DatePicker,
Pagination,
Switch,
Container,
Menu,
MenuItem,
import Vue from 'vue'
import { Form, FormItem, Switch } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-TW'
import locale from 'element-ui/lib/locale'
import root from './root.vue'
Vue.config.productionTip = false
const mainLangName = chrome.i18n.getUILanguage().split('-')[0]
locale.use((mainLangName === 'zh') ? zhLocale : enLocale)
Vue.use(Form, { locale })
Vue.use(FormItem, { locale })
Vue.use(Switch, { locale })
/* eslint-disable no-new */
new Vue({
el: '#root',
render: h => h(root)
})
import Vue from 'vue'
import Tippy from 'v-tippy'
import 'typeface-lato/index.css'
import App from './App.vue'
import { Select, Option, OptionGroup, InputNumber, Switch } from 'element-ui'
import lang from 'element-ui/lib/locale/lang/en'
import locale from 'element-ui/lib/locale'
// configure language
locale.use(lang)
Vue.use(Tippy, {
position: 'top',
theme: 'light',
size: 'small',
animation: 'scale',
performance: true,
arrow: true,
trigger: 'click',
duration: [200, 200]
})
Vue.use(Select)
Vue.use(Option)
Vue.use(OptionGroup)
Vue.use(InputNumber)
Vue.use(Switch)
import Vue from 'vue';
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';
import './assets/bootstrap/bootstrap-grid.css';
import './assets/common.css';
import lang from 'element-ui/lib/locale/lang/zh-CN';
import locale from 'element-ui/lib/locale';
import FastClick from 'fastclick';
import router from './router.js';
import App from './App.vue';
Vue.use(Vuex);
Vue.use(ElementUI);
locale.use(lang);
FastClick.attach(document.body);
/* eslint-disable no-new */
const store = new Vuex.Store({
state: {},
mutations: {}
});
new Vue({
router,
store,
el: '#app',
template: '',
components: {
App
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import 'bulma/css/bulma.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
import lang from 'element-ui/lib/locale/lang/en'
import locale from 'element-ui/lib/locale'
locale.use(lang)
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '',
components: { App },
});
// Backtop,
// Carousel,
// CarouselItem,
// Collapse,
// CollapseItem,
// Cascader,
// ColorPicker,
// Transfer,
// Rate,
// Upload,
// Slider,
// Tree,
// Tooltip,
} from 'element-ui'
locale.use(lang)
Vue.use(Dialog)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Input)
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Popover)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Tag)
const localize = lang => {
switch (lang) {
case 'zh-CN':
use(zhLocale)
break
default:
use(enLocale)
}
}
localize(lang)
Nova.booting(function(Vue, router) {
locale.use(mapLocales[Nova.config.locale] || mapLocales['en']);
Vue.use(Select);
Vue.use(Option);
Vue.use(Input);
Vue.use(Autocomplete);
Vue.use(InputNumber);
Vue.use(Radio);
Vue.use(RadioButton);
Vue.use(RadioGroup);
Vue.use(Checkbox);
Vue.use(CheckboxButton);
Vue.use(CheckboxGroup);
Vue.use(ColorPicker);
Vue.use(Tag);
Vue.use(Switch);
Vue.use(TabPane);
Vue.use(Tabs);
import Vue from 'vue'
import en from 'element-ui/lib/locale/lang/en'
import locale from 'element-ui/lib/locale'
locale.use(en);
import {
Button,
Menu,
Submenu,
MenuItem,
Tooltip,
Loading,
MessageBox,
Message,
Notification,
Table,
TableColumn,
RadioGroup,
Radio,
Pagination,