1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import CustomTable from './src/components/TablePage'
- import CustomForm from './src/components/Form'
- import CustomDialog from './src/components/Dialog'
- import CustomSearchForm from './src/components/SearchForm'
- import Tools from './src/utils/tool'
- import _Vue from 'vue'
- const components = [
- CustomTable,
- CustomForm,
- CustomDialog,
- CustomSearchForm
- ]
- const install = function(Vue){
- if (!Vue) {
- window.Vue = Vue = _Vue
- }
- components.forEach(function(component){
- Vue.component(component.name, component);
- });
- }
- const setDictLoader = function(dictLoad){
- Tools.dictLoad = dictLoad
- }
- const setUploadUrl = function(url){
- Tools.upload_stream_url = url
- }
- const setFormatImgUrl = function(func){
- Tools.formatImgUrl = func
- }
- const setOptions = function(options){
- for(var k in options){
- Tools[k] = options[k]
- }
- }
- export default {
- version: '1.0.0',
- CustomTable,
- CustomForm,
- CustomDialog,
- install: install,
- setDictLoader: setDictLoader,
- setUploadUrl: setUploadUrl,
- setFormatImgUrl: setFormatImgUrl,
- setOptions: setOptions
- }
|