This commit is contained in:
rhyme 2021-10-26 18:25:14 +08:00
commit b841753316
119 changed files with 19900 additions and 2059 deletions

View file

@ -1,4 +1,5 @@
<!-- 目前请提交 PR 到 2.0 分支 | Please send PR to 2.0 branch --> <!-- 请提交 PR 到 master 分支 | Please send PR to master branch -->
<!-- 如果试图解决一个问题,请附上能够最小化复现问题的 run.iviewui.com 链接 -->
<!-- 请不要提交 dist 的内容 | Please do not commit dist file --> <!-- 请不要提交 dist 的内容 | Please do not commit dist file -->
<!-- 请先运行 npm install 和 npm test通过测试后再提交您的 pr --> <!-- 请先运行 npm install 和 npm test通过测试后再提交您的 pr -->
<!-- Please run `npm install` and `npm test` to test your changes before submitting a pull request --> <!-- Please run `npm install` and `npm test` to test your changes before submitting a pull request -->

View file

@ -1,60 +0,0 @@
### Button
可以考虑是否支持 @click,而不用 @click.native
### Input
使用 v-model增加 on-input-change // todo 考虑更名
### RadioGroup
使用 v-model
### Radio
value 改为了 label使用 v-model废弃 checked
### Checkbox
使用 v-model
### CheckboxGroup
value 改为了 label使用 v-model废弃 checked
### Switch
废弃checked 改为了 value使用 v-model
### Badge
class 改为了 className
### InputNumber
使用 v-model
### Progress (名称有警告)
新增 on-status-change 事件
### Upload
父级不能 computed Upload 的 fileList 了
### Collapse
废弃 activeKey使用 v-modelkey 是保留的,更名为 name
### Carousel
废弃 activeIndex使用 v-modelv-for="n in slides.length",Vue2的数字循环是从1开始的
### Tree
废弃 data改为 value使用 v-modelkey 更名为 name不能再 template 的prop 上使用 this
### Circle
改名为 iCircle
### Tabs
废弃 activeKey改用 value使用 v-modelkey 更名为 name
### popper.js 将 prop: visible 移至 data 里
### Slider
支持 v-model
### Dropdown
DropdownItem key 改为 name, Dropdown 的 visible 要使用 @on-visible-change 捕获,不再 sync
DropdownItem 里this.$parent.$parent 与1.0 有区别
### Menu
MenuItem 和 Submenu 的 key 改为了 name
Menu 的 activeKey 改为 activeName,openKeys 改为 openNames
### Cascader
Caspanel 的 sublist 从 prop -> data
### Select
model 改为 value支持 v-model
### Page
class 改为 className
### DatePicker
使用 v-model
### LoadingBar
部分 prop 移至 data
### Modal
visible 改为 value使用 v-modelstyle 改为 styles$Modal 的关闭有改动,建议后面在纯 html 模式下测试
### Table
i-table 改为 Table
### Message
notice.vue 的 key 改为了 namestyle 改为 styles
notification.vue 的 key 改为了 namestyle 改为 styles
## Popper
移除了 visible使用 value 受控可能涉及到的组件Poptip、Tooltip

View file

