el-plus 0.0.76 → 0.0.78
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/CHANGELOG.md +12 -0
- package/dist/index.css +1 -1
- package/dist/index.full.js +112 -71
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +113 -72
- package/es/components/attachment/index.d.ts +24 -0
- package/es/components/attachment/src/attachment.d.ts +8 -0
- package/es/components/attachment/src/attachment.mjs +8 -0
- package/es/components/attachment/src/attachment.mjs.map +1 -1
- package/es/components/attachment/src/attachment.vue.d.ts +15 -0
- package/es/components/attachment/src/attachment.vue2.mjs +10 -5
- package/es/components/attachment/src/attachment.vue2.mjs.map +1 -1
- package/es/components/attachment/src/use-attachment.d.ts +14 -105
- package/es/components/attachment/src/use-attachment.mjs +31 -30
- package/es/components/attachment/src/use-attachment.mjs.map +1 -1
- package/es/components/header/index.d.ts +6 -0
- package/es/components/header/src/header.vue.d.ts +2 -0
- package/es/components/search-list-page/index.d.ts +42 -15
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +14 -5
- package/es/components/search-list-page/src/use-search-list-page.d.ts +14 -5
- package/es/components/table/index.d.ts +15 -3
- package/es/components/table/src/table.d.ts +4 -1
- package/es/components/table/src/table.mjs +4 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +9 -2
- package/es/components/table/src/table.vue2.mjs +17 -6
- package/es/components/table/src/table.vue2.mjs.map +1 -1
- package/es/components/table/src/use-table.mjs +1 -1
- package/es/components/table/src/use-table.mjs.map +1 -1
- package/es/components/uni-vue/index.d.ts +23 -3
- package/es/components/uni-vue/src/uni-vue.vue.d.ts +10 -2
- package/es/components/uni-vue/src/uni-vue.vue2.mjs +4 -2
- package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -1
- package/es/components/uni-vue/src/use-uni-vue.d.ts +1 -1
- package/es/components/uni-vue/src/use-uni-vue.mjs +39 -27
- package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/lib/components/attachment/index.d.ts +24 -0
- package/lib/components/attachment/src/attachment.d.ts +8 -0
- package/lib/components/attachment/src/attachment.js +8 -0
- package/lib/components/attachment/src/attachment.js.map +1 -1
- package/lib/components/attachment/src/attachment.vue.d.ts +15 -0
- package/lib/components/attachment/src/attachment.vue2.js +11 -6
- package/lib/components/attachment/src/attachment.vue2.js.map +1 -1
- package/lib/components/attachment/src/use-attachment.d.ts +14 -105
- package/lib/components/attachment/src/use-attachment.js +31 -30
- package/lib/components/attachment/src/use-attachment.js.map +1 -1
- package/lib/components/header/index.d.ts +6 -0
- package/lib/components/header/src/header.vue.d.ts +2 -0
- package/lib/components/search-list-page/index.d.ts +42 -15
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +14 -5
- package/lib/components/search-list-page/src/use-search-list-page.d.ts +14 -5
- package/lib/components/table/index.d.ts +15 -3
- package/lib/components/table/src/table.d.ts +4 -1
- package/lib/components/table/src/table.js +4 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +9 -2
- package/lib/components/table/src/table.vue2.js +17 -6
- package/lib/components/table/src/table.vue2.js.map +1 -1
- package/lib/components/table/src/use-table.js +1 -1
- package/lib/components/table/src/use-table.js.map +1 -1
- package/lib/components/uni-vue/index.d.ts +23 -3
- package/lib/components/uni-vue/src/uni-vue.vue.d.ts +10 -2
- package/lib/components/uni-vue/src/uni-vue.vue2.js +4 -2
- package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -1
- package/lib/components/uni-vue/src/use-uni-vue.d.ts +1 -1
- package/lib/components/uni-vue/src/use-uni-vue.js +38 -26
- package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/package.json +1 -1
- package/theme-chalk/header.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/header.scss +8 -1
package/CHANGELOG.md
CHANGED
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small.is-hide-label .el-form-item__label{display:none}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-textarea__inner{font-size:13px!important}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .el-table{font-size:13px}.ep-table .el-table .el-table__cell .is-edit{cursor:pointer}.ep-table .el-table .el-table__cell .is-edit:hover{color:#409eff}.ep-table .el-table .el-table__cell .is-edit .el-icon{vertical-align:-2px}.ep-table .el-table .el-table__cell.is-center .el-link{margin:0 auto;text-align:center}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table thead tr th .cell{line-height:20px}.ep-table .el-table thead tr th .el-checkbox__inner{height:14px;width:14px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:32px;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .ep-title__toggle .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 30px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-confirm-dialog{padding-bottom:20px}.ep-confirm-dialog .ep-dialog__footer{padding-top:0}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__dialog .el-transfer__buttons button{width:100px}.ep-custom-column__dialog .el-transfer__buttons button span{font-size:13px}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 12px),32px)}.ep-custom-column__operate button{width:100px}.ep-custom-column__operate button span{font-size:13px}.no-cn__operate{transform:translate(calc(25% - 520px),32px)}.ep-link{font-size:13px}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}.ep-attachment__dialog--normal{background:none;position:static!important}.ep-attachment__dialog--normal .el-overlay-dialog{position:static}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog{margin:0;padding:0;width:auto!important}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__header{display:none}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__body{padding:0}.ep-attachment__handler{height:32px;padding:9px 15px}.ep-attachment__handler.el-button--text{padding:0}
|
|
1
|
+
.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small.is-hide-label .el-form-item__label{display:none}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-textarea__inner{font-size:13px!important}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .el-table{font-size:13px}.ep-table .el-table .el-table__cell .is-edit{cursor:pointer}.ep-table .el-table .el-table__cell .is-edit:hover{color:#409eff}.ep-table .el-table .el-table__cell .is-edit .el-icon{vertical-align:-2px}.ep-table .el-table .el-table__cell.is-center .el-link{margin:0 auto;text-align:center}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table thead tr th .cell{line-height:20px}.ep-table .el-table thead tr th .el-checkbox__inner{height:14px;width:14px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:32px;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .ep-title__toggle .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex;lex-wrap:wrap}.ep-header>.el-button{margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-header .el-page-header .el-page-header__title{white-space:nowrap}.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 30px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-confirm-dialog{padding-bottom:20px}.ep-confirm-dialog .ep-dialog__footer{padding-top:0}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__dialog .el-transfer__buttons button{width:100px}.ep-custom-column__dialog .el-transfer__buttons button span{font-size:13px}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 12px),32px)}.ep-custom-column__operate button{width:100px}.ep-custom-column__operate button span{font-size:13px}.no-cn__operate{transform:translate(calc(25% - 520px),32px)}.ep-link{font-size:13px}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}.ep-attachment__dialog--normal{background:none;position:static!important}.ep-attachment__dialog--normal .el-overlay-dialog{position:static}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog{margin:0;padding:0;width:auto!important}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__header{display:none}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__body{padding:0}.ep-attachment__handler{height:32px;padding:9px 15px}.ep-attachment__handler.el-button--text{padding:0}
|
package/dist/index.full.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! ElPlus v0.0.
|
|
1
|
+
/*! ElPlus v0.0.78 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus'), require('@vue/shared'), require('axios'), require('js-cookie'), require('defu'), require('qs'), require('element-plus/es/components/table/src/table/defaults'), require('@element-plus/icons-vue'), require('mitt'), require('lodash-unified'), require('@vueuse/core'), require('vue-router'), require('js-base64'), require('vue2'), require('vue-router3'), require('dayjs')) :
|
|
@@ -1846,6 +1846,10 @@
|
|
|
1846
1846
|
fontSize: "14px",
|
|
1847
1847
|
color: "#505050"
|
|
1848
1848
|
})
|
|
1849
|
+
},
|
|
1850
|
+
rowKey: {
|
|
1851
|
+
type: String,
|
|
1852
|
+
default: "_rowKey"
|
|
1849
1853
|
}
|
|
1850
1854
|
};
|
|
1851
1855
|
const expandTableProps = {
|
|
@@ -2307,7 +2311,7 @@
|
|
|
2307
2311
|
isShowLabel: false,
|
|
2308
2312
|
required,
|
|
2309
2313
|
hideRequiredAsterisk: "cellRequired" in item ? false : required,
|
|
2310
|
-
prop: `table.${scope
|
|
2314
|
+
prop: `table.${scope.row[props.rowKey]}.${item.prop}`,
|
|
2311
2315
|
tableProp: item.prop,
|
|
2312
2316
|
// table里的表单需要绑定的prop
|
|
2313
2317
|
props: {
|
|
@@ -2351,6 +2355,18 @@
|
|
|
2351
2355
|
...prepareEvents(emit, tableEmitsKeys)
|
|
2352
2356
|
};
|
|
2353
2357
|
});
|
|
2358
|
+
const tableData = vue.computed(() => {
|
|
2359
|
+
const result = {};
|
|
2360
|
+
data.value?.forEach((item, index) => {
|
|
2361
|
+
if (props.rowKey === "_rowKey") {
|
|
2362
|
+
item[props.rowKey] = lodashUnified.uniqueId();
|
|
2363
|
+
}
|
|
2364
|
+
result[item[props.rowKey]] = item;
|
|
2365
|
+
});
|
|
2366
|
+
return {
|
|
2367
|
+
table: result
|
|
2368
|
+
};
|
|
2369
|
+
});
|
|
2354
2370
|
const {
|
|
2355
2371
|
pagination,
|
|
2356
2372
|
paginationProps,
|
|
@@ -2401,9 +2417,7 @@
|
|
|
2401
2417
|
}, [vue.createVNode(_component_el_form, {
|
|
2402
2418
|
ref_key: "elFormRef",
|
|
2403
2419
|
ref: elFormRef,
|
|
2404
|
-
model:
|
|
2405
|
-
table: vue.unref(data)
|
|
2406
|
-
},
|
|
2420
|
+
model: tableData.value,
|
|
2407
2421
|
size: "small",
|
|
2408
2422
|
"hide-required-asterisk": "",
|
|
2409
2423
|
"scroll-to-error": "",
|
|
@@ -2466,14 +2480,14 @@
|
|
|
2466
2480
|
_: 1
|
|
2467
2481
|
}, 8, ["label", "align", "width"])) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(columnList), (item, index) => {
|
|
2468
2482
|
return vue.openBlock(), vue.createBlock(_component_el_table_column, vue.mergeProps({
|
|
2469
|
-
key: index
|
|
2483
|
+
key: `${item.prop}_${item.type}_${index}`
|
|
2470
2484
|
}, {
|
|
2471
2485
|
ref_for: true
|
|
2472
2486
|
}, item), {
|
|
2473
2487
|
default: vue.withCtx((scope) => [item.type || item.render ? (vue.openBlock(), vue.createBlock(vue.unref(EpFormItem), vue.mergeProps({
|
|
2474
|
-
key: 0,
|
|
2475
2488
|
"form-data": scope.row,
|
|
2476
|
-
"table-scope": scope
|
|
2489
|
+
"table-scope": scope,
|
|
2490
|
+
key: `${scope.row[props.rowKey]}_${item.prop}`
|
|
2477
2491
|
}, {
|
|
2478
2492
|
ref_for: true
|
|
2479
2493
|
}, vue.unref(formItemProps)(scope, item)), null, 16, ["form-data", "table-scope"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
@@ -3377,6 +3391,10 @@
|
|
|
3377
3391
|
formatColumns: {
|
|
3378
3392
|
...tableProps.formatColumns
|
|
3379
3393
|
},
|
|
3394
|
+
rowKey: {
|
|
3395
|
+
type: String,
|
|
3396
|
+
default: "fileId"
|
|
3397
|
+
},
|
|
3380
3398
|
// 页面模式
|
|
3381
3399
|
mode: {
|
|
3382
3400
|
type: String
|
|
@@ -3404,6 +3422,10 @@
|
|
|
3404
3422
|
// 添加前校验
|
|
3405
3423
|
beforeAdd: {
|
|
3406
3424
|
type: Function
|
|
3425
|
+
},
|
|
3426
|
+
// 权限
|
|
3427
|
+
permission: {
|
|
3428
|
+
type: String
|
|
3407
3429
|
}
|
|
3408
3430
|
};
|
|
3409
3431
|
|
|
@@ -3554,38 +3576,30 @@
|
|
|
3554
3576
|
const isDialogOpen = props.openType === "dialog";
|
|
3555
3577
|
let toBeConfirmData = [];
|
|
3556
3578
|
let toBeDeleteData = {};
|
|
3557
|
-
const
|
|
3579
|
+
const actionButtons = vue.ref([
|
|
3558
3580
|
{
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
{
|
|
3566
|
-
name: t("ep.attachment.download"),
|
|
3567
|
-
onClick({ row }) {
|
|
3568
|
-
downloadFile({
|
|
3569
|
-
src: row.filePath,
|
|
3570
|
-
fileName: row.originalFilename || row.originalFileName
|
|
3571
|
-
});
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
{
|
|
3575
|
-
name: t("ep.attachment.delete"),
|
|
3576
|
-
disabled: () => {
|
|
3577
|
-
return mode.value === "browse";
|
|
3578
|
-
},
|
|
3579
|
-
onClick: ({ $index, row }) => {
|
|
3580
|
-
if (isDialogOpen) {
|
|
3581
|
-
toBeDeleteData[$index] = row;
|
|
3582
|
-
}
|
|
3583
|
-
data.value.splice($index, 1);
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
]
|
|
3581
|
+
name: t("ep.attachment.download"),
|
|
3582
|
+
onClick({ row }) {
|
|
3583
|
+
downloadFile({
|
|
3584
|
+
src: row.filePath,
|
|
3585
|
+
fileName: row.originalFilename || row.originalFileName
|
|
3586
|
+
});
|
|
3587
3587
|
}
|
|
3588
3588
|
},
|
|
3589
|
+
{
|
|
3590
|
+
name: t("ep.attachment.delete"),
|
|
3591
|
+
disabled: () => {
|
|
3592
|
+
return mode.value === "browse";
|
|
3593
|
+
},
|
|
3594
|
+
onClick: ({ $index, row }) => {
|
|
3595
|
+
if (isDialogOpen) {
|
|
3596
|
+
toBeDeleteData[$index] = row;
|
|
3597
|
+
}
|
|
3598
|
+
data.value.splice($index, 1);
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
]);
|
|
3602
|
+
const columns = vue.ref([
|
|
3589
3603
|
{
|
|
3590
3604
|
label: t("ep.attachment.attachmentType"),
|
|
3591
3605
|
prop: "type",
|
|
@@ -3663,14 +3677,23 @@
|
|
|
3663
3677
|
}
|
|
3664
3678
|
resolve();
|
|
3665
3679
|
};
|
|
3680
|
+
const permission = vue.computed(() => {
|
|
3681
|
+
const arr = props.permission?.split(":") || [];
|
|
3682
|
+
return {
|
|
3683
|
+
arg: arr[0],
|
|
3684
|
+
value: arr[1]
|
|
3685
|
+
};
|
|
3686
|
+
});
|
|
3666
3687
|
return {
|
|
3667
3688
|
columns,
|
|
3689
|
+
actionButtons,
|
|
3668
3690
|
addAttachment,
|
|
3669
3691
|
isNormalOpen,
|
|
3670
3692
|
isDialogOpen,
|
|
3671
3693
|
onConfirm,
|
|
3672
3694
|
onCancel,
|
|
3673
|
-
mode
|
|
3695
|
+
mode,
|
|
3696
|
+
permission
|
|
3674
3697
|
};
|
|
3675
3698
|
};
|
|
3676
3699
|
|
|
@@ -3690,7 +3713,7 @@
|
|
|
3690
3713
|
const bem = createNameSpace("attachment");
|
|
3691
3714
|
const props = __props;
|
|
3692
3715
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
3693
|
-
const { columns, addAttachment, isNormalOpen, onConfirm, onCancel, mode } = useAttachment(props, {
|
|
3716
|
+
const { columns, actionButtons, addAttachment, isNormalOpen, permission, onConfirm, onCancel, mode } = useAttachment(props, {
|
|
3694
3717
|
data: modelValue
|
|
3695
3718
|
});
|
|
3696
3719
|
const AttachmentDialog = useDialog({
|
|
@@ -3722,7 +3745,7 @@
|
|
|
3722
3745
|
return (_ctx, _cache) => {
|
|
3723
3746
|
const _component_EpButtons = vue.resolveComponent("EpButtons");
|
|
3724
3747
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3725
|
-
props.isShowOpenDialogButton ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), {
|
|
3748
|
+
props.isShowOpenDialogButton ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), {
|
|
3726
3749
|
key: 0,
|
|
3727
3750
|
type: "primary",
|
|
3728
3751
|
plain: "",
|
|
@@ -3734,7 +3757,9 @@
|
|
|
3734
3757
|
vue.createTextVNode(vue.toDisplayString(vue.unref(t)("ep.attachment.manageAttachment")) + "(" + vue.toDisplayString(modelValue.value?.length || 0) + ") ", 1)
|
|
3735
3758
|
]),
|
|
3736
3759
|
_: 1
|
|
3737
|
-
}, 8, ["class", "onClick"]))
|
|
3760
|
+
}, 8, ["class", "onClick"])), [
|
|
3761
|
+
[vue.unref(vPermisson), vue.unref(permission)]
|
|
3762
|
+
]) : vue.createCommentVNode("", true),
|
|
3738
3763
|
vue.createVNode(vue.unref(AttachmentDialog), null, {
|
|
3739
3764
|
default: vue.withCtx(() => [
|
|
3740
3765
|
vue.createElementVNode("div", { style: { "margin-bottom": "10px", "text-align": "right" } }, [
|
|
@@ -3757,8 +3782,10 @@
|
|
|
3757
3782
|
...vue.unref(prepareStyles)()
|
|
3758
3783
|
},
|
|
3759
3784
|
columns: vue.unref(columns),
|
|
3785
|
+
"action-buttons": vue.unref(actionButtons),
|
|
3786
|
+
actionColWidth: "110",
|
|
3760
3787
|
data: modelValue.value
|
|
3761
|
-
}, props), null, 16, ["class", "style", "columns", "data"])
|
|
3788
|
+
}, props), null, 16, ["class", "style", "columns", "action-buttons", "data"])
|
|
3762
3789
|
]),
|
|
3763
3790
|
_: 1
|
|
3764
3791
|
})
|
|
@@ -4005,7 +4032,7 @@
|
|
|
4005
4032
|
// 组件类型 bpm、 address
|
|
4006
4033
|
};
|
|
4007
4034
|
|
|
4008
|
-
const useUniVue = (props) => {
|
|
4035
|
+
const useUniVue = (props, emit) => {
|
|
4009
4036
|
const uniVue = vue.useTemplateRef("uniVue");
|
|
4010
4037
|
const { type } = props;
|
|
4011
4038
|
const loading = vue.ref(true);
|
|
@@ -4039,7 +4066,7 @@
|
|
|
4039
4066
|
let eventName = key.slice(2);
|
|
4040
4067
|
if (eventName.startsWith("Update:")) {
|
|
4041
4068
|
eventName = "update:" + eventName.slice(7);
|
|
4042
|
-
if (eventName === "update:
|
|
4069
|
+
if (eventName === "update:modelValue") {
|
|
4043
4070
|
eventName = "input";
|
|
4044
4071
|
}
|
|
4045
4072
|
} else {
|
|
@@ -4048,10 +4075,13 @@
|
|
|
4048
4075
|
}
|
|
4049
4076
|
events[eventName] = attrs[key];
|
|
4050
4077
|
} else {
|
|
4051
|
-
|
|
4078
|
+
if (key === "modelValue") {
|
|
4079
|
+
_props.value = attrs[key];
|
|
4080
|
+
} else {
|
|
4081
|
+
_props[key] = attrs[key];
|
|
4082
|
+
}
|
|
4052
4083
|
}
|
|
4053
4084
|
});
|
|
4054
|
-
console.log(events, _props, 9999);
|
|
4055
4085
|
return {
|
|
4056
4086
|
on: events,
|
|
4057
4087
|
props: _props
|
|
@@ -4063,7 +4093,7 @@
|
|
|
4063
4093
|
case "bpm":
|
|
4064
4094
|
return `${cdn}bpm-common/common/index.umd.min.js`;
|
|
4065
4095
|
case "address":
|
|
4066
|
-
return
|
|
4096
|
+
return `http://localhost:8001/dist/hx-address.js`;
|
|
4067
4097
|
default:
|
|
4068
4098
|
return "";
|
|
4069
4099
|
}
|
|
@@ -4155,6 +4185,22 @@
|
|
|
4155
4185
|
}
|
|
4156
4186
|
}
|
|
4157
4187
|
shadowRoot.appendChild(container);
|
|
4188
|
+
console.log(prepareVueAttributes());
|
|
4189
|
+
const baseEvents = {
|
|
4190
|
+
...prepareVueAttributes().on,
|
|
4191
|
+
"input": (newVal) => {
|
|
4192
|
+
console.log(newVal, "input", props.name);
|
|
4193
|
+
emit("update:modelValue", newVal);
|
|
4194
|
+
},
|
|
4195
|
+
"update:dialogFormData": (newVal) => {
|
|
4196
|
+
console.log(newVal, "update:dialogFormData");
|
|
4197
|
+
emit("update:dialogFormData", newVal);
|
|
4198
|
+
},
|
|
4199
|
+
"update:visible": (newVal) => {
|
|
4200
|
+
console.log(newVal, "update:visible");
|
|
4201
|
+
emit("update:visible", newVal);
|
|
4202
|
+
}
|
|
4203
|
+
};
|
|
4158
4204
|
instance = new Vue2({
|
|
4159
4205
|
el: container,
|
|
4160
4206
|
// @ts-expect-error 缺少类型定义
|
|
@@ -4163,38 +4209,31 @@
|
|
|
4163
4209
|
props: {
|
|
4164
4210
|
...prepareVueAttributes().props
|
|
4165
4211
|
},
|
|
4166
|
-
on:
|
|
4167
|
-
...prepareVueAttributes().on,
|
|
4168
|
-
// 'update:dialogFormData': (newVal) => {
|
|
4169
|
-
// console.log(newVal, 'update:dialogFormData');
|
|
4170
|
-
// },
|
|
4171
|
-
// 'update:visible': (newVal) => {
|
|
4172
|
-
// console.log(newVal, 'update:visible');
|
|
4173
|
-
// },
|
|
4174
|
-
"input": (newVal) => {
|
|
4175
|
-
console.log(newVal, "input");
|
|
4176
|
-
}
|
|
4177
|
-
}
|
|
4212
|
+
on: baseEvents
|
|
4178
4213
|
})
|
|
4179
4214
|
});
|
|
4180
4215
|
};
|
|
4181
4216
|
Object.keys(attrs).forEach((key) => {
|
|
4182
|
-
|
|
4183
|
-
|
|
4217
|
+
console.log(key, 8);
|
|
4218
|
+
if (!key.startsWith("on")) {
|
|
4184
4219
|
vue.watch(
|
|
4185
|
-
() => attrs[
|
|
4220
|
+
() => attrs[key],
|
|
4186
4221
|
(newVal) => {
|
|
4187
|
-
|
|
4222
|
+
vue.nextTick(() => {
|
|
4188
4223
|
try {
|
|
4189
|
-
console.log(newVal, "
|
|
4190
|
-
|
|
4224
|
+
console.log(props.name, newVal, "watch", key, instance);
|
|
4225
|
+
let vue2Prop = key;
|
|
4226
|
+
if (key === "modelValue") {
|
|
4227
|
+
vue2Prop = "value";
|
|
4228
|
+
}
|
|
4229
|
+
instance.$children[0][vue2Prop] = newVal;
|
|
4191
4230
|
} catch (e) {
|
|
4192
4231
|
}
|
|
4193
|
-
}
|
|
4232
|
+
});
|
|
4194
4233
|
},
|
|
4195
4234
|
{
|
|
4196
|
-
|
|
4197
|
-
|
|
4235
|
+
deep: true,
|
|
4236
|
+
immediate: true
|
|
4198
4237
|
}
|
|
4199
4238
|
);
|
|
4200
4239
|
}
|
|
@@ -4214,10 +4253,12 @@
|
|
|
4214
4253
|
},
|
|
4215
4254
|
__name: "uni-vue",
|
|
4216
4255
|
props: uniVueProps,
|
|
4217
|
-
|
|
4256
|
+
emits: ["update:modelValue", "update:dialogFormData", "update:visible"],
|
|
4257
|
+
setup(__props, { emit: __emit }) {
|
|
4218
4258
|
const bem = createNameSpace("uni-vue");
|
|
4219
4259
|
const props = __props;
|
|
4220
|
-
const
|
|
4260
|
+
const emit = __emit;
|
|
4261
|
+
const { loading } = useUniVue(props, emit);
|
|
4221
4262
|
return (_ctx, _cache) => {
|
|
4222
4263
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
4223
4264
|
vue.createVNode(vue.unref(elementPlus.ElSkeleton), {
|
|
@@ -4256,7 +4297,7 @@
|
|
|
4256
4297
|
EpUniVue
|
|
4257
4298
|
];
|
|
4258
4299
|
|
|
4259
|
-
var version = "0.0.
|
|
4300
|
+
var version = "0.0.78";
|
|
4260
4301
|
|
|
4261
4302
|
var globalProperties = {
|
|
4262
4303
|
install(app) {
|