/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2022-06-29 15:28:34
 * @LastEditors: wenjie 1454560336@qq.com
 * @LastEditTime: 2024-10-25 14:21:05
 * @FilePath: \admin-manage\src\main.js
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import './styles/element-variables.scss'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import './assets/font/iconfont.css'
import '@/styles/index.scss' // global css
import echarts from "echarts";
Vue.prototype.$echarts = echarts;


import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

import TabCard from '@/components/TabCard'
Vue.use(TabCard)

import TopBar from '@/components/TopBar'
Vue.use(TopBar)

import Title from '@/components/Title'
Vue.use(Title)
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
// if (process.env.NODE_ENV === 'production') {
//   const { mockXHR } = require('../mock')
//   mockXHR()
// }

// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)

Vue.config.productionTip = false

Vue.mixin({
  data() {
    return {
      masterShopOptions:[
        {
          value: 1,
          label: "慧研学惠生活",
        },
        {
          value: 2,
          label: "印象贵大",
        },
        {
          value: 3,
          label: "中数未来生活宝",
        },
      ]
    }
   },
   methods: {
    filterMasterName(val){
      let value = val+''
      let list = value.split(",")
      let arr = []
       list.map(item=>{
        this.masterShopOptions.map(v=>{
          if(v.value == item){
            arr.push(v.label)
          }
        })
       })
       arr = arr.join()
      return arr
    },
   },
})

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