@ -31,9 +31,9 @@ ViewUI
## Features ## Features
- Dozens of useful and beautiful components. - Dozens of useful and beautiful components.
- Friendly API. It's made for people with any skill level. - Friendly API. It's made for people with any skills level.
- Extensive documentation and demos. - Extensive documentations and demos.
- It is quite beautiful. - It is quite awesome.
- Supports both Vue.js 2 and Vue.js 1. - Supports both Vue.js 2 and Vue.js 1.
## Who's using ViewUI ## Who's using ViewUI
@ -42,9 +42,9 @@ ViewUI
## Install ## Install
We provide an [View UI plugin](https://github.com/iview-design/vue-cli-plugin-viewui) for Vue CLI 3, which you can use to quickly build an ViewUI-based project. We provide an [View UI plugin](https://github.com/view-design/vue-cli-plugin-viewui) for Vue CLI 3, which you can use to quickly build an ViewUI-based project.
We also provide a starter kit [view-ui-project](https://github.com/iview-design/view-ui-project) for you. We also provide a starter kit [view-ui-project](https://github.com/view-design/view-ui-project) for you.
### Install View UI ### Install View UI
@ -97,7 +97,7 @@ import 'view-design/dist/styles/iview.css';
## Community ## Community
If you want to contribute or have questions or bugs to report: If you want to contribute us or in case you are haiving any doubt.
**Questions:** Find other users at the [Gitter chat](https://gitter.im/iview/iview) or post on [StackOverflow using `[iview-ui]` tag](https://stackoverflow.com/questions/tagged/iview-ui) **Questions:** Find other users at the [Gitter chat](https://gitter.im/iview/iview) or post on [StackOverflow using `[iview-ui]` tag](https://stackoverflow.com/questions/tagged/iview-ui)
**Bugs:** [File a issue here](https://github.com/iview-design/iview/issues) - please provide a example so we can help you better **Bugs:** [File a issue here](https://github.com/iview-design/iview/issues) - please provide a example so we can help you better
@ -108,7 +108,7 @@ If you want to contribute or have questions or bugs to report:
|---|---|---|---|---|---| |---|---|---|---|---|---|
|[Aresn](https://github.com/icarusion) | ![](https://avatars3.githubusercontent.com/u/5370542?v=3&s=60) |[jingsam](https://github.com/jingsam) | ![](https://avatars3.githubusercontent.com/u/1522494?v=3&s=60) | [rijn](https://github.com/rijn) | ![](https://avatars2.githubusercontent.com/u/6976367?v=3&s=60) | |[Aresn](https://github.com/icarusion) | ![](https://avatars3.githubusercontent.com/u/5370542?v=3&s=60) |[jingsam](https://github.com/jingsam) | ![](https://avatars3.githubusercontent.com/u/1522494?v=3&s=60) | [rijn](https://github.com/rijn) | ![](https://avatars2.githubusercontent.com/u/6976367?v=3&s=60) |
|[lcx960324](https://github.com/lcx960324) | ![](https://avatars3.githubusercontent.com/u/9768245?v=3&s=60) |[GITleonine1989](https://github.com/GITleonine1989) | ![](https://avatars1.githubusercontent.com/u/7582490?v=3&s=60) |[huixisheng](https://github.com/huixisheng) | ![](https://avatars1.githubusercontent.com/u/1518967?v=3&s=60) | |[lcx960324](https://github.com/lcx960324) | ![](https://avatars3.githubusercontent.com/u/9768245?v=3&s=60) |[GITleonine1989](https://github.com/GITleonine1989) | ![](https://avatars1.githubusercontent.com/u/7582490?v=3&s=60) |[huixisheng](https://github.com/huixisheng) | ![](https://avatars1.githubusercontent.com/u/1518967?v=3&s=60) |
|[Sergio Crisostomo](https://github.com/SergioCrisostomo) | ![](https://avatars3.githubusercontent.com/u/5614559?v=3&s=60) | [lison16](https://github.com/lison16) | ![](https://avatars3.githubusercontent.com/u/20942571?v=3&s=60) | [Xotic750](https://github.com/Xotic750) | ![](https://avatars3.githubusercontent.com/u/216041?v=3&s=60) | |[Sergio Crisostomo](https://github.com/SergioCrisostomo) | ![](https://avatars3.githubusercontent.com/u/5614559?v=3&s=60) | [lison16](https://github.com/lison16) | ![](https://avatars3.githubusercontent.com/u/20942571?v=3&s=60) | [Xotic750](https://github.com/Xotic750) | ![](https://avatars3.githubusercontent.com/u/216041?v=3&s=60) |
[huanghong1125](https://github.com/huanghong1125) | ![](https://avatars3.githubusercontent.com/u/12794817?v=3&s=60) | [yangdan8](https://github.com/yangdan8) | ![](https://avatars2.githubusercontent.com/u/16515026?v=3&s=60) | [huanghong1125](https://github.com/huanghong1125) | ![](https://avatars3.githubusercontent.com/u/12794817?v=3&s=60) | [yangdan8](https://github.com/yangdan8) | ![](https://avatars2.githubusercontent.com/u/16515026?v=3&s=60) |

3270
dist/iview.js vendored

File diff suppressed because one or more lines are too long

2
dist/iview.js.map vendored

File diff suppressed because one or more lines are too long

6
dist/iview.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/iview.min.js.gz vendored

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/locale/si_LK.js vendored Normal file
View file

@ -0,0 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=27)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},27:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"si-LK",select:{placeholder:"තෝරන්න",noMatch:"ගැළපෙන දත්ත නැත",loading:"පූරණය වෙමින්"},table:{noDataText:"දත්ත නැත",noFilteredDataText:"පෙරහන් දත්ත නොමැත",confirmFilter:"තහවුරු කරන්න",resetFilter:"යළි පිහිටුවන්න",clearFilter:"සියල්ල",sumText:"එකතුව"},datepicker:{selectDate:"දිනය තෝරන්න",selectTime:"වේලාව තෝරන්න",startTime:"ආරම්භක වේලාව",endTime:"අවසන් වේලාව",clear:"හිස් කරන්න",ok:"හරි",datePanelLabel:"[yyyy] [mmmm]",month:"මාසය",month1:"දුරුතු",month2:"නවම්",month3:"මැදින්",month4:"බක්",month5:"වෙසක්",month6:"පොසොන්",month7:"ඇසළ",month8:"නිකිණි",month9:"බිනර",month10:"වප්",month11:"ඉල්",month12:"උඳුවප්",year:"වර්ෂය",weekStartDay:"0",weeks:{sun:"ඉරිදා",mon:"සඳුදා",tue:"අඟහ",wed:"බදාදා",thu:"බ්‍රහස්",fri:"සිකු",sat:"සෙන"},months:{m1:"දුරුතු",m2:"නවම්",m3:"මැදින්",m4:"බක්",m5:"වෙසක්",m6:"පෙසොන්",m7:"ඇසළ",m8:"නිකිණි",m9:"බිනර",m10:"වප්",m11:"ඉල්",m12:"උඳුව"}},transfer:{titles:{source:"ප්‍රභවය",target:"ඉලක්කය"},filterPlaceholder:"මෙතැන සොයන්න",notFoundText:"සොයා ගත නොහැක"},modal:{okText:"හරි",cancelText:"අවලංගු කරන්න"},poptip:{okText:"හරි",cancelText:"අවලංගු කරන්න"},page:{prev:"පෙර පිටුව",next:"ඊළඟ පිටුව",total:"මුළු එකතුව",item:"අථකය",items:"අථක",prev5:"පෙර පිටු 5",next5:"ඊළඟ පිටු 5",page:"/පිටුව",goto:"ට යන්න",p:""},rate:{star:"තරුව",stars:"තරු"},time:{before:" පෙර",after:" පසු",just:"මේ දැන්",seconds:" තත්පර",minutes:" විනාඩි",hours:" පැය",days:" දින"},tree:{emptyText:"දත්ත නැත"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=si_LK.js.map

1
dist/locale/si_LK.js.map vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/locale/",r(r.s=27)}({0:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1)).default.prototype.$isServer},1:function(t,r){t.exports=e},27:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"sv-SE",select:{placeholder:"Välj",noMatch:"Ingen träff",loading:"Laddar"},table:{noDataText:"Ingen data",noFilteredDataText:"Ingen filter data",confirmFilter:"Bekräfta",resetFilter:"Återställ filter",clearFilter:"Rensa filter",sumText:"Sum"},datepicker:{selectDate:"Välj datum",selectTime:"Välj tidpunkt",startTime:"Start tid",endTime:"Slut tid",clear:"Rensa",ok:"Ok",datePanelLabel:"[mmmm] [yyyy]",month:"Månad",month1:"Januari",month2:"Februari",month3:"Mars",month4:"April",month5:"Maj",month6:"Juni",month7:"Juli",month8:"Augusti",month9:"September",month10:"Oktober",month11:"November",month12:"December",year:"År",weekStartDay:"1",weeks:{sun:"Sön",mon:"Mån",tue:"Tis",wed:"Ons",thu:"Tor",fri:"Fre",sat:"Lör"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"Maj",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Okt",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Källa",target:"Mål"},filterPlaceholder:"Sök här",notFoundText:"Hittade inte"},modal:{okText:"Ok",cancelText:"Avbryt"},poptip:{okText:"Ok",cancelText:"Avbryt"},page:{prev:"Föregående sida",next:"Nästa sida",total:"Totalt",item:"objekt",items:"objekt",prev5:"Föregående 5 sidor",next5:"Nästa 5 sidor",page:"/page",goto:"Gå till",p:""},rate:{star:"Stjärna",stars:"Stjärnor"},tree:{emptyText:"Ingen data"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(r(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/locale/",r(r.s=28)}({0:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1)).default.prototype.$isServer},1:function(t,r){t.exports=e},28:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"sv-SE",select:{placeholder:"Välj",noMatch:"Ingen träff",loading:"Laddar"},table:{noDataText:"Ingen data",noFilteredDataText:"Ingen filter data",confirmFilter:"Bekräfta",resetFilter:"Återställ filter",clearFilter:"Rensa filter",sumText:"Sum"},datepicker:{selectDate:"Välj datum",selectTime:"Välj tidpunkt",startTime:"Start tid",endTime:"Slut tid",clear:"Rensa",ok:"Ok",datePanelLabel:"[mmmm] [yyyy]",month:"Månad",month1:"Januari",month2:"Februari",month3:"Mars",month4:"April",month5:"Maj",month6:"Juni",month7:"Juli",month8:"Augusti",month9:"September",month10:"Oktober",month11:"November",month12:"December",year:"År",weekStartDay:"1",weeks:{sun:"Sön",mon:"Mån",tue:"Tis",wed:"Ons",thu:"Tor",fri:"Fre",sat:"Lör"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"Maj",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Okt",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Källa",target:"Mål"},filterPlaceholder:"Sök här",notFoundText:"Hittade inte"},modal:{okText:"Ok",cancelText:"Avbryt"},poptip:{okText:"Ok",cancelText:"Avbryt"},page:{prev:"Föregående sida",next:"Nästa sida",total:"Totalt",item:"objekt",items:"objekt",prev5:"Föregående 5 sidor",next5:"Nästa 5 sidor",page:"/page",goto:"Gå till",p:""},rate:{star:"Stjärna",stars:"Stjärnor"},tree:{emptyText:"Ingen data"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(r(0)).default)(n),t.default=n}})});
//# sourceMappingURL=sv-SE.js.map //# sourceMappingURL=sv-SE.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=28)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},28:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"th-TH",select:{placeholder:"ตัวเลือก",noMatch:"ข้อมูลไม่ตรงกัน",loading:"ดาวน์โหลด"},table:{noDataText:"ไม่พบข้อมูล",noFilteredDataText:"ไม่พบตัวกรองข้อมูล",confirmFilter:"ยืนยัน",resetFilter:"รีเซ็ต",clearFilter:"ทั้งหมด",sumText:"Sum"},datepicker:{selectDate:"เลือกวัน",selectTime:"เลือกเวลา",startTime:"เริ่มเวลา",endTime:"สิ้นสุดเวลา",clear:"ล้างข้อมูล",ok:"ตกลง",datePanelLabel:"[mmmm] [yyyy]",month:"เดือน",month1:"มกราตม",month2:"กุมภาพันธ์",month3:"มีนาคม",month4:"เมษายน",month5:"พฤษภาคม",month6:"มิถุนายน",month7:"กรกฎาคม",month8:"สิงหาคม",month9:"กันยายน",month10:"ตุลาคม",month11:"พฤศจิกายน",month12:"ธันวาคม",year:"ปี",weekStartDay:"0",weeks:{sun:"อาทิตย์",mon:"จันทร์",tue:"อังคาร",wed:"พุธ",thu:"พฤหัสบดี",fri:"ศุกร์",sat:"เสาร์"},months:{m1:"ม.ค.",m2:"ก.พ.",m3:"มี.ค.",m4:"เม.ย.",m5:"พ.ค.",m6:"มิ.ย.",m7:"ก.ค.",m8:"ส.ค.",m9:"ก.ย.",m10:"ต.ค.",m11:"พ.ย.",m12:"ธ.ค."}},transfer:{titles:{source:"แหล่งข้อมูล",target:"เป้าหมาย"},filterPlaceholder:"ค้นหาที่นี้",notFoundText:"ค้นหาไม่พบ"},modal:{okText:"ตกลง",cancelText:"ยกเลิก"},poptip:{okText:"ตกลง",cancelText:"ยกเลิก"},page:{prev:"หน้าก่อน",next:"หน้าถัดไป",total:"ทั้งหมด",item:"ไอเทม",items:"ไอเทม",prev5:"ก่อน 5 หน้า",next5:"ถัดไป 5 หน้า",page:"/หน้า",goto:"ไปยัง",p:"หน้า"},rate:{star:"ดวง",stars:"ดวง"},tree:{emptyText:"ไม่พบข้อมูล"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=29)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},29:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"th-TH",select:{placeholder:"ตัวเลือก",noMatch:"ข้อมูลไม่ตรงกัน",loading:"ดาวน์โหลด"},table:{noDataText:"ไม่พบข้อมูล",noFilteredDataText:"ไม่พบตัวกรองข้อมูล",confirmFilter:"ยืนยัน",resetFilter:"รีเซ็ต",clearFilter:"ทั้งหมด",sumText:"Sum"},datepicker:{selectDate:"เลือกวัน",selectTime:"เลือกเวลา",startTime:"เริ่มเวลา",endTime:"สิ้นสุดเวลา",clear:"ล้างข้อมูล",ok:"ตกลง",datePanelLabel:"[mmmm] [yyyy]",month:"เดือน",month1:"มกราตม",month2:"กุมภาพันธ์",month3:"มีนาคม",month4:"เมษายน",month5:"พฤษภาคม",month6:"มิถุนายน",month7:"กรกฎาคม",month8:"สิงหาคม",month9:"กันยายน",month10:"ตุลาคม",month11:"พฤศจิกายน",month12:"ธันวาคม",year:"ปี",weekStartDay:"0",weeks:{sun:"อาทิตย์",mon:"จันทร์",tue:"อังคาร",wed:"พุธ",thu:"พฤหัสบดี",fri:"ศุกร์",sat:"เสาร์"},months:{m1:"ม.ค.",m2:"ก.พ.",m3:"มี.ค.",m4:"เม.ย.",m5:"พ.ค.",m6:"มิ.ย.",m7:"ก.ค.",m8:"ส.ค.",m9:"ก.ย.",m10:"ต.ค.",m11:"พ.ย.",m12:"ธ.ค."}},transfer:{titles:{source:"แหล่งข้อมูล",target:"เป้าหมาย"},filterPlaceholder:"ค้นหาที่นี้",notFoundText:"ค้นหาไม่พบ"},modal:{okText:"ตกลง",cancelText:"ยกเลิก"},poptip:{okText:"ตกลง",cancelText:"ยกเลิก"},page:{prev:"หน้าก่อน",next:"หน้าถัดไป",total:"ทั้งหมด",item:"ไอเทม",items:"ไอเทม",prev5:"ก่อน 5 หน้า",next5:"ถัดไป 5 หน้า",page:"/หน้า",goto:"ไปยัง",p:"หน้า"},rate:{star:"ดวง",stars:"ดวง"},tree:{emptyText:"ไม่พบข้อมูล"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=th-TH.js.map //# sourceMappingURL=th-TH.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/dist/locale/",a(a.s=29)}({0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(a(1)).default.prototype.$isServer},1:function(t,a){t.exports=e},29:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"tr-TR",select:{placeholder:"Seç",noMatch:"Eşleşen veri yok",loading:"yükleme"},table:{noDataText:"Veri Yok",noFilteredDataText:"Süzülen veri yok",confirmFilter:"Onayla",resetFilter:"Sıfırla",clearFilter:"Hepsi",sumText:"Sum"},datepicker:{selectDate:"Tarih seç",selectTime:"Zaman seç",startTime:"Başlangıç",endTime:"Bitişe",clear:"Temizle",ok:"Tamam",datePanelLabel:"[mmmm] [yyyy]",month:"",month1:"Ocak",month2:"Şubat",month3:"Mart",month4:"Nisan",month5:"Mayıs",month6:"Haziran",month7:"Temmuz",month8:"Ağustos",month9:"Eylül",month10:"Ekim",month11:"Kasım",month12:"Aralık",year:"",weekStartDay:"0",weeks:{sun:"Paz",mon:"Pzt",tue:"Sal",wed:"Çar",thu:"Per",fri:"Cum",sat:"Cmt"},months:{m1:"Oca",m2:"Şub",m3:"Mar",m4:"Nis",m5:"May",m6:"Haz",m7:"Tem",m8:"Ağu",m9:"Eyl",m10:"Ekm",m11:"Kas",m12:"Ara"}},transfer:{titles:{source:"Kaynak",target:"Hedef"},filterPlaceholder:"Arama yapın",notFoundText:"Bulunamadı"},modal:{okText:"Tamam",cancelText:"İptal"},poptip:{okText:"Tamam",cancelText:"İptal"},page:{prev:"Önceki",next:"Sonraki",total:"Toplam",item:"öğe",items:"öğeler",prev5:"Önceki 5 Sayfa",next5:"Sonraki 5 Sayfa",page:"/sayfa",goto:"Git",p:""},rate:{star:"Yıldız",stars:"Yıldız"},time:{before:" önce",after:" sonra",just:"hemen şimdi",seconds:" saniye",minutes:" dakika",hours:" saat",days:" gün"},tree:{emptyText:"Veri Yok"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(a(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/dist/locale/",a(a.s=30)}({0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(a(1)).default.prototype.$isServer},1:function(t,a){t.exports=e},30:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"tr-TR",select:{placeholder:"Seç",noMatch:"Eşleşen veri yok",loading:"yükleme"},table:{noDataText:"Veri Yok",noFilteredDataText:"Süzülen veri yok",confirmFilter:"Onayla",resetFilter:"Sıfırla",clearFilter:"Hepsi",sumText:"Sum"},datepicker:{selectDate:"Tarih seç",selectTime:"Zaman seç",startTime:"Başlangıç",endTime:"Bitişe",clear:"Temizle",ok:"Tamam",datePanelLabel:"[mmmm] [yyyy]",month:"",month1:"Ocak",month2:"Şubat",month3:"Mart",month4:"Nisan",month5:"Mayıs",month6:"Haziran",month7:"Temmuz",month8:"Ağustos",month9:"Eylül",month10:"Ekim",month11:"Kasım",month12:"Aralık",year:"",weekStartDay:"0",weeks:{sun:"Paz",mon:"Pzt",tue:"Sal",wed:"Çar",thu:"Per",fri:"Cum",sat:"Cmt"},months:{m1:"Oca",m2:"Şub",m3:"Mar",m4:"Nis",m5:"May",m6:"Haz",m7:"Tem",m8:"Ağu",m9:"Eyl",m10:"Ekm",m11:"Kas",m12:"Ara"}},transfer:{titles:{source:"Kaynak",target:"Hedef"},filterPlaceholder:"Arama yapın",notFoundText:"Bulunamadı"},modal:{okText:"Tamam",cancelText:"İptal"},poptip:{okText:"Tamam",cancelText:"İptal"},page:{prev:"Önceki",next:"Sonraki",total:"Toplam",item:"öğe",items:"öğeler",prev5:"Önceki 5 Sayfa",next5:"Sonraki 5 Sayfa",page:"/sayfa",goto:"Git",p:""},rate:{star:"Yıldız",stars:"Yıldız"},time:{before:" önce",after:" sonra",just:"hemen şimdi",seconds:" saniye",minutes:" dakika",hours:" saat",days:" gün"},tree:{emptyText:"Veri Yok"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(a(0)).default)(n),t.default=n}})});
//# sourceMappingURL=tr-TR.js.map //# sourceMappingURL=tr-TR.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=30)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},30:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"uk-UA",select:{placeholder:"Обрати",noMatch:"Немає відповідних даних",loading:"Завантаження"},table:{noDataText:"Немає даних",noFilteredDataText:"Немає даних по фільтру",confirmFilter:"Підтвердити",resetFilter:"Скинути",clearFilter:"Усе",sumText:"Sum"},datepicker:{selectDate:"Обрати дату",selectTime:"Обрати час",startTime:"Початковий час",endTime:"Кінцевий час",clear:"Очистити",ok:"OK",datePanelLabel:"[Mmmm] [yyyy]",month:"",month1:"Січень",month2:"Лютий",month3:"Березень",month4:"Квітень",month5:"Травень",month6:"Червень",month7:"Липень",month8:"Серпень",month9:"Вересень",month10:"Жовтень",month11:"Листопад",month12:"Грудень",year:"",weekStartDay:"1",weeks:{sun:"Нд",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"},months:{m1:"Січ",m2:"Лют",m3:"Бер",m4:"Кві",m5:"Тра",m6:"Чер",m7:"Лип",m8:"Сер",m9:"Вер",m10:"Жов",m11:"Лис",m12:"Гру"}},transfer:{titles:{source:"Джерело",target:"Ціль"},filterPlaceholder:"Шукати тут",notFoundText:"Не знайдено"},modal:{okText:"OK",cancelText:"Скасувати"},poptip:{okText:"OK",cancelText:"Скасувати"},page:{prev:"Попер. сторінка",next:"Наст. сторінка",total:"Всього",item:"пункт",items:"пункти",prev5:"Попер. 5 сторінок",next5:"Наст. 5 сторінок",page:"/page",goto:"Йти до",p:""},rate:{star:"Зірка",stars:"Зірки"},tree:{emptyText:"Немає даних"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=31)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},31:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"uk-UA",select:{placeholder:"Обрати",noMatch:"Немає відповідних даних",loading:"Завантаження"},table:{noDataText:"Немає даних",noFilteredDataText:"Немає даних по фільтру",confirmFilter:"Підтвердити",resetFilter:"Скинути",clearFilter:"Усе",sumText:"Sum"},datepicker:{selectDate:"Обрати дату",selectTime:"Обрати час",startTime:"Початковий час",endTime:"Кінцевий час",clear:"Очистити",ok:"OK",datePanelLabel:"[Mmmm] [yyyy]",month:"",month1:"Січень",month2:"Лютий",month3:"Березень",month4:"Квітень",month5:"Травень",month6:"Червень",month7:"Липень",month8:"Серпень",month9:"Вересень",month10:"Жовтень",month11:"Листопад",month12:"Грудень",year:"",weekStartDay:"1",weeks:{sun:"Нд",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"},months:{m1:"Січ",m2:"Лют",m3:"Бер",m4:"Кві",m5:"Тра",m6:"Чер",m7:"Лип",m8:"Сер",m9:"Вер",m10:"Жов",m11:"Лис",m12:"Гру"}},transfer:{titles:{source:"Джерело",target:"Ціль"},filterPlaceholder:"Шукати тут",notFoundText:"Не знайдено"},modal:{okText:"OK",cancelText:"Скасувати"},poptip:{okText:"OK",cancelText:"Скасувати"},page:{prev:"Попер. сторінка",next:"Наст. сторінка",total:"Всього",item:"пункт",items:"пункти",prev5:"Попер. 5 сторінок",next5:"Наст. 5 сторінок",page:"/page",goto:"Йти до",p:""},rate:{star:"Зірка",stars:"Зірки"},tree:{emptyText:"Немає даних"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=uk-UA.js.map //# sourceMappingURL=uk-UA.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/locale/",n(n.s=31)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){o||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var o=function(e){return e&&e.__esModule?e:{default:e}}(n(1)).default.prototype.$isServer},1:function(t,n){t.exports=e},31:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={i:{locale:"vi-VN",select:{placeholder:"Chọn",noMatch:"Không tìm thấy",loading:"Đang tải"},table:{noDataText:"Không có dữ liệu",noFilteredDataText:"Không có dữ liệu lọc",confirmFilter:"Xác nhận",resetFilter:"Làm lại",clearFilter:"Xóa hết",sumText:"Tổng"},datepicker:{selectDate:"Chọn ngày",selectTime:"Chọn giờ",startTime:"Ngày bắt đầu",endTime:"Ngày kết thúc",clear:"Xóa",ok:"Đồng ý",datePanelLabel:"[Tháng mm]/[yyyy]",month:"",month1:"Tháng 1",month2:"Tháng 2",month3:"Tháng 3",month4:"Tháng 4",month5:"Tháng 5",month6:"Tháng 6",month7:"Tháng 7",month8:"Tháng 8",month9:"Tháng 9",month10:"Tháng 10",month11:"Tháng 11",month12:"Tháng 12",year:"",weekStartDay:"1",weeks:{sun:"CN",mon:"T2",tue:"T3",wed:"T4",thu:"T5",fri:"T6",sat:"T7"},months:{m1:"Th.1",m2:"Th.2",m3:"Th.3",m4:"Th.4",m5:"Th.5",m6:"Th.6",m7:"Th.7",m8:"Th.8",m9:"Th.9",m10:"Th.10",m11:"Th.11",m12:"Th.12"}},transfer:{titles:{source:"Nguồn",target:"Đích"},filterPlaceholder:"Nhập từ khóa",notFoundText:"Không tìm thấy"},modal:{okText:"Đồng ý",cancelText:"Hủy bỏ"},poptip:{okText:"Đồng ý",cancelText:"Hủy bỏ"},page:{prev:"Trang trước",next:"Trang kế",total:"Tổng",item:"kết quả",items:"kết quả",prev5:"5 trang trước",next5:"5 trang kế",page:"/trang",goto:"Tới trang",p:""},rate:{star:"Sao",stars:"Sao"},tree:{emptyText:"Không có dữ liệu"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(n(0)).default)(o),t.default=o}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/locale/",n(n.s=32)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){o||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var o=function(e){return e&&e.__esModule?e:{default:e}}(n(1)).default.prototype.$isServer},1:function(t,n){t.exports=e},32:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={i:{locale:"vi-VN",select:{placeholder:"Chọn",noMatch:"Không tìm thấy",loading:"Đang tải"},table:{noDataText:"Không có dữ liệu",noFilteredDataText:"Không có dữ liệu lọc",confirmFilter:"Xác nhận",resetFilter:"Làm lại",clearFilter:"Xóa hết",sumText:"Tổng"},datepicker:{selectDate:"Chọn ngày",selectTime:"Chọn giờ",startTime:"Ngày bắt đầu",endTime:"Ngày kết thúc",clear:"Xóa",ok:"Đồng ý",datePanelLabel:"[Tháng mm]/[yyyy]",month:"",month1:"Tháng 1",month2:"Tháng 2",month3:"Tháng 3",month4:"Tháng 4",month5:"Tháng 5",month6:"Tháng 6",month7:"Tháng 7",month8:"Tháng 8",month9:"Tháng 9",month10:"Tháng 10",month11:"Tháng 11",month12:"Tháng 12",year:"",weekStartDay:"1",weeks:{sun:"CN",mon:"T2",tue:"T3",wed:"T4",thu:"T5",fri:"T6",sat:"T7"},months:{m1:"Th.1",m2:"Th.2",m3:"Th.3",m4:"Th.4",m5:"Th.5",m6:"Th.6",m7:"Th.7",m8:"Th.8",m9:"Th.9",m10:"Th.10",m11:"Th.11",m12:"Th.12"}},transfer:{titles:{source:"Nguồn",target:"Đích"},filterPlaceholder:"Nhập từ khóa",notFoundText:"Không tìm thấy"},modal:{okText:"Đồng ý",cancelText:"Hủy bỏ"},poptip:{okText:"Đồng ý",cancelText:"Hủy bỏ"},page:{prev:"Trang trước",next:"Trang kế",total:"Tổng",item:"kết quả",items:"kết quả",prev5:"5 trang trước",next5:"5 trang kế",page:"/trang",goto:"Tới trang",p:""},rate:{star:"Sao",stars:"Sao"},tree:{emptyText:"Không có dữ liệu"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(n(0)).default)(o),t.default=o}})});
//# sourceMappingURL=vi-VN.js.map //# sourceMappingURL=vi-VN.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=32)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},32:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-CN",select:{placeholder:"请选择",noMatch:"无匹配数据",loading:"加载中"},table:{noDataText:"暂无数据",noFilteredDataText:"暂无筛选结果",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},datepicker:{selectDate:"选择日期",selectTime:"选择时间",startTime:"开始时间",endTime:"结束时间",clear:"清空",ok:"确定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"源列表",target:"目的列表"},filterPlaceholder:"请输入搜索内容",notFoundText:"列表为空"},modal:{okText:"确定",cancelText:"取消"},poptip:{okText:"确定",cancelText:"取消"},page:{prev:"上一页",next:"下一页",total:"共",item:"条",items:"条",prev5:"向前 5 页",next5:"向后 5 页",page:"条/页",goto:"跳至",p:"页"},rate:{star:"星",stars:"星"},time:{before:"前",after:"后",just:"刚刚",seconds:"秒",minutes:"分钟",hours:"小时",days:"天"},tree:{emptyText:"暂无数据"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=33)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},33:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-CN",select:{placeholder:"请选择",noMatch:"无匹配数据",loading:"加载中"},table:{noDataText:"暂无数据",noFilteredDataText:"暂无筛选结果",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},datepicker:{selectDate:"选择日期",selectTime:"选择时间",startTime:"开始时间",endTime:"结束时间",clear:"清空",ok:"确定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"源列表",target:"目的列表"},filterPlaceholder:"请输入搜索内容",notFoundText:"列表为空"},modal:{okText:"确定",cancelText:"取消"},poptip:{okText:"确定",cancelText:"取消"},page:{prev:"上一页",next:"下一页",total:"共",item:"条",items:"条",prev5:"向前 5 页",next5:"向后 5 页",page:"条/页",goto:"跳至",p:"页"},rate:{star:"星",stars:"星"},time:{before:"前",after:"后",just:"刚刚",seconds:"秒",minutes:"分钟",hours:"小时",days:"天"},tree:{emptyText:"暂无数据"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=zh-CN.js.map //# sourceMappingURL=zh-CN.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=33)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},33:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-TW",select:{placeholder:"請選擇",noMatch:"無匹配資料",loading:"加載中"},table:{noDataText:"暫無資料",noFilteredDataText:"暫無篩選結果",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},datepicker:{selectDate:"選擇日期",selectTime:"選擇時間",startTime:"開始時間",endTime:"結束時間",clear:"清空",ok:"確定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"來源列表",target:"目標列表"},filterPlaceholder:"請輸入搜尋內容",notFoundText:"列表爲空"},modal:{okText:"確定",cancelText:"取消"},poptip:{okText:"確定",cancelText:"取消"},page:{prev:"上一頁",next:"下一頁",total:"共",item:"條",items:"條",prev5:"向前 5 頁",next5:"向後 5 頁",page:"條/頁",goto:"跳至",p:"頁"},rate:{star:"星",stars:"星"},tree:{emptyText:"暫無資料"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=34)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},34:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-TW",select:{placeholder:"請選擇",noMatch:"無匹配資料",loading:"加載中"},table:{noDataText:"暫無資料",noFilteredDataText:"暫無篩選結果",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},datepicker:{selectDate:"選擇日期",selectTime:"選擇時間",startTime:"開始時間",endTime:"結束時間",clear:"清空",ok:"確定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"來源列表",target:"目標列表"},filterPlaceholder:"請輸入搜尋內容",notFoundText:"列表爲空"},modal:{okText:"確定",cancelText:"取消"},poptip:{okText:"確定",cancelText:"取消"},page:{prev:"上一頁",next:"下一頁",total:"共",item:"條",items:"條",prev5:"向前 5 頁",next5:"向後 5 頁",page:"條/頁",goto:"跳至",p:"頁"},rate:{star:"星",stars:"星"},tree:{emptyText:"暫無資料"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=zh-TW.js.map //# sourceMappingURL=zh-TW.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=34)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},34:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-UG",select:{placeholder:"تاللاش",noMatch:"ئۇچۇر يوق",loading:"سەل ساقلاش"},table:{noDataText:"ئۇچۇر يوق",noFilteredDataText:"بۇنداق نەتىجە يوق",confirmFilter:"تاسقاش",resetFilter:"تازلاش",clearFilter:"بارلىق",sumText:"جەمئىي"},datepicker:{selectDate:"چىسلا تاللاش",selectTime:"ۋاقىت تاللاش",startTime:"باشلىنىش",endTime:"ئاخىرلىشىش",clear:"بىكارلاش",ok:"جەزىملەش",datePanelLabel:"[yyyyيىل] [mئاي]",month:"ئاي",month1:"1-ئاي",month2:"2-ئاي",month3:"3-ئاي",month4:"4-ئاي",month5:"5-ئاي",month6:"6-ئاي",month7:"7-ئاي",month8:"8-ئاي",month9:"9-ئاي",month10:"10-ئاي",month11:"11-ئاي",month12:"12-ئاي",year:"يىل",weekStartDay:"0",weeks:{sun:"يەك",mon:"دۈ",tue:"سەي",wed:"چار",thu:"پەي",fri:"جۈ",sat:"شەن"},months:{m1:"1-ئاي",m2:"2-ئاي",m3:"3-ئاي",m4:"4-ئاي",m5:"5-ئاي",m6:"6-ئاي",m7:"7-ئاي",m8:"8-ئاي",m9:"9-ئاي",m10:"10-ئاي",m11:"11-ئاي",m12:"12-ئاي"}},transfer:{titles:{source:"ئەسلى تىزىملىك",target:"نىشان تىزىملىك"},filterPlaceholder:"ئىزدەيدىغان مەزمۇننى كىرگۈزۈڭ",notFoundText:"ئۇچۇر يوق"},modal:{okText:"جەزىملەش",cancelText:"بىكار قىلىش"},poptip:{okText:"جەزىملەش",cancelText:"بىكار قىلىش"},page:{prev:"ئالدىنقى بەت",next:"كىيىنكى بەت",total:"جەمئىي",item:"تال",items:"تال",prev5:"ئالدىغا 5 بەت",next5:"ئارقىغا 5 بەت",page:"تال/ھەر بىر بەت",goto:"ئاتلاش",p:"بەت"},rate:{star:"يۇلتۇز",stars:"يۇلتۇز"},time:{before:" بۇرۇن",after:" كىيىن",just:"بايىلا",seconds:" سىكونت",minutes:" مىنۇت",hours:" سائەت",days:" كۈن"},tree:{emptyText:"ئۇچۇر يوق"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})}); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/locale/",o(o.s=35)}({0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){n||void 0!==window.iview&&("langs"in iview||(iview.langs={}),iview.langs[e.i.locale]=e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(1)).default.prototype.$isServer},1:function(t,o){t.exports=e},35:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={i:{locale:"zh-UG",select:{placeholder:"تاللاش",noMatch:"ئۇچۇر يوق",loading:"سەل ساقلاش"},table:{noDataText:"ئۇچۇر يوق",noFilteredDataText:"بۇنداق نەتىجە يوق",confirmFilter:"تاسقاش",resetFilter:"تازلاش",clearFilter:"بارلىق",sumText:"جەمئىي"},datepicker:{selectDate:"چىسلا تاللاش",selectTime:"ۋاقىت تاللاش",startTime:"باشلىنىش",endTime:"ئاخىرلىشىش",clear:"بىكارلاش",ok:"جەزىملەش",datePanelLabel:"[yyyyيىل] [mئاي]",month:"ئاي",month1:"1-ئاي",month2:"2-ئاي",month3:"3-ئاي",month4:"4-ئاي",month5:"5-ئاي",month6:"6-ئاي",month7:"7-ئاي",month8:"8-ئاي",month9:"9-ئاي",month10:"10-ئاي",month11:"11-ئاي",month12:"12-ئاي",year:"يىل",weekStartDay:"0",weeks:{sun:"يەك",mon:"دۈ",tue:"سەي",wed:"چار",thu:"پەي",fri:"جۈ",sat:"شەن"},months:{m1:"1-ئاي",m2:"2-ئاي",m3:"3-ئاي",m4:"4-ئاي",m5:"5-ئاي",m6:"6-ئاي",m7:"7-ئاي",m8:"8-ئاي",m9:"9-ئاي",m10:"10-ئاي",m11:"11-ئاي",m12:"12-ئاي"}},transfer:{titles:{source:"ئەسلى تىزىملىك",target:"نىشان تىزىملىك"},filterPlaceholder:"ئىزدەيدىغان مەزمۇننى كىرگۈزۈڭ",notFoundText:"ئۇچۇر يوق"},modal:{okText:"جەزىملەش",cancelText:"بىكار قىلىش"},poptip:{okText:"جەزىملەش",cancelText:"بىكار قىلىش"},page:{prev:"ئالدىنقى بەت",next:"كىيىنكى بەت",total:"جەمئىي",item:"تال",items:"تال",prev5:"ئالدىغا 5 بەت",next5:"ئارقىغا 5 بەت",page:"تال/ھەر بىر بەت",goto:"ئاتلاش",p:"بەت"},rate:{star:"يۇلتۇز",stars:"يۇلتۇز"},time:{before:" بۇرۇن",after:" كىيىن",just:"بايىلا",seconds:" سىكونت",minutes:" مىنۇت",hours:" سائەت",days:" كۈن"},tree:{emptyText:"ئۇچۇر يوق"}}};(0,function(e){return e&&e.__esModule?e:{default:e}}(o(0)).default)(n),t.default=n}})});
//# sourceMappingURL=zh-UG.js.map //# sourceMappingURL=zh-UG.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<Alert> <Button @click="show = !show">toggle show</Button>
<Alert v-if="show" :fade="false">
An info prompt An info prompt
<template slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </template> <template slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </template>
</Alert> </Alert>
@ -56,7 +57,7 @@
A success prompt A success prompt
<span slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </span> <span slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </span>
</Alert> </Alert>
<Alert type="warning" closable> <Alert type="warning" closable :fade="false">
Custom closing content Custom closing content
<span slot="close">No longer prompt</span> <span slot="close">No longer prompt</span>
</Alert> </Alert>
@ -65,6 +66,11 @@
<script> <script>
import { Alert, Icon } from 'iview'; import { Alert, Icon } from 'iview';
export default { export default {
components: { Alert, Icon } components: { Alert, Icon },
data () {
return {
show: true
}
}
} }
</script> </script>

