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.
Files changed (41) hide show
  1. package/components/_tool/directives.js +1 -1
  2. package/components/_tool/docClick.js +1 -1
  3. package/components/_tool/outsiteclick.js +1 -1
  4. package/components/_tool/resize.js +2 -1
  5. package/components/_tool/scroll.js +1 -1
  6. package/components/_tool/transfer.js +1 -1
  7. package/components/bin/index.js +3 -2
  8. package/components/drawer/drawer.jsx +2 -1
  9. package/components/index.js +17 -13
  10. package/components/locale/lang/de.js +1 -1
  11. package/components/locale/lang/el.js +1 -1
  12. package/components/locale/lang/en.js +1 -1
  13. package/components/locale/lang/fr.js +1 -1
  14. package/components/locale/lang/it.js +1 -1
  15. package/components/locale/lang/ja.js +1 -1
  16. package/components/locale/lang/ko.js +1 -1
  17. package/components/locale/lang/ru.js +1 -1
  18. package/components/locale/lang/th.js +2 -2
  19. package/components/locale/lang/ua.js +1 -1
  20. package/components/locale/lang/vi.js +1 -1
  21. package/components/locale/lang/zh-CN.js +1 -1
  22. package/components/locale/lang/zh-TW.js +1 -1
  23. package/components/modal/index.js +1 -1
  24. package/components/page/page.jsx +6 -0
  25. package/components/spin/demo/mode.md +2 -2
  26. package/dist/k-ui.css +1 -1
  27. package/dist/k-ui.js +2 -2
  28. package/dist/locale/de.js +2 -2
  29. package/dist/locale/el.js +2 -2
  30. package/dist/locale/en.js +2 -2
  31. package/dist/locale/fr.js +2 -2
  32. package/dist/locale/it.js +2 -2
  33. package/dist/locale/ja.js +2 -2
  34. package/dist/locale/ko.js +2 -2
  35. package/dist/locale/ru.js +2 -2
  36. package/dist/locale/th.js +2 -2
  37. package/dist/locale/ua.js +2 -2
  38. package/dist/locale/vi.js +2 -2
  39. package/dist/locale/zhCN.js +2 -2
  40. package/dist/locale/zhTW.js +2 -2
  41. 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,7 +1,7 @@
1
1
  import Vue from 'vue';
2
- const SSR = Vue.prototype.$isServer
3
2
  export default {
4
3
  bind(el, binding) {
4
+ const SSR = Vue && Vue.prototype.$isServer
5
5
  let docClick = (e) => {
6
6
  if (el.contains(e.target)) {
7
7
  return false;
@@ -1,7 +1,7 @@
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 (!SSR && typeof value == 'function') {
6
6
  document.addEventListener('click', value)
7
7
  }
@@ -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
  }
@@ -1,7 +1,7 @@
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('scroll', value)
7
7
  }
@@ -1,8 +1,8 @@
1
1
 
2
2
  import Vue from 'vue';
3
- const SSR = Vue.prototype.$isServer
4
3
  export default {
5
4
  inserted(el, { value }, vnode) {
5
+ const SSR = Vue && Vue.prototype.$isServer
6
6
  if (!SSR && value) {
7
7
  const parentNode = el.parentNode
8
8
  if (!parentNode) return false;
@@ -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&&<div class="k-drawer-header"><div class="k-drawer-header-inner">{title}</div></div>}
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>
@@ -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
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Startdatum',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Ημερομηνία Έναρξης',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Start date',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Horaire début',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Data inizio',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: '開始日',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: '시작 날짜',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Выбрать дату',
@@ -1,4 +1,4 @@
1
- export default {
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: 'ตกลง',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Дата початку',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: 'Ngày bắt đầu',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: '开始日期',
@@ -1,4 +1,4 @@
1
- export default {
1
+ module.exports = {
2
2
  k: {
3
3
  datePicker: {
4
4
  startDate: '開始日期',
@@ -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';
@@ -28,6 +28,12 @@ export default {
28
28
  }
29
29
  },
30
30
  watch: {
31
+ pageSize(v) {
32
+ this.defaultPageSize = v
33
+ },
34
+ current(v) {
35
+ this.page = v
36
+ },
31
37
  total(v) {
32
38
  this.pageCount = Math.ceil(this.total / this.defaultPageSize) || 1;
33
39
  }
@@ -40,8 +40,8 @@ export default{
40
40
  change(checked){
41
41
  this.spinning = checked
42
42
  },
43
- changeMode(mode){
44
- this.mode = mode
43
+ changeMode({value}){
44
+ this.mode = value
45
45
  }
46
46
  }
47
47
  }
package/dist/k-ui.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.2.7
2
+ * kui-vue v3.2.8rc3
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: chuchur@qq.com / www.chuchur.com