You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
2.8 KiB
134 lines
2.8 KiB
import GuipButton from './GuipButton';
|
|
import GroupFormBtns from './GroupFormBtns';
|
|
import GuipInput from './GuipInput';
|
|
import PromptText from './PromptText';
|
|
import GuipTextarea from './GuipTextarea';
|
|
import DevicePreview from './DevicePreview';
|
|
import GuipRadio from './GuipRadio';
|
|
import GuipSelect from './GuipSelect';
|
|
import Breadcrumb from './Breadcrumb';
|
|
import SvgIcon1 from './SvgIcon1';
|
|
import SvgIcon from './SvgIcon';
|
|
import GuipTable from './GuipTable';
|
|
import GuipSwitch from './GuipSwitch';
|
|
import GuipTooltip from './GuipToolTip';
|
|
import GuipDialog from './GuipDialog';
|
|
import GuipMessage from './GuipMessage';
|
|
// import CustomDropdown from './CustomDropdown';
|
|
|
|
import GuipFormItem from './GuipFormItem';
|
|
|
|
import {
|
|
directive as clickaway
|
|
} from 'vue-clickaway';
|
|
|
|
|
|
// 表格头部 添加自定义小图标 *
|
|
// import HeaderIcon from './utils/headerIcon'
|
|
// Vue.mixin(HeaderIcon)
|
|
|
|
|
|
// 复制到粘贴板
|
|
import clipboard from './utils/dirClipBoard';
|
|
import {
|
|
modernCopyToClipboard
|
|
} from './utils/clipboard';
|
|
|
|
import 'core-js/stable';
|
|
import 'element-ui/lib/theme-chalk/index.css'; // 如果依赖Element
|
|
import './styles/index.css'; // 全局引入
|
|
import './styles/common.scss'; // 全局引入
|
|
import './styles/component.scss'; // 全局引入
|
|
|
|
import EventBus, {
|
|
$busOn,
|
|
$busOnce,
|
|
$busOff,
|
|
$busEmit
|
|
} from './utils/eventBus'
|
|
|
|
const components = [
|
|
GuipButton,
|
|
GroupFormBtns,
|
|
GuipInput,
|
|
PromptText,
|
|
GuipTextarea,
|
|
DevicePreview,
|
|
GuipRadio,
|
|
GuipSelect,
|
|
Breadcrumb,
|
|
SvgIcon1,
|
|
SvgIcon,
|
|
GuipTable,
|
|
GuipTooltip,
|
|
GuipSwitch,
|
|
GuipDialog,
|
|
GuipFormItem,
|
|
// CustomDropdown
|
|
];
|
|
|
|
const install = function (Vue, options = {}) {
|
|
// 为了避免冲突 名字要和特殊api 区分
|
|
// 挂载到Vue原型
|
|
Vue.prototype.$eventBus = EventBus
|
|
Vue.prototype.$busOn = $busOn
|
|
Vue.prototype.$busEmit = $busEmit
|
|
Vue.prototype.$busOff = $busOff
|
|
Vue.prototype.$busOnce = $busOnce
|
|
|
|
Vue.prototype.$Message = GuipMessage
|
|
|
|
// 复制
|
|
Vue.prototype.$copy = modernCopyToClipboard;
|
|
Vue.use(clipboard);
|
|
Vue.directive('clickaway', clickaway);
|
|
|
|
components.forEach(component => {
|
|
if (!component.name) {
|
|
throw new Error(`Component name is required: ${component}`)
|
|
}
|
|
Vue.component(component.name, component)
|
|
})
|
|
}
|
|
|
|
export {
|
|
GuipButton,
|
|
GroupFormBtns,
|
|
GuipInput,
|
|
PromptText,
|
|
GuipTextarea,
|
|
DevicePreview,
|
|
GuipRadio,
|
|
GuipSelect,
|
|
Breadcrumb,
|
|
SvgIcon1,
|
|
SvgIcon,
|
|
GuipTable,
|
|
GuipTooltip,
|
|
GuipSwitch,
|
|
GuipDialog,
|
|
GuipFormItem,
|
|
GuipMessage,
|
|
// CustomDropdown
|
|
}
|
|
export default {
|
|
install,
|
|
GuipButton,
|
|
GroupFormBtns,
|
|
GuipInput,
|
|
PromptText,
|
|
GuipTextarea,
|
|
DevicePreview,
|
|
GuipRadio,
|
|
GuipSelect,
|
|
Breadcrumb,
|
|
SvgIcon1,
|
|
SvgIcon,
|
|
GuipTable,
|
|
GuipTooltip,
|
|
GuipSwitch,
|
|
GuipDialog,
|
|
GuipFormItem,
|
|
GuipMessage,
|
|
// CustomDropdown
|
|
}
|