View file

@ -309,9 +309,11 @@
</ButtonGroup> </ButtonGroup>
</div> </div>
<Divider></Divider> <Divider></Divider>
<Button to="http://baidu.com" replace>http跳转</Button> <Button to="http://baidu.com">http跳转</Button>
<Button to="http://baidu.com" target="_blank">http跳转(_blank)</Button>
<Button to="https://iviewui.com" replace>https跳转</Button> <Button to="https://iviewui.com" replace>https跳转</Button>
<Button :to="{path: '/icon'}">Router 对象跳转</Button> <Button :to="{path: '/icon'}">Router 对象跳转</Button>
<Button :to="{path: '/icon'}" target="_blank">Router 对象跳转(_blank)</Button>
</div> </div>
</template> </template>
<script> <script>

View file

@ -67,7 +67,9 @@
iView is a set of UI components and widgets built on Vue.js. iView is a set of UI components and widgets built on Vue.js.
iView is a set of UI components and widgets built on Vue.js. iView is a set of UI components and widgets built on Vue.js.
</p> </p>
<Divider plain>iView</Divider>
<Divider orientation="left" plain>iView</Divider>
<Divider orientation="right" plain>iView</Divider>
</div> </div>
</Card> </Card>
</i-col> </i-col>

View file

@ -1,152 +1,191 @@
<style> <style>
.view { .demo-row{
height: 100px; margin-bottom: 5px;
width: 100px; background-image: -webkit-linear-gradient(0deg, #F5F5F5 4.16666667%, transparent 4.16666667%, transparent 8.33333333%, #F5F5F5 8.33333333%, #F5F5F5 12.5%, transparent 12.5%, transparent 16.66666667%, #F5F5F5 16.66666667%, #F5F5F5 20.83333333%, transparent 20.83333333%, transparent 25%, #F5F5F5 25%, #F5F5F5 29.16666667%, transparent 29.16666667%, transparent 33.33333333%, #F5F5F5 33.33333333%, #F5F5F5 37.5%, transparent 37.5%, transparent 41.66666667%, #F5F5F5 41.66666667%, #F5F5F5 45.83333333%, transparent 45.83333333%, transparent 50%, #F5F5F5 50%, #F5F5F5 54.16666667%, transparent 54.16666667%, transparent 58.33333333%, #F5F5F5 58.33333333%, #F5F5F5 62.5%, transparent 62.5%, transparent 66.66666667%, #F5F5F5 66.66666667%, #F5F5F5 70.83333333%, transparent 70.83333333%, transparent 75%, #F5F5F5 75%, #F5F5F5 79.16666667%, transparent 79.16666667%, transparent 83.33333333%, #F5F5F5 83.33333333%, #F5F5F5 87.5%, transparent 87.5%, transparent 91.66666667%, #F5F5F5 91.66666667%, #F5F5F5 95.83333333%, transparent 95.83333333%);
background: yellow; background-image: linear-gradient(90deg, #F5F5F5 4.16666667%, transparent 4.16666667%, transparent 8.33333333%, #F5F5F5 8.33333333%, #F5F5F5 12.5%, transparent 12.5%, transparent 16.66666667%, #F5F5F5 16.66666667%, #F5F5F5 20.83333333%, transparent 20.83333333%, transparent 25%, #F5F5F5 25%, #F5F5F5 29.16666667%, transparent 29.16666667%, transparent 33.33333333%, #F5F5F5 33.33333333%, #F5F5F5 37.5%, transparent 37.5%, transparent 41.66666667%, #F5F5F5 41.66666667%, #F5F5F5 45.83333333%, transparent 45.83333333%, transparent 50%, #F5F5F5 50%, #F5F5F5 54.16666667%, transparent 54.16666667%, transparent 58.33333333%, #F5F5F5 58.33333333%, #F5F5F5 62.5%, transparent 62.5%, transparent 66.66666667%, #F5F5F5 66.66666667%, #F5F5F5 70.83333333%, transparent 70.83333333%, transparent 75%, #F5F5F5 75%, #F5F5F5 79.16666667%, transparent 79.16666667%, transparent 83.33333333%, #F5F5F5 83.33333333%, #F5F5F5 87.5%, transparent 87.5%, transparent 91.66666667%, #F5F5F5 91.66666667%, #F5F5F5 95.83333333%, transparent 95.83333333%);
}
.demo-col{
color: #fff;
padding: 30px 0;
text-align: center;
font-size: 18px;
background: rgba(0, 153, 229, .7);
}
.demo-col.light{
background: rgba(0, 153, 229, .5);
}
.demo-row.light .demo-col{
background: rgba(0, 153, 229, .5);
}
.demo-row.light .demo-col.light{
background: rgba(0, 153, 229, .3);
}
.example-demo .ivu-col, .example-demo .ivu-col div{
color: #fff;
padding: 10px 0;
text-align: center;
background: rgba(0, 153, 229, .9);
}
.example-demo .gutter .ivu-col{
background: transparent !important;
}
.example-demo .ivu-col:nth-child(odd), .example-demo .ivu-col:nth-child(odd) div{
background: rgba(0, 153, 229, .7);
}
.code-row-bg{
background: rgba(0,0,0,.05);
} }
</style> </style>
<template> <template>
<div> <div class="example-demo">
<Row type='flex' justify='center'> <Row>
<i-col span='21' class="offset-header"> <Col span="12">col-12</Col>
<Row type='flex' :gutter='16' justify='space-between'> <Col span="12">col-12</Col>
<i-col :order='25'> </Row>
<div class="view"> <br>
<label>245</label> <Row>
</div> <Col span="8">col-8</Col>
</i-col> <Col span="8">col-8</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='1'> <Col span="8">col-8</Col>
<div class="view" > </Row>
<label>1</label> <br>
</div> <Row>
</i-col> <Col span="6">col-6</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='2'> <Col span="6">col-6</Col>
<div class="view" > <Col span="6">col-6</Col>
<label>2</label> <Col span="6">col-6</Col>
</div> </Row>
</i-col> <Divider></Divider>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='3'> <Row :gutter="16">
<div class="view" > <Col span="6">
<label>3</label> <div>col-6</div>
</div> </Col>
</i-col> <Col span="6">
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='4'> <div>col-6</div>
<div class="view" > </Col>
<label>4</label> <Col span="6">
</div> <div>col-6</div>
</i-col> </Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='5'> <Col span="6">
<div class="view" > <div>col-6</div>
<label>5</label> </Col>
</div> </Row>
</i-col> <Divider></Divider>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='6'> <Row type="flex">
<div class="view" > <Col span="6" order="4">1 | order-4</Col>
<label>6</label> <Col span="6" order="3">2 | order-3</Col>
</div> <Col span="6" order="2">3 | order-2</Col>
</i-col> <Col span="6" order="1">4 | order-1</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='7'> </Row>
<div class="view" > <Divider></Divider>
<label>2</label> <Row>
</div> <Col span="18" push="6">col-18 | push-6</Col>
</i-col> <Col span="6" pull="18">col-6 | pull-18</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='8'> </Row>
<div class="view" > <Divider></Divider>
<label>2</label> <Row>
</div> <Col span="8">col-8</Col>
</i-col> <Col span="8" offset="8">col-8 | offset-8</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='9'> </Row>
<div class="view" > <br>
<label>2</label> <Row>
</div> <Col span="6" offset="8">col-6 | offset-8</Col>
</i-col> <Col span="6" offset="4">col-6 | offset-4</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='10'> </Row>
<div class="view" > <br>
<label>2</label> <Row>
</div> <Col span="12" offset="8">col-12 | offset-8</Col>
</i-col> </Row>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='11'> <Divider></Divider>
<div class="view" > <p>子元素向左排列</p>
<label>2</label> <Row type="flex" justify="start" class="code-row-bg">
</div> <Col span="4">col-4</Col>
</i-col> <Col span="4">col-4</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='12'> <Col span="4">col-4</Col>
<div class="view" > <Col span="4">col-4</Col>
<label>2</label> </Row>
</div> <p>子元素向右排列</p>
</i-col> <Row type="flex" justify="end" class="code-row-bg">
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='13'> <Col span="4">col-4</Col>
<div class="view" > <Col span="4">col-4</Col>
<label>12</label> <Col span="4">col-4</Col>
</div> <Col span="4">col-4</Col>
</i-col> </Row>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='14'> <p>子元素居中排列</p>
<div class="view" > <Row type="flex" justify="center" class="code-row-bg">
<label>2</label> <Col span="4">col-4</Col>
</div> <Col span="4">col-4</Col>
</i-col> <Col span="4">col-4</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='15'> <Col span="4">col-4</Col>
<div class="view" > </Row>
<label>2</label> <p>子元素等宽排列</p>
</div> <Row type="flex" justify="space-between" class="code-row-bg">
</i-col> <Col span="4">col-4</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='16'> <Col span="4">col-4</Col>
<div class="view" > <Col span="4">col-4</Col>
<label>2</label> <Col span="4">col-4</Col>
</div> </Row>
</i-col> <p>子元素分散排列</p>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='17'> <Row type="flex" justify="space-around" class="code-row-bg">
<div class="view" > <Col span="4">col-4</Col>
<label>2</label> <Col span="4">col-4</Col>
</div> <Col span="4">col-4</Col>
</i-col> <Col span="4">col-4</Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='18'> </Row>
<div class="view" > <Divider></Divider>
<label>2</label> <p>顶部对齐</p>
</div> <Row type="flex" justify="center" align="top" class="code-row-bg">
</i-col> <Col span="4"><p style="height: 80px">col-4</p></Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='19'> <Col span="4"><p style="height: 30px">col-4</p></Col>
<div class="view" > <Col span="4"><p style="height: 100px">col-4</p></Col>
<label>2</label> <Col span="4"><p style="height: 60px">col-4</p></Col>
</div> </Row>
</i-col> <p>底部对齐</p>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='20'> <Row type="flex" justify="center" align="bottom" class="code-row-bg">
<div class="view" > <Col span="4"><p style="height: 80px">col-4</p></Col>
<label>2</label> <Col span="4"><p style="height: 30px">col-4</p></Col>
</div> <Col span="4"><p style="height: 100px">col-4</p></Col>
</i-col> <Col span="4"><p style="height: 60px">col-4</p></Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='21'> </Row>
<div class="view" > <p>居中对齐</p>
<label>2</label> <Row type="flex" justify="center" align="middle" class="code-row-bg">
</div> <Col span="4"><p style="height: 80px">col-4</p></Col>
</i-col> <Col span="4"><p style="height: 30px">col-4</p></Col>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='22'> <Col span="4"><p style="height: 100px">col-4</p></Col>
<div class="view" > <Col span="4"><p style="height: 60px">col-4</p></Col>
<label>2</label> </Row>
</div> <Divider></Divider>
</i-col> <Row>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='23'> <Col :xs="2" :sm="4" :md="6" :lg="8">Col</Col>
<div class="view" > <Col :xs="20" :sm="16" :md="12" :lg="8">Col</Col>
<label>2</label> <Col :xs="2" :sm="4" :md="6" :lg="8">Col</Col>
</div> </Row>
</i-col> <Divider></Divider>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='24'> <Row>
<div class="view" > <Col :xs="{ span: 5, offset: 1 }" :lg="{ span: 6, offset: 2 }">Col</Col>
<label>2</label> <Col :xs="{ span: 11, offset: 1 }" :lg="{ span: 6, offset: 2 }">Col</Col>
</div> <Col :xs="{ span: 5, offset: 1 }" :lg="{ span: 6, offset: 2 }">Col</Col>
</i-col> </Row>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='25'> <Divider>Flex 填充</Divider>
<div class="view" > <Row>
<label>25-------</label> <Col :flex="2">2 / 5</Col>
</div> <Col :flex="3">3 / 5</Col>
</i-col> </Row>
<i-col :xs='12' :sm='12' :md='8' :lg='8' :order='26'> <Row>
<div class="view" > <Col flex="100px">100px</Col>
<label>26------</label> <Col flex="auto">Fill Rest</Col>
</div> </Row>
</i-col> <Row>
</Row> <Col flex="1 1 200px">1 1 200px</Col>
</i-col> <Col flex="0 1 300px">0 1 300px</Col>
</Row>
<Row :wrap="false">
<Col flex="none">
<div style="padding: 0 16px">none</div>
</Col>
<Col flex="auto">auto with no-wrap</Col>
</Row> </Row>
</div> </div>
</template> </template>

View file

@ -43,17 +43,17 @@
<div> <div>
<!-- <InputNumber :max="1000000000" :min="1" v-model="value1" :formatter="formatter" :parser="parser" @on-change="change" style="width: 200px"></InputNumber> <!-- <InputNumber :max="1000000000" :min="1" v-model="value1" :formatter="formatter" :parser="parser" @on-change="change" style="width: 200px"></InputNumber>
<InputNumber :max="1000000000" :min="1" v-model="value2" :formatter="formatter2" :parser="parser2" @on-change="change" style="width: 200px"></InputNumber> <InputNumber :max="1000000000" :min="1" v-model="value2" :formatter="formatter2" :parser="parser2" @on-change="change" style="width: 200px"></InputNumber>
<InputNumber @on-change="change" style="width: 200px"></InputNumber> <InputNumber @on-change="change" style="width: 200px"></InputNumber>
<InputNumber v-model="valueNull" @on-change="change" style="width: 200px"></InputNumber> <InputNumber v-model="valueNull" @on-change="change" style="width: 200px"></InputNumber>
<InputNumber v-model="valueNull" @on-change="change" :formatter="formatter" :parser="parser" style="width: 200px"></InputNumber> <InputNumber v-model="valueNull" @on-change="change" :formatter="formatter" :parser="parser" style="width: 200px"></InputNumber>
<InputNumber v-model="value2" @on-focus="focus" style="width: 200px"></InputNumber> <InputNumber v-model="value2" @on-focus="focus" style="width: 200px"></InputNumber>
<InputNumber v-model="value3" style="width: 200px" placeholder="Enter something..."></InputNumber> --> <InputNumber v-model="value3" style="width: 200px" placeholder="Enter something..."></InputNumber> -->
<InputNumber v-model="valueNull" style="width: 200px" :min='1' :max='10000' :precision='2' ></InputNumber> <InputNumber v-model="valueNull" style="width: 200px" :min='1' :max='10000' :precision='2' ></InputNumber>
<InputNumber v-model="valueNull" style="width: 200px" ></InputNumber> <InputNumber v-model="valueNull" style="width: 200px" ></InputNumber>
<div style="margin:10px 0px"> <div style="margin:10px 0px">
@ -72,6 +72,11 @@
:formatter="value => `${value}%`" :formatter="value => `${value}%`"
:parser="value => value.replace('%', '')"></InputNumber> :parser="value => value.replace('%', '')"></InputNumber>
</div> </div>
<Divider></Divider>
<InputNumber disabled size="large" controls-outside :max="1000" :min="1" v-model="value20"></InputNumber>
<InputNumber size="default" controls-outside :max="1000" :min="1" v-model="value20"></InputNumber>
<InputNumber size="small" controls-outside :max="1000" :min="1" v-model="value20"></InputNumber>
</div> </div>
</template> </template>
<script> <script>
@ -87,7 +92,8 @@
formatter2: (value) => `${value}%`, formatter2: (value) => `${value}%`,
parser2: (value) => value.replace('%', ''), parser2: (value) => value.replace('%', ''),
value9: 1000, value9: 1000,
value10: 100 value10: 100,
value20: 2
}; };
}, },
methods: { methods: {

View file

@ -5,7 +5,9 @@
v-model="modal1" v-model="modal1"
title="Common Modal dialog box title" title="Common Modal dialog box title"
@on-ok="ok" @on-ok="ok"
@on-cancel="cancel"> @on-cancel="cancel"
:before-close="handleBeforeClose"
>
<p>Content of dialog</p> <p>Content of dialog</p>
<p>Content of dialog</p> <p>Content of dialog</p>
<p>Content of dialog</p> <p>Content of dialog</p>
@ -145,6 +147,20 @@
handleSpinShow () { handleSpinShow () {
this.$Spin.show(); this.$Spin.show();
}, },
handleBeforeClose () {
return new Promise((resolve, reject) => {
this.$Modal.confirm({
title: '关闭确认',
content: '您确认要关闭弹窗吗?',
onOk: () => {
resolve();
},
onCancel: () => {
reject();
}
});
});
}
} }
} }
</script> </script>

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total :current.sync="current"></Page> <Page prev-text="上一页" next-text="下一页" @on-prev="op" @on-next="on" :total="total" show-sizer show-elevator show-total :current.sync="current"></Page>
{{ current }} {{ current }}
<Button type="primary" @click="subject">- 1</Button> <Button type="primary" @click="subject">- 1</Button>
<Button type="primary" @click="change">Change</Button> <Button type="primary" @click="change">Change</Button>
@ -49,6 +49,12 @@
}, },
change() { change() {
this.current = 1; this.current = 1;
},
op (p) {
console.log(111, p)
},
on (p) {
console.log(110, p)
} }
} }
} }

