diff --git a/build/webpack.dev.config.js b/build/webpack.dev.config.js
index 5803c51e..8c07d166 100644
--- a/build/webpack.dev.config.js
+++ b/build/webpack.dev.config.js
@@ -27,7 +27,8 @@ module.exports = merge(webpackBaseConfig, {
resolve: {
alias: {
iview: '../../src/index',
- vue: 'vue/dist/vue.js'
+ // vue: 'vue/dist/vue.js'
+ vue: 'vue/dist/vue.runtime.js'
}
},
plugins: [
diff --git a/examples/routers/notice.vue b/examples/routers/notice.vue
index aa0f4e0b..d1a76c58 100644
--- a/examples/routers/notice.vue
+++ b/examples/routers/notice.vue
@@ -1,21 +1,44 @@
- 打开提醒
+
+
带描述信息
+
+
+
+
+
仅标题
+
+
+
+
+
diff --git a/src/components/base/notification/index.js b/src/components/base/notification/index.js
index 7ab2c625..794bac56 100644
--- a/src/components/base/notification/index.js
+++ b/src/components/base/notification/index.js
@@ -10,15 +10,18 @@ Notification.newInstance = properties => {
props += ' :' + camelcaseToHyphen(prop) + '=' + prop;
});
- const div = document.createElement('div');
- div.innerHTML = ``;
- document.body.appendChild(div);
-
- const notification = new Vue({
- el: div,
+ const Instance = new Vue({
data: _props,
- components: { Notification }
- }).$children[0];
+ render (h) {
+ return h(Notification, {
+ props: _props
+ })
+ }
+ });
+
+ const component = Instance.$mount();
+ document.body.appendChild(component.$el);
+ const notification = Instance.$children[0];
return {
notice (noticeProps) {