kui-vue 3.2.5 → 3.2.6-rc
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/utils.js +9 -3
- package/components/affix/affix.jsx +20 -7
- package/components/avatar/styles/index.less +1 -1
- package/components/base/pop.jsx +7 -4
- 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 +14 -12
- package/components/datePicker/datepicker.jsx +6 -3
- package/components/datePicker/styles/datepicker.less +2 -2
- package/components/drawer/demo/custom.md +1 -1
- package/components/drawer/demo/form.md +1 -1
- package/components/drawer/drawer.jsx +5 -4
- 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 +2 -2
- package/components/icon/index.md +1 -1
- package/components/index.js +10 -2
- 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 +54 -0
- package/components/locale/lang/el.js +71 -0
- package/components/locale/lang/en.js +54 -0
- package/components/locale/lang/fr.js +71 -0
- package/components/locale/lang/it.js +71 -0
- package/components/locale/lang/ja.js +71 -0
- package/components/locale/lang/ko.js +71 -0
- package/components/locale/lang/ru.js +54 -0
- package/components/locale/lang/th.js +71 -0
- package/components/locale/lang/ua.js +54 -0
- package/components/locale/lang/vi.js +54 -0
- package/components/locale/lang/zh-CN.js +54 -0
- package/components/locale/lang/zh-TW.js +54 -0
- package/components/modal/demo/custom.md +1 -1
- package/components/modal/index.js +3 -3
- package/components/modal/modal.jsx +6 -5
- 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/styles/color.less +2 -2
- package/components/table/index.md +4 -3
- package/components/table/table.jsx +2 -1
- package/components/tabs/tabs.jsx +1 -1
- 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/upload/upload.jsx +4 -3
- 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
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: 'OK',
|
|
20
|
+
cancel: 'Отмена'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: 'Нет данных',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: 'OK',
|
|
27
|
+
cancel: 'Отмена'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: 'OK',
|
|
31
|
+
cancel: 'Отмена'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '',
|
|
35
|
+
pageSize: ' на странице',
|
|
36
|
+
goto: 'Перейти',
|
|
37
|
+
items: '',
|
|
38
|
+
total: 'Всего'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: 'Выбрать',
|
|
42
|
+
loading: 'Загрузка...',
|
|
43
|
+
emptyText: 'Нет данных'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: 'Нет данных'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: 'успешно',
|
|
50
|
+
failed: 'неудача',
|
|
51
|
+
errorFileSize: ' Неверный размер файла'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
},
|
|
35
|
+
drawer: {
|
|
36
|
+
ok: 'ตกลง',
|
|
37
|
+
cancel: 'ยกเลิก'
|
|
38
|
+
},
|
|
39
|
+
empty: {
|
|
40
|
+
description: 'ไม่พบข้อมูล',
|
|
41
|
+
},
|
|
42
|
+
pop: {
|
|
43
|
+
ok: 'ตกลง',
|
|
44
|
+
cancel: 'ยกเลิก'
|
|
45
|
+
},
|
|
46
|
+
modal: {
|
|
47
|
+
ok: 'ตกลง',
|
|
48
|
+
cancel: 'ยกเลิก'
|
|
49
|
+
},
|
|
50
|
+
page: {
|
|
51
|
+
page: '',
|
|
52
|
+
pageSize: '/หน้า',
|
|
53
|
+
goto: 'ไปที่',
|
|
54
|
+
items: '',
|
|
55
|
+
total: 'ทั้งหมด'
|
|
56
|
+
},
|
|
57
|
+
select: {
|
|
58
|
+
placeholder: 'เลือก',
|
|
59
|
+
loading: 'ไม่พบข้อมูลที่ตรงกัน...',
|
|
60
|
+
emptyText: 'ไม่พบข้อมูล'
|
|
61
|
+
},
|
|
62
|
+
table: {
|
|
63
|
+
emptyText: 'ไม่พบข้อมูล'
|
|
64
|
+
},
|
|
65
|
+
upload: {
|
|
66
|
+
successful: 'สำเร็จแล้ว',
|
|
67
|
+
failed: 'ความล้มเหลว',
|
|
68
|
+
errorFileSize: 'ขนาดไฟล์ไม่ถูกต้อง'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: 'Обрати',
|
|
20
|
+
cancel: 'Відміна'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: 'Немає даних',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: 'Обрати',
|
|
27
|
+
cancel: 'Відміна'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: 'Обрати',
|
|
31
|
+
cancel: 'Відміна'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '',
|
|
35
|
+
pageSize: 'на сторінці',
|
|
36
|
+
goto: 'Перейти',
|
|
37
|
+
items: '',
|
|
38
|
+
total: 'Всього'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: 'Обрати',
|
|
42
|
+
loading: 'Завантаження...',
|
|
43
|
+
emptyText: 'Немає даних'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: 'Немає даних'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: 'успіх',
|
|
50
|
+
failed: 'не вдалося',
|
|
51
|
+
errorFileSize: 'незаконний розмір файла'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: 'Ok',
|
|
20
|
+
cancel: 'Huỷ'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: 'Không có dữ liệu',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: 'Ok',
|
|
27
|
+
cancel: 'Huỷ'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: 'Ok',
|
|
31
|
+
cancel: 'Huỷ'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '',
|
|
35
|
+
pageSize: '/trang',
|
|
36
|
+
goto: 'Nhảy tới',
|
|
37
|
+
items: '',
|
|
38
|
+
total: 'Tổng'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: 'Chọn',
|
|
42
|
+
loading: 'Đang tải...',
|
|
43
|
+
emptyText: 'Không có dữ liệu'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: 'Không có dữ liệu'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: 'thành công',
|
|
50
|
+
failed: 'thất bại',
|
|
51
|
+
errorFileSize: 'Phạm vi bất hợp pháp'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: '确定',
|
|
20
|
+
cancel: '取消'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: '暂无数据',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: '确定',
|
|
27
|
+
cancel: '取消'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: '确定',
|
|
31
|
+
cancel: '取消'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '页',
|
|
35
|
+
pageSize: '条/页',
|
|
36
|
+
goto: '跳至',
|
|
37
|
+
items: '条数据',
|
|
38
|
+
total: '共'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: '请选择',
|
|
42
|
+
loading: '加载中...',
|
|
43
|
+
emptyText: '暂无数据'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: '暂无数据'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: '上传成功',
|
|
50
|
+
failed: '上传失败',
|
|
51
|
+
errorFileSize: '文件尺寸不合法'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: '確定',
|
|
20
|
+
cancel: '取消'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: '暫無數據',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: '確定',
|
|
27
|
+
cancel: '取消'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: '確定',
|
|
31
|
+
cancel: '取消'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '頁',
|
|
35
|
+
pageSize: '條/頁',
|
|
36
|
+
goto: '跳至',
|
|
37
|
+
items: '條數據',
|
|
38
|
+
total: '共'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: '請選擇',
|
|
42
|
+
loading: '加載中…',
|
|
43
|
+
emptyText: '暫無數據'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: '暫無數據'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: '上傳成功',
|
|
50
|
+
failed: '上傳失敗',
|
|
51
|
+
errorFileSize: '檔案尺寸不合法'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -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,7 +2,7 @@ import Modal from './modal.jsx'
|
|
|
2
2
|
import Icon from '../icon'
|
|
3
3
|
import Vue from 'vue'
|
|
4
4
|
import Button from '../button'
|
|
5
|
-
|
|
5
|
+
import { t } from '../locale'
|
|
6
6
|
function isPromise(obj) {
|
|
7
7
|
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
|
|
8
8
|
}
|
|
@@ -42,10 +42,10 @@ let createInstance = (props = {}) => {
|
|
|
42
42
|
let footerNode = [h(Button, {
|
|
43
43
|
props: { type: 'primary', loading: this.loading },
|
|
44
44
|
on: { click: this.ok }
|
|
45
|
-
}, okText || '
|
|
45
|
+
}, okText || t('k.modal.ok'))]
|
|
46
46
|
|
|
47
47
|
if (type == 'confirm') {
|
|
48
|
-
footerNode.unshift(h(Button, { on: { click: this.cancel } }, cancelText || '
|
|
48
|
+
footerNode.unshift(h(Button, { on: { click: this.cancel } }, cancelText || t('k.modal.ok')))
|
|
49
49
|
}
|
|
50
50
|
let footer = h('div', { attrs: { class: 'k-toast-footer' } }, footerNode)
|
|
51
51
|
|
|
@@ -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 },
|
|
@@ -175,7 +175,8 @@ export default {
|
|
|
175
175
|
if (this.mask) {
|
|
176
176
|
maskNode = <transition name="k-modal-fade"><div class="k-modal-mask" v-show={show} /></transition>
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
let okText = this.okText || t('k.modal.ok')
|
|
179
|
+
let cancelText = this.cancelText || t('k.modal.cancel')
|
|
179
180
|
//content
|
|
180
181
|
let contentNode = $slots.content
|
|
181
182
|
if (!contentNode) {
|
|
@@ -188,7 +189,7 @@ export default {
|
|
|
188
189
|
if (this.footer !== null) {
|
|
189
190
|
let footer = $slots.footer
|
|
190
191
|
if (!footer) {
|
|
191
|
-
footer = [<Button onClick={this.cancel}>{
|
|
192
|
+
footer = [<Button onClick={this.cancel}>{cancelText}</Button>, <Button onClick={this.ok} type="primary" loading={this.loading}>{okText}</Button>]
|
|
192
193
|
}
|
|
193
194
|
const footerNode = footer ? <div class="k-modal-footer">{footer}</div> : null;
|
|
194
195
|
|
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 (
|
|
@@ -6,32 +6,25 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div class="demo-select">
|
|
9
|
-
<
|
|
9
|
+
<span>单选过滤 :</span>
|
|
10
10
|
<Select
|
|
11
11
|
size="large"
|
|
12
|
-
:width="
|
|
12
|
+
:width="300"
|
|
13
13
|
v-model="data"
|
|
14
14
|
placeholder="单选过滤" filterable>
|
|
15
15
|
<Option :value="v" :label="v" v-for="(v,i) in options" :key="i"/>
|
|
16
16
|
</Select>
|
|
17
|
-
<p
|
|
17
|
+
<p></p>
|
|
18
|
+
<br/>
|
|
19
|
+
<span>多选过滤 :</span>
|
|
18
20
|
<Select
|
|
19
21
|
class="demo-select"
|
|
20
22
|
multiple
|
|
21
|
-
:width="
|
|
23
|
+
:width="300"
|
|
22
24
|
v-model="data2"
|
|
23
25
|
placeholder="多选过滤" filterable >
|
|
24
26
|
<Option :value="v" :label="v" v-for="(v,i) in options" :key="i"/>
|
|
25
27
|
</Select>
|
|
26
|
-
<p>Selected value:{{data3}}</p>
|
|
27
|
-
<Select
|
|
28
|
-
class="demo-select"
|
|
29
|
-
:width="512"
|
|
30
|
-
multiple
|
|
31
|
-
v-model="data3"
|
|
32
|
-
placeholder="远程搜索" filterable size="small">
|
|
33
|
-
<Option :value="v" :label="v" v-for="(v,i) in options" :key="i"/>
|
|
34
|
-
</Select>
|
|
35
28
|
</div>
|
|
36
29
|
</template>
|
|
37
30
|
<script>
|
|
@@ -41,7 +34,6 @@ export default{
|
|
|
41
34
|
options:['almond','apple','apple core','apple juice','apple skin','apricot','apricot flesh','apricot pit','areca nut','banana','banana skin','bargain price','beechnut','Beijing flowering crab','bitter','bitterness','bitter orange','blackberry','canned fruit','carambola','cherry','cherry pit','cherry pulp','chestnut','Chinese chestnut','Chinese date','Chinese gooseberry','Chinese walnut','coconut','coconut milk','coconut water','cold storage','cold store','crisp','cumquat','damson plum','Dangshan pear','date','date pit','decayed fruit','downy pitch','dry fruit','duke','early-maturing','fig','filbert','first class','flat peach','flavour','flesh','flesh fruit','fresh','fresh litchi','fruiterer','fruit in bags','fruit knife','fruits of the season','gingko','give full weigh','give short weight','grape','grape juice','grape skin','grapestone','greengage','Hami melon','Hard','haw','hawthorn','hazel','honey peach','in season','juicy','juicy peach','jujube','kernel','kumquat','late-maturing','lemon','litchi','litchi rind','longan','longan pulp','loquat','mandarine','mango','mature','morello','muskmelon','navel orange','nut','nut meat','nut shell','oleaster','olive','orange','orange peel','papaya','peach','pear','perishable','pineapple','plum','plumcot','pomegranate','pomelo','red bayberry','reduced price','ripe','rotten fruit','seasonable','seedless orange','special-grade','strawberry','sultana','superfine','tangerine','tart','tender','tinned fruit','unripe','walnut','walnut kernel','water chestnut','watermelon'],
|
|
42
35
|
data:'',
|
|
43
36
|
data2:[],
|
|
44
|
-
data3:[],
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
}
|
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div class="demo-select">
|
|
9
|
-
<
|
|
9
|
+
<span>单选搜索: </span>
|
|
10
10
|
<Select
|
|
11
11
|
v-model="s1"
|
|
12
|
-
:width="
|
|
12
|
+
:width="300"
|
|
13
13
|
@search="search1"
|
|
14
14
|
:loading="loading1"
|
|
15
15
|
placeholder="单选搜索">
|
|
16
16
|
<Option :value="v" :label="v" v-for="(v,i) in options1" :key="i"/>
|
|
17
17
|
</Select>
|
|
18
|
-
<p
|
|
18
|
+
<p></p>
|
|
19
|
+
<br/>
|
|
20
|
+
<span>多选搜索</span>
|
|
19
21
|
<Select
|
|
20
22
|
class="demo-select"
|
|
21
23
|
multiple
|
|
22
|
-
:width="
|
|
24
|
+
:width="300"
|
|
23
25
|
:loading="loading2"
|
|
24
26
|
@search="search2"
|
|
25
27
|
v-model="s2"
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
### Select API
|
|
2
|
-
| 属性 | 说明 | 类型 | 默认值
|
|
3
|
-
| ----------- | ---------------------------------------------------------- | ------------------------------ |
|
|
4
|
-
| value | 指定选中项目的 `value` 值,可以使用 `v-model` 双向绑定数据 | String,Number | -
|
|
5
|
-
| width | 组件宽度 | String,Number | -
|
|
6
|
-
| placeholder | 选择框默认文字 | String | 请选择
|
|
7
|
-
| disabled | 是否禁用当前项 | Boolean | false
|
|
8
|
-
| size | 组件尺寸大小,提供`small`,`large`两种尺寸,默认为正常 | String | -
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
2
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
|
+
| ----------- | ---------------------------------------------------------- | ------------------------------ | ---------- |
|
|
4
|
+
| value | 指定选中项目的 `value` 值,可以使用 `v-model` 双向绑定数据 | String,Number | - |
|
|
5
|
+
| width | 组件宽度 | String,Number | - |
|
|
6
|
+
| placeholder | 选择框默认文字 | String | 请选择 |
|
|
7
|
+
| disabled | 是否禁用当前项 | Boolean | false |
|
|
8
|
+
| size | 组件尺寸大小,提供`small`,`large`两种尺寸,默认为正常 | String | - |
|
|
9
|
+
| emptyText | 没有数据时展示的提示 | String | '赞无数据' |
|
|
10
|
+
| multiple | 是否呈现多选模式 | Boolean | false |
|
|
11
|
+
| loading | 是否显示异步加载 | Boolean | false |
|
|
12
|
+
| clearable | 是否可以清空选项 | Boolean | false |
|
|
13
|
+
| bordered | 是否显示边框 | Boolean | true |
|
|
14
|
+
| showArrow | 是否显示下拉按钮 | Boolean | true |
|
|
15
|
+
| transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
|
|
16
|
+
| change | 在选项状态发生改变时触发,返回选择项{value:xx,label:xx} | Function | - |
|
|
17
|
+
| open-change | 下拉框展开或收起时触发 | Function | - |
|
|
18
|
+
| options | options 数据,如果设置则不需要手动构造 Option 节点 | Array <{value,label,disabled}> | [] |
|
|
19
|
+
| theme | theme='light' 时呈现浅色主题 | String | - |
|
|
20
|
+
| icon | 自定义图标 | String | - |
|
|
21
|
+
| shape | shape='circle' 时呈现圆角 | String | - |
|
|
21
22
|
|
|
22
23
|
### Option API
|
|
23
24
|
| 属性 | 说明 | 类型 | 默认值 |
|