View file

@ -22,12 +22,18 @@
<span>Windows</span> <span>Windows</span>
</Radio> </Radio>
</Radio-group> </Radio-group>
<Radio-group v-model="button2" type="button" size="large"> <Radio-group v-model="button2" type="button" size="large" button-style="solid">
<Radio label="北京"></Radio> <Radio label="北京"></Radio>
<Radio label="上海" disabled></Radio> <Radio label="上海" disabled></Radio>
<Radio label="深圳"></Radio> <Radio label="深圳"></Radio>
<Radio label="杭州"></Radio> <Radio label="杭州"></Radio>
</Radio-group> </Radio-group>
<Radio-group v-model="button2" type="button" size="large">
<Radio label="北京"></Radio>
<Radio label="上海"></Radio>
<Radio label="深圳"></Radio>
<Radio label="杭州"></Radio>
</Radio-group>
<Radio-group v-model="button2" type="button" size="default"> <Radio-group v-model="button2" type="button" size="default">
<Radio label="北京"></Radio> <Radio label="北京"></Radio>
<Radio label="上海" disabled></Radio> <Radio label="上海" disabled></Radio>

16687
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "view-design", "name": "view-design",
"version": "4.3.2", "version": "4.7.0-beta.11",
"title": "ViewUI", "title": "ViewUI",
"description": "A high quality UI components Library with Vue.js", "description": "A high quality UI components Library with Vue.js",
"homepage": "http://www.iviewui.com", "homepage": "http://www.iviewui.com",
@ -55,7 +55,7 @@
"v-click-outside-x": "^3.7.1" "v-click-outside-x": "^3.7.1"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "^2.5.2" "vue": "^2.6.10"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer-loader": "^3.2.0", "autoprefixer-loader": "^3.2.0",
@ -109,13 +109,13 @@
"typescript": "^3.3.4000", "typescript": "^3.3.4000",
"uglifyjs-webpack-plugin": "^1.3.0", "uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^1.1.2", "url-loader": "^1.1.2",
"vue": "^2.6.10", "vue": "^2.6.12",
"vue-hot-reload-api": "^2.3.1", "vue-hot-reload-api": "^2.3.1",
"vue-html-loader": "^1.2.4", "vue-html-loader": "^1.2.4",
"vue-loader": "^14.2.1", "vue-loader": "^14.2.1",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10", "vue-template-compiler": "^2.6.12",
"webpack": "^3.11.0", "webpack": "^3.11.0",
"webpack-dev-server": "^2.11.3", "webpack-dev-server": "^2.11.3",
"webpack-merge": "^3.0.0" "webpack-merge": "^3.0.0"

View file

@ -1,5 +1,5 @@
<template> <template>
<transition name="fade"> <transition :name="fade ? 'fade' : ''">
<div v-if="!closed" :class="wrapClasses"> <div v-if="!closed" :class="wrapClasses">
<span :class="iconClasses" v-if="showIcon"> <span :class="iconClasses" v-if="showIcon">
<slot name="icon"> <slot name="icon">
@ -43,6 +43,10 @@
banner: { banner: {
type: Boolean, type: Boolean,
default: false default: false
},
fade: {
type: Boolean,
default: true
} }
}, },
data () { data () {

View file

@ -16,7 +16,10 @@
:remote-method="remoteMethod" :remote-method="remoteMethod"
@on-select="handleSelect" @on-select="handleSelect"
@on-clickoutside="handleClickOutside" @on-clickoutside="handleClickOutside"
:transfer="transfer"> :transfer="transfer"
:capture="capture"
:eventsEnabled="eventsEnabled"
>
<slot name="input"> <slot name="input">
<i-input <i-input
:element-id="elementId" :element-id="elementId"
@ -108,6 +111,18 @@
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
capture: {
type: Boolean,
default () {
return !this.$IVIEW ? true : this.$IVIEW.capture;
}
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@ -120,7 +135,7 @@
inputIcon () { inputIcon () {
let icon = ''; let icon = '';
if (this.clearable && this.currentValue && !this.disabled) { if (this.clearable && this.currentValue && !this.disabled) {
icon = 'ios-close'; icon = 'ios-close-circle';
} else if (this.icon) { } else if (this.icon) {
icon = this.icon; icon = this.icon;
} }

View file

@ -45,7 +45,8 @@
prefixCls: prefixCls, prefixCls: prefixCls,
scale: 1, scale: 1,
childrenWidth: 0, childrenWidth: 0,
isSlotShow: false isSlotShow: false,
slotTemp: null
}; };
}, },
computed: { computed: {
@ -85,6 +86,11 @@
return style; return style;
} }
}, },
watch: {
size (val, oldVal) {
if (val !== oldVal) this.setScale();
}
},
methods: { methods: {
setScale () { setScale () {
this.isSlotShow = !this.src && !this.icon; this.isSlotShow = !this.src && !this.icon;
@ -104,11 +110,17 @@
this.$emit('on-error', e); this.$emit('on-error', e);
} }
}, },
beforeCreate () {
this.slotTemp = this.$slots.default;
},
mounted () { mounted () {
this.setScale(); this.setScale();
}, },
updated () { updated () {
this.setScale(); if (this.$slots.default !== this.slotTemp) {
this.slotTemp = this.$slots.default;
this.setScale();
}
} }
}; };
</script> </script>

View file

@ -7,6 +7,10 @@ const Popper = isServer ? function() {} : require('popper.js/dist/umd/popper.js'
export default { export default {
props: { props: {
eventsEnabled: {
type: Boolean,
default: false
},
placement: { placement: {
type: String, type: String,
default: 'bottom' default: 'bottom'
@ -85,6 +89,8 @@ export default {
if (this.popperJS && this.popperJS.hasOwnProperty('destroy')) { if (this.popperJS && this.popperJS.hasOwnProperty('destroy')) {
this.popperJS.destroy(); this.popperJS.destroy();
} }
options.eventsEnabled = this.eventsEnabled;
options.placement = this.placement; options.placement = this.placement;

View file

@ -25,6 +25,7 @@
v-show="visible" v-show="visible"
:class="dropdownCls" :class="dropdownCls"
ref="drop" ref="drop"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom> v-transfer-dom>
@ -152,6 +153,11 @@
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@ -162,10 +168,11 @@
selected: [], selected: [],
tmpSelected: [], tmpSelected: [],
updatingValue: false, // to fix set value in changeOnSelect type updatingValue: false, // to fix set value in changeOnSelect type
currentValue: this.value, currentValue: this.value || [],
query: '', query: '',
validDataStr: '', validDataStr: '',
isLoadedChildren: false // #950 isLoadedChildren: false, // #950
isValueNull: false // hack value null $emit:input [] null
}; };
}, },
computed: { computed: {
@ -432,11 +439,17 @@
this.$emit('on-visible-change', val); this.$emit('on-visible-change', val);
}, },
value (val) { value (val) {
this.currentValue = val; if (val === null) this.isValueNull = true;
if (!val.length) this.selected = []; this.currentValue = val || [];
if (val === null || !val.length) this.selected = [];
}, },
currentValue () { currentValue () {
this.$emit('input', this.currentValue); if (this.isValueNull) {
this.isValueNull = false;
this.$emit('input', null);
} else {
this.$emit('input', this.currentValue);
}
if (this.updatingValue) { if (this.updatingValue) {
this.updatingValue = false; this.updatingValue = false;
return; return;

View file

@ -30,8 +30,8 @@
}, },
data () { data () {
return { return {
currentValue: this.value, currentValue: this.value || [],
childrens: [] children: []
}; };
}, },
computed: { computed: {
@ -49,10 +49,10 @@
}, },
methods: { methods: {
updateModel (update) { updateModel (update) {
this.childrens = findComponentsDownward(this, 'Checkbox'); this.children = findComponentsDownward(this, 'Checkbox');
if (this.childrens) { if (this.children) {
const { value } = this; const value = this.value || [];
this.childrens.forEach(child => { this.children.forEach(child => {
child.model = value; child.model = value;
if (update) { if (update) {

View file

@ -41,6 +41,7 @@
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
:class="dropClasses" :class="dropClasses"
:eventsEnabled="eventsEnabled"
> >
<transition name="fade"> <transition name="fade">
<div <div
@ -84,7 +85,7 @@
<div :class="[prefixCls + '-confirm']"> <div :class="[prefixCls + '-confirm']">
<span :class="confirmColorClasses"> <span :class="confirmColorClasses">
<template v-if="editable"> <template v-if="editable">
<i-input :value="formatColor" size="small" @on-enter="handleEditColor" @on-blur="handleEditColor"></i-input> <i-input ref="editColorInput" :value="formatColor" size="small" @on-enter="handleEditColor" @on-blur="handleEditColor"></i-input>
</template> </template>
<template v-else>{{formatColor}}</template> <template v-else>{{formatColor}}</template>
</span> </span>
@ -231,13 +232,18 @@ export default {
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data() { data() {
return { return {
val: changeColor(this.value), val: changeColor(this.value || ''),
currentValue: this.value, currentValue: this.value || '',
dragging: false, dragging: false,
visible: false, visible: false,
recommendedColor: [ recommendedColor: [
@ -403,10 +409,10 @@ export default {
watch: { watch: {
value(newVal) { value(newVal) {
this.val = changeColor(newVal); this.val = changeColor(newVal || '');
}, },
visible(val) { visible(val) {
this.val = changeColor(this.value); this.val = changeColor(this.value || '');
this.$refs.drop[val ? 'update' : 'destroy'](); this.$refs.drop[val ? 'update' : 'destroy']();
this.$emit('on-open-change', Boolean(val)); this.$emit('on-open-change', Boolean(val));
}, },
@ -424,7 +430,9 @@ export default {
handleClose(event) { handleClose(event) {
if (this.visible) { if (this.visible) {
if (this.dragging || event.type === 'mousedown') { if (this.dragging || event.type === 'mousedown') {
event.preventDefault(); if (this.$refs.editColorInput && event.target !== this.$refs.editColorInput.$el.querySelector('input')) {
event.preventDefault();
}
return; return;
} }

View file

@ -296,7 +296,12 @@
}, },
changePanelDate(panel, type, increment, updateOtherPanel = true){ changePanelDate(panel, type, increment, updateOtherPanel = true){
const current = new Date(this[`${panel}PanelDate`]); const current = new Date(this[`${panel}PanelDate`]);
current[`set${type}`](current[`get${type}`]() + increment); // fix https://github.com/view-design/ViewUI/issues/418
// 1
// FullYear https://github.com/iview/iview/issues/6600
if (type === 'FullYear') current[`set${type}`](current[`get${type}`]() + increment);
else current[`set${type}`](current[`get${type}`]() + increment, 1);
this[`${panel}PanelDate`] = current; this[`${panel}PanelDate`] = current;
if (!updateOtherPanel) return; if (!updateOtherPanel) return;

View file

@ -38,6 +38,7 @@
:class="dropdownCls" :class="dropdownCls"
:placement="placement" :placement="placement"
ref="drop" ref="drop"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom> v-transfer-dom>
@ -223,6 +224,11 @@
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data(){ data(){
@ -249,6 +255,7 @@
active: false active: false
}, },
internalFocus: false, internalFocus: false,
isValueNull: false // hack value null $emit:input null
}; };
}, },
computed: { computed: {
@ -779,10 +786,11 @@
if (state === false){ if (state === false){
this.$refs.drop.destroy(); this.$refs.drop.destroy();
} }
this.$refs.drop.update(); if (state) this.$refs.drop.update(); // #589 #590 #592Drop
this.$emit('on-open-change', state); this.$emit('on-open-change', state);
}, },
value(val) { value(val) {
if (val === null) this.isValueNull = true;
this.internalValue = this.parseDate(val); this.internalValue = this.parseDate(val);
}, },
open (val) { open (val) {
@ -795,20 +803,33 @@
const newValue = JSON.stringify(now); const newValue = JSON.stringify(now);
const oldValue = JSON.stringify(before); const oldValue = JSON.stringify(before);
const shouldEmitInput = newValue !== oldValue || typeof now !== typeof before; const shouldEmitInput = newValue !== oldValue || typeof now !== typeof before;
if (shouldEmitInput) this.$emit('input', now); // to update v-model // to update v-model
if (shouldEmitInput) {
if (this.isValueNull) {
this.isValueNull = false;
this.$emit('input', null);
} else {
this.$emit('input', now);
}
}
}, },
}, },
mounted () { mounted () {
const initialValue = this.value; // null
const parsedValue = this.publicVModelValue; // const initialValue = this.value;
if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){ // const parsedValue = this.publicVModelValue;
this.$emit('input', this.publicVModelValue); // to update v-model // if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){
} // this.$emit('input', this.publicVModelValue); // to update v-model
// }
if (this.open !== null) this.visible = this.open; if (this.open !== null) this.visible = this.open;
// to handle focus from confirm buttons // to handle focus from confirm buttons
this.$on('focus-input', () => this.focus()); this.$on('focus-input', () => this.focus());
this.$on('update-popper', () => this.updatePopper()); this.$on('update-popper', () => this.updatePopper());
},
beforeDestroy() {
this.$off('focus-input');
this.$off('update-popper');
} }
}; };
</script> </script>

View file

@ -37,6 +37,11 @@
return oneOf(value, ['small', 'default']); return oneOf(value, ['small', 'default']);
}, },
default: 'default' default: 'default'
},
// 4.5.0
plain: {
type: Boolean,
default: false
} }
}, },
computed: { computed: {
@ -51,7 +56,8 @@
{ {
[`${prefixCls}-with-text`]: this.hasSlot && this.orientation === 'center', [`${prefixCls}-with-text`]: this.hasSlot && this.orientation === 'center',
[`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot, [`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot,
[`${prefixCls}-dashed`]: !!this.dashed [`${prefixCls}-dashed`]: !!this.dashed,
[`${prefixCls}-plain`]: this.plain
} }
]; ];
}, },
@ -62,4 +68,4 @@
} }
} }
}; };
</script> </script>

View file

@ -4,7 +4,7 @@
<div :class="maskClasses" :style="maskStyle" v-show="visible" v-if="mask" @click="handleMask"></div> <div :class="maskClasses" :style="maskStyle" v-show="visible" v-if="mask" @click="handleMask"></div>
</transition> </transition>
<div :class="wrapClasses" @click="handleWrapClick"> <div :class="wrapClasses" @click="handleWrapClick">
<transition :name="'move-' + placement"> <transition :name="transitionName">
<div :class="classes" :style="mainStyles" v-show="visible"> <div :class="classes" :style="mainStyles" v-show="visible">
<div :class="contentClasses" ref="content"> <div :class="contentClasses" ref="content">
<a class="ivu-drawer-close" v-if="closable" @click="close"> <a class="ivu-drawer-close" v-if="closable" @click="close">
@ -15,7 +15,7 @@
<div :class="[prefixCls + '-header']" v-if="showHead"><slot name="header"><div :class="[prefixCls + '-header-inner']">{{ title }}</div></slot></div> <div :class="[prefixCls + '-header']" v-if="showHead"><slot name="header"><div :class="[prefixCls + '-header-inner']">{{ title }}</div></slot></div>
<div :class="[prefixCls + '-body']" :style="styles"><slot></slot></div> <div :class="[prefixCls + '-body']" :style="styles"><slot></slot></div>
</div> </div>
<div class="ivu-drawer-drag" :class="{ 'ivu-drawer-drag-left': placement === 'left' }" v-if="draggable" @mousedown="handleTriggerMousedown"> <div class="ivu-drawer-drag" :class="'ivu-drawer-drag-' + placement" v-if="draggable && (placement === 'left' || placement === 'right')" @mousedown="handleTriggerMousedown">
<slot name="trigger"> <slot name="trigger">
<div class="ivu-drawer-drag-move-trigger"> <div class="ivu-drawer-drag-move-trigger">
<div class="ivu-drawer-drag-move-trigger-point"> <div class="ivu-drawer-drag-move-trigger-point">
@ -57,6 +57,11 @@
type: [Number, String], type: [Number, String],
default: 256 default: 256
}, },
// 4.6.0
height: {
type: [Number, String],
default: 256
},
closable: { closable: {
type: Boolean, type: Boolean,
default: true default: true
@ -79,9 +84,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
// 4.6.0 add top, bottom
placement: { placement: {
validator (value) { validator (value) {
return oneOf(value, ['left', 'right']); return oneOf(value, ['left', 'right', 'top', 'bottom']);
}, },
default: 'right' default: 'right'
}, },
@ -117,9 +123,12 @@
showHead: true, showHead: true,
canMove: false, canMove: false,
dragWidth: this.width, dragWidth: this.width,
dragHeight: this.height,
wrapperWidth: this.width, wrapperWidth: this.width,
wrapperHeight: this.height,
wrapperLeft: 0, wrapperLeft: 0,
minWidth: 256 minWidth: 256,
minHeight: 256
}; };
}, },
computed: { computed: {
@ -138,13 +147,23 @@
mainStyles () { mainStyles () {
let style = {}; let style = {};
const width = parseInt(this.dragWidth); if (this.placement === 'left' || this.placement === 'right') {
const width = parseInt(this.dragWidth);
const styleWidth = { const styleWidth = {
width: width <= 100 ? `${width}%` : `${width}px` width: width <= 100 ? `${width}%` : `${width}px`
}; };
Object.assign(style, styleWidth); Object.assign(style, styleWidth);
} else {
const height = parseInt(this.dragHeight);
const styleHeight = {
height: height <= 100 ? `${height}%` : `${height}px`
};
Object.assign(style, styleHeight);
}
return style; return style;
}, },
@ -173,6 +192,11 @@
[`${prefixCls}-mask-inner`]: this.inner [`${prefixCls}-mask-inner`]: this.inner
} }
]; ];
},
transitionName () {
if (this.placement === 'left' || this.placement === 'right') return `move-${this.placement}`;
else if (this.placement === 'top') return 'move-up';
else return 'move-down';
} }
}, },
methods: { methods: {
@ -306,7 +330,10 @@
}, },
width (val) { width (val) {
this.dragWidth = val; this.dragWidth = val;
},
height (val) {
this.dragHeight = val;
} }
} }
}; };
</script> </script>

