kui-vue 3.2.5 → 3.2.7
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 +3 -1
- package/components/_tool/docClick.js +3 -1
- package/components/_tool/outsiteclick.js +1 -2
- package/components/_tool/resize.js +2 -3
- package/components/_tool/scroll.js +2 -3
- package/components/_tool/transfer.js +3 -1
- package/components/_tool/utils.js +9 -3
- package/components/affix/affix.jsx +21 -8
- package/components/avatar/styles/index.less +1 -1
- package/components/base/drop.jsx +3 -3
- package/components/base/pop.jsx +7 -4
- package/components/bin/index.js +2 -0
- package/components/button/styles/index.less +7 -6
- package/components/colorPicker/colorpicker.jsx +27 -15
- package/components/colorPicker/demo/base.md +1 -1
- package/components/colorPicker/demo/index.vue +2 -0
- package/components/colorPicker/demo/shape.md +33 -0
- package/components/colorPicker/index.md +10 -7
- package/components/colorPicker/styles/index.less +30 -13
- package/components/datePicker/datecalendar.jsx +149 -83
- package/components/datePicker/datepicker.jsx +11 -7
- package/components/datePicker/demo/base.md +2 -0
- package/components/datePicker/demo/index.vue +2 -0
- package/components/datePicker/demo/inside.md +76 -0
- package/components/datePicker/demo/size.md +3 -3
- package/components/datePicker/index.js +2 -1
- package/components/datePicker/index.md +1 -0
- package/components/datePicker/styles/calendar.less +149 -49
- package/components/datePicker/styles/datepicker.less +3 -3
- package/components/drawer/demo/base.md +2 -2
- package/components/drawer/demo/custom.md +2 -2
- package/components/drawer/demo/form.md +1 -1
- package/components/drawer/demo/target.md +14 -3
- package/components/drawer/drawer.jsx +11 -10
- package/components/drawer/index.md +1 -1
- package/components/drawer/styles/animal.less +2 -1
- package/components/drawer/styles/index.less +26 -10
- package/components/dropdown/dropdown.jsx +0 -1
- package/components/empty/empty.jsx +2 -1
- package/components/form/form.jsx +1 -1
- package/components/icon/demo/search.vue +4 -4
- package/components/icon/index.md +1 -1
- package/components/image/preview.jsx +10 -8
- package/components/index.js +12 -4
- package/components/input/demo/size.md +3 -3
- package/components/input/styles/index.less +5 -5
- package/components/locale/index.js +74 -0
- package/components/locale/lang/de.js +55 -0
- package/components/locale/lang/el.js +72 -0
- package/components/locale/lang/en.js +55 -0
- package/components/locale/lang/fr.js +72 -0
- package/components/locale/lang/it.js +72 -0
- package/components/locale/lang/ja.js +72 -0
- package/components/locale/lang/ko.js +72 -0
- package/components/locale/lang/ru.js +55 -0
- package/components/locale/lang/th.js +72 -0
- package/components/locale/lang/ua.js +55 -0
- package/components/locale/lang/vi.js +55 -0
- package/components/locale/lang/zh-CN.js +55 -0
- package/components/locale/lang/zh-TW.js +55 -0
- package/components/message/styles/index.less +4 -3
- package/components/modal/demo/custom.md +1 -1
- package/components/modal/index.js +8 -6
- package/components/modal/modal.jsx +42 -37
- package/components/page/page.jsx +4 -3
- package/components/page/styles/index.less +13 -13
- package/components/popconfirm/popconfirm.jsx +2 -2
- package/components/select/demo/filterable.md +6 -14
- package/components/select/demo/search.md +6 -4
- package/components/select/index.md +20 -19
- package/components/select/select.jsx +7 -4
- package/components/select/styles/index.less +13 -3
- package/components/slider/slider.jsx +6 -4
- package/components/space/space.jsx +2 -2
- package/components/styles/color.less +2 -2
- package/components/table/extend.jsx +1 -1
- package/components/table/index.md +4 -3
- package/components/table/table.jsx +4 -3
- package/components/tabs/tabs.jsx +3 -3
- package/components/timeline/demo/base.md +3 -3
- package/components/timeline/demo/icon.md +5 -5
- package/components/timeline/demo/mode.md +12 -6
- package/components/timeline/index.md +7 -6
- package/components/timeline/styles/index.less +40 -13
- package/components/timeline/timeline.jsx +5 -1
- package/components/timeline/timelineitem.jsx +9 -5
- package/components/treeselect/treeselect.vue +36 -35
- package/components/upload/index.md +1 -1
- package/components/upload/styles/index.less +1 -1
- package/components/upload/upload.jsx +5 -4
- package/dist/k-ui.css +7 -1
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +8 -0
- package/dist/locale/el.js +8 -0
- package/dist/locale/en.js +8 -0
- package/dist/locale/fr.js +8 -0
- package/dist/locale/it.js +8 -0
- package/dist/locale/ja.js +8 -0
- package/dist/locale/ko.js +8 -0
- package/dist/locale/ru.js +8 -0
- package/dist/locale/th.js +8 -0
- package/dist/locale/ua.js +8 -0
- package/dist/locale/vi.js +8 -0
- package/dist/locale/zhCN.js +8 -0
- package/dist/locale/zhTW.js +8 -0
- package/package.json +4 -3
- package/readme.md +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Выбрать дату',
|
|
5
|
+
endDate: 'Дата окончания',
|
|
6
|
+
placeholder: 'Выбрать',
|
|
7
|
+
months: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
|
|
8
|
+
weeks: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
|
9
|
+
year: '',
|
|
10
|
+
month: '',
|
|
11
|
+
day: '',
|
|
12
|
+
today: 'Сегодня',
|
|
13
|
+
now: 'Сейчас',
|
|
14
|
+
ok: 'OK',
|
|
15
|
+
selectDate: 'Выбрать дату',
|
|
16
|
+
selectTime: 'Выбрать время',
|
|
17
|
+
back:'назад'
|
|
18
|
+
},
|
|
19
|
+
drawer: {
|
|
20
|
+
ok: 'OK',
|
|
21
|
+
cancel: 'Отмена'
|
|
22
|
+
},
|
|
23
|
+
empty: {
|
|
24
|
+
description: 'Нет данных',
|
|
25
|
+
},
|
|
26
|
+
pop: {
|
|
27
|
+
ok: 'OK',
|
|
28
|
+
cancel: 'Отмена'
|
|
29
|
+
},
|
|
30
|
+
modal: {
|
|
31
|
+
ok: 'OK',
|
|
32
|
+
cancel: 'Отмена'
|
|
33
|
+
},
|
|
34
|
+
page: {
|
|
35
|
+
page: '',
|
|
36
|
+
pageSize: ' на странице',
|
|
37
|
+
goto: 'Перейти',
|
|
38
|
+
items: '',
|
|
39
|
+
total: 'Всего'
|
|
40
|
+
},
|
|
41
|
+
select: {
|
|
42
|
+
placeholder: 'Выбрать',
|
|
43
|
+
loading: 'Загрузка...',
|
|
44
|
+
emptyText: 'Нет данных'
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
emptyText: 'Нет данных'
|
|
48
|
+
},
|
|
49
|
+
upload: {
|
|
50
|
+
successful: 'успешно',
|
|
51
|
+
failed: 'неудача',
|
|
52
|
+
errorFileSize: ' Неверный размер файла'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'วันที่เริ่มต้น',
|
|
5
|
+
endDate: 'วันที่สิ้นสุด',
|
|
6
|
+
placeholder: 'เลือก',
|
|
7
|
+
months: ['มกรา',
|
|
8
|
+
'กุมภา',
|
|
9
|
+
'มีนา',
|
|
10
|
+
'เมษา',
|
|
11
|
+
'พฤษภา',
|
|
12
|
+
'มิถุนา',
|
|
13
|
+
'กรกฎา',
|
|
14
|
+
'สิงหา',
|
|
15
|
+
'กันยา',
|
|
16
|
+
'ตุลา',
|
|
17
|
+
'พฤศจิกา',
|
|
18
|
+
'ธันวา'],
|
|
19
|
+
weeks: ['อา',
|
|
20
|
+
'จ',
|
|
21
|
+
'อ',
|
|
22
|
+
'พ',
|
|
23
|
+
'พฤ',
|
|
24
|
+
'ศ',
|
|
25
|
+
'ส'],
|
|
26
|
+
year: '',
|
|
27
|
+
month: '',
|
|
28
|
+
day: '',
|
|
29
|
+
today: 'วันนี้',
|
|
30
|
+
now: 'ตอนนี้',
|
|
31
|
+
ok: 'ตกลง',
|
|
32
|
+
selectDate: 'เลือกวันที่',
|
|
33
|
+
selectTime: 'เลือกเวลา',
|
|
34
|
+
back:'เบื้องหลัง'
|
|
35
|
+
},
|
|
36
|
+
drawer: {
|
|
37
|
+
ok: 'ตกลง',
|
|
38
|
+
cancel: 'ยกเลิก'
|
|
39
|
+
},
|
|
40
|
+
empty: {
|
|
41
|
+
description: 'ไม่พบข้อมูล',
|
|
42
|
+
},
|
|
43
|
+
pop: {
|
|
44
|
+
ok: 'ตกลง',
|
|
45
|
+
cancel: 'ยกเลิก'
|
|
46
|
+
},
|
|
47
|
+
modal: {
|
|
48
|
+
ok: 'ตกลง',
|
|
49
|
+
cancel: 'ยกเลิก'
|
|
50
|
+
},
|
|
51
|
+
page: {
|
|
52
|
+
page: '',
|
|
53
|
+
pageSize: '/หน้า',
|
|
54
|
+
goto: 'ไปที่',
|
|
55
|
+
items: '',
|
|
56
|
+
total: 'ทั้งหมด'
|
|
57
|
+
},
|
|
58
|
+
select: {
|
|
59
|
+
placeholder: 'เลือก',
|
|
60
|
+
loading: 'ไม่พบข้อมูลที่ตรงกัน...',
|
|
61
|
+
emptyText: 'ไม่พบข้อมูล'
|
|
62
|
+
},
|
|
63
|
+
table: {
|
|
64
|
+
emptyText: 'ไม่พบข้อมูล'
|
|
65
|
+
},
|
|
66
|
+
upload: {
|
|
67
|
+
successful: 'สำเร็จแล้ว',
|
|
68
|
+
failed: 'ความล้มเหลว',
|
|
69
|
+
errorFileSize: 'ขนาดไฟล์ไม่ถูกต้อง'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Дата початку',
|
|
5
|
+
endDate: 'Дата завершення',
|
|
6
|
+
placeholder: 'Вибрати дату',
|
|
7
|
+
months: ['Січ', 'Лют', 'Бер', 'Кві', 'Тра', 'Чер', 'Лип', 'Сер', 'Вер', 'Жов', 'Лис', 'Гру'],
|
|
8
|
+
weeks: ['Нд', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
|
9
|
+
year: '',
|
|
10
|
+
month: '',
|
|
11
|
+
day: '',
|
|
12
|
+
today: 'Сьогодні',
|
|
13
|
+
now: 'Зараз',
|
|
14
|
+
ok: 'Обрати',
|
|
15
|
+
selectDate: 'Вибрати дату',
|
|
16
|
+
selectTime: 'Вибрати час',
|
|
17
|
+
back:'назад'
|
|
18
|
+
},
|
|
19
|
+
drawer: {
|
|
20
|
+
ok: 'Обрати',
|
|
21
|
+
cancel: 'Відміна'
|
|
22
|
+
},
|
|
23
|
+
empty: {
|
|
24
|
+
description: 'Немає даних',
|
|
25
|
+
},
|
|
26
|
+
pop: {
|
|
27
|
+
ok: 'Обрати',
|
|
28
|
+
cancel: 'Відміна'
|
|
29
|
+
},
|
|
30
|
+
modal: {
|
|
31
|
+
ok: 'Обрати',
|
|
32
|
+
cancel: 'Відміна'
|
|
33
|
+
},
|
|
34
|
+
page: {
|
|
35
|
+
page: '',
|
|
36
|
+
pageSize: 'на сторінці',
|
|
37
|
+
goto: 'Перейти',
|
|
38
|
+
items: '',
|
|
39
|
+
total: 'Всього'
|
|
40
|
+
},
|
|
41
|
+
select: {
|
|
42
|
+
placeholder: 'Обрати',
|
|
43
|
+
loading: 'Завантаження...',
|
|
44
|
+
emptyText: 'Немає даних'
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
emptyText: 'Немає даних'
|
|
48
|
+
},
|
|
49
|
+
upload: {
|
|
50
|
+
successful: 'успіх',
|
|
51
|
+
failed: 'не вдалося',
|
|
52
|
+
errorFileSize: 'незаконний розмір файла'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Ngày bắt đầu',
|
|
5
|
+
endDate: 'cuối ngày',
|
|
6
|
+
placeholder: 'xin hãy chọn ngày',
|
|
7
|
+
months: ['Th.1', 'Th.2', 'Th.3', 'Th.4', 'Th.5', 'Th.6', 'Th.7', 'Th.8', 'Th.9', 'Th.10', 'Th.11', 'Th.12'],
|
|
8
|
+
weeks: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
|
9
|
+
year: '',
|
|
10
|
+
month: '',
|
|
11
|
+
day: '',
|
|
12
|
+
today: 'Hôm nay',
|
|
13
|
+
now: 'Hiện tại',
|
|
14
|
+
ok: 'Ok',
|
|
15
|
+
selectDate: 'Chọn ngày',
|
|
16
|
+
selectTime: 'Chọn giờ',
|
|
17
|
+
back:'Lùi'
|
|
18
|
+
},
|
|
19
|
+
drawer: {
|
|
20
|
+
ok: 'Ok',
|
|
21
|
+
cancel: 'Huỷ'
|
|
22
|
+
},
|
|
23
|
+
empty: {
|
|
24
|
+
description: 'Không có dữ liệu',
|
|
25
|
+
},
|
|
26
|
+
pop: {
|
|
27
|
+
ok: 'Ok',
|
|
28
|
+
cancel: 'Huỷ'
|
|
29
|
+
},
|
|
30
|
+
modal: {
|
|
31
|
+
ok: 'Ok',
|
|
32
|
+
cancel: 'Huỷ'
|
|
33
|
+
},
|
|
34
|
+
page: {
|
|
35
|
+
page: '',
|
|
36
|
+
pageSize: '/trang',
|
|
37
|
+
goto: 'Nhảy tới',
|
|
38
|
+
items: '',
|
|
39
|
+
total: 'Tổng'
|
|
40
|
+
},
|
|
41
|
+
select: {
|
|
42
|
+
placeholder: 'Chọn',
|
|
43
|
+
loading: 'Đang tải...',
|
|
44
|
+
emptyText: 'Không có dữ liệu'
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
emptyText: 'Không có dữ liệu'
|
|
48
|
+
},
|
|
49
|
+
upload: {
|
|
50
|
+
successful: 'thành công',
|
|
51
|
+
failed: 'thất bại',
|
|
52
|
+
errorFileSize: 'Phạm vi bất hợp pháp'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: '开始日期',
|
|
5
|
+
endDate: '结束日期',
|
|
6
|
+
placeholder: '请选择日期',
|
|
7
|
+
months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
8
|
+
weeks: ['一', '二', '三', '四', '五', '六', '日'],
|
|
9
|
+
year: '年',
|
|
10
|
+
month: '月',
|
|
11
|
+
day: '日',
|
|
12
|
+
today: '今天',
|
|
13
|
+
now: '此刻',
|
|
14
|
+
ok: '确定',
|
|
15
|
+
selectDate: '选择日期',
|
|
16
|
+
selectTime: '选择时间',
|
|
17
|
+
back:'返回'
|
|
18
|
+
},
|
|
19
|
+
drawer: {
|
|
20
|
+
ok: '确定',
|
|
21
|
+
cancel: '取消'
|
|
22
|
+
},
|
|
23
|
+
empty: {
|
|
24
|
+
description: '暂无数据',
|
|
25
|
+
},
|
|
26
|
+
pop: {
|
|
27
|
+
ok: '确定',
|
|
28
|
+
cancel: '取消'
|
|
29
|
+
},
|
|
30
|
+
modal: {
|
|
31
|
+
ok: '确定',
|
|
32
|
+
cancel: '取消'
|
|
33
|
+
},
|
|
34
|
+
page: {
|
|
35
|
+
page: '页',
|
|
36
|
+
pageSize: '条/页',
|
|
37
|
+
goto: '跳至',
|
|
38
|
+
items: '条数据',
|
|
39
|
+
total: '共'
|
|
40
|
+
},
|
|
41
|
+
select: {
|
|
42
|
+
placeholder: '请选择',
|
|
43
|
+
loading: '加载中...',
|
|
44
|
+
emptyText: '暂无数据'
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
emptyText: '暂无数据'
|
|
48
|
+
},
|
|
49
|
+
upload: {
|
|
50
|
+
successful: '上传成功',
|
|
51
|
+
failed: '上传失败',
|
|
52
|
+
errorFileSize: '文件尺寸不合法'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: '開始日期',
|
|
5
|
+
endDate: '結束日期',
|
|
6
|
+
placeholder: '請選擇日期',
|
|
7
|
+
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
8
|
+
weeks: ['一', '二', '三', '四', '五', '六', '日'],
|
|
9
|
+
year: '年',
|
|
10
|
+
month: '月',
|
|
11
|
+
day: '日',
|
|
12
|
+
today: '今天',
|
|
13
|
+
now: '此刻',
|
|
14
|
+
ok: '確定',
|
|
15
|
+
selectDate: '選擇日期',
|
|
16
|
+
selectTime: '選擇時間',
|
|
17
|
+
back:'返回'
|
|
18
|
+
},
|
|
19
|
+
drawer: {
|
|
20
|
+
ok: '確定',
|
|
21
|
+
cancel: '取消'
|
|
22
|
+
},
|
|
23
|
+
empty: {
|
|
24
|
+
description: '暫無數據',
|
|
25
|
+
},
|
|
26
|
+
pop: {
|
|
27
|
+
ok: '確定',
|
|
28
|
+
cancel: '取消'
|
|
29
|
+
},
|
|
30
|
+
modal: {
|
|
31
|
+
ok: '確定',
|
|
32
|
+
cancel: '取消'
|
|
33
|
+
},
|
|
34
|
+
page: {
|
|
35
|
+
page: '頁',
|
|
36
|
+
pageSize: '條/頁',
|
|
37
|
+
goto: '跳至',
|
|
38
|
+
items: '條數據',
|
|
39
|
+
total: '共'
|
|
40
|
+
},
|
|
41
|
+
select: {
|
|
42
|
+
placeholder: '請選擇',
|
|
43
|
+
loading: '加載中…',
|
|
44
|
+
emptyText: '暫無數據'
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
emptyText: '暫無數據'
|
|
48
|
+
},
|
|
49
|
+
upload: {
|
|
50
|
+
successful: '上傳成功',
|
|
51
|
+
failed: '上傳失敗',
|
|
52
|
+
errorFileSize: '檔案尺寸不合法'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -21,17 +21,18 @@
|
|
|
21
21
|
}
|
|
22
22
|
.k-message-content {
|
|
23
23
|
box-sizing: content-box;
|
|
24
|
-
line-height: 1
|
|
24
|
+
line-height: 1;
|
|
25
25
|
padding: 10px 16px;
|
|
26
26
|
border-radius: var(--kui-border-radius);
|
|
27
27
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
28
28
|
background: var(--kui-color-control-10);
|
|
29
|
-
display: inline-
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
30
31
|
pointer-events: all;
|
|
31
32
|
align-items: center;
|
|
32
33
|
.k-message-icon {
|
|
33
34
|
margin-right: 8px;
|
|
34
|
-
font-size:
|
|
35
|
+
font-size: 22px;
|
|
35
36
|
vertical-align: sub;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
</Modal>
|
|
23
23
|
|
|
24
|
-
<Modal title="Are you ok ?" v-model="visible3" ok-text="Ok" cancel-text="
|
|
24
|
+
<Modal title="Are you ok ?" v-model="visible3" ok-text="Ok" cancel-text="Cancel" @ok="okHandle">
|
|
25
25
|
<p>Yes , I'm fine !</p>
|
|
26
26
|
</Modal>
|
|
27
27
|
|
|
@@ -2,6 +2,8 @@ import Modal from './modal.jsx'
|
|
|
2
2
|
import Icon from '../icon'
|
|
3
3
|
import Vue from 'vue'
|
|
4
4
|
import Button from '../button'
|
|
5
|
+
import { t } from '../locale'
|
|
6
|
+
const SSR = Vue.prototype.$isServer
|
|
5
7
|
|
|
6
8
|
function isPromise(obj) {
|
|
7
9
|
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
|
|
@@ -11,7 +13,7 @@ let showPoint = {}
|
|
|
11
13
|
let mousedown = e => {
|
|
12
14
|
showPoint = { x: e.clientX, y: e.clientY }
|
|
13
15
|
}
|
|
14
|
-
if (typeof window !== undefined) {
|
|
16
|
+
if (!SSR && typeof window !== undefined) {
|
|
15
17
|
document.addEventListener('mousedown', mousedown)
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -42,10 +44,10 @@ let createInstance = (props = {}) => {
|
|
|
42
44
|
let footerNode = [h(Button, {
|
|
43
45
|
props: { type: 'primary', loading: this.loading },
|
|
44
46
|
on: { click: this.ok }
|
|
45
|
-
}, okText || '
|
|
47
|
+
}, okText || t('k.modal.ok'))]
|
|
46
48
|
|
|
47
49
|
if (type == 'confirm') {
|
|
48
|
-
footerNode.unshift(h(Button, { on: { click: this.cancel } }, cancelText || '
|
|
50
|
+
footerNode.unshift(h(Button, { on: { click: this.cancel } }, cancelText || t('k.modal.cancel')))
|
|
49
51
|
}
|
|
50
52
|
let footer = h('div', { attrs: { class: 'k-toast-footer' } }, footerNode)
|
|
51
53
|
|
|
@@ -88,14 +90,14 @@ let createInstance = (props = {}) => {
|
|
|
88
90
|
setTimeout(() => {
|
|
89
91
|
modalList.splice(modalList.indexOf(instance), 1)
|
|
90
92
|
this.$destroy()
|
|
91
|
-
if (document.body.contains(this.$el))
|
|
93
|
+
if (!SSR && document.body.contains(this.$el))
|
|
92
94
|
document.body.removeChild(this.$el)
|
|
93
95
|
}, 300);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
})
|
|
97
|
-
const component = instance.$mount()
|
|
98
|
-
document.body.appendChild(component.$el)
|
|
99
|
+
const component = instance.$mount();
|
|
100
|
+
!SSR && document.body.appendChild(component.$el);
|
|
99
101
|
let toast = component.$children[0]
|
|
100
102
|
toast.showPoint = showPoint
|
|
101
103
|
toast.tasks = modalList
|
|
@@ -2,7 +2,7 @@ import Icon from '../icon'
|
|
|
2
2
|
import Button from '../button'
|
|
3
3
|
import transfer from "../_tool/transfer";
|
|
4
4
|
import { measureScrollBar, getOffset } from '../_tool/utils'
|
|
5
|
-
|
|
5
|
+
import { t } from '../locale'
|
|
6
6
|
let cacheBodyOverflow = {};
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ export default {
|
|
|
11
11
|
props: {
|
|
12
12
|
value: Boolean,
|
|
13
13
|
title: String,
|
|
14
|
-
okText:
|
|
15
|
-
cancelText:
|
|
14
|
+
okText: String,
|
|
15
|
+
cancelText: String,
|
|
16
16
|
top: Number,
|
|
17
17
|
width: Number,
|
|
18
18
|
mask: { type: Boolean, default: true },
|
|
@@ -66,30 +66,32 @@ export default {
|
|
|
66
66
|
this.resetBodyStyle(visible)
|
|
67
67
|
},
|
|
68
68
|
resetBodyStyle(opened) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cacheBodyOverflow
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
if (!this.$isServer) {
|
|
70
|
+
let target = document.body;
|
|
71
|
+
if (!this.show && !cacheBodyOverflow.hasOwnProperty('overflow')) {
|
|
72
|
+
cacheBodyOverflow = {
|
|
73
|
+
width: target.style.width,
|
|
74
|
+
overflow: target.style.overflow,
|
|
75
|
+
overflowX: target.style.overflowX,
|
|
76
|
+
overflowY: target.style.overflowY,
|
|
77
|
+
}
|
|
76
78
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
if (opened) {
|
|
80
|
+
let barWidth = measureScrollBar(true)
|
|
81
|
+
let hasBar = target.scrollHeight > window.innerHeight || target.offsetHeight > window.innerHeight
|
|
82
|
+
if (barWidth && hasBar) {
|
|
83
|
+
target.style.width = `calc(100% - ${barWidth}px)`
|
|
84
|
+
target.style.overflow = `hidden`
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
let task = (this.tasks && this.tasks.length == 0) || !this.tasks
|
|
89
|
+
task && Object.keys(cacheBodyOverflow).forEach(key => {
|
|
90
|
+
target.style[key] = cacheBodyOverflow[key] || ''
|
|
91
|
+
delete cacheBodyOverflow[key]
|
|
92
|
+
})
|
|
93
|
+
}, 300)
|
|
84
94
|
}
|
|
85
|
-
} else {
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
let task = (this.tasks && this.tasks.length == 0) || !this.tasks
|
|
88
|
-
task && Object.keys(cacheBodyOverflow).forEach(key => {
|
|
89
|
-
target.style[key] = cacheBodyOverflow[key] || ''
|
|
90
|
-
delete cacheBodyOverflow[key]
|
|
91
|
-
})
|
|
92
|
-
}, 300)
|
|
93
95
|
}
|
|
94
96
|
},
|
|
95
97
|
setPos() {
|
|
@@ -150,21 +152,23 @@ export default {
|
|
|
150
152
|
}
|
|
151
153
|
},
|
|
152
154
|
beforeDestroy() {
|
|
153
|
-
document.removeEventListener('mousedown', this.mousedown)
|
|
155
|
+
!this.$isServer && document.removeEventListener('mousedown', this.mousedown);
|
|
154
156
|
this.resetBodyStyle(false)
|
|
155
157
|
},
|
|
156
158
|
|
|
157
159
|
mounted() {
|
|
158
|
-
|
|
160
|
+
if (!this.$isServer) {
|
|
161
|
+
document.addEventListener('mousedown', this.mousedown)
|
|
159
162
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
if (this.draggable) {
|
|
164
|
+
this.left = (document.body.offsetWidth - (this.width || 520)) / 2
|
|
165
|
+
}
|
|
166
|
+
// console.log(this.value)
|
|
167
|
+
if (this.value) {
|
|
168
|
+
this.$nextTick(() => {
|
|
169
|
+
this.updateProp(true)
|
|
170
|
+
})
|
|
171
|
+
}
|
|
168
172
|
}
|
|
169
173
|
},
|
|
170
174
|
render() {
|
|
@@ -175,7 +179,8 @@ export default {
|
|
|
175
179
|
if (this.mask) {
|
|
176
180
|
maskNode = <transition name="k-modal-fade"><div class="k-modal-mask" v-show={show} /></transition>
|
|
177
181
|
}
|
|
178
|
-
|
|
182
|
+
let okText = this.okText || t('k.modal.ok')
|
|
183
|
+
let cancelText = this.cancelText || t('k.modal.cancel')
|
|
179
184
|
//content
|
|
180
185
|
let contentNode = $slots.content
|
|
181
186
|
if (!contentNode) {
|
|
@@ -188,7 +193,7 @@ export default {
|
|
|
188
193
|
if (this.footer !== null) {
|
|
189
194
|
let footer = $slots.footer
|
|
190
195
|
if (!footer) {
|
|
191
|
-
footer = [<Button onClick={this.cancel}>{
|
|
196
|
+
footer = [<Button onClick={this.cancel}>{cancelText}</Button>, <Button onClick={this.ok} type="primary" loading={this.loading}>{okText}</Button>]
|
|
192
197
|
}
|
|
193
198
|
const footerNode = footer ? <div class="k-modal-footer">{footer}</div> : null;
|
|
194
199
|
|
package/components/page/page.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Select, Option } from '../select'
|
|
2
2
|
import { Input } from '../input'
|
|
3
3
|
import Icon from '../icon'
|
|
4
|
+
import { t } from '../locale';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
name: "Page",
|
|
@@ -130,7 +131,7 @@ export default {
|
|
|
130
131
|
value: this.defaultPageSize,
|
|
131
132
|
size: this.size,
|
|
132
133
|
options: this.sizeData.map(s => {
|
|
133
|
-
return { value: s, label: `${s}
|
|
134
|
+
return { value: s, label: `${s}${t('k.page.pageSize')}` }
|
|
134
135
|
})
|
|
135
136
|
},
|
|
136
137
|
on: {
|
|
@@ -164,7 +165,7 @@ export default {
|
|
|
164
165
|
return (
|
|
165
166
|
this.showElevator ?
|
|
166
167
|
<div class="k-page-options">
|
|
167
|
-
<span
|
|
168
|
+
<span>{t('k.page.goto')}</span><Input {...prop} /><span>{t('k.page.page')}</span>
|
|
168
169
|
</div> : null
|
|
169
170
|
)
|
|
170
171
|
}
|
|
@@ -173,7 +174,7 @@ export default {
|
|
|
173
174
|
const classes = ["k-page", { ["k-page-sm"]: this.size == 'small' }],
|
|
174
175
|
preNode = <li class={['k-pager-item', { 'k-pager-item-disabled': this.page == 1 }]} onClick={this.prePage}><Icon type="chevron-back" /></li>,
|
|
175
176
|
nextNode = <li class={['k-pager-item', { 'k-pager-item-disabled': this.page == this.pageCount }]} onClick={this.nextPage}><Icon type="chevron-forward" /></li>,
|
|
176
|
-
totalNode = (this.showTotal ? <div class="k-page-number"><span
|
|
177
|
+
totalNode = (this.showTotal ? <div class="k-page-number"><span>{t('k.page.total')} {this.total} {t('k.page.items')}</span></div> : null),
|
|
177
178
|
pagerNode = this.renderPage(),
|
|
178
179
|
sizeNode = this.renderSize(),
|
|
179
180
|
elvatorNode = this.renderElvator(),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@import '../../styles/var.less';
|
|
2
2
|
.k-page {
|
|
3
3
|
color: var(--kui-color-font);
|
|
4
|
-
font-size:
|
|
4
|
+
font-size: 14px;
|
|
5
5
|
padding: 20px 0;
|
|
6
6
|
user-select: none;
|
|
7
7
|
.k-pager {
|
|
8
8
|
margin: 0 auto;
|
|
9
|
-
display:
|
|
10
|
-
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
11
|
.k-pager-item {
|
|
12
12
|
background: transparent;
|
|
13
13
|
color: var(--kui-color-font);
|
|
@@ -74,22 +74,22 @@
|
|
|
74
74
|
}
|
|
75
75
|
.k-page-sizer {
|
|
76
76
|
display: inline-block;
|
|
77
|
-
width: 90px;
|
|
77
|
+
// width: 90px;
|
|
78
78
|
}
|
|
79
79
|
.k-page-number {
|
|
80
80
|
margin: 0 4px;
|
|
81
81
|
display: inline-block;
|
|
82
|
-
font-size:
|
|
82
|
+
font-size: 14px;
|
|
83
83
|
}
|
|
84
84
|
.k-page-options {
|
|
85
85
|
display: inline-block;
|
|
86
|
-
font-size:
|
|
86
|
+
font-size: 14px;
|
|
87
87
|
span {
|
|
88
88
|
padding: 0 5px;
|
|
89
89
|
}
|
|
90
90
|
.k-page-options-elevator {
|
|
91
91
|
width: 50px;
|
|
92
|
-
font-size:
|
|
92
|
+
font-size: 14px;
|
|
93
93
|
text-align: center;
|
|
94
94
|
vertical-align: middle;
|
|
95
95
|
}
|
|
@@ -101,15 +101,15 @@
|
|
|
101
101
|
|
|
102
102
|
.k-page-sm {
|
|
103
103
|
.k-pager .k-pager-item {
|
|
104
|
-
height:
|
|
105
|
-
font-size:
|
|
106
|
-
line-height:
|
|
107
|
-
min-width:
|
|
104
|
+
height: 22px;
|
|
105
|
+
font-size: 14px;
|
|
106
|
+
line-height: 22px;
|
|
107
|
+
min-width: 22px;
|
|
108
108
|
}
|
|
109
109
|
.k-page-sizer {
|
|
110
|
-
width:
|
|
110
|
+
width: 86px;
|
|
111
111
|
}
|
|
112
112
|
.k-page-number {
|
|
113
|
-
font-size:
|
|
113
|
+
font-size: 14px;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -6,8 +6,8 @@ export default {
|
|
|
6
6
|
transfer: { type: Boolean, default: true },
|
|
7
7
|
title: String,
|
|
8
8
|
width: [Number, String],
|
|
9
|
-
okText:
|
|
10
|
-
cancelText:
|
|
9
|
+
okText: String,
|
|
10
|
+
cancelText: String,
|
|
11
11
|
placement: {
|
|
12
12
|
validator(value) {
|
|
13
13
|
return (
|