n20-common-lib 1.3.9 → 1.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nstc-g6/assets/svg/404.svg +1 -0
- package/nstc-g6/assets/svg/addFile.svg +32 -0
- package/nstc-g6/assets/svg/bug.svg +1 -0
- package/nstc-g6/assets/svg/chart.svg +1 -0
- package/nstc-g6/assets/svg/clipboard.svg +1 -0
- package/nstc-g6/assets/svg/component.svg +1 -0
- package/nstc-g6/assets/svg/dashboard.svg +1 -0
- package/nstc-g6/assets/svg/deleteFile.svg +28 -0
- package/nstc-g6/assets/svg/documentation.svg +1 -0
- package/nstc-g6/assets/svg/drag.svg +1 -0
- package/nstc-g6/assets/svg/edit.svg +1 -0
- package/nstc-g6/assets/svg/education.svg +1 -0
- package/nstc-g6/assets/svg/email.svg +1 -0
- package/nstc-g6/assets/svg/example.svg +1 -0
- package/nstc-g6/assets/svg/excel.svg +1 -0
- package/nstc-g6/assets/svg/exit-fullscreen.svg +1 -0
- package/nstc-g6/assets/svg/eye-open.svg +1 -0
- package/nstc-g6/assets/svg/eye.svg +1 -0
- package/nstc-g6/assets/svg/favorite.svg +1 -0
- package/nstc-g6/assets/svg/favorite_active.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400_active.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400_blank.svg +1 -0
- package/nstc-g6/assets/svg/filter.svg +16 -0
- package/nstc-g6/assets/svg/filter@2x.png +0 -0
- package/nstc-g6/assets/svg/filterActive.svg +16 -0
- package/nstc-g6/assets/svg/filterClose@2x.png +0 -0
- package/nstc-g6/assets/svg/form.svg +1 -0
- package/nstc-g6/assets/svg/fullscreen.svg +1 -0
- package/nstc-g6/assets/svg/guide.svg +1 -0
- package/nstc-g6/assets/svg/hourglass.svg +19 -0
- package/nstc-g6/assets/svg/icon.svg +1 -0
- package/nstc-g6/assets/svg/international.svg +1 -0
- package/nstc-g6/assets/svg/language.svg +1 -0
- package/nstc-g6/assets/svg/left-dis.svg +1 -0
- package/nstc-g6/assets/svg/left.svg +1 -0
- package/nstc-g6/assets/svg/link.svg +1 -0
- package/nstc-g6/assets/svg/list.svg +1 -0
- package/nstc-g6/assets/svg/lock.svg +1 -0
- package/nstc-g6/assets/svg/message-t.svg +1 -0
- package/nstc-g6/assets/svg/money.svg +1 -0
- package/nstc-g6/assets/svg/money3.svg +1 -0
- package/nstc-g6/assets/svg/money4.svg +1 -0
- package/nstc-g6/assets/svg/moneyTwo.svg +1 -0
- package/nstc-g6/assets/svg/msg_white.svg +1 -0
- package/nstc-g6/assets/svg/nested.svg +1 -0
- package/nstc-g6/assets/svg/newsearch.svg +19 -0
- package/nstc-g6/assets/svg/password.svg +1 -0
- package/nstc-g6/assets/svg/pdf.svg +1 -0
- package/nstc-g6/assets/svg/people.svg +1 -0
- package/nstc-g6/assets/svg/peoples.svg +1 -0
- package/nstc-g6/assets/svg/phone.svg +1 -0
- package/nstc-g6/assets/svg/phone_msg.svg +1 -0
- package/nstc-g6/assets/svg/qq.svg +1 -0
- package/nstc-g6/assets/svg/right-dis.svg +1 -0
- package/nstc-g6/assets/svg/right.svg +1 -0
- package/nstc-g6/assets/svg/search.svg +1 -0
- package/nstc-g6/assets/svg/searchActive.svg +19 -0
- package/nstc-g6/assets/svg/shopping.svg +1 -0
- package/nstc-g6/assets/svg/size.svg +1 -0
- package/nstc-g6/assets/svg/skill.svg +1 -0
- package/nstc-g6/assets/svg/star.svg +1 -0
- package/nstc-g6/assets/svg/steam.svg +1 -0
- package/nstc-g6/assets/svg/tab.svg +1 -0
- package/nstc-g6/assets/svg/table.svg +1 -0
- package/nstc-g6/assets/svg/theme.svg +1 -0
- package/nstc-g6/assets/svg/tree-table.svg +1 -0
- package/nstc-g6/assets/svg/tree.svg +1 -0
- package/nstc-g6/assets/svg/user.svg +1 -0
- package/nstc-g6/assets/svg/wechat.svg +1 -0
- package/nstc-g6/assets/svg/z-left-2-dis.svg +1 -0
- package/nstc-g6/assets/svg/z-left-2.svg +1 -0
- package/nstc-g6/assets/svg/z-right-2-dis.svg +1 -0
- package/nstc-g6/assets/svg/z-right-2.svg +1 -0
- package/nstc-g6/assets/svg/z-right.svg +1 -0
- package/nstc-g6/assets/svg/zip.svg +1 -0
- package/nstc-g6/components/Calendar/index.js +8 -0
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +129 -0
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +126 -0
- package/nstc-g6/components/Calendar/src/main.vue +442 -0
- package/nstc-g6/components/DialogForm/index.js +8 -0
- package/nstc-g6/components/DialogForm/src/demo/index.vue +56 -0
- package/nstc-g6/components/DialogForm/src/main.vue +189 -0
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +281 -0
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1222 -0
- package/nstc-g6/components/Form/A_DEMO/index.vue +803 -0
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +72 -0
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +191 -0
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +128 -0
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +233 -0
- package/nstc-g6/components/Form/BusinessSpecific/readme.md +7 -0
- package/nstc-g6/components/Form/CascaderCustom/index.vue +101 -0
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +84 -0
- package/nstc-g6/components/Form/Component.vue +661 -0
- package/nstc-g6/components/Form/ComponentSecond.vue +650 -0
- package/nstc-g6/components/Form/DatepickerCustom/index.vue +130 -0
- package/nstc-g6/components/Form/InputAndDialog/index.js +15 -0
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +395 -0
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +65 -0
- package/nstc-g6/components/Form/InputCustom/index.vue +307 -0
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +31 -0
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +118 -0
- package/nstc-g6/components/Form/Item.vue +330 -0
- package/nstc-g6/components/Form/ItemSecond.vue +269 -0
- package/nstc-g6/components/Form/List.vue +146 -0
- package/nstc-g6/components/Form/ListSecond.vue +130 -0
- package/nstc-g6/components/Form/RadioCustom/index.vue +73 -0
- package/nstc-g6/components/Form/SelectAccount/index.js +15 -0
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +58 -0
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +283 -0
- package/nstc-g6/components/Form/SelectAndDialog/index.js +15 -0
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +384 -0
- package/nstc-g6/components/Form/SelectCashFlow/index.js +15 -0
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +42 -0
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +126 -0
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +82 -0
- package/nstc-g6/components/Form/SelectCustom/index.vue +488 -0
- package/nstc-g6/components/Form/SelectSubject/index.js +15 -0
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +85 -0
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +182 -0
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +188 -0
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +650 -0
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +7 -0
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +53 -0
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +183 -0
- package/nstc-g6/components/Form/TextCustom/index.vue +38 -0
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +31 -0
- package/nstc-g6/components/Form/UploadCustom/iconxitongshezhi-yichu.png +0 -0
- package/nstc-g6/components/Form/UploadCustom/index.vue +506 -0
- package/nstc-g6/components/Form/configs.js +191 -0
- package/nstc-g6/components/Form/configsSecond.js +161 -0
- package/nstc-g6/components/Form/index.js +8 -0
- package/nstc-g6/components/Form/index.scss +29 -0
- package/nstc-g6/components/Form/payeePersonSelect/index.js +15 -0
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +164 -0
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +185 -0
- package/nstc-g6/components/Form/readme.txt +4 -0
- package/nstc-g6/components/FormGroup/index.js +8 -0
- package/nstc-g6/components/FormGroup/src/demo/config.js +23 -0
- package/nstc-g6/components/FormGroup/src/demo/index.vue +85 -0
- package/nstc-g6/components/FormGroup/src/main.vue +639 -0
- package/nstc-g6/components/FormGroup/src/validate.js +23 -0
- package/nstc-g6/components/InputTag/InputTag.vue +270 -0
- package/nstc-g6/components/NstcApprovel/NstcApprovel.vue +24 -0
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +150 -0
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +123 -0
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +162 -0
- package/nstc-g6/components/NstcCharts/define.js +74 -0
- package/nstc-g6/components/NstcCharts/mixins/resize.js +56 -0
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +152 -0
- package/nstc-g6/components/NstcConfirm/index.js +25 -0
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +185 -0
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +176 -0
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +280 -0
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +52 -0
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +396 -0
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +591 -0
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +475 -0
- package/nstc-g6/components/NstcExcelCustomImport/img/upload@2x.png +0 -0
- package/nstc-g6/components/NstcExcelExport/NstcExcelExport.vue +145 -0
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +1074 -0
- package/nstc-g6/components/NstcExcelImport/img/upload@2x.png +0 -0
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +1166 -0
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +130 -0
- package/nstc-g6/components/NstcExpandCollapse/index.scss +77 -0
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +989 -0
- package/nstc-g6/components/NstcFileUpload/img/addFile.svg +32 -0
- package/nstc-g6/components/NstcFileUpload/img/delete.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/deleteFile.svg +28 -0
- package/nstc-g6/components/NstcFileUpload/img/download.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/inputUpload.svg +30 -0
- package/nstc-g6/components/NstcFileUpload/img/look-diabled.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/look.svg +24 -0
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +281 -0
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1222 -0
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +796 -0
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +68 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputMultiple.vue +189 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +128 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +233 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/readme.md +7 -0
- package/nstc-g6/components/NstcForm/CascaderCustom/index.vue +101 -0
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +84 -0
- package/nstc-g6/components/NstcForm/Component.vue +684 -0
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +650 -0
- package/nstc-g6/components/NstcForm/DatepickerCustom/index.vue +130 -0
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +389 -0
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +314 -0
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +116 -0
- package/nstc-g6/components/NstcForm/Item.vue +327 -0
- package/nstc-g6/components/NstcForm/ItemSecond.vue +269 -0
- package/nstc-g6/components/NstcForm/List.vue +146 -0
- package/nstc-g6/components/NstcForm/ListSecond.vue +130 -0
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +73 -0
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +334 -0
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +377 -0
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +123 -0
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +460 -0
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +185 -0
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +648 -0
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +183 -0
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +38 -0
- package/nstc-g6/components/NstcForm/UploadCustom/iconxitongshezhi-yichu.png +0 -0
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +500 -0
- package/nstc-g6/components/NstcForm/configs.js +191 -0
- package/nstc-g6/components/NstcForm/configsSecond.js +161 -0
- package/nstc-g6/components/NstcForm/index.js +8 -0
- package/nstc-g6/components/NstcForm/index.scss +29 -0
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +188 -0
- package/nstc-g6/components/NstcForm/readme.txt +4 -0
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +428 -0
- package/nstc-g6/components/NstcPagination/setPageNum.png +0 -0
- package/nstc-g6/components/NstcPagination/setpagedefault.png +0 -0
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +70 -0
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +729 -0
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +676 -0
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +97 -0
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +72 -0
- package/nstc-g6/components/NstcTab/NstcTab.vue +80 -0
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +45 -0
- package/nstc-g6/components/NstcTabWithBadge/index.scss +31 -0
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +292 -0
- package/nstc-g6/components/NstcTable/NstcTable.vue +460 -0
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +801 -0
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +186 -0
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +330 -0
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +145 -0
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +176 -0
- package/nstc-g6/components/Search/NstcSearch.vue +583 -0
- package/nstc-g6/components/Search/src/demo/index copy.vue +101 -0
- package/nstc-g6/components/Search/src/demo/index.vue +103 -0
- package/nstc-g6/components/Search/src/main copy.vue +607 -0
- package/nstc-g6/components/approvelTwo/main.vue +220 -0
- package/nstc-g6/components/approvelTwo/progress.vue +154 -0
- package/nstc-g6/directives/VCopy/index.js +60 -0
- package/nstc-g6/directives/VNstcNumber/index.js +14 -0
- package/nstc-g6/directives/VNstcNumber/temp.js +446 -0
- package/nstc-g6/index.js +193 -0
- package/nstc-g6/utils/auth.js +2 -0
- package/nstc-g6/utils/axios.js +2 -0
- package/nstc-g6/utils/dateAndValidator.js +649 -0
- package/nstc-g6/utils/debounce.js +40 -0
- package/nstc-g6/utils/parseTime.js +48 -0
- package/nstc-g6/utils/validate/index.js +7 -0
- package/nstc-g6/utils/vendor/Export2Excel.js +229 -0
- package/nstc-g6/utils/vendor/Export2Zip.js +24 -0
- package/nstc-g6/utils/vue-bus.js +5 -0
- package/package.json +9 -2
- package/src/assets/css/_coreLib.scss +9 -1
- package/src/assets/css/element-variables.scss +1 -1
- package/src/components/ChildRange/index.vue +2 -37
- package/src/components/ChildRange/style.scss +34 -0
- package/src/components/FileImport/index.vue +3 -1
- package/src/components/PageHeader/index.vue +2 -44
- package/src/components/PageHeader/style.scss +39 -0
- package/src/components/Search/index.vue +1 -97
- package/src/components/Search/style.scss +93 -0
- package/src/components/Table/ThSelectHeader.vue +2 -11
- package/src/components/Table/index.vue +4 -2
- package/src/directives/VTitle/index.js +14 -17
- package/style/css/normalize.scss +6 -6
- package/style/index.css +3 -3
- package/style/index.css.map +1 -1
- package/style/server-config.jsonc +527 -410
- package/treme/blue.css +3 -0
- package/treme/blue.umd.min.js +1 -0
- package/treme/css/normalize.scss +726 -0
- package/treme/fonts/element-icons.535877f5.woff +0 -0
- package/treme/fonts/element-icons.732389de.ttf +0 -0
- package/treme/fonts/iconfont.022f36c4.woff2 +0 -0
- package/treme/fonts/iconfont.4a1b2c93.woff +0 -0
- package/treme/fonts/iconfont.a9febaa2.ttf +0 -0
- package/treme/green.css +3 -0
- package/treme/green.umd.min.js +1 -0
- package/treme/lightBlue.css +3 -0
- package/treme/lightBlue.umd.min.js +1 -0
- package/treme/orange.css +3 -0
- package/treme/orange.umd.min.js +1 -0
- package/treme/pageDemo/demo-1.vue +131 -0
- package/treme/pageDemo/demo-2.vue +35 -0
- package/treme/pageDemo/demo-3.vue +22 -0
- package/treme/pageDemo/seeCode.js +20 -0
- package/treme/red.css +3 -0
- package/treme/red.umd.min.js +1 -0
- package/treme/server-config.jsonc +723 -0
- package/treme/yellow.css +3 -0
- package/treme/yellow.umd.min.js +1 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
|
|
2
|
+
// import Vue from 'vue'
|
|
3
|
+
const NULL_ARR = ['', null, undefined, NaN]
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 金额格式化
|
|
9
|
+
* @param num 金额
|
|
10
|
+
* @param len 保留小数位数
|
|
11
|
+
* @param magnitude 数量级 ( 5 代表万 )
|
|
12
|
+
* @returns {*}
|
|
13
|
+
*/
|
|
14
|
+
function amountFormat(num, len = 2, magnitude) {
|
|
15
|
+
/**
|
|
16
|
+
* input框的输入初始状态
|
|
17
|
+
*/
|
|
18
|
+
if(num === '-') {
|
|
19
|
+
return '-'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 已经格式化的数据
|
|
23
|
+
if (String(num).includes(',')) {
|
|
24
|
+
num = num.replace(/,/g, '')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// let symbol = String(num).includes('-') ? '-' : ''
|
|
28
|
+
|
|
29
|
+
// 非空校验
|
|
30
|
+
if (isNaN(Number(num)) || [null, '', undefined].includes(num)) {
|
|
31
|
+
return ''
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const magnitudeObj = {
|
|
35
|
+
5: { label: '万元', value: 1E4 },
|
|
36
|
+
6: { label: '十万元', value: 1E5 },
|
|
37
|
+
7: { label: '百万元', value: 1E6 },
|
|
38
|
+
8: { label: '千万元', value: 1E7 },
|
|
39
|
+
9: { label: '亿元', value: 1E8 }
|
|
40
|
+
}
|
|
41
|
+
let temp = +num
|
|
42
|
+
|
|
43
|
+
if (magnitude) {
|
|
44
|
+
const t = magnitudeObj[magnitude]
|
|
45
|
+
|
|
46
|
+
temp = (temp / (t.value))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
temp = temp.toFixed(len)
|
|
50
|
+
|
|
51
|
+
// 三点一逗
|
|
52
|
+
function get_thousand_num(num) {
|
|
53
|
+
return num.toString().replace(/\d+/, function(n) { // 先提取整数部分
|
|
54
|
+
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) { // 对整数部分添加分隔符
|
|
55
|
+
return $1 + ','
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
temp = get_thousand_num(temp)
|
|
61
|
+
return temp
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** *
|
|
65
|
+
* uuid
|
|
66
|
+
*/
|
|
67
|
+
function generateUUID() {
|
|
68
|
+
var d = new Date().getTime()
|
|
69
|
+
if (window.performance && typeof window.performance.now === 'function') {
|
|
70
|
+
d += performance.now() // use high-precision timer if available
|
|
71
|
+
}
|
|
72
|
+
let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
73
|
+
var r = (d + Math.random() * 16) % 16 | 0
|
|
74
|
+
d = Math.floor(d / 16)
|
|
75
|
+
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
|
76
|
+
})
|
|
77
|
+
return uuid
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let currentFocusUUID = ''
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* updateInput
|
|
84
|
+
* el, binding, vnode, oldVnode
|
|
85
|
+
*/
|
|
86
|
+
function updateInput(el, binding) {
|
|
87
|
+
// 判断 input 是否是激活状态
|
|
88
|
+
const inputEl = el.querySelectorAll('input')[0]
|
|
89
|
+
if (!inputEl) {
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
// const activeFlag = document.activeElement.tagName
|
|
93
|
+
const currentUUID = inputEl.getAttribute('money-id')
|
|
94
|
+
const disabledFlag = inputEl.getAttribute('disabled') === 'disabled'
|
|
95
|
+
const screenEl = el.children[el.children.length - 1]
|
|
96
|
+
|
|
97
|
+
// 延迟后的
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
// 只有金额才存在更新遮挡板 (activeFlag !== 'INPUT')
|
|
100
|
+
// console.log('当前激活的元素', document.activeElement)
|
|
101
|
+
if (binding.value[`isMoney`] && currentFocusUUID !== currentUUID) {
|
|
102
|
+
const curValue = inputEl.value
|
|
103
|
+
|
|
104
|
+
// 如果input框是disabled 状态, 遮挡层也因该是disabled状态
|
|
105
|
+
if (!disabledFlag) {
|
|
106
|
+
// el.classList.remove('nstc-amount-input-disabled')
|
|
107
|
+
el.classList.add('nstc-amount-num')
|
|
108
|
+
} else {
|
|
109
|
+
// el.classList.add('nstc-amount-input-disabled')
|
|
110
|
+
el.classList.add('nstc-amount-num')
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 当input值更新时, 遮挡层也要更新
|
|
114
|
+
screenEl.innerText = amountFormat(curValue || '')
|
|
115
|
+
if (binding.value.precision) {
|
|
116
|
+
let word_ = Number(inputEl.value).toFixed(binding.value.precision)
|
|
117
|
+
let after_ = word_.slice(-Number(binding.value.precision))
|
|
118
|
+
if (amountFormat(inputEl.value || '', binding.value.precision).indexOf('.') !== -1) {
|
|
119
|
+
let index = amountFormat(inputEl.value || '', binding.value.precision).indexOf('.')
|
|
120
|
+
let before_ = amountFormat(inputEl.value || '', binding.value.precision).slice(0, index)
|
|
121
|
+
el.children[el.children.length - 1].innerText = `${before_}.${after_}`
|
|
122
|
+
}
|
|
123
|
+
inputEl.value = Number(word_)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (NULL_ARR.includes(curValue)) {
|
|
127
|
+
el.classList.remove('nstc-amount-num-temp')
|
|
128
|
+
inputEl.value = ''
|
|
129
|
+
} else {
|
|
130
|
+
// 当前的激活元素,进行输入时,不显示遮罩层
|
|
131
|
+
currentFocusUUID !== currentUUID && el.classList.add('nstc-amount-num-temp')
|
|
132
|
+
}
|
|
133
|
+
//
|
|
134
|
+
} else {
|
|
135
|
+
// 保证遮罩层的text的内容,和 input 的内容一致
|
|
136
|
+
// 金额模式下
|
|
137
|
+
binding.value[`isMoney`] && (screenEl.innerText = amountFormat(inputEl.value || ''))
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
//处理刷新页面赋值带有小数点后几位问题
|
|
141
|
+
// if (binding.value.precision) {
|
|
142
|
+
// let word_ = Number(inputEl.value).toFixed(binding.value.precision)
|
|
143
|
+
// el.children[el.children.length - 1].innerText = word_
|
|
144
|
+
// inputEl.value = Number(inputEl.value)
|
|
145
|
+
// }
|
|
146
|
+
}, 30)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export default {
|
|
150
|
+
bind: function (el, binding) {
|
|
151
|
+
// 绑定uuid
|
|
152
|
+
const inputEl = el.querySelectorAll('input')[0]
|
|
153
|
+
// 将input的type 类型设置为 Number
|
|
154
|
+
// inputEl && (inputEl.setAttribute('type', 'number'))
|
|
155
|
+
inputEl && inputEl.setAttribute('money-id', generateUUID())
|
|
156
|
+
|
|
157
|
+
if (binding.value[`isMoney`]) {
|
|
158
|
+
inputEl && inputEl.setAttribute('style', 'text-align:right;')
|
|
159
|
+
} else {
|
|
160
|
+
inputEl && inputEl.setAttribute('style', 'text-align:left;')
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
inputEl && inputEl.addEventListener('input', function () {
|
|
164
|
+
const curValue = el.querySelectorAll('input')[0].value
|
|
165
|
+
const screenEl = el.children[el.children.length - 1]
|
|
166
|
+
if (binding.value[`isMoney`]) {
|
|
167
|
+
|
|
168
|
+
screenEl.innerText = amountFormat(curValue || '')
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
})
|
|
172
|
+
},
|
|
173
|
+
unbind: function (el) {
|
|
174
|
+
el.removeEventListener('input', el.handler)
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
inserted(el, vDir) {
|
|
178
|
+
|
|
179
|
+
// 禁止input滚动事件
|
|
180
|
+
const ele = el.tagName === 'INPUT' ? el : el.querySelector('input')
|
|
181
|
+
// el.type = 'number'
|
|
182
|
+
ele && ele.addEventListener('mousewheel', () => {
|
|
183
|
+
ele.blur()
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
// 当为金额时,浮框显示三点一逗
|
|
187
|
+
if (vDir.value[`isMoney`]) {
|
|
188
|
+
|
|
189
|
+
el.querySelector('input').parentElement.style.userSelect = 'none';
|
|
190
|
+
const elDiv = document.createElement('div')
|
|
191
|
+
elDiv.className = 'input-after-amount-num'
|
|
192
|
+
|
|
193
|
+
// 添加金额class
|
|
194
|
+
el.classList.add('nstc-amount-num')
|
|
195
|
+
|
|
196
|
+
elDiv.innerText = ''
|
|
197
|
+
el.append(elDiv)
|
|
198
|
+
|
|
199
|
+
// 监听input聚焦事件
|
|
200
|
+
el.addEventListener('click', () => {
|
|
201
|
+
const inputEl = el.querySelectorAll('input')[0]
|
|
202
|
+
const disabledFlag = inputEl.getAttribute('disabled') === 'disabled'
|
|
203
|
+
|
|
204
|
+
if (!disabledFlag) {
|
|
205
|
+
el.classList.remove('nstc-amount-num-temp')
|
|
206
|
+
el.children[0].focus()
|
|
207
|
+
|
|
208
|
+
currentFocusUUID = el.querySelectorAll('input')[0].getAttribute('money-id')
|
|
209
|
+
//
|
|
210
|
+
}
|
|
211
|
+
//
|
|
212
|
+
// eslint-disable-next-line no-debugger
|
|
213
|
+
})
|
|
214
|
+
} else {
|
|
215
|
+
let inputEl = el.querySelectorAll('input')[0]
|
|
216
|
+
let curValue = inputEl.value
|
|
217
|
+
inputEl.value = curValue ? parseFloat(curValue).toFixed(vDir.value.precision || 0) : ""
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// vDir.value 有指令的参数
|
|
221
|
+
if (JSON.stringify(vDir.value) === '{}') {
|
|
222
|
+
return null
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let content
|
|
226
|
+
// 按键按下=>只允许输入 数字/小数点
|
|
227
|
+
el.addEventListener('keypress', event => {
|
|
228
|
+
let e = event || window.event
|
|
229
|
+
if (!Number(e.target.value) && e.target.value != 0) {
|
|
230
|
+
e.target.value = ''
|
|
231
|
+
return ''
|
|
232
|
+
}
|
|
233
|
+
if (!e.target.value) {
|
|
234
|
+
return null
|
|
235
|
+
}
|
|
236
|
+
let inputKey = String.fromCharCode(e.keyCode || e.charCode)
|
|
237
|
+
let re = /\d|\./
|
|
238
|
+
let reP = /\d|\.|-/
|
|
239
|
+
content = e.target.value
|
|
240
|
+
|
|
241
|
+
// 定义方法,阻止输入
|
|
242
|
+
function preventInput() {
|
|
243
|
+
if (e.preventDefault) {
|
|
244
|
+
e.preventDefault()
|
|
245
|
+
} else {
|
|
246
|
+
e.returnValue = false
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// 判断最小值是不是负数
|
|
251
|
+
let arg_min = null
|
|
252
|
+
let preventFlag = null
|
|
253
|
+
if (vDir.value) {
|
|
254
|
+
arg_min = vDir.value.min
|
|
255
|
+
if (!NULL_ARR.includes(arg_min) && arg_min < 0) {
|
|
256
|
+
preventFlag = !reP.test(inputKey) && !e.ctrlKey
|
|
257
|
+
} else {
|
|
258
|
+
preventFlag = !re.test(inputKey) && !e.ctrlKey
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (preventFlag) {
|
|
263
|
+
preventInput()
|
|
264
|
+
} else if ((content.indexOf('.') > 0 && inputKey === '.') || (content.includes('-') && inputKey === '-')) {
|
|
265
|
+
// 已有小数点,再次输入小数点
|
|
266
|
+
preventInput()
|
|
267
|
+
}
|
|
268
|
+
})
|
|
269
|
+
// 按键弹起=>并限制最大最小, 最大长度
|
|
270
|
+
el.addEventListener('keyup', event => {
|
|
271
|
+
let e = event || window.event
|
|
272
|
+
if (!Number(e.target.value) && e.target.value != 0) {
|
|
273
|
+
e.target.value = ''
|
|
274
|
+
return ''
|
|
275
|
+
}
|
|
276
|
+
if (!e.target.value) {
|
|
277
|
+
return null
|
|
278
|
+
}
|
|
279
|
+
content = e.target.value
|
|
280
|
+
let inputKey = String.fromCharCode(e.keyCode || e.charCode)
|
|
281
|
+
// 判断是不是才输入的初始状态
|
|
282
|
+
vDir.value[`isMoney`] && (el.children[el.children.length - 1].innerText = amountFormat(content || ''))
|
|
283
|
+
|
|
284
|
+
if (!content) {
|
|
285
|
+
content = ''
|
|
286
|
+
}
|
|
287
|
+
let arg_max = ''
|
|
288
|
+
let arg_min = ''
|
|
289
|
+
let max = 9999999999999
|
|
290
|
+
if (vDir.value) {
|
|
291
|
+
arg_max = vDir.value.max
|
|
292
|
+
arg_min = vDir.value.min // 没用到
|
|
293
|
+
}
|
|
294
|
+
if (!arg_max || arg_max >= max) {
|
|
295
|
+
max = arg_max
|
|
296
|
+
}
|
|
297
|
+
if (arg_max && content > arg_max) {
|
|
298
|
+
e.target.value = arg_max
|
|
299
|
+
content = arg_max
|
|
300
|
+
}
|
|
301
|
+
let maxl = max.toString().length
|
|
302
|
+
|
|
303
|
+
// console.log('判断结果', Number(arg_min) < 0, inputKey === '½')
|
|
304
|
+
|
|
305
|
+
// 验证数字的最大长度
|
|
306
|
+
if (!NULL_ARR.includes(vDir.value[`isMoney`])) {
|
|
307
|
+
|
|
308
|
+
// 如果输入为负号, 不处理
|
|
309
|
+
// console.log('判断结果', Number(arg_min) < 0, currentInputValue)
|
|
310
|
+
if (Number(arg_min) < 0 && ['½', 'm', '\b', '-'].includes(inputKey)) {
|
|
311
|
+
return null
|
|
312
|
+
}
|
|
313
|
+
let numPart = e.target.value.split('.')
|
|
314
|
+
let intPart = numPart[0] || ''
|
|
315
|
+
let decimalPart = numPart[1] || ''
|
|
316
|
+
if (numPart.length === 1) {
|
|
317
|
+
try {
|
|
318
|
+
Number(arg_min) >= 0 ? (e.target.value = Math.abs(intPart.toString().slice(0, maxl))) : (e.target.value = intPart.toString().slice(0, maxl))
|
|
319
|
+
} catch {
|
|
320
|
+
e.target.value = intPart.toString().slice(0, maxl)
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
} else {
|
|
324
|
+
try {
|
|
325
|
+
Number(arg_min) >= 0 ? (e.target.value = Math.abs(intPart.toString().slice(0, maxl) + '.' + decimalPart.slice(0, 2))) : (e.target.value = intPart.toString().slice(0, maxl) + '.' + decimalPart.slice(0, 2))
|
|
326
|
+
} catch {
|
|
327
|
+
e.target.value = intPart.toString().slice(0, maxl) + '.' + decimalPart.slice(0, 2)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
}
|
|
331
|
+
//同步修改vue v-model绑定值
|
|
332
|
+
e.target.dispatchEvent(new Event('input'));
|
|
333
|
+
// e.target.value = e.target.value
|
|
334
|
+
|
|
335
|
+
} else if (!NULL_ARR.includes(vDir.value.maxLength)) {
|
|
336
|
+
// console.log('验证数字的最大长度', vDir.value.maxLength, e.target.value)
|
|
337
|
+
if (!isNaN(Number(vDir.value.maxLength))) {
|
|
338
|
+
if (vDir.value.maxLength > maxl) {
|
|
339
|
+
e.target.value = e.target.value.toString().slice(0, maxl)
|
|
340
|
+
} else {
|
|
341
|
+
e.target.value = e.target.value.toString().slice(0, vDir.value.maxLength)
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
})
|
|
347
|
+
updateInput(el, vDir)
|
|
348
|
+
// 失去焦点=>保留指定位小数
|
|
349
|
+
el.addEventListener('focusout', event => { // 此处会在 el-input 的 @change 后执行
|
|
350
|
+
|
|
351
|
+
let e = event || window.event
|
|
352
|
+
let arg_precision = vDir.value.precision || 0 // 默认保留至整数
|
|
353
|
+
|
|
354
|
+
currentFocusUUID = ''
|
|
355
|
+
// 显示三点一抖的数字temp
|
|
356
|
+
if (!Number(e.target.value) && e.target.value != 0) {
|
|
357
|
+
e.target.value = ''
|
|
358
|
+
return ''
|
|
359
|
+
}
|
|
360
|
+
if (!e.target.value) {
|
|
361
|
+
return null
|
|
362
|
+
} else {
|
|
363
|
+
el.classList.add('nstc-amount-num-temp')
|
|
364
|
+
}
|
|
365
|
+
content = e.target.value
|
|
366
|
+
if (NULL_ARR.includes(content)) {
|
|
367
|
+
el.classList.add('nstc-amount-temp-transparent')
|
|
368
|
+
} else {
|
|
369
|
+
el.classList.remove('nstc-amount-temp-transparent')
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (!content) {
|
|
373
|
+
content = ''
|
|
374
|
+
}
|
|
375
|
+
let arg_min = ''
|
|
376
|
+
if (vDir.value) {
|
|
377
|
+
arg_min = vDir.value.min
|
|
378
|
+
}
|
|
379
|
+
if (!NULL_ARR.includes(arg_min) && content < arg_min) {
|
|
380
|
+
// 设置input的框的值
|
|
381
|
+
e.target.value = arg_min
|
|
382
|
+
content = arg_min
|
|
383
|
+
|
|
384
|
+
// 还原遮罩层
|
|
385
|
+
if (vDir.value[`isMoney`]) {
|
|
386
|
+
el.children[el.children.length - 1].innerText = amountFormat(content, arg_precision);
|
|
387
|
+
|
|
388
|
+
} else {
|
|
389
|
+
el.children[el.children.length - 1].innerText = content
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (vDir.value.precision) {
|
|
394
|
+
|
|
395
|
+
let word_ = !NULL_ARR.includes(content) && (Number(content).toFixed(arg_precision))
|
|
396
|
+
let after_ = word_.slice(-Number(arg_precision))
|
|
397
|
+
if (amountFormat(word_ || '', arg_precision).indexOf('.') !== -1) {
|
|
398
|
+
let index = amountFormat(word_ || '', arg_precision).indexOf('.')
|
|
399
|
+
let before_ = amountFormat(word_ || '', arg_precision).slice(0, index)
|
|
400
|
+
el.children[el.children.length - 1].innerText = `${before_}.${after_}`
|
|
401
|
+
}
|
|
402
|
+
e.target.value = Number(word_)
|
|
403
|
+
// e.target.dispatchEvent(new Event('input'));
|
|
404
|
+
}
|
|
405
|
+
if (!vDir.value[`isMoney`]) {
|
|
406
|
+
e.target.value = Number(e.target.value).toFixed(vDir.value.precision)
|
|
407
|
+
}
|
|
408
|
+
// !NULL_ARR.includes(content) && (e.target.value = Number(content))
|
|
409
|
+
// e.target.dispatchEvent(new Event('input'));
|
|
410
|
+
// updateInput(el, vDir)
|
|
411
|
+
|
|
412
|
+
//更新遮罩层
|
|
413
|
+
// e.target.dispatchEvent(new Event('input'));
|
|
414
|
+
// updateInput(el, vDir)
|
|
415
|
+
// -- callback写法1
|
|
416
|
+
// vNode.data.model.callback = ()=>{
|
|
417
|
+
// e.target.value = content.toFixed(arg_precision)
|
|
418
|
+
// }
|
|
419
|
+
// vNode.data.model.callback();
|
|
420
|
+
// -- callback 写法2
|
|
421
|
+
// vNode.data.model.callback(
|
|
422
|
+
// e.target.value = content.toFixed(arg_precision)
|
|
423
|
+
// )
|
|
424
|
+
})
|
|
425
|
+
|
|
426
|
+
// 当时去焦点时
|
|
427
|
+
el.addEventListener('blur', () => {
|
|
428
|
+
|
|
429
|
+
})
|
|
430
|
+
|
|
431
|
+
// 聚焦事件
|
|
432
|
+
el.addEventListener('focus', event => {
|
|
433
|
+
let e = event || window.event
|
|
434
|
+
if (!vDir.value[`isMoney`]) {
|
|
435
|
+
if (e.target.value !== '') {
|
|
436
|
+
e.target.value = Number(e.target.value)
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}, true)
|
|
440
|
+
},
|
|
441
|
+
componentUpdated(el, binding, vnode, oldVnode) {
|
|
442
|
+
updateInput(el, binding, vnode, oldVnode)
|
|
443
|
+
},
|
|
444
|
+
update() {
|
|
445
|
+
}
|
|
446
|
+
}
|
package/nstc-g6/index.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import NstcDialog from './components/NstcDialog/NstcDialog.vue'
|
|
2
|
+
import NstcBackToTop from './components/NstcBackToTop/NstcBackToTop.vue'
|
|
3
|
+
import NstcBranchLazyLoad from './components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue'
|
|
4
|
+
import NstcCharts from './components/NstcCharts/NstcCharts.vue'
|
|
5
|
+
import NstcApprovelTwo from './components/approvelTwo/main.vue'
|
|
6
|
+
import NstcApprovel from './components/NstcApprovel/NstcApprovel.vue'
|
|
7
|
+
import confirmFunction from './components/NstcConfirm/index'
|
|
8
|
+
import NstcWorkBench from './components/NstcWorkBench/NstcWorkBench.vue'
|
|
9
|
+
import NstcThemePicker from './components/NstcThemePicker/NstcThemePicker.vue'
|
|
10
|
+
import NstcTabWithBadge from './components/NstcTabWithBadge/NstcTabWithBadge.vue'
|
|
11
|
+
import NstcTableSet from './components/NstcTableSet/NstcTableSet.vue'
|
|
12
|
+
import NstcDropdown from './components/NstcDropdown/NstcDropdown.vue'
|
|
13
|
+
import NstcPagination from './components/NstcPagination/NstcPagination.vue'
|
|
14
|
+
import NstcTable from './components/NstcTable/NstcTable.vue'
|
|
15
|
+
import NstcTab from './components/NstcTab/NstcTab.vue'
|
|
16
|
+
import NstcSvgIcon from './components/NstcSvgIcon/NstcSvgIcon.vue'
|
|
17
|
+
import NstcSticky from './components/NstcSticky/NstcSticky.vue'
|
|
18
|
+
import InputTag from './components/InputTag/InputTag.vue'
|
|
19
|
+
import NstcSelectTreeList from './components/NstcSelectTreeList/NstcSelectTreeList.vue'
|
|
20
|
+
import NstcSelectTree from './components/NstcSelectTree/NstcSelectTree.vue'
|
|
21
|
+
import NstcScreenFull from './components/NstcScreenFull/NstcScreenFull.vue'
|
|
22
|
+
import NstcExpandCollapse from './components/NstcExpandCollapse/NstcExpandCollapse.vue'
|
|
23
|
+
import NstcFileUpload from './components/NstcFileUpload/NstcFileUpload.vue'
|
|
24
|
+
import NstcExcelImportN from './components/NstcExcelImportN/NstcExcelImportN.vue'
|
|
25
|
+
import NstcUploadExcel from './components/NstcUploadExcel/NstcUploadExcel.vue'
|
|
26
|
+
import NstcExcelImport from './components/NstcExcelImport/NstcExcelImport.vue'
|
|
27
|
+
import NstcExcelExport from './components/NstcExcelExport/NstcExcelExport.vue'
|
|
28
|
+
import NstcUploadCustomExcel from './components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue'
|
|
29
|
+
import NstcExcelCustomImport from './components/NstcExcelCustomImport/NstcExcelCustomImport.vue'
|
|
30
|
+
import NstcElectronicFile from './components/NstcElectronicFile/NstcElectronicFile.vue'
|
|
31
|
+
import NstcDropdownTree from './components/NstcDropdownTree/NstcDropdownTree.vue'
|
|
32
|
+
import NstcDialogTable from './components/NstcDialogTable/NstcDialogTable.vue'
|
|
33
|
+
import InputCustom from './components/NstcForm/InputCustom/index.vue'
|
|
34
|
+
import IntervalInputCustom from './components/NstcForm/IntervalInputCustom/index.vue'
|
|
35
|
+
import AutocompleteCustom from './components/NstcForm/AutocompleteCustom/index.vue'
|
|
36
|
+
import SelectCustom from './components/NstcForm/SelectCustom/index.vue'
|
|
37
|
+
import NstcSelectInDialog from './components/NstcForm/SelectindialogCustom/index.vue'
|
|
38
|
+
import UploadCustom from './components/NstcForm/UploadCustom/index.vue'
|
|
39
|
+
import RadioCustom from './components/NstcForm/RadioCustom/index.vue'
|
|
40
|
+
import CheckboxCustom from './components/NstcForm/CheckboxCustom/index'
|
|
41
|
+
import CascaderCustom from './components/NstcForm/CascaderCustom/index'
|
|
42
|
+
import TextCustom from './components/NstcForm/TextCustom/index'
|
|
43
|
+
import NstcInputAndDialog from './components/NstcForm/InputAndDialog/NstcInputAndDialog.vue'
|
|
44
|
+
import NstcSelectAndDialog from './components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue'
|
|
45
|
+
import NstcPayeePerson from './components/NstcForm/payeePersonSelect/NstcPayeePerson.vue'
|
|
46
|
+
import NstcSelectSubject from './components/NstcForm/SelectSubject/NstcSelectSubject.vue'
|
|
47
|
+
import NstcSelectCashFlow from './components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue'
|
|
48
|
+
import NstcSelectAccount from './components/NstcForm/SelectAccount/NstcSelectAccount.vue'
|
|
49
|
+
import TableRadioCustom from './components/NstcForm/TableRadioCustom/index.vue'
|
|
50
|
+
import NstcSearch from './components/Search/NstcSearch.vue'
|
|
51
|
+
// import NstcDialogForm from './components/NstcDialogForm/NstcDialogForm'
|
|
52
|
+
|
|
53
|
+
/* 加载所有svg图标 */
|
|
54
|
+
require.context('./assets/svg', false, /\.svg$/)
|
|
55
|
+
|
|
56
|
+
/* 方法 */
|
|
57
|
+
import VueBus from './utils/vue-bus'
|
|
58
|
+
|
|
59
|
+
/* 指令 */
|
|
60
|
+
import VCopy from './directives/VCopy'
|
|
61
|
+
import VNstcNumber from './directives/VNstcNumber'
|
|
62
|
+
|
|
63
|
+
const components = [
|
|
64
|
+
NstcDialog,
|
|
65
|
+
NstcBackToTop,
|
|
66
|
+
NstcBranchLazyLoad,
|
|
67
|
+
NstcCharts,
|
|
68
|
+
NstcApprovel,
|
|
69
|
+
NstcApprovelTwo,
|
|
70
|
+
NstcWorkBench,
|
|
71
|
+
NstcThemePicker,
|
|
72
|
+
NstcTabWithBadge,
|
|
73
|
+
NstcTableSet,
|
|
74
|
+
NstcDropdown,
|
|
75
|
+
NstcPagination,
|
|
76
|
+
NstcTable,
|
|
77
|
+
NstcTab,
|
|
78
|
+
NstcSvgIcon,
|
|
79
|
+
NstcSticky,
|
|
80
|
+
InputTag,
|
|
81
|
+
NstcSelectTreeList,
|
|
82
|
+
NstcSelectTree,
|
|
83
|
+
NstcScreenFull,
|
|
84
|
+
NstcExpandCollapse,
|
|
85
|
+
NstcFileUpload,
|
|
86
|
+
NstcExcelImportN,
|
|
87
|
+
NstcUploadExcel,
|
|
88
|
+
NstcExcelImport,
|
|
89
|
+
NstcExcelExport,
|
|
90
|
+
NstcUploadCustomExcel,
|
|
91
|
+
NstcExcelCustomImport,
|
|
92
|
+
NstcElectronicFile,
|
|
93
|
+
NstcDropdownTree,
|
|
94
|
+
NstcDialogTable,
|
|
95
|
+
InputCustom,
|
|
96
|
+
IntervalInputCustom,
|
|
97
|
+
AutocompleteCustom,
|
|
98
|
+
SelectCustom,
|
|
99
|
+
NstcSelectInDialog,
|
|
100
|
+
UploadCustom,
|
|
101
|
+
RadioCustom,
|
|
102
|
+
CheckboxCustom,
|
|
103
|
+
CascaderCustom,
|
|
104
|
+
TextCustom,
|
|
105
|
+
NstcInputAndDialog,
|
|
106
|
+
NstcSelectAndDialog,
|
|
107
|
+
NstcPayeePerson,
|
|
108
|
+
NstcSelectSubject,
|
|
109
|
+
NstcSelectCashFlow,
|
|
110
|
+
NstcSelectAccount,
|
|
111
|
+
TableRadioCustom,
|
|
112
|
+
NstcSearch
|
|
113
|
+
// NstcDialogForm
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
const install = function (Vue) {
|
|
117
|
+
components.forEach((component) => {
|
|
118
|
+
let name = component.name
|
|
119
|
+
Vue.component(name, component)
|
|
120
|
+
})
|
|
121
|
+
Vue.use(VCopy)
|
|
122
|
+
Vue.use(VNstcNumber)
|
|
123
|
+
Vue.prototype.$bus = {
|
|
124
|
+
$on(...event) {
|
|
125
|
+
VueBus.$on(...event)
|
|
126
|
+
},
|
|
127
|
+
$off(...event) {
|
|
128
|
+
VueBus.$off(...event)
|
|
129
|
+
},
|
|
130
|
+
$once(...event) {
|
|
131
|
+
VueBus.$emit(...event)
|
|
132
|
+
},
|
|
133
|
+
$emit(...event) {
|
|
134
|
+
VueBus.$emit(...event)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
Vue.prototype.$confirmTip = confirmFunction
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export default {
|
|
142
|
+
install
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
NstcDialog,
|
|
146
|
+
NstcBackToTop,
|
|
147
|
+
NstcBranchLazyLoad,
|
|
148
|
+
NstcCharts,
|
|
149
|
+
NstcApprovel,
|
|
150
|
+
NstcWorkBench,
|
|
151
|
+
NstcThemePicker,
|
|
152
|
+
NstcTabWithBadge,
|
|
153
|
+
NstcTableSet,
|
|
154
|
+
NstcDropdown,
|
|
155
|
+
NstcPagination,
|
|
156
|
+
NstcTable,
|
|
157
|
+
NstcTab,
|
|
158
|
+
NstcSvgIcon,
|
|
159
|
+
NstcSticky,
|
|
160
|
+
InputTag,
|
|
161
|
+
NstcSelectTreeList,
|
|
162
|
+
NstcSelectTree,
|
|
163
|
+
NstcScreenFull,
|
|
164
|
+
NstcExpandCollapse,
|
|
165
|
+
NstcFileUpload,
|
|
166
|
+
NstcExcelImportN,
|
|
167
|
+
NstcUploadExcel,
|
|
168
|
+
NstcExcelImport,
|
|
169
|
+
NstcExcelExport,
|
|
170
|
+
NstcUploadCustomExcel,
|
|
171
|
+
NstcExcelCustomImport,
|
|
172
|
+
NstcElectronicFile,
|
|
173
|
+
NstcDropdownTree,
|
|
174
|
+
NstcDialogTable,
|
|
175
|
+
InputCustom,
|
|
176
|
+
IntervalInputCustom,
|
|
177
|
+
AutocompleteCustom,
|
|
178
|
+
SelectCustom,
|
|
179
|
+
NstcSelectInDialog,
|
|
180
|
+
UploadCustom,
|
|
181
|
+
RadioCustom,
|
|
182
|
+
CheckboxCustom,
|
|
183
|
+
CascaderCustom,
|
|
184
|
+
TextCustom,
|
|
185
|
+
NstcInputAndDialog,
|
|
186
|
+
NstcSelectAndDialog,
|
|
187
|
+
NstcPayeePerson,
|
|
188
|
+
NstcSelectSubject,
|
|
189
|
+
NstcSelectCashFlow,
|
|
190
|
+
NstcSelectAccount,
|
|
191
|
+
TableRadioCustom,
|
|
192
|
+
NstcSearch
|
|
193
|
+
}
|