View file

@ -13,6 +13,7 @@
ref="drop" ref="drop"
@mouseenter.native="handleMouseenter" @mouseenter.native="handleMouseenter"
@mouseleave.native="handleMouseleave" @mouseleave.native="handleMouseleave"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom><slot name="list"></slot></Drop> v-transfer-dom><slot name="list"></slot></Drop>
@ -67,6 +68,11 @@
default () { default () {
return !this.$IVIEW ? true : this.$IVIEW.capture; return !this.$IVIEW ? true : this.$IVIEW.capture;
} }
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
computed: { computed: {
@ -113,7 +119,9 @@
if (this.trigger !== 'click') { if (this.trigger !== 'click') {
return false; return false;
} }
this.currentVisible = !this.currentVisible; // #661
const $parent = this.hasParent();
if (!$parent) this.currentVisible = !this.currentVisible;
}, },
handleRightClick () { handleRightClick () {
if (this.trigger === 'custom') return false; if (this.trigger === 'custom') return false;

View file

@ -234,7 +234,7 @@
// this.validateDisabled = true; // this.validateDisabled = true;
// prop.o[prop.k] = this.initialValue; // prop.o[prop.k] = this.initialValue;
// } // }
if (Array.isArray(value)) { if (Array.isArray(value) && this.initialValue !== null) {
this.validateDisabled = true; this.validateDisabled = true;
prop.o[prop.k] = [].concat(this.initialValue); prop.o[prop.k] = [].concat(this.initialValue);
} else { } else {

View file

@ -7,6 +7,18 @@
import { findComponentUpward } from '../../utils/assist'; import { findComponentUpward } from '../../utils/assist';
const prefixCls = 'ivu-col'; const prefixCls = 'ivu-col';
function parseFlex(flex) {
if (typeof flex === 'number') {
return `${flex} ${flex} auto`;
}
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
return `0 0 ${flex}`;
}
return flex;
}
export default { export default {
name: 'iCol', name: 'iCol',
props: { props: {
@ -21,7 +33,12 @@
md: [Number, Object], md: [Number, Object],
lg: [Number, Object], lg: [Number, Object],
xl: [Number, Object], xl: [Number, Object],
xxl: [Number, Object] xxl: [Number, Object],
// 4.5.0
flex: {
type: [Number, String],
default: ''
}
}, },
data () { data () {
return { return {
@ -68,6 +85,11 @@
}; };
} }
// 4.5.0
if (this.flex) {
style.flex = parseFlex(this.flex);
}
return style; return style;
} }
}, },

View file

@ -11,6 +11,7 @@
export default { export default {
name: 'Row', name: 'Row',
props: { props: {
// todo 4.5.0 flex
type: { type: {
validator (value) { validator (value) {
return oneOf(value, ['flex']); return oneOf(value, ['flex']);
@ -30,17 +31,26 @@
type: Number, type: Number,
default: 0 default: 0
}, },
className: String className: String,
// 4.5.0
wrap: {
type: Boolean,
default: true
}
}, },
computed: { computed: {
classes () { classes () {
return [ return [
// todo 4.5.0 flex
`${prefixCls}`,
{ {
[`${prefixCls}`]: !this.type,
[`${prefixCls}-${this.type}`]: !!this.type, [`${prefixCls}-${this.type}`]: !!this.type,
[`${prefixCls}-${this.type}-${this.align}`]: !!this.align, [`${prefixCls}-${this.type}-${this.align}`]: !!this.align && this.type,
[`${prefixCls}-${this.type}-${this.justify}`]: !!this.justify, [`${prefixCls}-${this.type}-${this.justify}`]: !!this.justify && this.type,
[`${this.className}`]: !!this.className [`${prefixCls}-${this.align}`]: !!this.align,
[`${prefixCls}-${this.justify}`]: !!this.justify,
[`${this.className}`]: !!this.className,
[`${prefixCls}-no-wrap`]: !this.wrap
} }
]; ];
}, },

View file

@ -1,6 +1,6 @@
<template> <template>
<div :class="wrapClasses"> <div :class="wrapClasses">
<div :class="handlerClasses"> <div :class="handlerClasses" v-if="!controlsOutside">
<a <a
@click="up" @click="up"
:class="upClasses"> :class="upClasses">
@ -12,6 +12,20 @@
<span :class="innerDownClasses" @click="preventDefault"></span> <span :class="innerDownClasses" @click="preventDefault"></span>
</a> </a>
</div> </div>
<div
class="ivu-input-number-controls-outside-btn ivu-input-number-controls-outside-down"
:class="{ 'ivu-input-number-controls-outside-btn-disabled': downDisabled }"
v-if="controlsOutside"
@click="down">
<i class="ivu-icon ivu-icon-ios-remove"></i>
</div>
<div
class="ivu-input-number-controls-outside-btn ivu-input-number-controls-outside-up"
:class="{ 'ivu-input-number-controls-outside-btn-disabled': upDisabled }"
v-if="controlsOutside"
@click="up">
<i class="ivu-icon ivu-icon-ios-add"></i>
</div>
<div :class="inputWrapClasses"> <div :class="inputWrapClasses">
<input <input
:id="elementId" :id="elementId"
@ -87,7 +101,7 @@
}, },
value: { value: {
type: Number, type: Number,
default: null default: 1
}, },
size: { size: {
validator (value) { validator (value) {
@ -132,6 +146,11 @@
type: String, type: String,
default: '' default: ''
}, },
// 4.5.0
controlsOutside: {
type: Boolean,
default: false
}
}, },
data () { data () {
return { return {
@ -148,7 +167,8 @@
{ {
[`${prefixCls}-${this.size}`]: !!this.size, [`${prefixCls}-${this.size}`]: !!this.size,
[`${prefixCls}-disabled`]: this.itemDisabled, [`${prefixCls}-disabled`]: this.itemDisabled,
[`${prefixCls}-focused`]: this.focused [`${prefixCls}-focused`]: this.focused,
[`${prefixCls}-controls-outside`]: this.controlsOutside
} }
]; ];
}, },
@ -187,13 +207,8 @@
}, },
precisionValue () { precisionValue () {
// can not display 1.0 // can not display 1.0
// if(!this.currentValue) return this.currentValue; if(!this.currentValue) return this.currentValue;
// return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue; return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
let arr = (this.currentValue + '').split('.');
if (this.precision && arr[1] && this.precision < arr[1].length) {
return this.currentValue.toFixed(this.precision);
}
return this.currentValue;
}, },
formatterValue () { formatterValue () {
if (this.formatter && this.precisionValue !== null) { if (this.formatter && this.precisionValue !== null) {

View file

@ -2,14 +2,14 @@
<div :class="wrapClasses"> <div :class="wrapClasses">
<template v-if="type !== 'textarea'"> <template v-if="type !== 'textarea'">
<div :class="[prefixCls + '-group-prepend']" v-if="prepend" v-show="slotReady"><slot name="prepend"></slot></div> <div :class="[prefixCls + '-group-prepend']" v-if="prepend" v-show="slotReady"><slot name="prepend"></slot></div>
<i class="ivu-icon" :class="['ivu-icon-ios-close-circle', prefixCls + '-icon', prefixCls + '-icon-clear' , prefixCls + '-icon-normal']" v-if="clearable && currentValue && !itemDisabled" @click="handleClear"></i> <i class="ivu-icon" :class="['ivu-icon-ios-close-circle', prefixCls + '-icon', prefixCls + '-icon-clear' , prefixCls + '-icon-normal']" v-if="clearable && currentValue && !itemDisabled" @click="handleClear" :style="clearableStyles"></i>
<i class="ivu-icon" :class="['ivu-icon-' + icon, prefixCls + '-icon', prefixCls + '-icon-normal']" v-else-if="icon" @click="handleIconClick"></i> <i class="ivu-icon" :class="['ivu-icon-' + icon, prefixCls + '-icon', prefixCls + '-icon-normal']" v-else-if="icon" @click="handleIconClick"></i>
<i class="ivu-icon ivu-icon-ios-search" :class="[prefixCls + '-icon', prefixCls + '-icon-normal', prefixCls + '-search-icon']" v-else-if="search && enterButton === false" @click="handleSearch"></i> <i class="ivu-icon ivu-icon-ios-search" :class="[prefixCls + '-icon', prefixCls + '-icon-normal', prefixCls + '-search-icon']" v-else-if="search && enterButton === false" @click="handleSearch"></i>
<span class="ivu-input-suffix" v-else-if="showSuffix"><slot name="suffix"><i class="ivu-icon" :class="['ivu-icon-' + suffix]" v-if="suffix"></i></slot></span> <span class="ivu-input-suffix" v-else-if="showSuffix"><slot name="suffix"><i class="ivu-icon" :class="['ivu-icon-' + suffix]" v-if="suffix"></i></slot></span>
<span class="ivu-input-word-count" v-else-if="showWordLimit">{{ textLength }}/{{ upperLimit }}</span> <span class="ivu-input-word-count" v-else-if="showWordLimit">{{ textLength }}/{{ upperLimit }}</span>
<span class="ivu-input-suffix" v-else-if="password" @click="handleToggleShowPassword"> <span class="ivu-input-suffix" v-else-if="password" @click="handleToggleShowPassword">
<i class="ivu-icon ivu-icon-ios-eye-off-outline" v-if="showPassword"></i> <i class="ivu-icon ivu-icon-ios-eye-outline" v-if="showPassword"></i>
<i class="ivu-icon ivu-icon-ios-eye-outline" v-else></i> <i class="ivu-icon ivu-icon-ios-eye-off-outline" v-else></i>
</span> </span>
<transition name="fade"> <transition name="fade">
<i class="ivu-icon ivu-icon-ios-loading ivu-load-loop" :class="[prefixCls + '-icon', prefixCls + '-icon-validate']" v-if="!icon"></i> <i class="ivu-icon ivu-icon-ios-loading ivu-load-loop" :class="[prefixCls + '-icon', prefixCls + '-icon-validate']" v-if="!icon"></i>
@ -190,6 +190,11 @@
password: { password: {
type: Boolean, type: Boolean,
default: false default: false
},
// 4.5.0
border: {
type: Boolean,
default: true
} }
}, },
data () { data () {
@ -199,7 +204,8 @@
slotReady: false, slotReady: false,
textareaStyles: {}, textareaStyles: {},
isOnComposition: false, isOnComposition: false,
showPassword: false showPassword: false,
clearableIconOffset: 0
}; };
}, },
computed: { computed: {
@ -239,7 +245,8 @@
[`${prefixCls}-group-with-prepend`]: this.prepend, [`${prefixCls}-group-with-prepend`]: this.prepend,
[`${prefixCls}-group-with-append`]: this.append || (this.search && this.enterButton), [`${prefixCls}-group-with-append`]: this.append || (this.search && this.enterButton),
[`${prefixCls}-hide-icon`]: this.append, // #554 [`${prefixCls}-hide-icon`]: this.append, // #554
[`${prefixCls}-with-search`]: (this.search && this.enterButton) [`${prefixCls}-with-search`]: (this.search && this.enterButton),
[`${prefixCls}-wrapper-disabled`]: this.itemDisabled // #685
} }
]; ];
}, },
@ -249,6 +256,7 @@
{ {
[`${prefixCls}-${this.size}`]: !!this.size, [`${prefixCls}-${this.size}`]: !!this.size,
[`${prefixCls}-disabled`]: this.itemDisabled, [`${prefixCls}-disabled`]: this.itemDisabled,
[`${prefixCls}-no-border`]: !this.border,
[`${prefixCls}-with-prefix`]: this.showPrefix, [`${prefixCls}-with-prefix`]: this.showPrefix,
[`${prefixCls}-with-suffix`]: this.showSuffix || (this.search && this.enterButton === false) [`${prefixCls}-with-suffix`]: this.showSuffix || (this.search && this.enterButton === false)
} }
@ -258,7 +266,8 @@
return [ return [
`${prefixCls}`, `${prefixCls}`,
{ {
[`${prefixCls}-disabled`]: this.itemDisabled [`${prefixCls}-disabled`]: this.itemDisabled,
[`${prefixCls}-no-border`]: !this.border
} }
]; ];
}, },
@ -271,6 +280,12 @@
} }
return (this.value || '').length; return (this.value || '').length;
},
clearableStyles () {
const style = {};
let offset = this.clearableIconOffset;
if (offset) style.transform = `translateX(-${offset}px)`;
return style;
} }
}, },
methods: { methods: {
@ -341,11 +356,24 @@
this.textareaStyles = calcTextareaHeight(this.$refs.textarea, minRows, maxRows); this.textareaStyles = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
}, },
focus () { focus (option) {
if (this.type === 'textarea') { const $el = this.type === 'textarea' ? this.$refs.textarea : this.$refs.input;
this.$refs.textarea.focus(); $el.focus(option);
} else { // Selection content
this.$refs.input.focus(); const { cursor } = option || {};
if (cursor) {
const len = $el.value.length;
switch (cursor) {
case 'start':
$el.setSelectionRange(0, 0);
break;
case 'end':
$el.setSelectionRange(len, len);
break;
default:
$el.setSelectionRange(0, len);
}
} }
}, },
blur () { blur () {
@ -375,16 +403,31 @@
setTimeout(() => { setTimeout(() => {
this.$refs.input.setSelectionRange(len, len); this.$refs.input.setSelectionRange(len, len);
}, 0); }, 0);
},
handleCalcIconOffset () {
const $el = this.$el.querySelectorAll('.ivu-input-group-append')[0];
if ($el) {
this.clearableIconOffset = $el.offsetWidth;
} else {
this.clearableIconOffset = 0;
}
} }
}, },
watch: { watch: {
value (val) { value (val) {
this.setCurrentValue(val); this.setCurrentValue(val);
},
type () {
this.$nextTick(this.handleCalcIconOffset);
} }
}, },
mounted () { mounted () {
this.slotReady = true; this.slotReady = true;
this.resizeTextarea(); this.resizeTextarea();
this.handleCalcIconOffset();
},
updated () {
this.$nextTick(this.handleCalcIconOffset);
} }
}; };
</script> </script>

