Commit 8e8e832c authored by Your Name's avatar Your Name

学习项目和学习内容改动

parent 53f8b625
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import Vue from 'vue'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import App from './App' import App from './App'
import router from './router' import router from './router'
import $ from 'jquery' import $ from 'jquery'
import moment from 'moment' import moment from 'moment'
import Vuex from 'vuex' import Vuex from 'vuex'
import qs from 'qs' import qs from 'qs'
import axios from 'axios' import axios from 'axios'
import {backToken} from './config/env' import {backToken} from './config/env'
import http from './config/httpServer' import http from './config/httpServer'
import echarts from 'echarts' import echarts from 'echarts'
import Video from 'video.js' import Video from 'video.js'
import 'video.js/dist/video-js.css' import 'video.js/dist/video-js.css'
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
// 引入JsPdf // 引入JsPdf
import exportToPdf from "@/utils/exportToPdf" import exportToPdf from "@/utils/exportToPdf"
Vue.use(exportToPdf) Vue.use(exportToPdf)
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
return moment(dataStr).format(pattern) return moment(dataStr).format(pattern)
}) })
Vue.prototype.$querystring = qs//其他的代码用到比较多 就新增一个可以了 Vue.prototype.$querystring = qs//其他的代码用到比较多 就新增一个可以了
Vue.prototype.$qs = qs Vue.prototype.$qs = qs
Vue.prototype.$http = axios Vue.prototype.$http = axios
Vue.prototype.$https = http Vue.prototype.$https = http
Vue.prototype.backToken=backToken Vue.prototype.backToken=backToken
Vue.prototype.moment = moment Vue.prototype.moment = moment
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(Vuex); Vue.use(Vuex);
Vue.config.productionTip = false Vue.config.productionTip = false
/* eslint-disable no-new */ Vue.directive("defaultSelect", {
new Vue({ componentUpdated (el, bindings) {
el: '#app', const [defaultValues] = bindings.value
router,
components: { App }, const dealStyle = function (tags) {
template: '<App/>' // 因为不可删除原有值,所以原有值的index是不会变的,也就是将前n个tag的close隐藏掉即可。n即已有值的长度defaultValues.length
}) tags.forEach((el, index) => {
if (index<=defaultValues.length-1 && ![...el.classList].includes('select-tag-close-none')) {
el.classList.add('none')
}
})
}
// 设置样式 隐藏close icon
const tags = el.querySelectorAll('.el-tag__close')
if (tags.length === 0) {
// 初始化tags为空处理
setTimeout(() => {
const tagTemp = el.querySelectorAll('.el-tag__close')
dealStyle(tagTemp)
})
} else {
dealStyle(tags)
}
}
});
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
...@@ -24,17 +24,18 @@ ...@@ -24,17 +24,18 @@
<script> <script>
export default { export default {
props:{ // props:{
fileList:{ // fileList:{
type:Array, // type: Array,
default:[] // default: () => [],
}, // },
}, // },
data() { data() {
return { return {
fileList: [],
dialogImageUrl: "", dialogImageUrl: "",
dialogVisible: false, dialogVisible: false,
imageUrl:"" imageUrl:"",
}; };
}, },
computed: { computed: {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment