kui-vue 3.2.7 → 3.2.8-rc3
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/drawer/drawer.jsx +2 -1
- package/components/index.js +17 -13
- package/components/locale/lang/de.js +1 -1
- package/components/locale/lang/el.js +1 -1
- package/components/locale/lang/en.js +1 -1
- package/components/locale/lang/fr.js +1 -1
- package/components/locale/lang/it.js +1 -1
- package/components/locale/lang/ja.js +1 -1
- package/components/locale/lang/ko.js +1 -1
- package/components/locale/lang/ru.js +1 -1
- package/components/locale/lang/th.js +2 -2
- package/components/locale/lang/ua.js +1 -1
- package/components/locale/lang/vi.js +1 -1
- package/components/locale/lang/zh-CN.js +1 -1
- package/components/locale/lang/zh-TW.js +1 -1
- package/components/modal/index.js +1 -1
- package/components/page/page.jsx +6 -0
- package/components/spin/demo/mode.md +2 -2
- package/dist/k-ui.css +1 -1
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +2 -2
- package/dist/locale/el.js +2 -2
- package/dist/locale/en.js +2 -2
- package/dist/locale/fr.js +2 -2
- package/dist/locale/it.js +2 -2
- package/dist/locale/ja.js +2 -2
- package/dist/locale/ko.js +2 -2
- package/dist/locale/ru.js +2 -2
- package/dist/locale/th.js +2 -2
- package/dist/locale/ua.js +2 -2
- package/dist/locale/vi.js +2 -2
- package/dist/locale/zhCN.js +2 -2
- package/dist/locale/zhTW.js +2 -2
- 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
|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
render() {
|
|
96
|
+
if (this.$isServer) return null;
|
|
96
97
|
const { title, visible, cancelText, okText, ok,
|
|
97
98
|
placement, cancel, $slots,
|
|
98
99
|
closable, close, } = this
|
|
@@ -134,7 +135,7 @@ export default {
|
|
|
134
135
|
<div class="k-drawer-box" v-show={visible} style={styles}>
|
|
135
136
|
<div class="k-drawer-content">
|
|
136
137
|
{closeNode}
|
|
137
|
-
{title!==null&&title!==false
|
|
138
|
+
{title !== null && title !== false && <div class="k-drawer-header"><div class="k-drawer-header-inner">{title}</div></div>}
|
|
138
139
|
<div class="k-drawer-body">
|
|
139
140
|
{$slots.default}
|
|
140
141
|
</div>
|
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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports = {
|
|
2
2
|
k: {
|
|
3
3
|
datePicker: {
|
|
4
4
|
startDate: 'วันที่เริ่มต้น',
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
ok: 'ตกลง',
|
|
32
32
|
selectDate: 'เลือกวันที่',
|
|
33
33
|
selectTime: 'เลือกเวลา',
|
|
34
|
-
back:'เบื้องหลัง'
|
|
34
|
+
back: 'เบื้องหลัง'
|
|
35
35
|
},
|
|
36
36
|
drawer: {
|
|
37
37
|
ok: 'ตกลง',
|
|
@@ -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/components/page/page.jsx
CHANGED
package/dist/k-ui.css
CHANGED