View file

@ -2,12 +2,13 @@ import Modal from './confirm';
let modalInstance; let modalInstance;
function getModalInstance (render = undefined) { function getModalInstance (render = undefined, lockScroll = true) {
modalInstance = modalInstance || Modal.newInstance({ modalInstance = modalInstance || Modal.newInstance({
closable: false, closable: false,
maskClosable: false, maskClosable: false,
footerHide: true, footerHide: true,
render: render render: render,
lockScroll
}); });
return modalInstance; return modalInstance;
@ -15,7 +16,8 @@ function getModalInstance (render = undefined) {
function confirm (options) { function confirm (options) {
const render = ('render' in options) ? options.render : undefined; const render = ('render' in options) ? options.render : undefined;
let instance = getModalInstance(render); const lockScroll = ('lockScroll' in options) ? options.lockScroll : true;
let instance = getModalInstance(render, lockScroll);
options.onRemove = function () { options.onRemove = function () {
modalInstance = null; modalInstance = null;
@ -64,4 +66,4 @@ Modal.remove = function () {
instance.remove(); instance.remove();
}; };
export default Modal; export default Modal;

View file

@ -1,6 +1,12 @@
// used for Modal & $Spin & Drawer // used for Modal & $Spin & Drawer
import { getScrollBarSize } from '../../utils/assist'; import { getScrollBarSize } from '../../utils/assist';
export default { export default {
props: {
lockScroll: {
type: Boolean,
default: true
}
},
methods: { methods: {
checkScrollBar () { checkScrollBar () {
let fullWindowWidth = window.innerWidth; let fullWindowWidth = window.innerWidth;
@ -26,11 +32,13 @@ export default {
document.body.style.paddingRight = ''; document.body.style.paddingRight = '';
}, },
addScrollEffect () { addScrollEffect () {
if (!this.lockScroll) return;
this.checkScrollBar(); this.checkScrollBar();
this.setScrollBar(); this.setScrollBar();
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
}, },
removeScrollEffect() { removeScrollEffect() {
if (!this.lockScroll) return;
if (this.checkMaskInVisible()) { if (this.checkMaskInVisible()) {
document.body.style.overflow = ''; document.body.style.overflow = '';
this.resetScrollBar(); this.resetScrollBar();

View file

@ -38,12 +38,21 @@
import ScrollbarMixins from './mixins-scrollbar'; import ScrollbarMixins from './mixins-scrollbar';
import { on, off } from '../../utils/dom'; import { on, off } from '../../utils/dom';
import { findComponentsDownward } from '../../utils/assist'; import { findComponentsDownward, deepCopy } from '../../utils/assist';
import { transferIndex as modalIndex, transferIncrease as modalIncrease } from '../../utils/transfer-queue'; import { transferIndex as modalIndex, transferIncrease as modalIncrease, lastVisibleIndex, lastVisibleIncrease } from '../../utils/transfer-queue';
const prefixCls = 'ivu-modal'; const prefixCls = 'ivu-modal';
const dragData = {
x: null,
y: null,
dragX: null,
dragY: null,
dragging: false,
rect: null
};
export default { export default {
name: 'Modal', name: 'Modal',
mixins: [ Locale, Emitter, ScrollbarMixins ], mixins: [ Locale, Emitter, ScrollbarMixins ],
@ -123,10 +132,26 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
// 4.6.0
sticky: {
type: Boolean,
default: false
},
// 4.6.0
stickyDistance: {
type: Number,
default: 10
},
// 4.6.0
resetDragPosition: {
type: Boolean,
default: false
},
zIndex: { zIndex: {
type: Number, type: Number,
default: 1000 default: 1000
}, },
beforeClose: Function
}, },
data () { data () {
return { return {
@ -135,13 +160,7 @@
showHead: true, showHead: true,
buttonLoading: false, buttonLoading: false,
visible: this.value, visible: this.value,
dragData: { dragData: deepCopy(dragData),
x: null,
y: null,
dragX: null,
dragY: null,
dragging: false
},
modalIndex: this.handleGetModalIndex(), // for Esc close the top modal modalIndex: this.handleGetModalIndex(), // for Esc close the top modal
isMouseTriggerIn: false, // #5800 isMouseTriggerIn: false, // #5800
}; };
@ -180,7 +199,7 @@
`${prefixCls}-content`, `${prefixCls}-content`,
{ {
[`${prefixCls}-content-no-mask`]: !this.showMask, [`${prefixCls}-content-no-mask`]: !this.showMask,
[`${prefixCls}-content-drag`]: this.draggable, [`${prefixCls}-content-drag`]: this.draggable && !this.fullscreen,
[`${prefixCls}-content-dragging`]: this.draggable && this.dragData.dragging [`${prefixCls}-content-dragging`]: this.draggable && this.dragData.dragging
} }
]; ];
@ -204,7 +223,7 @@
contentStyles () { contentStyles () {
let style = {}; let style = {};
if (this.draggable) { if (this.draggable && !this.fullscreen) {
const customTop = this.styles.top ? parseFloat(this.styles.top) : 0; const customTop = this.styles.top ? parseFloat(this.styles.top) : 0;
const customLeft = this.styles.left ? parseFloat(this.styles.left) : 0; const customLeft = this.styles.left ? parseFloat(this.styles.left) : 0;
if (this.dragData.x !== null) style.left = `${this.dragData.x - customLeft}px`; if (this.dragData.x !== null) style.left = `${this.dragData.x - customLeft}px`;
@ -236,11 +255,26 @@
} }
}, },
showMask () { showMask () {
return this.draggable ? false : this.mask; return this.mask;
} }
}, },
methods: { methods: {
close () { close () {
if (!this.beforeClose) {
return this.handleClose();
}
const before = this.beforeClose();
if (before && before.then) {
before.then(() => {
this.handleClose();
});
} else {
this.handleClose();
}
},
handleClose () {
this.visible = false; this.visible = false;
this.$emit('input', false); this.$emit('input', false);
this.$emit('on-cancel'); this.$emit('on-cancel');
@ -293,10 +327,12 @@
this.$emit('on-hidden'); this.$emit('on-hidden');
}, },
handleMoveStart (event) { handleMoveStart (event) {
if (!this.draggable) return false; if (!this.draggable || this.fullscreen) return false;
const $content = this.$refs.content; const $content = this.$refs.content;
const rect = $content.getBoundingClientRect(); const rect = $content.getBoundingClientRect();
this.dragData.rect = rect;
this.dragData.x = rect.x || rect.left; this.dragData.x = rect.x || rect.left;
this.dragData.y = rect.y || rect.top; this.dragData.y = rect.y || rect.top;
@ -314,7 +350,7 @@
on(window, 'mouseup', this.handleMoveEnd); on(window, 'mouseup', this.handleMoveEnd);
}, },
handleMoveMove (event) { handleMoveMove (event) {
if (!this.dragData.dragging) return false; if (!this.dragData.dragging || this.fullscreen) return false;
const distance = { const distance = {
x: event.clientX, x: event.clientX,
@ -326,8 +362,29 @@
y: distance.y - this.dragData.dragY y: distance.y - this.dragData.dragY
}; };
this.dragData.x += diff_distance.x; if (this.sticky) {
this.dragData.y += diff_distance.y; const clientWidth = document.documentElement.clientWidth;
const clientHeight = document.documentElement.clientHeight;
if ((this.dragData.x + diff_distance.x <= this.stickyDistance) && diff_distance.x < 0) {
this.dragData.x = 0;
} else if ((this.dragData.x + this.dragData.rect.width - clientWidth > -this.stickyDistance) && diff_distance.x > 0) {
this.dragData.x = clientWidth - this.dragData.rect.width;
} else {
this.dragData.x += diff_distance.x;
}
if ((this.dragData.y + diff_distance.y <= this.stickyDistance) && diff_distance.y < 0) {
this.dragData.y = 0;
} else if ((this.dragData.y + this.dragData.rect.height - clientHeight > -this.stickyDistance) && diff_distance.y > 0) {
this.dragData.y = clientHeight - this.dragData.rect.height;
} else {
this.dragData.y += diff_distance.y;
}
} else {
this.dragData.x += diff_distance.x;
this.dragData.y += diff_distance.y;
}
this.dragData.dragX = distance.x; this.dragData.dragX = distance.x;
this.dragData.dragY = distance.y; this.dragData.dragY = distance.y;
@ -343,6 +400,10 @@
}, },
handleClickModal () { handleClickModal () {
if (this.draggable) { if (this.draggable) {
if (lastVisibleIndex !== this.lastVisibleIndex){
this.lastVisibleIndex = lastVisibleIndex;
return;
}
this.modalIndex = this.handleGetModalIndex(); this.modalIndex = this.handleGetModalIndex();
} }
} }
@ -379,7 +440,10 @@
this.removeScrollEffect(); this.removeScrollEffect();
}, 300); }, 300);
} else { } else {
this.modalIndex = this.handleGetModalIndex(); if (this.lastVisible !== val) {
this.modalIndex = this.handleGetModalIndex();
lastVisibleIncrease();
}
if (this.timer) clearTimeout(this.timer); if (this.timer) clearTimeout(this.timer);
this.wrapShow = true; this.wrapShow = true;
@ -390,6 +454,11 @@
this.broadcast('Table', 'on-visible-change', val); this.broadcast('Table', 'on-visible-change', val);
this.broadcast('Slider', 'on-visible-change', val); // #2852 this.broadcast('Slider', 'on-visible-change', val); // #2852
this.$emit('on-visible-change', val); this.$emit('on-visible-change', val);
this.lastVisible = val;
this.lastVisibleIndex = lastVisibleIndex;
if (val && this.resetDragPosition) {
this.dragData = deepCopy(dragData);
}
}, },
loading (val) { loading (val) {
if (!val) { if (!val) {

View file

@ -1,7 +1,7 @@
<template> <template>
<div v-if="showSizer || showElevator" :class="optsClasses"> <div v-if="showSizer || showElevator" :class="optsClasses">
<div v-if="showSizer" :class="sizerClasses"> <div v-if="showSizer" :class="sizerClasses">
<i-select v-model="currentPageSize" :size="size" :placement="placement" :transfer="transfer" :disabled="disabled" @on-change="changeSize"> <i-select v-model="currentPageSize" :size="size" :placement="placement" :transfer="transfer" :disabled="disabled" :eventsEnabled="eventsEnabled" @on-change="changeSize">
<i-option v-for="item in pageSizeOpts" :key="item" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option> <i-option v-for="item in pageSizeOpts" :key="item" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option>
</i-select> </i-select>
</div> </div>
@ -45,7 +45,8 @@
isSmall: Boolean, isSmall: Boolean,
placement: String, placement: String,
transfer: Boolean, transfer: Boolean,
disabled: Boolean disabled: Boolean,
eventsEnabled: Boolean
}, },
data () { data () {
return { return {

View file

@ -3,7 +3,7 @@
<li <li
:title="t('i.page.prev')" :title="t('i.page.prev')"
:class="prevClasses" :class="prevClasses"
@click.stop="prev"> @click="prev">
<a><i class="ivu-icon ivu-icon-ios-arrow-back"></i></a> <a><i class="ivu-icon ivu-icon-ios-arrow-back"></i></a>
</li> </li>
<div :class="simplePagerClasses" :title="currentPage + '/' + allPages"> <div :class="simplePagerClasses" :title="currentPage + '/' + allPages">
@ -22,7 +22,7 @@
<li <li
:title="t('i.page.next')" :title="t('i.page.next')"
:class="nextClasses" :class="nextClasses"
@click.stop="next"> @click="next">
<a><i class="ivu-icon ivu-icon-ios-arrow-forward"></i></a> <a><i class="ivu-icon ivu-icon-ios-arrow-forward"></i></a>
</li> </li>
</ul> </ul>
@ -33,24 +33,24 @@
<li <li
:title="t('i.page.prev')" :title="t('i.page.prev')"
:class="prevClasses" :class="prevClasses"
@click.stop="prev"> @click="prev">
<a><template v-if="prevText !== ''">{{ prevText }}</template><i v-else class="ivu-icon ivu-icon-ios-arrow-back"></i></a> <a><template v-if="prevText !== ''">{{ prevText }}</template><i v-else class="ivu-icon ivu-icon-ios-arrow-back"></i></a>
</li> </li>
<li title="1" :class="firstPageClasses" @click.stop="changePage(1)"><a>1</a></li> <li title="1" :class="firstPageClasses" @click="changePage(1)"><a>1</a></li>
<li :title="t('i.page.prev5')" v-if="currentPage > 5" :class="[prefixCls + '-item-jump-prev']" @click.stop="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-back"></i></a></li> <li :title="t('i.page.prev5')" v-if="currentPage > 5" :class="[prefixCls + '-item-jump-prev']" @click="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-back"></i><i class="ivu-icon ivu-icon-ios-more"></i></a></li>
<li :title="currentPage - 3" v-if="currentPage === 5" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage - 3)"><a>{{ currentPage - 3 }}</a></li> <li :title="currentPage - 3" v-if="currentPage === 5" :class="[prefixCls + '-item']" @click="changePage(currentPage - 3)"><a>{{ currentPage - 3 }}</a></li>
<li :title="currentPage - 2" v-if="currentPage - 2 > 1" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage - 2)"><a>{{ currentPage - 2 }}</a></li> <li :title="currentPage - 2" v-if="currentPage - 2 > 1" :class="[prefixCls + '-item']" @click="changePage(currentPage - 2)"><a>{{ currentPage - 2 }}</a></li>
<li :title="currentPage - 1" v-if="currentPage - 1 > 1" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage - 1)"><a>{{ currentPage - 1 }}</a></li> <li :title="currentPage - 1" v-if="currentPage - 1 > 1" :class="[prefixCls + '-item']" @click="changePage(currentPage - 1)"><a>{{ currentPage - 1 }}</a></li>
<li :title="currentPage" v-if="currentPage != 1 && currentPage != allPages" :class="[prefixCls + '-item',prefixCls + '-item-active']"><a>{{ currentPage }}</a></li> <li :title="currentPage" v-if="currentPage != 1 && currentPage != allPages" :class="[prefixCls + '-item',prefixCls + '-item-active']"><a>{{ currentPage }}</a></li>
<li :title="currentPage + 1" v-if="currentPage + 1 < allPages" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage + 1)"><a>{{ currentPage + 1 }}</a></li> <li :title="currentPage + 1" v-if="currentPage + 1 < allPages" :class="[prefixCls + '-item']" @click="changePage(currentPage + 1)"><a>{{ currentPage + 1 }}</a></li>
<li :title="currentPage + 2" v-if="currentPage + 2 < allPages" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage + 2)"><a>{{ currentPage + 2 }}</a></li> <li :title="currentPage + 2" v-if="currentPage + 2 < allPages" :class="[prefixCls + '-item']" @click="changePage(currentPage + 2)"><a>{{ currentPage + 2 }}</a></li>
<li :title="currentPage + 3" v-if="allPages - currentPage === 4" :class="[prefixCls + '-item']" @click.stop="changePage(currentPage + 3)"><a>{{ currentPage + 3 }}</a></li> <li :title="currentPage + 3" v-if="allPages - currentPage === 4" :class="[prefixCls + '-item']" @click="changePage(currentPage + 3)"><a>{{ currentPage + 3 }}</a></li>
<li :title="t('i.page.next5')" v-if="allPages - currentPage >= 5" :class="[prefixCls + '-item-jump-next']" @click.stop="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-forward"></i></a></li> <li :title="t('i.page.next5')" v-if="allPages - currentPage >= 5" :class="[prefixCls + '-item-jump-next']" @click="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-forward"></i><i class="ivu-icon ivu-icon-ios-more"></i></a></li>
<li :title="allPages" v-if="allPages > 1" :class="lastPageClasses" @click.stop="changePage(allPages)"><a>{{ allPages }}</a></li> <li :title="allPages" v-if="allPages > 1" :class="lastPageClasses" @click="changePage(allPages)"><a>{{ allPages }}</a></li>
<li <li
:title="t('i.page.next')" :title="t('i.page.next')"
:class="nextClasses" :class="nextClasses"
@click.stop="next"> @click="next">
<a><template v-if="nextText !== ''">{{ nextText }}</template><i v-else class="ivu-icon ivu-icon-ios-arrow-forward"></i></a> <a><template v-if="nextText !== ''">{{ nextText }}</template><i v-else class="ivu-icon ivu-icon-ios-arrow-forward"></i></a>
</li> </li>
<Options <Options
@ -65,6 +65,7 @@
:disabled="disabled" :disabled="disabled"
:all-pages="allPages" :all-pages="allPages"
:is-small="isSmall" :is-small="isSmall"
:eventsEnabled="eventsEnabled"
@on-size="onSize" @on-size="onSize"
@on-page="onPage"> @on-page="onPage">
</Options> </Options>
@ -114,7 +115,7 @@
}, },
size: { size: {
validator (value) { validator (value) {
return oneOf(value, ['small']); return oneOf(value, ['small', 'default']);
} }
}, },
simple: { simple: {
@ -147,15 +148,12 @@
type: String, type: String,
default: '' default: ''
}, },
cacheKey: { disabled: {
type: String,
default: ''
},
cachePageSize: {
type: Boolean, type: Boolean,
default: false default: false
}, },
disabled: { // 4.6.0
eventsEnabled: {
type: Boolean, type: Boolean,
default: false default: false
} }
@ -183,7 +181,7 @@
}, },
computed: { computed: {
isSmall () { isSmall () {
return !!this.size; return this.size === 'small';
}, },
allPages () { allPages () {
const allPage = Math.ceil(this.total / this.currentPageSize); const allPage = Math.ceil(this.total / this.currentPageSize);
@ -207,7 +205,7 @@
{ {
[`${this.className}`]: !!this.className, [`${this.className}`]: !!this.className,
[`${prefixCls}-with-disabled`]: this.disabled, [`${prefixCls}-with-disabled`]: this.disabled,
'mini': !!this.size 'mini': this.size === 'small'
} }
]; ];
}, },
@ -244,13 +242,6 @@
[`${prefixCls}-item-active`]: this.currentPage === this.allPages [`${prefixCls}-item-active`]: this.currentPage === this.allPages
} }
]; ];
},
pageSizeKey() {
if (this.cachePageSize && this.cacheKey !== null) {
return `pageSize_${this.cacheKey}`;
} else {
return null;
}
} }
}, },
methods: { methods: {
@ -269,6 +260,7 @@
return false; return false;
} }
this.changePage(current - 1); this.changePage(current - 1);
this.$emit('on-prev', current - 1);
}, },
next () { next () {
if (this.disabled) return; if (this.disabled) return;
@ -277,6 +269,7 @@
return false; return false;
} }
this.changePage(current + 1); this.changePage(current + 1);
this.$emit('on-next', current + 1);
}, },
fastPrev () { fastPrev () {
if (this.disabled) return; if (this.disabled) return;
@ -301,9 +294,6 @@
this.currentPageSize = pageSize; this.currentPageSize = pageSize;
this.$emit('on-page-size-change', pageSize); this.$emit('on-page-size-change', pageSize);
this.changePage(1); this.changePage(1);
if (this.cachePageSize && this.cacheKey !== null) {
window.localStorage.setItem(this.pageSizeKey, pageSize);
}
}, },
onPage (page) { onPage (page) {
if (this.disabled) return; if (this.disabled) return;

View file

@ -41,12 +41,19 @@
name: { name: {
type: String, type: String,
default: getUuid default: getUuid
},
// 4.5.0
buttonStyle: {
validator (value) {
return oneOf(value, ['default', 'solid']);
},
default: 'default'
} }
}, },
data () { data () {
return { return {
currentValue: this.value, currentValue: this.value,
childrens: [] children: []
}; };
}, },
computed: { computed: {
@ -57,6 +64,7 @@
[`${prefixCls}-${this.size}`]: !!this.size, [`${prefixCls}-${this.size}`]: !!this.size,
[`ivu-radio-${this.size}`]: !!this.size, [`ivu-radio-${this.size}`]: !!this.size,
[`${prefixCls}-${this.type}`]: !!this.type, [`${prefixCls}-${this.type}`]: !!this.type,
[`${prefixCls}-button-${this.buttonStyle}`]: this.type === 'button' && this.buttonStyle !== 'default',
[`${prefixCls}-vertical`]: this.vertical [`${prefixCls}-vertical`]: this.vertical
} }
]; ];
@ -67,9 +75,9 @@
}, },
methods: { methods: {
updateValue () { updateValue () {
this.childrens = findComponentsDownward(this, 'Radio'); this.children = findComponentsDownward(this, 'Radio');
if (this.childrens) { if (this.children) {
this.childrens.forEach(child => { this.children.forEach(child => {
child.currentValue = this.currentValue === child.label; child.currentValue = this.currentValue === child.label;
child.group = true; child.group = true;
}); });

View file

@ -81,12 +81,13 @@
} }
}, },
data () { data () {
const value = this.value || 0;
return { return {
prefixCls: prefixCls, prefixCls: prefixCls,
hoverIndex: -1, hoverIndex: -1,
isHover: false, isHover: false,
isHalf: this.allowHalf && this.value.toString().indexOf('.') >= 0, isHalf: this.allowHalf && value.toString().indexOf('.') >= 0,
currentValue: this.value currentValue: value
}; };
}, },
computed: { computed: {
@ -113,7 +114,7 @@
}, },
watch: { watch: {
value (val) { value (val) {
this.currentValue = val; this.currentValue = val || 0;
}, },
currentValue (val) { currentValue (val) {
this.setHalf(val); this.setHalf(val);
@ -136,7 +137,7 @@
} }
return [ return [
{ {
[`${prefixCls}-star`]: !this.showCharacter, [`${prefixCls}-star`]: !this.showCharacter,
[`${prefixCls}-star-chart`]: this.showCharacter, [`${prefixCls}-star-chart`]: this.showCharacter,
[`${prefixCls}-star-full`]: (!isLast && full) || (isLast && !this.isHalf), [`${prefixCls}-star-full`]: (!isLast && full) || (isLast && !this.isHalf),

View file

@ -55,7 +55,11 @@
loadingText: { loadingText: {
type: String type: String
}, },
distanceToEdge: [Number, Array] distanceToEdge: [Number, Array],
stopSlide: {
type: Boolean,
default: false
}
}, },
data() { data() {
const distanceToEdge = this.calculateProximityThreshold(); const distanceToEdge = this.calculateProximityThreshold();
@ -86,7 +90,12 @@
return `${prefixCls}-wrapper`; return `${prefixCls}-wrapper`;
}, },
scrollContainerClasses() { scrollContainerClasses() {
return `${prefixCls}-container`; return [
`${prefixCls}-container`,
{
[`${prefixCls}-container-loading`]: this.showBodyLoader && this.stopSlide
}
];
}, },
slotContainerClasses() { slotContainerClasses() {
return [ return [

View file

@ -21,6 +21,11 @@
}, },
transfer: { transfer: {
type: Boolean type: Boolean
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@ -44,14 +49,13 @@
methods: { methods: {
update () { update () {
if (isServer) return; if (isServer) return;
if (this.popper) { this.$nextTick(() => {
this.$nextTick(() => { if (this.popper) {
this.popper.update(); this.popper.update();
this.popperStatus = true; this.popperStatus = true;
}); } else {
} else {
this.$nextTick(() => {
this.popper = new Popper(this.$parent.$refs.reference, this.$el, { this.popper = new Popper(this.$parent.$refs.reference, this.$el, {
eventsEnabled: this.eventsEnabled,
placement: this.placement, placement: this.placement,
modifiers: { modifiers: {
computeStyle:{ computeStyle:{
@ -69,18 +73,20 @@
this.resetTransformOrigin(); this.resetTransformOrigin();
} }
}); });
}); }
} // set a height for parent is Modal and Select's width is 100%
// set a height for parent is Modal and Select's width is 100% if (this.$parent.$options.name === 'iSelect') {
if (this.$parent.$options.name === 'iSelect') { this.width = parseInt(getStyle(this.$parent.$el, 'width'));
this.width = parseInt(getStyle(this.$parent.$el, 'width')); }
} this.tIndex = this.handleGetIndex();
this.tIndex = this.handleGetIndex(); });
}, },
destroy () { destroy () {
if (this.popper) { if (this.popper) {
setTimeout(() => { setTimeout(() => {
if (this.popper && !this.popperStatus) { if (this.popper && !this.popperStatus) {
//fix:#910
this.popper.popper.style.display = 'none';
this.popper.destroy(); this.popper.destroy();
this.popper = null; this.popper = null;
} }
@ -110,8 +116,11 @@
this.$on('on-destroy-popper', this.destroy); this.$on('on-destroy-popper', this.destroy);
}, },
beforeDestroy () { beforeDestroy () {
this.$off('on-update-popper', this.update);
this.$off('on-destroy-popper', this.destroy);
if (this.popper) { if (this.popper) {
this.popper.destroy(); this.popper.destroy();
this.popper = null;
} }
} }
}; };

View file

@ -1,4 +1,3 @@
<script> <script>
const returnArrayFn = () => []; const returnArrayFn = () => [];
@ -15,15 +14,19 @@
slotUpdateHook: { slotUpdateHook: {
type: Function, type: Function,
default: () => {} default: () => {}
}, }
}, },
functional: true, // if use functional, there will be memory leaks
render(h, {props, parent}){ // functional: true,
render(h) {
// to detect changes in the $slot children/options we do this hack // to detect changes in the $slot children/options we do this hack
// so we can trigger the parents computed properties and have everything reactive // so we can trigger the parents computed properties and have everything reactive
// although $slot.default is not // although $slot.default is not
if (props.slotOptions !== parent.$slots.default) props.slotUpdateHook(); if (this.slotOptions !== this.$parent.$slots.default) this.slotUpdateHook();
return props.options; return h('ul', [
this.$slots.default,
this.options
]);
} }
}; };
</script> </script>

View file

@ -43,6 +43,9 @@
this.queryChange(); this.queryChange();
return true; return true;
}); });
},
beforeDestroy() {
this.$off('on-query-change');
} }
}; };
</script> </script>

View file

@ -243,8 +243,10 @@
this.removeTag(this.selectedMultiple[this.selectedMultiple.length - 1]); this.removeTag(this.selectedMultiple[this.selectedMultiple.length - 1]);
} }
}, },
handleInputEnter () { handleInputEnter (e) {
this.$emit('on-enter'); this.$emit('on-enter');
// #926
if (this.showCreateItem) e.stopPropagation();
}, },
onHeaderClick(e){ onHeaderClick(e){
if (this.filterable && e.target === this.$el){ if (this.filterable && e.target === this.$el){

View file

@ -22,10 +22,8 @@
@keydown.tab="handleKeydown" @keydown.tab="handleKeydown"
@keydown.delete="handleKeydown" @keydown.delete="handleKeydown"
@mouseenter="hasMouseHoverHead = true" @mouseenter="hasMouseHoverHead = true"
@mouseleave="hasMouseHoverHead = false" @mouseleave="hasMouseHoverHead = false"
> >
<slot name="input"> <slot name="input">
<input type="hidden" :name="name" :value="publicValue"> <input type="hidden" :name="name" :value="publicValue">
@ -65,20 +63,29 @@
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom v-transfer-dom
:eventsEnabled="eventsEnabled"
> >
<ul v-show="showNotFoundLabel && !allowCreate" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul> <ul v-show="showNotFoundLabel && !allowCreate" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul>
<ul :class="prefixCls + '-dropdown-list'">
<functional-options
v-if="(!remote) || (remote && !loading)"
:options="selectOptions"
:slot-update-hook="updateSlotOptions"
:slot-options="slotOptions"
:class="prefixCls + '-dropdown-list'"
>
<li :class="prefixCls + '-item'" v-if="showCreateItem" @click="handleCreateItem">
{{ query }}
<Icon type="md-return-left" :class="prefixCls + '-item-enter'" />
</li>
</functional-options>
<ul :class="prefixCls + '-dropdown-list'" v-else>
<li :class="prefixCls + '-item'" v-if="showCreateItem" @click="handleCreateItem"> <li :class="prefixCls + '-item'" v-if="showCreateItem" @click="handleCreateItem">
{{ query }} {{ query }}
<Icon type="md-return-left" :class="prefixCls + '-item-enter'" /> <Icon type="md-return-left" :class="prefixCls + '-item-enter'" />
</li> </li>
<functional-options
v-if="(!remote) || (remote && !loading)"
:options="selectOptions"
:slot-update-hook="updateSlotOptions"
:slot-options="slotOptions"
></functional-options>
</ul> </ul>
<ul v-show="loading" :class="[prefixCls + '-loading']">{{ localeLoadingText }}</ul> <ul v-show="loading" :class="[prefixCls + '-loading']">{{ localeLoadingText }}</ul>
</Drop> </Drop>
</transition> </transition>
@ -112,7 +119,7 @@
const findOptionsInVNode = (node) => { const findOptionsInVNode = (node) => {
const opts = node.componentOptions; const opts = node.componentOptions;
if (opts && opts.tag.match(optionRegexp)) return [node]; if (opts && optionRegexp.test(opts.tag)) return [node];
if (!node.children && (!opts || !opts.children)) return []; if (!node.children && (!opts || !opts.children)) return [];
const children = [...(node.children || []), ...(opts && opts.children || [])]; const children = [...(node.children || []), ...(opts && opts.children || [])];
const options = children.reduce( const options = children.reduce(
@ -177,6 +184,11 @@
type: [String, Number, Array], type: [String, Number, Array],
default: '' default: ''
}, },
// 4.4.0
defaultLabel: {
type: [String, Number, Array],
default: ''
},
multiple: { multiple: {
type: Boolean, type: Boolean,
default: false default: false
@ -279,6 +291,11 @@
filterByLabel: { filterByLabel: {
type: Boolean, type: Boolean,
default: false default: false
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
mounted(){ mounted(){
@ -293,9 +310,29 @@
} }
this.checkUpdateStatus(); this.checkUpdateStatus();
// remote search, set default-label
if (this.remote && this.value && this.defaultLabel) {
if (!this.multiple) {
this.query = this.defaultLabel;
} else if (this.multiple && (this.defaultLabel instanceof Array) && this.value.length === this.defaultLabel.length) {
const values = this.value.map((item, index) => {
return {
value: item,
label: this.defaultLabel[index]
};
});
this.$emit('on-set-default-options', JSON.parse(JSON.stringify(values)));
setTimeout(() => {
this.values = values;
});
}
}
},
beforeDestroy () {
this.$off('on-select-selected');
}, },
data () { data () {
return { return {
prefixCls: prefixCls, prefixCls: prefixCls,
values: [], values: [],
@ -311,6 +348,7 @@
lastRemoteQuery: '', lastRemoteQuery: '',
unchangedQuery: true, unchangedQuery: true,
hasExpectedValue: false, hasExpectedValue: false,
isTyping: false, // #728
preventRemoteCall: false, preventRemoteCall: false,
filterQueryChange: false, // #4273 filterQueryChange: false, // #4273
}; };
@ -385,11 +423,13 @@
return selectOptions && selectOptions.length === 0 && (!remote || (remote && !loading)); return selectOptions && selectOptions.length === 0 && (!remote || (remote && !loading));
}, },
publicValue(){ publicValue(){
if (this.labelInValue){ // labelInValue bug:Selectlabel-in-value
return this.multiple ? this.values : this.values[0]; // if (this.labelInValue){
} else { // return this.multiple ? this.values : this.values[0];
return this.multiple ? this.values.map(option => option.value) : (this.values[0] || {}).value; // } else {
} // return this.multiple ? this.values.map(option => option.value) : (this.values[0] || {}).value;
// }
return this.multiple ? this.values.map(option => option.value) : (this.values[0] || {}).value;
}, },
canBeCleared(){ canBeCleared(){
const uiStateMatch = this.hasMouseHoverHead || this.active; const uiStateMatch = this.hasMouseHoverHead || this.active;
@ -424,11 +464,11 @@
const cOptions = option.componentOptions; const cOptions = option.componentOptions;
if (!cOptions) continue; if (!cOptions) continue;
if (cOptions.tag.match(optionGroupRegexp)){ if (optionGroupRegexp.test(cOptions.tag)){
let children = cOptions.children; let children = cOptions.children;
// remove filtered children // remove filtered children
if (this.filterable){ if (this.filterable && this.isTyping){ // #728 let option show full when reclick it
children = children.filter( children = children.filter(
({componentOptions}) => this.validateOption(componentOptions) ({componentOptions}) => this.validateOption(componentOptions)
); );
@ -557,6 +597,8 @@
}, },
hideMenu () { hideMenu () {
this.toggleMenu(null, false); this.toggleMenu(null, false);
// fix #728
this.isTyping = false;
setTimeout(() => this.unchangedQuery = true, ANIMATION_TIMEOUT); setTimeout(() => this.unchangedQuery = true, ANIMATION_TIMEOUT);
}, },
onClickOutside(event){ onClickOutside(event){
@ -648,6 +690,7 @@
}, },
navigateOptions(direction){ navigateOptions(direction){
const optionsLength = this.flatOptions.length - 1; const optionsLength = this.flatOptions.length - 1;
if (optionsLength < 0) return;
let index = this.focusIndex + direction; let index = this.focusIndex + direction;
if (index < 0) index = optionsLength; if (index < 0) index = optionsLength;
@ -712,6 +755,7 @@
}, ANIMATION_TIMEOUT); }, ANIMATION_TIMEOUT);
}, },
onQueryChange(query) { onQueryChange(query) {
this.isTyping = true;
if (query.length > 0 && query !== this.query) { if (query.length > 0 && query !== this.query) {
// in 'AutoComplete', when set an initial value asynchronously, // in 'AutoComplete', when set an initial value asynchronously,
// the 'dropdown list' should be stay hidden. // the 'dropdown list' should be stay hidden.
@ -757,12 +801,8 @@
label: query, label: query,
tag: undefined tag: undefined
}; };
if (this.multiple) { // #926 nextTick
this.onOptionClick(option); this.$nextTick(() => this.onOptionClick(option));
} else {
// nextTick
this.$nextTick(() => this.onOptionClick(option));
}
} }
} }
}, },
@ -782,14 +822,29 @@
const newValue = JSON.stringify(now); const newValue = JSON.stringify(now);
const oldValue = JSON.stringify(before); const oldValue = JSON.stringify(before);
// v-model is always just the value, event with labelInValue === true // v-model is always just the value, event with labelInValue === true
const vModelValue = (this.publicValue && this.labelInValue) ? // const vModelValue = (this.publicValue && this.labelInValue === false) ?
(this.multiple ? this.publicValue.map(({value}) => value) : this.publicValue.value) : // (this.multiple ? this.publicValue.map(({value}) => value) : this.publicValue.value) :
this.publicValue; // this.publicValue;
// labelInValue emit
let vModelValue = this.publicValue;
const shouldEmitInput = newValue !== oldValue && vModelValue !== this.value; const shouldEmitInput = newValue !== oldValue && vModelValue !== this.value;
if (shouldEmitInput) { if (shouldEmitInput) {
let emitValue = this.publicValue;
if (this.labelInValue) {
if (this.multiple) {
emitValue = this.values;
} else {
emitValue = this.values[0];
}
}
// Form null null []
if (Array.isArray(vModelValue) && !vModelValue.length && this.value === null) vModelValue = null;
else if (vModelValue === undefined && this.value === null) vModelValue = null;
this.$emit('input', vModelValue); // to update v-model this.$emit('input', vModelValue); // to update v-model
this.$emit('on-change', this.publicValue); this.$emit('on-change', emitValue);
this.dispatch('FormItem', 'on-form-change', this.publicValue); this.dispatch('FormItem', 'on-form-change', emitValue);
} }
}, },
query (query) { query (query) {

View file

@ -181,7 +181,8 @@
} }
}, },
data () { data () {
const val = this.checkLimits(Array.isArray(this.value) ? this.value : [this.value]); let val = this.checkLimits(Array.isArray(this.value) ? this.value : [this.value]);
if (this.range && this.value === null) val = [0, 0];
return { return {
prefixCls: prefixCls, prefixCls: prefixCls,
currentValue: val, currentValue: val,
@ -195,14 +196,17 @@
min: 0, min: 0,
max: 1, max: 1,
}, },
sliderWidth: 0 sliderWidth: 0,
isValueNull: false // hack value null $emit:input 0 null
}; };
}, },
watch: { watch: {
value (val) { value (val) {
if (val === null) this.isValueNull = true;
val = this.checkLimits(Array.isArray(val) ? val : [val]); val = this.checkLimits(Array.isArray(val) ? val : [val]);
if (!this.dragging && (val[0] !== this.currentValue[0] || val[1] !== this.currentValue[1])) { if (!this.dragging && (val[0] !== this.currentValue[0] || val[1] !== this.currentValue[1])) {
this.currentValue = val; if (this.isValueNull && this.range) this.currentValue = [0, 0];
else this.currentValue = val;
} }
}, },
exportValue (values) { exportValue (values) {
@ -213,7 +217,12 @@
} }
}); });
const value = this.range ? values : values[0]; const value = this.range ? values : values[0];
this.$emit('input', value); if (this.isValueNull) {
this.isValueNull = false;
this.$emit('input', null);
} else {
this.$emit('input', value);
}
this.$emit('on-input', value); this.$emit('on-input', value);
} }
}, },

