123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import CustomTable from './src/components/TablePage'
- import CustomForm from './src/components/Form'
- import CustomDialog from './src/components/Dialog'
- import Tools from './src/utils/tool'
- import _Vue from 'vue'
- const components = [
- CustomTable,
- CustomForm,
- CustomDialog
- ]
- 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
- }
|