kui-vue 3.2.7 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_tool/directives.js +1 -1
- package/components/_tool/docClick.js +1 -1
- package/components/_tool/outsiteclick.js +1 -1
- package/components/_tool/resize.js +2 -1
- package/components/_tool/scroll.js +1 -1
- package/components/_tool/transfer.js +1 -1
- package/components/bin/index.js +3 -2
- package/components/index.js +17 -13
- package/components/modal/index.js +1 -1
- package/dist/k-ui.css +1 -1
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/ua.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zhCN.js +1 -1
- package/dist/locale/zhTW.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
const SSR = Vue.prototype.$isServer
|
|
3
2
|
export default {
|
|
4
3
|
inserted(el, { value }, vnode) {
|
|
5
4
|
let transfer = el.getAttribute ? el.getAttribute('data-transfer') : el.dataset.transfer
|
|
5
|
+
const SSR = Vue && Vue.prototype.$isServer
|
|
6
6
|
if (!SSR && transfer === 'true') {
|
|
7
7
|
const parentNode = el.parentNode
|
|
8
8
|
if (!parentNode) return false;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
const SSR = Vue.prototype.$isServer
|
|
3
2
|
export default {
|
|
4
3
|
bind(el, { value }) {
|
|
4
|
+
const SSR = Vue && Vue.prototype.$isServer
|
|
5
5
|
if (typeof value == 'function' && !SSR) {
|
|
6
6
|
window.addEventListener('resize', value)
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
unbind(el, { value }) {
|
|
10
|
+
const SSR = Vue && Vue.prototype.$isServer
|
|
10
11
|
if (typeof value == 'function' && !SSR)
|
|
11
12
|
window.removeEventListener('resize', value)
|
|
12
13
|
}
|
package/components/bin/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import '../index.js'
|
|
2
|
-
import '../styles/index.less';
|
|
1
|
+
import UI from '../index.js'
|
|
2
|
+
import '../styles/index.less';
|
|
3
|
+
export default UI
|
package/components/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import Upload from './upload'
|
|
|
47
47
|
|
|
48
48
|
import { version } from '../package.json'
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
// import './styles/index.less';
|
|
51
51
|
|
|
52
52
|
import locale from './locale'
|
|
53
53
|
|
|
@@ -116,23 +116,27 @@ const UI = {
|
|
|
116
116
|
kCol: Col,
|
|
117
117
|
kMenu: Menu,
|
|
118
118
|
Version: version,
|
|
119
|
-
install: function (Vue, opts = {}) {
|
|
120
|
-
locale.use(opts.locale);
|
|
121
|
-
locale.i18n(opts.i18n);
|
|
122
119
|
|
|
123
|
-
for (let key in UI) {
|
|
124
|
-
Vue.component(key, UI[key]);
|
|
125
|
-
}
|
|
126
|
-
Vue.prototype.$Message = Message;
|
|
127
|
-
Vue.prototype.$Notice = Notice;
|
|
128
|
-
Vue.prototype.$Modal = Modal;
|
|
129
|
-
Vue.prototype.$Loading = Loading;
|
|
130
|
-
Vue.prototype.$Image = Image;
|
|
131
|
-
},
|
|
132
120
|
locale: locale.use,
|
|
133
121
|
i18n: locale.i18n,
|
|
134
122
|
lang: {}
|
|
135
123
|
}
|
|
124
|
+
const install = function (Vue, opts = {}) {
|
|
125
|
+
locale.use(opts.locale);
|
|
126
|
+
locale.i18n(opts.i18n);
|
|
127
|
+
|
|
128
|
+
for (let key in UI) {
|
|
129
|
+
Vue.component(key, UI[key]);
|
|
130
|
+
}
|
|
131
|
+
Vue.prototype.$Message = Message;
|
|
132
|
+
Vue.prototype.$Notice = Notice;
|
|
133
|
+
Vue.prototype.$Modal = Modal;
|
|
134
|
+
Vue.prototype.$Loading = Loading;
|
|
135
|
+
Vue.prototype.$Image = Image;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
UI.install = install
|
|
139
|
+
|
|
136
140
|
// auto install
|
|
137
141
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
138
142
|
UI.install(window.Vue);
|
|
@@ -3,7 +3,7 @@ import Icon from '../icon'
|
|
|
3
3
|
import Vue from 'vue'
|
|
4
4
|
import Button from '../button'
|
|
5
5
|
import { t } from '../locale'
|
|
6
|
-
const SSR = Vue.prototype.$isServer
|
|
6
|
+
const SSR = Vue && Vue.prototype.$isServer
|
|
7
7
|
|
|
8
8
|
function isPromise(obj) {
|
|
9
9
|
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
|
package/dist/k-ui.css
CHANGED