@smallwei/avue 3.8.1 → 3.8.3
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/README.md +206 -86
- package/dist/avue.js +37301 -0
- package/dist/avue.js.map +1 -0
- package/dist/avue.min.js +6 -0
- package/dist/avue.min.mjs +2 -0
- package/dist/avue.mjs +2 -0
- package/dist/index.css +1 -0
- package/es/avue.min.mjs +2 -0
- package/es/avue.min.ts +2 -0
- package/es/avue.mjs +2 -0
- package/es/avue.ts +2 -0
- package/es/core/create.mjs +8 -0
- package/es/core/create.ts +16 -0
- package/es/core/dataformat.mjs +184 -0
- package/es/core/dataformat.ts +190 -0
- package/es/core/detail.mjs +74 -0
- package/es/core/detail.ts +81 -0
- package/es/core/dic.mjs +213 -0
- package/es/core/dic.ts +235 -0
- package/es/core/locale.mjs +8 -0
- package/es/core/locale.ts +9 -0
- package/es/core/packages.mjs +61 -0
- package/es/core/packages.ts +62 -0
- package/es/core/slot.mjs +32 -0
- package/es/core/slot.ts +30 -0
- package/es/global/variable.mjs +80 -0
- package/es/global/variable.ts +84 -0
- package/es/icon.mjs +9 -0
- package/es/icon.ts +11 -0
- package/es/index.mjs +127 -0
- package/es/index.ts +177 -0
- package/es/locale/browser/en.mjs +288 -0
- package/es/locale/browser/zh-cn.mjs +288 -0
- package/es/locale/browser/zh.mjs +288 -0
- package/es/locale/index.mjs +141 -0
- package/es/locale/index.ts +196 -0
- package/es/locale/lang/en.mjs +282 -0
- package/es/locale/lang/en.ts +282 -0
- package/es/locale/lang/zh-cn.mjs +282 -0
- package/es/locale/lang/zh-cn.ts +282 -0
- package/es/locale/lang/zh.mjs +282 -0
- package/es/locale/lang/zh.ts +282 -0
- package/es/packages/core/common/event.mjs +58 -0
- package/es/packages/core/common/event.ts +56 -0
- package/es/packages/core/common/init.mjs +134 -0
- package/es/packages/core/common/init.ts +133 -0
- package/es/packages/core/common/props.mjs +239 -0
- package/es/packages/core/common/props.ts +240 -0
- package/es/packages/core/components/dialog-form/index.mjs +29 -0
- package/es/packages/core/components/dialog-form/index.ts +29 -0
- package/es/packages/core/components/dialog-form/index.vue +108 -0
- package/es/packages/core/components/form/custom.mjs +41 -0
- package/es/packages/core/components/form/custom.ts +41 -0
- package/es/packages/core/components/form/index.vue +176 -0
- package/es/packages/core/components/icon/index.vue +37 -0
- package/es/packages/core/components/image-preview/index.mjs +34 -0
- package/es/packages/core/components/image-preview/index.ts +37 -0
- package/es/packages/core/components/image-preview/index.vue +215 -0
- package/es/packages/core/directive/contextmenu.mjs +92 -0
- package/es/packages/core/directive/contextmenu.ts +103 -0
- package/es/packages/core/directive/permission.mjs +19 -0
- package/es/packages/core/directive/permission.ts +18 -0
- package/es/packages/data/box/index.vue +66 -0
- package/es/packages/data/card/index.vue +62 -0
- package/es/packages/data/cardText/index.vue +56 -0
- package/es/packages/data/countdown/index.vue +81 -0
- package/es/packages/data/dashboard/index.vue +72 -0
- package/es/packages/data/display/index.vue +63 -0
- package/es/packages/data/icons/index.vue +68 -0
- package/es/packages/data/imgText/index.vue +72 -0
- package/es/packages/data/list/index.vue +69 -0
- package/es/packages/data/notice/index.vue +63 -0
- package/es/packages/data/operaText/index.vue +62 -0
- package/es/packages/data/panel/index.vue +62 -0
- package/es/packages/data/pay/index.vue +92 -0
- package/es/packages/data/price/index.vue +55 -0
- package/es/packages/data/product/index.vue +106 -0
- package/es/packages/data/profile/index.vue +91 -0
- package/es/packages/data/progress/index.vue +64 -0
- package/es/packages/data/rank/index.vue +92 -0
- package/es/packages/data/rotate/index.vue +69 -0
- package/es/packages/data/statistic/index.vue +71 -0
- package/es/packages/data/tabs/index.vue +64 -0
- package/es/packages/data/task/index.vue +82 -0
- package/es/packages/data/weather/index.vue +103 -0
- package/es/packages/element-plus/array/index.vue +115 -0
- package/es/packages/element-plus/article/index.vue +73 -0
- package/es/packages/element-plus/card/index.vue +103 -0
- package/es/packages/element-plus/cascader/index.vue +132 -0
- package/es/packages/element-plus/chat/index.vue +513 -0
- package/es/packages/element-plus/checkbox/index.vue +84 -0
- package/es/packages/element-plus/comment/index.vue +76 -0
- package/es/packages/element-plus/count-up/index.vue +107 -0
- package/es/packages/element-plus/crud/column/column-default.vue +128 -0
- package/es/packages/element-plus/crud/column/column-dynamic.vue +86 -0
- package/es/packages/element-plus/crud/column/column-menu.vue +267 -0
- package/es/packages/element-plus/crud/column/column-slot.vue +348 -0
- package/es/packages/element-plus/crud/column/column.vue +119 -0
- package/es/packages/element-plus/crud/column/menu.vue +78 -0
- package/es/packages/element-plus/crud/config.mjs +74 -0
- package/es/packages/element-plus/crud/config.ts +74 -0
- package/es/packages/element-plus/crud/dialog/dialog-column.vue +102 -0
- package/es/packages/element-plus/crud/dialog/dialog-excel.vue +204 -0
- package/es/packages/element-plus/crud/dialog/dialog-filter.vue +159 -0
- package/es/packages/element-plus/crud/dialog/dialog-form.vue +352 -0
- package/es/packages/element-plus/crud/grid/index.vue +271 -0
- package/es/packages/element-plus/crud/grid/item.vue +39 -0
- package/es/packages/element-plus/crud/index.vue +1018 -0
- package/es/packages/element-plus/crud/menu/header-menu.vue +175 -0
- package/es/packages/element-plus/crud/menu/header-search.vue +228 -0
- package/es/packages/element-plus/crud/menu/table-page.vue +108 -0
- package/es/packages/element-plus/date/index.vue +81 -0
- package/es/packages/element-plus/draggable/index.vue +444 -0
- package/es/packages/element-plus/dynamic/index.vue +353 -0
- package/es/packages/element-plus/flow/index.vue +339 -0
- package/es/packages/element-plus/flow/node.vue +84 -0
- package/es/packages/element-plus/form/config.mjs +6 -0
- package/es/packages/element-plus/form/config.ts +6 -0
- package/es/packages/element-plus/form/index.vue +954 -0
- package/es/packages/element-plus/form/menu.vue +63 -0
- package/es/packages/element-plus/group/index.vue +90 -0
- package/es/packages/element-plus/input/index.vue +1264 -0
- package/es/packages/element-plus/input-color/index.vue +70 -0
- package/es/packages/element-plus/input-cron/index.vue +363 -0
- package/es/packages/element-plus/input-icon/index.vue +143 -0
- package/es/packages/element-plus/input-map/index.vue +311 -0
- package/es/packages/element-plus/input-number/index.vue +91 -0
- package/es/packages/element-plus/input-table/index.vue +279 -0
- package/es/packages/element-plus/input-tag/index.vue +79 -0
- package/es/packages/element-plus/input-tree/index.vue +194 -0
- package/es/packages/element-plus/license/index.vue +155 -0
- package/es/packages/element-plus/login/index.vue +203 -0
- package/es/packages/element-plus/mention/index.vue +117 -0
- package/es/packages/element-plus/radio/index.vue +38 -0
- package/es/packages/element-plus/rate/index.vue +51 -0
- package/es/packages/element-plus/search/index.vue +129 -0
- package/es/packages/element-plus/select/index.vue +292 -0
- package/es/packages/element-plus/sign/index.vue +230 -0
- package/es/packages/element-plus/slider/index.vue +66 -0
- package/es/packages/element-plus/switch/index.vue +72 -0
- package/es/packages/element-plus/tabs/index.vue +62 -0
- package/es/packages/element-plus/text-ellipsis/index.vue +104 -0
- package/es/packages/element-plus/time/index.vue +81 -0
- package/es/packages/element-plus/title/index.vue +30 -0
- package/es/packages/element-plus/tree/index.vue +460 -0
- package/es/packages/element-plus/upload/index.vue +728 -0
- package/es/packages/element-plus/verify/index.vue +62 -0
- package/es/packages/element-plus/video/index.vue +90 -0
- package/es/plugin/ali/index.mjs +4 -0
- package/es/plugin/ali/index.ts +6 -0
- package/es/plugin/clipboard/index.mjs +61 -0
- package/es/plugin/clipboard/index.ts +67 -0
- package/es/plugin/export/_blob.mjs +151 -0
- package/es/plugin/export/_blob.ts +176 -0
- package/es/plugin/export/_export2Excel.mjs +141 -0
- package/es/plugin/export/_export2Excel.ts +166 -0
- package/es/plugin/export/index.mjs +263 -0
- package/es/plugin/export/index.ts +274 -0
- package/es/plugin/logs/index.mjs +46 -0
- package/es/plugin/logs/index.ts +66 -0
- package/es/plugin/print/index.mjs +145 -0
- package/es/plugin/print/index.ts +155 -0
- package/es/plugin/qiniu/index.mjs +78 -0
- package/es/plugin/qiniu/index.ts +88 -0
- package/es/plugin/screenshot/index.mjs +8 -0
- package/es/plugin/screenshot/index.ts +9 -0
- package/es/plugin/video/index.mjs +52 -0
- package/es/plugin/video/index.ts +60 -0
- package/es/plugin/watermark/index.mjs +114 -0
- package/es/plugin/watermark/index.ts +127 -0
- package/es/plugin/watermark/watermark.mjs +109 -0
- package/es/plugin/watermark/watermark.ts +121 -0
- package/es/ui/data/index.mjs +49 -0
- package/es/ui/data/index.ts +51 -0
- package/es/ui/element-plus/index.mjs +87 -0
- package/es/ui/element-plus/index.ts +89 -0
- package/es/ui/index.mjs +4 -0
- package/es/ui/index.ts +6 -0
- package/es/utils/bem.mjs +29 -0
- package/es/utils/bem.ts +36 -0
- package/es/utils/mock.mjs +137 -0
- package/es/utils/mock.ts +151 -0
- package/es/utils/util.mjs +370 -0
- package/es/utils/util.ts +392 -0
- package/es/utils/validate.mjs +18 -0
- package/es/utils/validate.ts +23 -0
- package/es/version.mjs +1 -0
- package/es/version.ts +1 -0
- package/lib/avue.js +11 -31398
- package/lib/avue.min.js +11 -6
- package/lib/avue.min.ts +2 -0
- package/lib/avue.ts +2 -0
- package/lib/core/create.js +14 -0
- package/lib/core/create.ts +16 -0
- package/lib/core/dataformat.js +194 -0
- package/lib/core/dataformat.ts +190 -0
- package/lib/core/detail.js +81 -0
- package/lib/core/detail.ts +81 -0
- package/lib/core/dic.js +220 -0
- package/lib/core/dic.ts +235 -0
- package/lib/core/locale.js +10 -0
- package/lib/core/locale.ts +9 -0
- package/lib/core/packages.js +66 -0
- package/lib/core/packages.ts +62 -0
- package/lib/core/slot.js +34 -0
- package/lib/core/slot.ts +30 -0
- package/lib/global/variable.js +83 -0
- package/lib/global/variable.ts +84 -0
- package/lib/icon.js +44 -0
- package/lib/icon.ts +11 -0
- package/lib/index.css +1 -1
- package/lib/index.js +134 -0
- package/lib/index.ts +177 -0
- package/lib/locale/browser/en.js +288 -0
- package/lib/locale/browser/zh-cn.js +288 -0
- package/lib/locale/browser/zh.js +288 -0
- package/lib/locale/index.js +153 -47
- package/lib/locale/index.ts +196 -0
- package/lib/locale/lang/en.js +284 -100
- package/lib/locale/lang/en.ts +282 -0
- package/lib/locale/lang/zh-cn.js +284 -0
- package/lib/locale/lang/zh-cn.ts +282 -0
- package/lib/locale/lang/zh.js +284 -100
- package/lib/locale/lang/zh.ts +282 -0
- package/lib/packages/core/common/event.js +61 -0
- package/lib/packages/core/common/event.ts +56 -0
- package/lib/packages/core/common/init.js +140 -0
- package/lib/packages/core/common/init.ts +133 -0
- package/lib/packages/core/common/props.js +245 -0
- package/lib/packages/core/common/props.ts +240 -0
- package/lib/packages/core/components/dialog-form/index.js +35 -0
- package/lib/packages/core/components/dialog-form/index.ts +29 -0
- package/lib/packages/core/components/dialog-form/index.vue +108 -0
- package/lib/packages/core/components/form/custom.js +43 -0
- package/lib/packages/core/components/form/custom.ts +41 -0
- package/lib/packages/core/components/form/index.vue +176 -0
- package/lib/packages/core/components/icon/index.vue +37 -0
- package/lib/packages/core/components/image-preview/index.js +40 -0
- package/lib/packages/core/components/image-preview/index.ts +37 -0
- package/lib/packages/core/components/image-preview/index.vue +215 -0
- package/lib/packages/core/directive/contextmenu.js +94 -0
- package/lib/packages/core/directive/contextmenu.ts +103 -0
- package/lib/packages/core/directive/permission.js +21 -0
- package/lib/packages/core/directive/permission.ts +18 -0
- package/lib/packages/data/box/index.vue +66 -0
- package/lib/packages/data/card/index.vue +62 -0
- package/lib/packages/data/cardText/index.vue +56 -0
- package/lib/packages/data/countdown/index.vue +81 -0
- package/lib/packages/data/dashboard/index.vue +72 -0
- package/lib/packages/data/display/index.vue +63 -0
- package/lib/packages/data/icons/index.vue +68 -0
- package/lib/packages/data/imgText/index.vue +72 -0
- package/lib/packages/data/list/index.vue +69 -0
- package/lib/packages/data/notice/index.vue +63 -0
- package/lib/packages/data/operaText/index.vue +62 -0
- package/lib/packages/data/panel/index.vue +62 -0
- package/lib/packages/data/pay/index.vue +92 -0
- package/lib/packages/data/price/index.vue +55 -0
- package/lib/packages/data/product/index.vue +106 -0
- package/lib/packages/data/profile/index.vue +91 -0
- package/lib/packages/data/progress/index.vue +64 -0
- package/lib/packages/data/rank/index.vue +92 -0
- package/lib/packages/data/rotate/index.vue +69 -0
- package/lib/packages/data/statistic/index.vue +71 -0
- package/lib/packages/data/tabs/index.vue +64 -0
- package/lib/packages/data/task/index.vue +82 -0
- package/lib/packages/data/weather/index.vue +103 -0
- package/lib/packages/element-plus/array/index.vue +115 -0
- package/lib/packages/element-plus/article/index.vue +73 -0
- package/lib/packages/element-plus/card/index.vue +103 -0
- package/lib/packages/element-plus/cascader/index.vue +132 -0
- package/lib/packages/element-plus/chat/index.vue +513 -0
- package/lib/packages/element-plus/checkbox/index.vue +84 -0
- package/lib/packages/element-plus/comment/index.vue +76 -0
- package/lib/packages/element-plus/count-up/index.vue +107 -0
- package/lib/packages/element-plus/crud/column/column-default.vue +128 -0
- package/lib/packages/element-plus/crud/column/column-dynamic.vue +86 -0
- package/lib/packages/element-plus/crud/column/column-menu.vue +267 -0
- package/lib/packages/element-plus/crud/column/column-slot.vue +348 -0
- package/lib/packages/element-plus/crud/column/column.vue +119 -0
- package/lib/packages/element-plus/crud/column/menu.vue +78 -0
- package/lib/packages/element-plus/crud/config.js +76 -0
- package/lib/packages/element-plus/crud/config.ts +74 -0
- package/lib/packages/element-plus/crud/dialog/dialog-column.vue +102 -0
- package/lib/packages/element-plus/crud/dialog/dialog-excel.vue +204 -0
- package/lib/packages/element-plus/crud/dialog/dialog-filter.vue +159 -0
- package/lib/packages/element-plus/crud/dialog/dialog-form.vue +352 -0
- package/lib/packages/element-plus/crud/grid/index.vue +271 -0
- package/lib/packages/element-plus/crud/grid/item.vue +39 -0
- package/lib/packages/element-plus/crud/index.vue +1018 -0
- package/lib/packages/element-plus/crud/menu/header-menu.vue +175 -0
- package/lib/packages/element-plus/crud/menu/header-search.vue +228 -0
- package/lib/packages/element-plus/crud/menu/table-page.vue +108 -0
- package/lib/packages/element-plus/date/index.vue +81 -0
- package/lib/packages/element-plus/draggable/index.vue +444 -0
- package/lib/packages/element-plus/dynamic/index.vue +353 -0
- package/lib/packages/element-plus/flow/index.vue +339 -0
- package/lib/packages/element-plus/flow/node.vue +84 -0
- package/lib/packages/element-plus/form/config.js +8 -0
- package/lib/packages/element-plus/form/config.ts +6 -0
- package/lib/packages/element-plus/form/index.vue +954 -0
- package/lib/packages/element-plus/form/menu.vue +63 -0
- package/lib/packages/element-plus/group/index.vue +90 -0
- package/lib/packages/element-plus/input/index.vue +1264 -0
- package/lib/packages/element-plus/input-color/index.vue +70 -0
- package/lib/packages/element-plus/input-cron/index.vue +363 -0
- package/lib/packages/element-plus/input-icon/index.vue +143 -0
- package/lib/packages/element-plus/input-map/index.vue +311 -0
- package/lib/packages/element-plus/input-number/index.vue +91 -0
- package/lib/packages/element-plus/input-table/index.vue +279 -0
- package/lib/packages/element-plus/input-tag/index.vue +79 -0
- package/lib/packages/element-plus/input-tree/index.vue +194 -0
- package/lib/packages/element-plus/license/index.vue +155 -0
- package/lib/packages/element-plus/login/index.vue +203 -0
- package/lib/packages/element-plus/mention/index.vue +117 -0
- package/lib/packages/element-plus/radio/index.vue +38 -0
- package/lib/packages/element-plus/rate/index.vue +51 -0
- package/lib/packages/element-plus/search/index.vue +129 -0
- package/lib/packages/element-plus/select/index.vue +292 -0
- package/lib/packages/element-plus/sign/index.vue +230 -0
- package/lib/packages/element-plus/slider/index.vue +66 -0
- package/lib/packages/element-plus/switch/index.vue +72 -0
- package/lib/packages/element-plus/tabs/index.vue +62 -0
- package/lib/packages/element-plus/text-ellipsis/index.vue +104 -0
- package/lib/packages/element-plus/time/index.vue +81 -0
- package/lib/packages/element-plus/title/index.vue +30 -0
- package/lib/packages/element-plus/tree/index.vue +460 -0
- package/lib/packages/element-plus/upload/index.vue +728 -0
- package/lib/packages/element-plus/verify/index.vue +62 -0
- package/lib/packages/element-plus/video/index.vue +90 -0
- package/lib/plugin/ali/index.js +8 -0
- package/lib/plugin/ali/index.ts +6 -0
- package/lib/plugin/clipboard/index.js +64 -0
- package/lib/plugin/clipboard/index.ts +67 -0
- package/lib/plugin/export/_blob.js +151 -0
- package/lib/plugin/export/_blob.ts +176 -0
- package/lib/plugin/export/_export2Excel.js +145 -0
- package/lib/plugin/export/_export2Excel.ts +166 -0
- package/lib/plugin/export/index.js +268 -0
- package/lib/plugin/export/index.ts +274 -0
- package/lib/plugin/logs/index.js +48 -0
- package/lib/plugin/logs/index.ts +66 -0
- package/lib/plugin/print/index.js +147 -0
- package/lib/plugin/print/index.ts +155 -0
- package/lib/plugin/qiniu/index.js +82 -0
- package/lib/plugin/qiniu/index.ts +88 -0
- package/lib/plugin/screenshot/index.js +14 -0
- package/lib/plugin/screenshot/index.ts +9 -0
- package/lib/plugin/video/index.js +55 -0
- package/lib/plugin/video/index.ts +60 -0
- package/lib/plugin/watermark/index.js +121 -0
- package/lib/plugin/watermark/index.ts +127 -0
- package/lib/plugin/watermark/watermark.js +111 -0
- package/lib/plugin/watermark/watermark.ts +121 -0
- package/lib/ui/data/index.js +54 -0
- package/lib/ui/data/index.ts +51 -0
- package/lib/ui/element-plus/index.js +92 -0
- package/lib/ui/element-plus/index.ts +89 -0
- package/lib/ui/index.js +9 -0
- package/lib/ui/index.ts +6 -0
- package/lib/utils/bem.js +31 -0
- package/lib/utils/bem.ts +36 -0
- package/lib/utils/mock.js +142 -0
- package/lib/utils/mock.ts +151 -0
- package/lib/utils/util.js +403 -0
- package/lib/utils/util.ts +392 -0
- package/lib/utils/validate.js +21 -0
- package/lib/utils/validate.ts +23 -0
- package/lib/version.js +4 -0
- package/lib/version.ts +1 -0
- package/package.json +24 -11
- package/types/index.d.ts +141 -0
- package/types/shims-aliases.d.ts +4 -0
- package/types/shims-vue.d.ts +6 -0
- package/lib/avue.js.map +0 -1
- package/lib/locale/format.js +0 -44
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="crud.tableColumnName"
|
|
4
|
+
v-if="getColumnProp(column, 'hide')"
|
|
5
|
+
:key="column.prop"
|
|
6
|
+
:prop="column.prop"
|
|
7
|
+
:grid-row="column.gridRow"
|
|
8
|
+
:label="column.label"
|
|
9
|
+
:class-name="column.className"
|
|
10
|
+
:label-class-name="column.labelClassName"
|
|
11
|
+
:column-key="column.prop"
|
|
12
|
+
:filter-placement="column.filterPlacement"
|
|
13
|
+
:filtered-value="column.filteredValue"
|
|
14
|
+
:filtered-multiple="column.filterMultiple"
|
|
15
|
+
:filters="getColumnProp(column, 'filters')"
|
|
16
|
+
:filter-method="
|
|
17
|
+
column.filters
|
|
18
|
+
? (value, row) =>
|
|
19
|
+
getColumnProp(columnOption, 'filterMethod', { value, row, column })
|
|
20
|
+
: undefined
|
|
21
|
+
"
|
|
22
|
+
:filter-multiple="validData(column.filterMultiple, true)"
|
|
23
|
+
:show-overflow-tooltip="column.showOverflowTooltip || column.overHidden"
|
|
24
|
+
:tooltip-formatter="column.tooltipFormatter"
|
|
25
|
+
:min-width="column.minWidth"
|
|
26
|
+
:sortable="getColumnProp(column, 'sortable')"
|
|
27
|
+
:sort-method="column.sortMethod"
|
|
28
|
+
:sort-orders="column.sortOrders"
|
|
29
|
+
:sort-by="column.sortBy"
|
|
30
|
+
:resizable="column.resizable"
|
|
31
|
+
:render-header="column.renderHeader"
|
|
32
|
+
:align="column.align || crud.tableOption.align"
|
|
33
|
+
:header-align="column.headerAlign || crud.tableOption.headerAlign"
|
|
34
|
+
:width="getColumnProp(column, 'width')"
|
|
35
|
+
:fixed="getColumnProp(column, 'fixed')"
|
|
36
|
+
>
|
|
37
|
+
<template #header="{ $index }">
|
|
38
|
+
<slot
|
|
39
|
+
:name="crud.getSlotName(column, 'H')"
|
|
40
|
+
v-if="crud.getSlotName(column, 'H', crud.$slots)"
|
|
41
|
+
v-bind="{ column, $index }"
|
|
42
|
+
></slot>
|
|
43
|
+
<span v-else>{{ column.label }}</span>
|
|
44
|
+
</template>
|
|
45
|
+
<template #="{ row, column: tableColumn, $index }">
|
|
46
|
+
<el-form-item
|
|
47
|
+
:prop="crud.isTree ? '' : `list.${$index}.${column.prop}`"
|
|
48
|
+
:label="validLabel(column, row, ' ')"
|
|
49
|
+
v-if="row.$cellEdit && column.cell"
|
|
50
|
+
:label-width="validLabel(column, row, '-1px')"
|
|
51
|
+
:rules="column.rules"
|
|
52
|
+
>
|
|
53
|
+
<el-tooltip
|
|
54
|
+
:content="(crud.listError[`list.${$index}.${column.prop}`] || {}).msg"
|
|
55
|
+
:disabled="
|
|
56
|
+
!(crud.listError[`list.${$index}.${column.prop}`] || {}).valid
|
|
57
|
+
"
|
|
58
|
+
placement="top"
|
|
59
|
+
>
|
|
60
|
+
<div>
|
|
61
|
+
<slot
|
|
62
|
+
v-bind="{
|
|
63
|
+
row: row,
|
|
64
|
+
tableColumn: tableColumn,
|
|
65
|
+
column: column,
|
|
66
|
+
dic: crud.DIC[column.prop],
|
|
67
|
+
size: crud.size,
|
|
68
|
+
index: $index,
|
|
69
|
+
disabled: crud.btnDisabledList[$index],
|
|
70
|
+
label: handleDetail(row, column),
|
|
71
|
+
$cell: row.$cellEdit,
|
|
72
|
+
}"
|
|
73
|
+
:name="crud.getSlotName(column, 'F')"
|
|
74
|
+
v-if="crud.getSlotName(column, 'F', crud.$slots)"
|
|
75
|
+
></slot>
|
|
76
|
+
<form-temp
|
|
77
|
+
v-else
|
|
78
|
+
:column="column"
|
|
79
|
+
:size="crud.size"
|
|
80
|
+
:index="$index"
|
|
81
|
+
:row="row"
|
|
82
|
+
:prop="`list.${$index}.${column.prop}`"
|
|
83
|
+
:clearValidate="crud.clearValidate"
|
|
84
|
+
:render="column.renderForm"
|
|
85
|
+
:table-data="{
|
|
86
|
+
index: $index,
|
|
87
|
+
row: row,
|
|
88
|
+
label: handleDetail(row, column),
|
|
89
|
+
}"
|
|
90
|
+
:dic="
|
|
91
|
+
(crud.cascaderDIC[$index] || {})[column.prop] ||
|
|
92
|
+
crud.DIC[column.prop]
|
|
93
|
+
"
|
|
94
|
+
:props="column.props || crud.tableOption.props"
|
|
95
|
+
:readonly="column.readonly"
|
|
96
|
+
:disabled="
|
|
97
|
+
crud.disabled ||
|
|
98
|
+
crud.tableOption.disabled ||
|
|
99
|
+
column.disabled ||
|
|
100
|
+
crud.btnDisabledList[$index]
|
|
101
|
+
"
|
|
102
|
+
:clearable="validData(column.clearable, false)"
|
|
103
|
+
v-bind="$uploadFun(column, crud)"
|
|
104
|
+
v-model="row[column.prop]"
|
|
105
|
+
:column-slot="crud.mainSlot"
|
|
106
|
+
@change="columnChange(row, column, $index)"
|
|
107
|
+
>
|
|
108
|
+
<template v-for="item in crud.mainSlot" #[item]="scope">
|
|
109
|
+
<slot v-bind="scope" :name="item"></slot>
|
|
110
|
+
</template>
|
|
111
|
+
</form-temp>
|
|
112
|
+
</div>
|
|
113
|
+
</el-tooltip>
|
|
114
|
+
</el-form-item>
|
|
115
|
+
<custom
|
|
116
|
+
v-else-if="column.render"
|
|
117
|
+
:column="column"
|
|
118
|
+
:row="row"
|
|
119
|
+
:index="$index"
|
|
120
|
+
:render="column.render"
|
|
121
|
+
:event="column.event"
|
|
122
|
+
:params="column.params"
|
|
123
|
+
></custom>
|
|
124
|
+
<slot
|
|
125
|
+
:row="row"
|
|
126
|
+
:tableColumn="tableColumn"
|
|
127
|
+
:column="column"
|
|
128
|
+
:index="$index"
|
|
129
|
+
:dic="crud.DIC[column.prop]"
|
|
130
|
+
:size="crud.size"
|
|
131
|
+
:label="handleDetail(row, column)"
|
|
132
|
+
:name="column.prop"
|
|
133
|
+
v-else-if="crud.$slots[column.prop]"
|
|
134
|
+
></slot>
|
|
135
|
+
<template v-else>
|
|
136
|
+
<span
|
|
137
|
+
v-if="['img', 'upload'].includes(column.type)"
|
|
138
|
+
class="avue-crud__img"
|
|
139
|
+
>
|
|
140
|
+
<template
|
|
141
|
+
v-for="(item, index) in getImgList(row, column)"
|
|
142
|
+
:key="index"
|
|
143
|
+
>
|
|
144
|
+
<component
|
|
145
|
+
:src="item"
|
|
146
|
+
v-if="isMediaType(item, column.fileType)"
|
|
147
|
+
:is="isMediaType(item, column.fileType)"
|
|
148
|
+
@click.stop="openImg(row, column, index)"
|
|
149
|
+
></component>
|
|
150
|
+
<el-icon v-else @click.stop="openImg(row, column, index)">
|
|
151
|
+
<el-icon-document></el-icon-document>
|
|
152
|
+
</el-icon>
|
|
153
|
+
</template>
|
|
154
|
+
</span>
|
|
155
|
+
<el-link
|
|
156
|
+
v-else-if="'url' === column.type"
|
|
157
|
+
v-for="(item, index) in corArray(row, column)"
|
|
158
|
+
type="primary"
|
|
159
|
+
:key="index"
|
|
160
|
+
:href="item"
|
|
161
|
+
:target="column.target || '_blank'"
|
|
162
|
+
>{{ item }}</el-link
|
|
163
|
+
>
|
|
164
|
+
<avue-rate
|
|
165
|
+
disabled
|
|
166
|
+
v-else-if="'rate' === column.type"
|
|
167
|
+
v-model="row[column.prop]"
|
|
168
|
+
></avue-rate>
|
|
169
|
+
<i
|
|
170
|
+
v-else-if="'color' === column.type"
|
|
171
|
+
class="avue-crud__color"
|
|
172
|
+
:style="{ backgroundColor: row[column.prop] }"
|
|
173
|
+
></i>
|
|
174
|
+
<icon-temp
|
|
175
|
+
v-else-if="'icon' === column.type"
|
|
176
|
+
:text="row[column.prop]"
|
|
177
|
+
></icon-temp>
|
|
178
|
+
<span v-else-if="column.html" v-html="handleDetail(row, column)"></span>
|
|
179
|
+
<span
|
|
180
|
+
v-else
|
|
181
|
+
:class="{ 'avue-crud__ellipsis': column.ellipsis }"
|
|
182
|
+
:title="column.ellipsis ? handleDetail(row, column) : ''"
|
|
183
|
+
v-text="handleDetail(row, column)"
|
|
184
|
+
></span>
|
|
185
|
+
</template>
|
|
186
|
+
</template>
|
|
187
|
+
</component>
|
|
188
|
+
</template>
|
|
189
|
+
|
|
190
|
+
<script>
|
|
191
|
+
let count = {};
|
|
192
|
+
import { detail } from "../../../../core/detail.js";
|
|
193
|
+
import { DIC_PROPS, DIC_SHOW_SPLIT, DIC_SPLIT } from "../../../../global/variable.js";
|
|
194
|
+
import { sendDic } from "../../../../core/dic.js";
|
|
195
|
+
import { isMediaType, blankVal } from "../../../../utils/util.js";
|
|
196
|
+
import custom from "../../../core/components/form/custom.js";
|
|
197
|
+
import formTemp from "../../../core/components/form/index.vue";
|
|
198
|
+
import iconTemp from "../../../core/components/icon/index.vue";
|
|
199
|
+
import tableItemCard from "../grid/item.vue";
|
|
200
|
+
export default {
|
|
201
|
+
name: "column-slot",
|
|
202
|
+
inject: ["dynamic", "crud"],
|
|
203
|
+
components: {
|
|
204
|
+
custom,
|
|
205
|
+
tableItemCard,
|
|
206
|
+
formTemp,
|
|
207
|
+
iconTemp,
|
|
208
|
+
},
|
|
209
|
+
props: {
|
|
210
|
+
column: Object,
|
|
211
|
+
columnOption: Array,
|
|
212
|
+
},
|
|
213
|
+
created() {
|
|
214
|
+
const list = ["getColumnProp"];
|
|
215
|
+
list.forEach((ele) => {
|
|
216
|
+
if (this.dynamic) this[ele] = this.dynamic[ele];
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
methods: {
|
|
220
|
+
isMediaType(item, fileType) {
|
|
221
|
+
return isMediaType(item, fileType);
|
|
222
|
+
},
|
|
223
|
+
validLabel(column, row, val) {
|
|
224
|
+
if (column.rules && row.$cellEdit) {
|
|
225
|
+
return val;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
columnChange(row, column, index) {
|
|
229
|
+
let key = `${index}-${column.prop}`;
|
|
230
|
+
if (!count[key]) {
|
|
231
|
+
this.handleChange(column, row);
|
|
232
|
+
if (typeof column.change === "function" && column.cell == true) {
|
|
233
|
+
column.change({ row, column, index, value: row[column.prop] });
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
count[key] = true;
|
|
237
|
+
this.$nextTick(() => (count[key] = false));
|
|
238
|
+
},
|
|
239
|
+
handleChange(column, row) {
|
|
240
|
+
if (!column.cascader) return;
|
|
241
|
+
this.$nextTick(() => {
|
|
242
|
+
const columnOption = [...this.crud.propOption];
|
|
243
|
+
//本节点;
|
|
244
|
+
const cascader = column.cascader;
|
|
245
|
+
const str = cascader.join(",");
|
|
246
|
+
cascader.forEach((item) => {
|
|
247
|
+
const columnNextProp = item;
|
|
248
|
+
const value = row[column.prop];
|
|
249
|
+
const rowIndex = row.$index;
|
|
250
|
+
// 下一个节点
|
|
251
|
+
const columnNext = this.findObject(this.columnOption, columnNextProp);
|
|
252
|
+
if (this.validatenull(columnNext)) return;
|
|
253
|
+
// 如果本节点没有字典则创建节点数组
|
|
254
|
+
if (this.validatenull(this.crud.cascaderDIC[rowIndex])) {
|
|
255
|
+
this.crud.cascaderDIC[rowIndex] = {};
|
|
256
|
+
}
|
|
257
|
+
if (this.crud.cascaderIndexList.includes(rowIndex)) {
|
|
258
|
+
//清空子类字典
|
|
259
|
+
cascader.forEach((ele) => {
|
|
260
|
+
this.crud.cascaderDIC[rowIndex][ele] = [];
|
|
261
|
+
cascader.forEach((ele) => {
|
|
262
|
+
row[ele] = blankVal(row[ele]);
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
//最后一级
|
|
267
|
+
if (
|
|
268
|
+
this.validatenull(cascader) ||
|
|
269
|
+
this.validatenull(value) ||
|
|
270
|
+
this.validatenull(columnNext)
|
|
271
|
+
) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
sendDic(
|
|
275
|
+
{
|
|
276
|
+
column: columnNext,
|
|
277
|
+
value: value,
|
|
278
|
+
form: row,
|
|
279
|
+
},
|
|
280
|
+
this
|
|
281
|
+
).then((res) => {
|
|
282
|
+
const dic = res || [];
|
|
283
|
+
//首次加载的放入队列记录
|
|
284
|
+
if (!this.crud.cascaderIndexList.includes(rowIndex)) {
|
|
285
|
+
this.crud.cascaderIndexList.push(rowIndex);
|
|
286
|
+
}
|
|
287
|
+
if (!this.crud.cascaderDicList[rowIndex]) {
|
|
288
|
+
this.crud.cascaderDicList[rowIndex] = {};
|
|
289
|
+
}
|
|
290
|
+
if (!this.crud.cascaderDicList[rowIndex][columnNextProp]) {
|
|
291
|
+
this.crud.cascaderDicList[rowIndex][columnNextProp] = dic;
|
|
292
|
+
}
|
|
293
|
+
// 修改字典
|
|
294
|
+
this.crud.cascaderDIC[rowIndex][columnNextProp] = dic;
|
|
295
|
+
|
|
296
|
+
if (
|
|
297
|
+
!this.validatenull(dic[columnNext.cascaderIndex]) &&
|
|
298
|
+
!this.validatenull(dic) &&
|
|
299
|
+
!this.validatenull(columnNext.cascaderIndex)
|
|
300
|
+
) {
|
|
301
|
+
row[columnNextProp] =
|
|
302
|
+
dic[columnNext.cascaderIndex][
|
|
303
|
+
(columnNext.props || {}).value || DIC_PROPS.value
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
handleDetail(row, column) {
|
|
311
|
+
let result;
|
|
312
|
+
let DIC = column.parentProp
|
|
313
|
+
? (this.crud.cascaderDIC[row.$index] || {})[column.prop]
|
|
314
|
+
: this.crud.DIC[column.prop];
|
|
315
|
+
result = detail(row, column, this.crud.tableOption, DIC);
|
|
316
|
+
if (!this.validatenull(DIC) && this.crud.tableOption.filterDic != true) {
|
|
317
|
+
row["$" + column.prop] = result;
|
|
318
|
+
}
|
|
319
|
+
return result;
|
|
320
|
+
},
|
|
321
|
+
corArray(row, column) {
|
|
322
|
+
let list = this.handleDetail(row, column);
|
|
323
|
+
if (!Array.isArray(list)) {
|
|
324
|
+
list = this.validatenull(list) ? [] : list.split(DIC_SHOW_SPLIT);
|
|
325
|
+
}
|
|
326
|
+
return this.deepClone(list);
|
|
327
|
+
},
|
|
328
|
+
openImg(row, column, index) {
|
|
329
|
+
let list = this.getImgList(row, column);
|
|
330
|
+
list = list.map((ele) => {
|
|
331
|
+
return { thumbUrl: ele, url: ele, type: column.fileType };
|
|
332
|
+
});
|
|
333
|
+
this.$ImagePreview(list, index);
|
|
334
|
+
},
|
|
335
|
+
getImgList(row, column) {
|
|
336
|
+
let url = column.propsHttp?.home || "";
|
|
337
|
+
let value = column.props?.value || DIC_PROPS.value;
|
|
338
|
+
let list = this.corArray(row, column);
|
|
339
|
+
list.forEach((ele, index) => {
|
|
340
|
+
list[index] = url + (ele[value] ? ele[value] : ele);
|
|
341
|
+
});
|
|
342
|
+
return list;
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
</script>
|
|
347
|
+
|
|
348
|
+
<style></style>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot name="header"></slot>
|
|
3
|
+
<!-- 动态列 -->
|
|
4
|
+
<template v-for="column in list" :key="column.prop">
|
|
5
|
+
<column-dynamic
|
|
6
|
+
v-if="column.children && column.children.length > 0"
|
|
7
|
+
:columnOption="column"
|
|
8
|
+
>
|
|
9
|
+
<template v-for="item in crud.mainSlot" #[item]="scope">
|
|
10
|
+
<slot v-bind="scope" :name="item"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
</column-dynamic>
|
|
13
|
+
<column-slot
|
|
14
|
+
v-else
|
|
15
|
+
:key="column.prop"
|
|
16
|
+
:column="column"
|
|
17
|
+
:column-option="columnOption"
|
|
18
|
+
>
|
|
19
|
+
<template v-for="item in crud.mainSlot" #[item]="scope">
|
|
20
|
+
<slot v-bind="scope" :name="item"></slot>
|
|
21
|
+
</template>
|
|
22
|
+
</column-slot>
|
|
23
|
+
</template>
|
|
24
|
+
<slot name="footer"></slot>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import create from "../../../../core/create.js";
|
|
29
|
+
import columnDynamic from "./column-dynamic.vue";
|
|
30
|
+
import columnSlot from "./column-slot.vue";
|
|
31
|
+
import { arraySort } from "../../../../utils/util.js";
|
|
32
|
+
import { DIC_PROPS } from "../../../../global/variable.js";
|
|
33
|
+
export default create({
|
|
34
|
+
name: "crud",
|
|
35
|
+
data() {
|
|
36
|
+
return {};
|
|
37
|
+
},
|
|
38
|
+
components: {
|
|
39
|
+
columnSlot,
|
|
40
|
+
columnDynamic,
|
|
41
|
+
},
|
|
42
|
+
inject: ["crud"],
|
|
43
|
+
provide() {
|
|
44
|
+
return {
|
|
45
|
+
crud: this.crud,
|
|
46
|
+
dynamic: this,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
columnOption: Array,
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
list() {
|
|
54
|
+
let result = [...this.columnOption];
|
|
55
|
+
result = arraySort(
|
|
56
|
+
result,
|
|
57
|
+
"index",
|
|
58
|
+
(a, b) =>
|
|
59
|
+
this.crud.objectOption[a.prop]?.index -
|
|
60
|
+
this.crud.objectOption[b.prop]?.index
|
|
61
|
+
);
|
|
62
|
+
return result;
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
//表格筛选逻辑
|
|
67
|
+
handleFilterMethod(params) {
|
|
68
|
+
const { value, row, column } = params;
|
|
69
|
+
if (typeof column.filterMethod === "function") {
|
|
70
|
+
return column.filterMethod(value, row, column);
|
|
71
|
+
} else {
|
|
72
|
+
return row[column.prop] == value;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
//表格筛选字典
|
|
76
|
+
handleFilters(column) {
|
|
77
|
+
if (Array.isArray(column.filters))
|
|
78
|
+
return column.filters.map((ele) => ({
|
|
79
|
+
text: ele.label,
|
|
80
|
+
value: ele.value,
|
|
81
|
+
}));
|
|
82
|
+
if (column.filters !== true) return undefined;
|
|
83
|
+
let DIC = this.crud.DIC[column.prop] || [];
|
|
84
|
+
let list = [];
|
|
85
|
+
if (!this.validatenull(DIC)) {
|
|
86
|
+
DIC.forEach((ele) => {
|
|
87
|
+
const props = column.props || this.crud.tableOption.props || {};
|
|
88
|
+
list.push({
|
|
89
|
+
text: ele[props.label || DIC_PROPS.label],
|
|
90
|
+
value: ele[props.value || DIC_PROPS.value],
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
this.crud.cellForm.list.forEach((ele) => {
|
|
95
|
+
if (!list.map((item) => item.text).includes(ele[column.prop])) {
|
|
96
|
+
list.push({
|
|
97
|
+
text: ele[column.prop],
|
|
98
|
+
value: ele[column.prop],
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return list;
|
|
104
|
+
},
|
|
105
|
+
getColumnProp(column, type, params) {
|
|
106
|
+
let obj = column || {};
|
|
107
|
+
if (type === "filterMethod") return this.handleFilterMethod(params);
|
|
108
|
+
if (this.crud.isMobile && ["fixed"].includes(type)) return false;
|
|
109
|
+
let result = obj?.[type];
|
|
110
|
+
if (type == "width" && result == 0) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
if (type == "filters") return this.handleFilters(column);
|
|
114
|
+
if (type == "hide") return obj?.hide !== true;
|
|
115
|
+
else return result;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
</script>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="['img','upload'].includes(column.type)">
|
|
3
|
+
<div class="avue-crud__img">
|
|
4
|
+
<img v-for="(item,index) in getImgList(row,column)"
|
|
5
|
+
:src="item"
|
|
6
|
+
:key="index"
|
|
7
|
+
@click="openImg(getImgList(row,column),index)" />
|
|
8
|
+
</div>
|
|
9
|
+
</span>
|
|
10
|
+
<span v-else-if="['url'].includes(column.type)">
|
|
11
|
+
<el-link v-for="(item,index) in corArray(row[column.prop],column.separator)"
|
|
12
|
+
type="primary"
|
|
13
|
+
:key="index"
|
|
14
|
+
:href="item"
|
|
15
|
+
:target="column.target || '_blank'">{{item}}</el-link>
|
|
16
|
+
</span>
|
|
17
|
+
<span v-else-if="['rate'].includes(column.type)">
|
|
18
|
+
<avue-rate disabled
|
|
19
|
+
v-model="row[column.prop]" />
|
|
20
|
+
</span>
|
|
21
|
+
<span v-else
|
|
22
|
+
v-html="handleDetail(row,column)"></span>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { detail } from "../../../../core/detail.js";
|
|
27
|
+
import { DIC_PROPS, DIC_SPLIT } from '../../../../global/variable.js'
|
|
28
|
+
export default {
|
|
29
|
+
props: {
|
|
30
|
+
column: Object,
|
|
31
|
+
row: Object
|
|
32
|
+
},
|
|
33
|
+
inject: ['crud'],
|
|
34
|
+
methods: {
|
|
35
|
+
openImg (list, index) {
|
|
36
|
+
list = list.map(ele => {
|
|
37
|
+
return { thumbUrl: ele, url: ele }
|
|
38
|
+
})
|
|
39
|
+
this.$ImagePreview(list, index);
|
|
40
|
+
},
|
|
41
|
+
corArray (list, separator = DIC_SPLIT) {
|
|
42
|
+
if (this.validatenull(list)) {
|
|
43
|
+
return []
|
|
44
|
+
} else if (!Array.isArray(list)) {
|
|
45
|
+
return list.split(separator);
|
|
46
|
+
}
|
|
47
|
+
return list
|
|
48
|
+
},
|
|
49
|
+
getImgList (row, column) {
|
|
50
|
+
let url = (column.propsHttp || {}).home || ''
|
|
51
|
+
let value = (column.props || {}).value || DIC_PROPS.value;
|
|
52
|
+
if (this.validatenull(row[column.prop])) return []
|
|
53
|
+
if (column.listType == 'picture-img') return [url + row[column.prop]]
|
|
54
|
+
let list = this.corArray(this.deepClone(row[column.prop]), column.separator);
|
|
55
|
+
list.forEach((ele, index) => {
|
|
56
|
+
if (typeof ele === 'object') {
|
|
57
|
+
list[index] = url + ele[value];
|
|
58
|
+
} else {
|
|
59
|
+
list[index] = url + ele;
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
return list;
|
|
63
|
+
},
|
|
64
|
+
handleDetail (row, column) {
|
|
65
|
+
let result = row[column.prop];
|
|
66
|
+
let DIC = column.parentProp ? (this.crud.cascaderDIC[row.$index] || {})[column.prop] : this.crud.DIC[column.prop]
|
|
67
|
+
result = detail(row, column, this.crud.tableOption, DIC);
|
|
68
|
+
if (!this.validatenull(DIC)) {
|
|
69
|
+
row["$" + column.prop] = result;
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<style>
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// crud 配置文件
|
|
4
|
+
exports.default = {
|
|
5
|
+
menuWidth: 220,
|
|
6
|
+
menuFixed: 'right',
|
|
7
|
+
menuXsWidth: 100,
|
|
8
|
+
menuAlign: 'center',
|
|
9
|
+
menuHeaderAlign: 'center',
|
|
10
|
+
headerAlign: 'left',
|
|
11
|
+
// 图标
|
|
12
|
+
cancelBtnIcon: 'el-icon-circle-close',
|
|
13
|
+
viewBtnIcon: 'el-icon-view',
|
|
14
|
+
editBtnIcon: 'el-icon-edit',
|
|
15
|
+
copyBtnIcon: 'el-icon-copy-document',
|
|
16
|
+
addBtnIcon: 'el-icon-plus',
|
|
17
|
+
printBtnIcon: 'el-icon-printer',
|
|
18
|
+
mockBtnIcon: 'el-icon-edit',
|
|
19
|
+
excelBtnIcon: 'el-icon-download',
|
|
20
|
+
delBtnIcon: 'el-icon-delete',
|
|
21
|
+
searchBtnIcon: 'el-icon-search',
|
|
22
|
+
emptyBtnIcon: 'el-icon-delete',
|
|
23
|
+
saveBtnIcon: 'el-icon-circle-plus',
|
|
24
|
+
updateBtnIcon: 'el-icon-circle-check',
|
|
25
|
+
columnBtnIcon: 'el-icon-operation',
|
|
26
|
+
filterBtnIcon: 'el-icon-tickets',
|
|
27
|
+
gridBtnIcon: 'el-icon-grid',
|
|
28
|
+
refreshBtnIcon: 'el-icon-refresh',
|
|
29
|
+
// 显隐
|
|
30
|
+
viewBtn: false,
|
|
31
|
+
editBtn: true,
|
|
32
|
+
copyBtn: false,
|
|
33
|
+
cancelBtn: true,
|
|
34
|
+
addBtn: true,
|
|
35
|
+
addRowBtn: false,
|
|
36
|
+
printBtn: false,
|
|
37
|
+
mockBtn: false,
|
|
38
|
+
excelBtn: false,
|
|
39
|
+
delBtn: true,
|
|
40
|
+
cellBtn: false,
|
|
41
|
+
dateBtn: false,
|
|
42
|
+
updateBtn: true,
|
|
43
|
+
saveBtn: true,
|
|
44
|
+
refreshBtn: true,
|
|
45
|
+
columnBtn: true,
|
|
46
|
+
filterBtn: false,
|
|
47
|
+
gridBtn: true,
|
|
48
|
+
queryBtn: true,
|
|
49
|
+
menuBtn: false,
|
|
50
|
+
searchBtn: true,
|
|
51
|
+
clearBtn: true,
|
|
52
|
+
selectClearBtn: true,
|
|
53
|
+
searchShow: true,
|
|
54
|
+
tip: true,
|
|
55
|
+
dialogWidth: '60%',
|
|
56
|
+
dialogDrag: false,
|
|
57
|
+
formFullscreen: false,
|
|
58
|
+
pageBackground: true,
|
|
59
|
+
page: true,
|
|
60
|
+
menu: true,
|
|
61
|
+
indexLabel: '#',
|
|
62
|
+
indexWidth: 50,
|
|
63
|
+
indexFixed: 'left',
|
|
64
|
+
selectionWidth: 50,
|
|
65
|
+
selectionFixed: 'left',
|
|
66
|
+
expandWidth: 60,
|
|
67
|
+
expandFixed: 'left',
|
|
68
|
+
filterMultiple: true,
|
|
69
|
+
calcHeight: 300,
|
|
70
|
+
width: '100%',
|
|
71
|
+
searchLabelWidth: 80,
|
|
72
|
+
searchSpan: 6,
|
|
73
|
+
dropRowClass: '.el-table__body-wrapper table tbody',
|
|
74
|
+
dropColClass: '.el-table__header-wrapper tr',
|
|
75
|
+
ghostClass: 'avue-crud__ghost',
|
|
76
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// crud 配置文件
|
|
2
|
+
export default {
|
|
3
|
+
menuWidth: 220,
|
|
4
|
+
menuFixed: 'right',
|
|
5
|
+
menuXsWidth: 100,
|
|
6
|
+
menuAlign: 'center',
|
|
7
|
+
menuHeaderAlign: 'center',
|
|
8
|
+
headerAlign: 'left',
|
|
9
|
+
// 图标
|
|
10
|
+
cancelBtnIcon: 'el-icon-circle-close',
|
|
11
|
+
viewBtnIcon: 'el-icon-view',
|
|
12
|
+
editBtnIcon: 'el-icon-edit',
|
|
13
|
+
copyBtnIcon: 'el-icon-copy-document',
|
|
14
|
+
addBtnIcon: 'el-icon-plus',
|
|
15
|
+
printBtnIcon: 'el-icon-printer',
|
|
16
|
+
mockBtnIcon: 'el-icon-edit',
|
|
17
|
+
excelBtnIcon: 'el-icon-download',
|
|
18
|
+
delBtnIcon: 'el-icon-delete',
|
|
19
|
+
searchBtnIcon: 'el-icon-search',
|
|
20
|
+
emptyBtnIcon: 'el-icon-delete',
|
|
21
|
+
saveBtnIcon: 'el-icon-circle-plus',
|
|
22
|
+
updateBtnIcon: 'el-icon-circle-check',
|
|
23
|
+
columnBtnIcon: 'el-icon-operation',
|
|
24
|
+
filterBtnIcon: 'el-icon-tickets',
|
|
25
|
+
gridBtnIcon: 'el-icon-grid',
|
|
26
|
+
refreshBtnIcon: 'el-icon-refresh',
|
|
27
|
+
// 显隐
|
|
28
|
+
viewBtn: false,
|
|
29
|
+
editBtn: true,
|
|
30
|
+
copyBtn: false,
|
|
31
|
+
cancelBtn: true,
|
|
32
|
+
addBtn: true,
|
|
33
|
+
addRowBtn: false,
|
|
34
|
+
printBtn: false,
|
|
35
|
+
mockBtn: false,
|
|
36
|
+
excelBtn: false,
|
|
37
|
+
delBtn: true,
|
|
38
|
+
cellBtn: false,
|
|
39
|
+
dateBtn: false,
|
|
40
|
+
updateBtn: true,
|
|
41
|
+
saveBtn: true,
|
|
42
|
+
refreshBtn: true,
|
|
43
|
+
columnBtn: true,
|
|
44
|
+
filterBtn: false,
|
|
45
|
+
gridBtn: true,
|
|
46
|
+
queryBtn: true,
|
|
47
|
+
menuBtn: false,
|
|
48
|
+
searchBtn: true,
|
|
49
|
+
clearBtn: true,
|
|
50
|
+
selectClearBtn: true,
|
|
51
|
+
searchShow: true,
|
|
52
|
+
tip: true,
|
|
53
|
+
dialogWidth: '60%',
|
|
54
|
+
dialogDrag: false,
|
|
55
|
+
formFullscreen: false,
|
|
56
|
+
pageBackground: true,
|
|
57
|
+
page: true,
|
|
58
|
+
menu: true,
|
|
59
|
+
indexLabel: '#',
|
|
60
|
+
indexWidth: 50,
|
|
61
|
+
indexFixed: 'left',
|
|
62
|
+
selectionWidth: 50,
|
|
63
|
+
selectionFixed: 'left',
|
|
64
|
+
expandWidth: 60,
|
|
65
|
+
expandFixed: 'left',
|
|
66
|
+
filterMultiple: true,
|
|
67
|
+
calcHeight: 300,
|
|
68
|
+
width: '100%',
|
|
69
|
+
searchLabelWidth: 80,
|
|
70
|
+
searchSpan: 6,
|
|
71
|
+
dropRowClass: '.el-table__body-wrapper table tbody',
|
|
72
|
+
dropColClass: '.el-table__header-wrapper tr',
|
|
73
|
+
ghostClass: 'avue-crud__ghost',
|
|
74
|
+
};
|