Comparing version 0.0.17 to 0.0.18
30
index.js
@@ -33,3 +33,3 @@ // es6 polyfill | ||
// import Slider from './components/slider'; | ||
// import Spin from './components/spin'; | ||
import Loading from './components/Loading'; | ||
// import Steps from './components/steps'; | ||
@@ -61,3 +61,6 @@ import Switch from './components/switch'; | ||
import $Notice from './plugins/notice'; | ||
import $Loading from './plugins/loading'; | ||
import filters from './filters'; | ||
import config from './utils/config'; | ||
@@ -122,3 +125,3 @@ | ||
// Slider, | ||
// Spin, | ||
Loading, | ||
// Step: Steps.Step, | ||
@@ -132,4 +135,2 @@ // Steps, | ||
// Tag, | ||
// Timeline, | ||
// TimelineItem: Timeline.Item, | ||
// TimePicker, | ||
@@ -152,3 +153,11 @@ // Tooltip, | ||
const prototypes = { | ||
$Message, | ||
$Modal, | ||
$Confirm, | ||
$Notice, | ||
$Loading | ||
} | ||
const install = function (Vue, opts = {}) { | ||
@@ -167,2 +176,5 @@ // locale.use(opts.locale); | ||
Object.keys(filters).forEach((key) => { | ||
Vue.filter(key, filters[key]); | ||
}); | ||
@@ -173,7 +185,5 @@ Object.keys(directives).forEach((key) => { | ||
// Vue.prototype.$Loading = LoadingBar; | ||
Vue.prototype.$Message = $Message; | ||
Vue.prototype.$Modal = $Modal; | ||
Vue.prototype.$Confirm = $Confirm; | ||
Vue.prototype.$Notice = $Notice; | ||
Object.keys(prototypes).forEach((key) => { | ||
Vue.prototype[key] = prototypes[key]; | ||
}); | ||
}; | ||
@@ -187,4 +197,4 @@ | ||
install | ||
}, config); | ||
}, prototypes, config); | ||
export default HeyUI; |
{ | ||
"name": "heyui", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "A UI components Library.", | ||
@@ -5,0 +5,0 @@ "main": "./build/heyui.js", |
@@ -49,5 +49,5 @@ import Notify from '../base/notify'; | ||
function notice(param, type) { | ||
if (Utils.isString(param)) { | ||
if (utils.isString(param)) { | ||
return Notice({ content: param, type }); | ||
} else if (Utils.isObject(param)) { | ||
} else if (utils.isObject(param)) { | ||
if (type) param.type = type; | ||
@@ -54,0 +54,0 @@ return Notice(param); |
@@ -79,2 +79,9 @@ import utils from './utils'; | ||
}, | ||
config(name, value) { | ||
if (utils.isNull(name)) { | ||
return false; | ||
} | ||
utils.setKeyValue(config, name, value); | ||
return true; | ||
}, | ||
initDict(objects) { | ||
@@ -81,0 +88,0 @@ Object.assign(config.dict.dicts, objects); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
597498
133
3893
6