View file

@ -129,7 +129,7 @@
}, },
watch: { watch: {
value (val) { value (val) {
if (val !== this.trueValue && val !== this.falseValue) { if (val !== this.trueValue && val !== this.falseValue && val !== null) {
throw 'Value should be trueValue or falseValue.'; throw 'Value should be trueValue or falseValue.';
} }
this.currentValue = val; this.currentValue = val;

View file

@ -1,6 +1,6 @@
<template> <template>
<div :class="classes" ref="cell" @click="handleCellClick"> <div :class="classes" ref="cell">
<template v-if="renderType === 'index'"><span>{{ column.indexMethod ? column.indexMethod(row) : (naturalIndex + 1) }}</span></template> <template v-if="renderType === 'index'"><span>{{ column.indexMethod ? column.indexMethod(row, naturalIndex) : (naturalIndex + 1) }}</span></template>
<template v-if="renderType === 'selection'"> <template v-if="renderType === 'selection'">
<Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox> <Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
</template> </template>
@ -14,8 +14,8 @@
<template v-if="renderType === 'html'"><span v-html="row[column.key]"></span></template> <template v-if="renderType === 'html'"><span v-html="row[column.key]"></span></template>
<template v-if="renderType === 'normal'"> <template v-if="renderType === 'normal'">
<template v-if="column.tooltip"> <template v-if="column.tooltip">
<Tooltip transfer :content="row[column.key]" :theme="tableRoot.tooltipTheme" :disabled="!showTooltip && !tooltipShow" :max-width="300" class="ivu-table-cell-tooltip" @on-popper-show="handleTooltipShow" @on-popper-hide="handleTooltipHide"> <Tooltip transfer :content="row[column.key]" :theme="column.tooltipTheme ? column.tooltipTheme : tableRoot.tooltipTheme" :disabled="!showTooltip" :max-width="column.tooltipMaxWidth ? column.tooltipMaxWidth : tableRoot.tooltipMaxWidth" class="ivu-table-cell-tooltip">
<span ref="content" @mouseenter="handleTooltipIn" @mouseleave="handleTooltipOut" class="ivu-table-cell-tooltip-content">{{ row[column.key] }}</span> <span ref="content" @mouseenter="handleTooltipIn" class="ivu-table-cell-tooltip-content">{{ row[column.key] }}</span>
</Tooltip> </Tooltip>
</template> </template>
<span v-else>{{row[column.key]}}</span> <span v-else>{{row[column.key]}}</span>
@ -75,8 +75,7 @@
renderType: '', renderType: '',
uid: -1, uid: -1,
context: this.$parent.$parent.$parent.currentContext, context: this.$parent.$parent.$parent.currentContext,
showTooltip: false, // overflow showTooltip: false // overflow
tooltipShow: false
}; };
}, },
computed: { computed: {
@ -153,23 +152,20 @@
}, },
handleTooltipIn () { handleTooltipIn () {
const $content = this.$refs.content; const $content = this.$refs.content;
this.showTooltip = $content.scrollWidth > $content.offsetWidth; let range = document.createRange();
}, range.setStart($content, 0);
handleTooltipOut () { range.setEnd($content, $content.childNodes.length);
this.showTooltip = false; const rangeWidth = range.getBoundingClientRect().width;
}, this.showTooltip = rangeWidth > $content.offsetWidth;
handleTooltipShow () { range = null;
this.tooltipShow = true;
},
handleTooltipHide () {
this.tooltipShow = false;
}, },
handleToggleTree () { handleToggleTree () {
this.$parent.$parent.$parent.toggleTree(this.row._rowKey); this.$parent.$parent.$parent.toggleTree(this.row._rowKey);
}, },
handleCellClick (event) { // table-body cell padding
this.$parent.$parent.$parent.$emit('on-cell-click', this.row, this.column, this.row[this.column.key], event); // handleCellClick (event) {
} // this.$parent.$parent.$parent.$emit('on-cell-click', this.row, this.column, this.row[this.column.key], event);
// }
}, },
created () { created () {
if (this.column.type === 'index') { if (this.column.type === 'index') {

View file

@ -114,12 +114,15 @@
event.stopPropagation(); event.stopPropagation();
this.$parent.dblclickCurrentRow(_index, rowKey); this.$parent.dblclickCurrentRow(_index, rowKey);
}, },
clickCell (row, column, key, event) {
this.$parent.$emit('on-cell-click', row, column, row[key], event);
},
contextmenuCurrentRow (_index, event, rowKey) { contextmenuCurrentRow (_index, event, rowKey) {
event.stopPropagation(); event.stopPropagation();
if (this.$parent.contextMenu) event.preventDefault(); if (this.$parent.contextMenu) event.preventDefault();
this.$parent.contextmenuCurrentRow(_index, rowKey, event); this.$parent.contextmenuCurrentRow(_index, rowKey, event);
}, },
selectStartCurrentRow (_index, event) { selectStartCurrentRow () {
if (this.$parent.contextMenu) { if (this.$parent.contextMenu) {
// event.stopPropagation(); // event.stopPropagation();
// event.preventDefault(); // event.preventDefault();
@ -257,7 +260,10 @@
const $td = h('td', { const $td = h('td', {
class: this.alignCls(column, row), class: this.alignCls(column, row),
attrs: this.getSpan(row, column, index, colIndex) attrs: this.getSpan(row, column, index, colIndex),
on: {
click: (e) => this.clickCell(row, column, column.key, e)
}
}, [$tableCell]); }, [$tableCell]);
$tds.push($td); $tds.push($td);
} }
@ -333,7 +339,10 @@
const $td = h('td', { const $td = h('td', {
class: this.alignCls(column, row), class: this.alignCls(column, row),
attrs: this.getSpan(row, column, index, colIndex) attrs: this.getSpan(row, column, index, colIndex),
on: {
click: (e) => this.clickCell(row, column, column.key, e)
}
}, [$tableCell]); }, [$tableCell]);
$tds.push($td); $tds.push($td);
} }

View file

@ -16,9 +16,9 @@
<span v-if="!column.renderHeader">{{ column.title || '' }}</span> <span v-if="!column.renderHeader">{{ column.title || '' }}</span>
<render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header> <render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header>
</template> </template>
<template v-else-if="column.type === 'selection'"><Checkbox :value="isSelectAll" :disabled="isSelectDisabled" @on-change="selectAll"></Checkbox></template> <template v-else-if="column.type === 'selection'"><Checkbox v-if="!column.hideSelectAll" :value="isSelectAll" :disabled="isSelectDisabled" @on-change="selectAll"></Checkbox></template>
<template v-else> <template v-else>
<span v-if="!column.renderHeader" :class="{[prefixCls + '-cell-sort']: column.sortable}" @click="handleSortByHead(getColumn(rowIndex, index)._index)">{{ column.title || '#' }}</span> <span v-if="!column.renderHeader" :class="{[prefixCls + '-cell-sort']: column.sortable}" @click="column.sortable && handleSortByHead(getColumn(rowIndex, index)._index)">{{ column.title || '#' }}</span>
<render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header> <render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header>
<span :class="[prefixCls + '-sort']" v-if="column.sortable"> <span :class="[prefixCls + '-sort']" v-if="column.sortable">
<i class="ivu-icon ivu-icon-md-arrow-dropup" :class="{on: getColumn(rowIndex, index)._sortType === 'asc'}" @click="handleSort(getColumn(rowIndex, index)._index, 'asc')"></i> <i class="ivu-icon ivu-icon-md-arrow-dropup" :class="{on: getColumn(rowIndex, index)._sortType === 'asc'}" @click="handleSort(getColumn(rowIndex, index)._index, 'asc')"></i>

View file

@ -48,7 +48,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div :class="[prefixCls + '-fixed']" :style="fixedTableStyle" v-if="isLeftFixed"> <div :class="fixedTableClasses" :style="fixedTableStyle" v-if="isLeftFixed">
<div :class="fixedHeaderClasses" v-if="showHeader"> <div :class="fixedHeaderClasses" v-if="showHeader">
<table-head <table-head
fixed="left" fixed="left"
@ -84,7 +84,7 @@
:style="{ 'margin-top': showHorizontalScrollBar ? scrollBarWidth + 'px' : 0 }" :style="{ 'margin-top': showHorizontalScrollBar ? scrollBarWidth + 'px' : 0 }"
/> />
</div> </div>
<div :class="[prefixCls + '-fixed-right']" :style="fixedRightTableStyle" v-if="isRightFixed"> <div :class="fixedRightTableClasses" :style="fixedRightTableStyle" v-if="isRightFixed">
<div :class="fixedHeaderClasses" v-if="showHeader"> <div :class="fixedHeaderClasses" v-if="showHeader">
<table-head <table-head
fixed="right" fixed="right"
@ -140,6 +140,8 @@
import tableHead from './table-head.vue'; import tableHead from './table-head.vue';
import tableBody from './table-body.vue'; import tableBody from './table-body.vue';
import tableSummary from './summary.vue'; import tableSummary from './summary.vue';
import Dropdown from '../dropdown/dropdown.vue';
import DropdownMenu from '../dropdown/dropdown-menu.vue';
import Spin from '../spin/spin.vue'; import Spin from '../spin/spin.vue';
import { oneOf, getStyle, deepCopy, getScrollBarSize } from '../../utils/assist'; import { oneOf, getStyle, deepCopy, getScrollBarSize } from '../../utils/assist';
import { on, off } from '../../utils/dom'; import { on, off } from '../../utils/dom';
@ -157,7 +159,7 @@
export default { export default {
name: 'Table', name: 'Table',
mixins: [ Locale ], mixins: [ Locale ],
components: { tableHead, tableBody, tableSummary, Spin }, components: { tableHead, tableBody, tableSummary, Spin, Dropdown, DropdownMenu },
provide () { provide () {
return { return {
tableRoot: this tableRoot: this
@ -242,6 +244,11 @@
}, },
default: 'dark' default: 'dark'
}, },
// 4.5.0
tooltipMaxWidth: {
type: Number,
default: 300
},
// #5380 :key 使 index // #5380 :key 使 index
// 4.1 String // 4.1 String
rowKey: { rowKey: {
@ -274,6 +281,11 @@
loadData: { loadData: {
type: Function type: Function
}, },
// 4.4.0
updateShowChildren: {
type: Boolean,
default: false
},
// 4.1.0 // 4.1.0
contextMenu: { contextMenu: {
type: Boolean, type: Boolean,
@ -283,6 +295,13 @@
showContextMenu: { showContextMenu: {
type: Boolean, type: Boolean,
default: false default: false
},
// 4.7.0
fixedShadow: {
validator (value) {
return oneOf(value, ['auto', 'show', 'hide']);
},
default: 'show'
} }
}, },
data () { data () {
@ -315,7 +334,9 @@
contextMenuStyles: { contextMenuStyles: {
top: 0, top: 0,
left: 0 left: 0
} },
scrollOnTheLeft: false,
scrollOnTheRight: false
}; };
}, },
computed: { computed: {
@ -363,6 +384,22 @@
} }
]; ];
}, },
fixedTableClasses () {
return [
`${prefixCls}-fixed`,
{
[`${prefixCls}-fixed-shadow`]: this.fixedShadow === 'show' || (this.fixedShadow === 'auto' && !this.scrollOnTheLeft)
}
];
},
fixedRightTableClasses () {
return [
`${prefixCls}-fixed-right`,
{
[`${prefixCls}-fixed-shadow`]: this.fixedShadow === 'show' || (this.fixedShadow === 'auto' && !this.scrollOnTheRight)
}
];
},
fixedHeaderClasses () { fixedHeaderClasses () {
return [ return [
`${prefixCls}-fixed-header`, `${prefixCls}-fixed-header`,
@ -460,7 +497,9 @@
let style = {}; let style = {};
if (this.bodyHeight !== 0) { if (this.bodyHeight !== 0) {
let height = this.bodyHeight - (this.showHorizontalScrollBar?this.scrollBarWidth:0); let height = this.bodyHeight - (this.showHorizontalScrollBar?this.scrollBarWidth:0);
style.height = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`; const bodyHeight = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`;
if (this.height) style.height = bodyHeight;
else if (this.maxHeight) style.maxHeight = bodyHeight;
} }
return style; return style;
}, },
@ -639,6 +678,15 @@
this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0) + 1; this.tableWidth = this.cloneColumns.map(cell => cell._width).reduce((a, b) => a + b, 0) + (this.showVerticalScrollBar?this.scrollBarWidth:0) + 1;
this.columnsWidth = columnsWidth; this.columnsWidth = columnsWidth;
this.fixedHeader(); this.fixedHeader();
// 4.7.0 auto fixed shadow
if (this.fixedShadow === 'auto') {
this.$nextTick(() => {
const $body = this.$refs.body;
this.scrollOnTheLeft = $body.scrollLeft === 0;
this.scrollOnTheRight = $body.scrollWidth === $body.scrollLeft + $body.clientWidth;
});
}
}, },
handleMouseIn (_index, rowKey) { handleMouseIn (_index, rowKey) {
if (this.disabledHover) return; if (this.disabledHover) return;
@ -851,7 +899,8 @@
data._isShowChildren = !data._isShowChildren; data._isShowChildren = !data._isShowChildren;
// updateDataStatus _showChildren @on-expand-tree // updateDataStatus _showChildren @on-expand-tree
// this.updateDataStatus(rowKey, '_showChildren', data._isShowChildren); // #675 updateShowChildren
if (this.updateShowChildren) this.updateDataStatus(rowKey, '_showChildren', data._isShowChildren);
this.$emit('on-expand-tree', rowKey, data._isShowChildren); this.$emit('on-expand-tree', rowKey, data._isShowChildren);
}, },
/** /**
@ -1023,6 +1072,10 @@
this.cloneColumns.forEach((col) => col._filterVisible = false); this.cloneColumns.forEach((col) => col._filterVisible = false);
}, },
handleBodyScroll (event) { handleBodyScroll (event) {
// 4.7.0
this.scrollOnTheLeft = event.target.scrollLeft === 0;
this.scrollOnTheRight = event.target.scrollWidth === event.target.scrollLeft + event.target.clientWidth;
if (this.showHeader) this.$refs.header.scrollLeft = event.target.scrollLeft; if (this.showHeader) this.$refs.header.scrollLeft = event.target.scrollLeft;
if (this.isLeftFixed) this.$refs.fixedBody.scrollTop = event.target.scrollTop; if (this.isLeftFixed) this.$refs.fixedBody.scrollTop = event.target.scrollTop;
if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop; if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop;

View file

@ -50,6 +50,8 @@
<script> <script>
import Icon from '../icon/icon.vue'; import Icon from '../icon/icon.vue';
import Render from '../base/render'; import Render from '../base/render';
import Dropdown from '../dropdown/dropdown.vue';
import DropdownMenu from '../dropdown/dropdown-menu.vue';
import { oneOf, MutationObserver, findComponentsDownward } from '../../utils/assist'; import { oneOf, MutationObserver, findComponentsDownward } from '../../utils/assist';
import Emitter from '../../mixins/emitter'; import Emitter from '../../mixins/emitter';
import elementResizeDetectorMaker from 'element-resize-detector'; import elementResizeDetectorMaker from 'element-resize-detector';
@ -81,7 +83,7 @@
export default { export default {
name: 'Tabs', name: 'Tabs',
mixins: [ Emitter ], mixins: [ Emitter ],
components: { Icon, Render }, components: { Icon, Render, Dropdown, DropdownMenu },
provide () { provide () {
return { TabsInstance: this }; return { TabsInstance: this };
}, },

View file

@ -12,7 +12,7 @@
:indeterminate="data.indeterminate" :indeterminate="data.indeterminate"
:disabled="data.disabled || data.disableCheckbox" :disabled="data.disabled || data.disableCheckbox"
@click.native.prevent="handleCheck"></Checkbox> @click.native.prevent="handleCheck"></Checkbox>
<span :class="titleClasses" @click="handleSelect"> <span :class="titleClasses" @click="handleClickNode">
<Render v-if="data.render" :render="data.render" :data="data" :node="node"></Render> <Render v-if="data.render" :render="data.render" :data="data" :node="node"></Render>
<Render v-else-if="isParentRender" :render="parentRender" :data="data" :node="node"></Render> <Render v-else-if="isParentRender" :render="parentRender" :data="data" :node="node"></Render>
<template v-else>{{ data.title }}</template> <template v-else>{{ data.title }}</template>
@ -201,6 +201,13 @@
this.dispatch('Tree', 'toggle-expand', this.data); this.dispatch('Tree', 'toggle-expand', this.data);
} }
}, },
handleClickNode () {
if (this.TreeInstance.expandNode) {
if (this.showArrow) this.handleExpand();
} else if (this.TreeInstance.selectNode) {
this.handleSelect();
}
},
handleSelect () { handleSelect () {
if (this.data.disabled) return; if (this.data.disabled) return;
if (this.TreeInstance.showCheckbox && this.TreeInstance.checkDirectly) { if (this.TreeInstance.showCheckbox && this.TreeInstance.checkDirectly) {

Some files were not shown because too many files have changed in this diff Show more