vue-super-crud 1.7.1 → 1.7.4
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 +42 -10
- package/lib/index.css +1 -1
- package/lib/super-crud.min.js +2 -2
- package/package.json +21 -16
- package/src/config/common.js +2 -1
- package/src/config/crud.js +3 -3
- package/src/index.js +4 -0
- package/src/template/formatData.js +75 -87
- package/.browserslistrc +0 -3
- package/.versionrc.json +0 -36
- package/CHANGELOG.md +0 -232
- package/babel.config.js +0 -12
- package/build/alias.js +0 -10
- package/build/build.js +0 -52
- package/build/config.js +0 -70
- package/deploy.bat +0 -14
- package/docs/.vuepress/components/button/base.vue +0 -88
- package/docs/.vuepress/components/common/code-format.vue +0 -331
- package/docs/.vuepress/components/commonConfig/presetCodeTemplate/base.vue +0 -68
- package/docs/.vuepress/components/commonConfig/presetCodeTemplate/customParams.vue +0 -73
- package/docs/.vuepress/components/commonConfig/renderType/component.vue +0 -160
- package/docs/.vuepress/components/commonConfig/renderType/formatter.vue +0 -49
- package/docs/.vuepress/components/commonConfig/renderType/render.vue +0 -91
- package/docs/.vuepress/components/commonConfig/renderType/slot.vue +0 -63
- package/docs/.vuepress/components/crud/baseUse/baseUse.vue +0 -98
- package/docs/.vuepress/components/crud/baseUse/columnAction.vue +0 -72
- package/docs/.vuepress/components/crud/baseUse/columnWidth.vue +0 -107
- package/docs/.vuepress/components/crud/baseUse/handleRow.vue +0 -65
- package/docs/.vuepress/components/crud/baseUse/height.vue +0 -82
- package/docs/.vuepress/components/crud/baseUse/index.vue +0 -54
- package/docs/.vuepress/components/crud/baseUse/loading.vue +0 -70
- package/docs/.vuepress/components/crud/baseUse/pagination.vue +0 -108
- package/docs/.vuepress/components/crud/baseUse/selection.vue +0 -114
- package/docs/.vuepress/components/crud/baseUse/summaryMethod.vue +0 -118
- package/docs/.vuepress/components/crud/baseUse/title.vue +0 -54
- package/docs/.vuepress/components/crud/baseUse/toolbar.vue +0 -69
- package/docs/.vuepress/components/crud/buttons/common.vue +0 -115
- package/docs/.vuepress/components/crud/buttons/fast.vue +0 -82
- package/docs/.vuepress/components/crud/contextMenu/base.vue +0 -72
- package/docs/.vuepress/components/crud/copy.vue +0 -52
- package/docs/.vuepress/components/crud/crudEvents/api.vue +0 -157
- package/docs/.vuepress/components/crud/crudEvents/deleteTip.vue +0 -93
- package/docs/.vuepress/components/crud/crudEvents/events.vue +0 -188
- package/docs/.vuepress/components/crud/dataSort/base.vue +0 -142
- package/docs/.vuepress/components/crud/genDynamicColumns/base.vue +0 -53
- package/docs/.vuepress/components/crud/genDynamicColumns/dynamicAndFixed.vue +0 -111
- package/docs/.vuepress/components/crud/genDynamicColumns/treeDynamic.vue +0 -68
- package/docs/.vuepress/components/crud/handleBar/handleRow.vue +0 -65
- package/docs/.vuepress/components/crud/handleBar/toolbar.vue +0 -69
- package/docs/.vuepress/components/crud/renderType/1.vue +0 -57
- package/docs/.vuepress/components/crud/renderType/2.vue +0 -63
- package/docs/.vuepress/components/crud/renderType/3.vue +0 -105
- package/docs/.vuepress/components/crud/renderType/5.vue +0 -91
- package/docs/.vuepress/components/crud/search/1.vue +0 -90
- package/docs/.vuepress/components/crud/search/2.vue +0 -78
- package/docs/.vuepress/components/crud/search/3.vue +0 -107
- package/docs/.vuepress/components/crud/search/base.vue +0 -123
- package/docs/.vuepress/components/crud/search/localSearch.vue +0 -124
- package/docs/.vuepress/components/crud/search/special.vue +0 -148
- package/docs/.vuepress/components/crud/selection/events.vue +0 -47
- package/docs/.vuepress/components/crud/selection/pagination.vue +0 -94
- package/docs/.vuepress/components/crud/selection/singleSelection.vue +0 -64
- package/docs/.vuepress/components/crud/span/base.vue +0 -69
- package/docs/.vuepress/components/crud/span/special.vue +0 -75
- package/docs/.vuepress/components/crud/summary/base.vue +0 -99
- package/docs/.vuepress/components/crud/tableEdit/addDeleteBtn.vue +0 -174
- package/docs/.vuepress/components/crud/tableEdit/cellEdit.vue +0 -194
- package/docs/.vuepress/components/crud/tableEdit/controlEdit.vue +0 -219
- package/docs/.vuepress/components/crud/tableEdit/dialog.vue +0 -172
- package/docs/.vuepress/components/crud/tableEdit/free.vue +0 -88
- package/docs/.vuepress/components/crud/tableEdit/freeColumn.vue +0 -82
- package/docs/.vuepress/components/crud/tableEdit/methods.vue +0 -154
- package/docs/.vuepress/components/crud/tableEdit/rowAction.vue +0 -107
- package/docs/.vuepress/components/crud/tableEdit/rowBatch.vue +0 -116
- package/docs/.vuepress/components/crud/tableEdit/rowClick.vue +0 -98
- package/docs/.vuepress/components/crud/validate/base.vue +0 -122
- package/docs/.vuepress/components/crud/validate/custom.vue +0 -82
- package/docs/.vuepress/components/crud/validate/regulars.vue +0 -88
- package/docs/.vuepress/components/crud/validate/relation.vue +0 -91
- package/docs/.vuepress/components/crud/validate/tree.vue +0 -82
- package/docs/.vuepress/components/dialog/baseUse/base.vue +0 -92
- package/docs/.vuepress/components/dialog/baseUse/beforeConfirm.vue +0 -78
- package/docs/.vuepress/components/dialog/baseUse/control.vue +0 -79
- package/docs/.vuepress/components/dialog/baseUse/drawer.vue +0 -59
- package/docs/.vuepress/components/dialog/baseUse/footer.vue +0 -87
- package/docs/.vuepress/components/dialog/baseUse/insertSlot.vue +0 -79
- package/docs/.vuepress/components/dict/DictLinkage.vue +0 -91
- package/docs/.vuepress/components/dict/baseUse.vue +0 -72
- package/docs/.vuepress/components/dict/component.vue +0 -82
- package/docs/.vuepress/components/dict/localDict.vue +0 -68
- package/docs/.vuepress/components/form/baseUse/base.vue +0 -48
- package/docs/.vuepress/components/form/baseUse/dataFormat.vue +0 -92
- package/docs/.vuepress/components/form/baseUse/deep.vue +0 -57
- package/docs/.vuepress/components/form/baseUse/gridLayout.vue +0 -47
- package/docs/.vuepress/components/form/baseUse/group.vue +0 -66
- package/docs/.vuepress/components/form/baseUse/hidden.vue +0 -40
- package/docs/.vuepress/components/form/baseUse/inlineLayout.vue +0 -48
- package/docs/.vuepress/components/form/baseUse/label.vue +0 -51
- package/docs/.vuepress/components/form/baseUse/tooltip.vue +0 -40
- package/docs/.vuepress/components/form/baseUse/validate.vue +0 -52
- package/docs/.vuepress/components/form/detail/base.vue +0 -78
- package/docs/.vuepress/components/form/detail/border.vue +0 -90
- package/docs/.vuepress/components/form/detail/singleDetail.vue +0 -72
- package/docs/.vuepress/components/formatData/baseUse.vue +0 -131
- package/docs/.vuepress/components/mock/index.js +0 -347
- package/docs/.vuepress/components/mockData/custom.vue +0 -69
- package/docs/.vuepress/components/mockData/example.vue +0 -290
- package/docs/.vuepress/components/positionSlot/base.vue +0 -24
- package/docs/.vuepress/components/positionSlot/form.vue +0 -71
- package/docs/.vuepress/components/positionSlot/table.vue +0 -85
- package/docs/.vuepress/components/tabs/base.vue +0 -57
- package/docs/.vuepress/components/temp.js +0 -195
- package/docs/.vuepress/config.js +0 -146
- package/docs/.vuepress/enhanceApp.js +0 -142
- package/docs/.vuepress/public/favicon.ico +0 -0
- package/docs/.vuepress/public/super.png +0 -0
- package/docs/.vuepress/styles/index.styl +0 -25
- package/docs/.vuepress/styles/palette.styl +0 -6
- package/docs/README.md +0 -14
- package/docs/guide/button/base.md +0 -31
- package/docs/guide/commonConfig/jsx.md +0 -166
- package/docs/guide/commonConfig/presetCodeTemplate.md +0 -68
- package/docs/guide/commonConfig/renderType.md +0 -181
- package/docs/guide/crud/baseUse.md +0 -120
- package/docs/guide/crud/buttons.md +0 -18
- package/docs/guide/crud/config.md +0 -217
- package/docs/guide/crud/contextMenu.md +0 -18
- package/docs/guide/crud/dataSort.md +0 -66
- package/docs/guide/crud/genDynamicColumns.md +0 -145
- package/docs/guide/crud/handleBar.md +0 -26
- package/docs/guide/crud/renderType.md +0 -4
- package/docs/guide/crud/search.md +0 -150
- package/docs/guide/crud/selection.md +0 -73
- package/docs/guide/crud/span.md +0 -98
- package/docs/guide/crud/summary.md +0 -167
- package/docs/guide/crud/tableEdit.md +0 -377
- package/docs/guide/crud/validate.md +0 -158
- package/docs/guide/dialog/baseUse.md +0 -81
- package/docs/guide/dict/baseUse.md +0 -174
- package/docs/guide/dict/component.md +0 -88
- package/docs/guide/dict/config.md +0 -44
- package/docs/guide/form/baseUse.md +0 -142
- package/docs/guide/form/detail.md +0 -38
- package/docs/guide/formatData/baseUse.md +0 -98
- package/docs/guide/formatData/config.md +0 -142
- package/docs/guide/mockData/base.md +0 -26
- package/docs/guide/positionSlot/base.md +0 -41
- package/docs/guide/question/base.md +0 -44
- package/docs/guide/start/base.md +0 -30
- package/docs/guide/tabs/base.md +0 -63
- package/examples/App.vue +0 -52
- package/examples/Layout/components/AppMain.vue +0 -40
- package/examples/Layout/components/Item.vue +0 -29
- package/examples/Layout/components/Link.vue +0 -44
- package/examples/Layout/components/SidebarItem.vue +0 -93
- package/examples/Layout/index.vue +0 -69
- package/examples/assets/logo.png +0 -0
- package/examples/favicon.ico +0 -0
- package/examples/index.html +0 -18
- package/examples/main.js +0 -54
- package/examples/router/index.js +0 -140
- package/examples/store/index.js +0 -0
- package/examples/styles/index.scss +0 -63
- package/examples/styles/sidebar.scss +0 -226
- package/examples/styles/transition.scss +0 -48
- package/examples/styles/variables.scss +0 -25
- package/examples/views/crud/base.vue +0 -68
- package/examples/views/crud/handleRow.vue +0 -84
- package/examples/views/crud/search.vue +0 -116
- package/examples/views/dashboard/index.vue +0 -244
- package/examples/views/dashboard/index1.vue +0 -234
- package/examples/views/dashboard/test.vue +0 -9
- package/examples/views/formTest/index.vue +0 -168
- package/examples/views/nested/menu1/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-1/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-2/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-2/menu1-2-1/index.vue +0 -5
- package/examples/views/nested/menu1/menu1-2/menu1-2-2/index.vue +0 -5
- package/examples/views/nested/menu1/menu1-3/index.vue +0 -5
- package/examples/views/nested/menu2/index.vue +0 -5
- package/gulpfile.js +0 -84
- package/packages/button/index.vue +0 -189
- package/packages/core/components/comp.vue +0 -223
- package/packages/core/components/position.vue +0 -135
- package/packages/core/components/render.vue +0 -460
- package/packages/core/configManager.js +0 -302
- package/packages/core/create.js +0 -8
- package/packages/core/defaultRender.js +0 -64
- package/packages/core/dict/global.js +0 -10
- package/packages/core/dict/index.js +0 -432
- package/packages/core/dict/mixin.js +0 -94
- package/packages/core/event.js +0 -60
- package/packages/core/index.js +0 -6
- package/packages/core/init.js +0 -122
- package/packages/core/mock/genConfig.js +0 -228
- package/packages/core/mock/genData.js +0 -422
- package/packages/core/mock/index.js +0 -4
- package/packages/core/rules.js +0 -111
- package/packages/crud/column.vue +0 -205
- package/packages/crud/columnAction.vue +0 -207
- package/packages/crud/columnCell.vue +0 -146
- package/packages/crud/defaultColumn.vue +0 -130
- package/packages/crud/drawerColumn.vue +0 -225
- package/packages/crud/form.vue +0 -69
- package/packages/crud/index.vue +0 -564
- package/packages/crud/menuBar.vue +0 -298
- package/packages/crud/mixins/cacheHandler.js +0 -36
- package/packages/crud/mixins/calcColumnWidth.js +0 -79
- package/packages/crud/mixins/calcHeight.js +0 -105
- package/packages/crud/mixins/columnHandler.js +0 -128
- package/packages/crud/mixins/contextMenu.js +0 -98
- package/packages/crud/mixins/dataProcessor.js +0 -202
- package/packages/crud/mixins/dialog.js +0 -109
- package/packages/crud/mixins/excelHandler.js +0 -150
- package/packages/crud/mixins/exposeMethods.js +0 -107
- package/packages/crud/mixins/generateDynamicColumns.js +0 -250
- package/packages/crud/mixins/props.js +0 -38
- package/packages/crud/mixins/searchHandler.js +0 -151
- package/packages/crud/mixins/select.js +0 -359
- package/packages/crud/mixins/spanMethod.js +0 -288
- package/packages/crud/mixins/summary.js +0 -177
- package/packages/crud/mixins/tableEdit.js +0 -547
- package/packages/crud/mixins/validate.js +0 -219
- package/packages/crud/pagination.vue +0 -110
- package/packages/crud/search.vue +0 -119
- package/packages/crud/searchHeader.vue +0 -231
- package/packages/crud/selectBanner.vue +0 -138
- package/packages/crud/utils/EditState.js +0 -319
- package/packages/crud/utils/excelExport.js +0 -112
- package/packages/crud/utils/excelImport.js +0 -112
- package/packages/crud/utils/index.js +0 -98
- package/packages/dialog/dialog.js +0 -233
- package/packages/dialog/dialog.vue +0 -15
- package/packages/dialog/index.js +0 -22
- package/packages/dict/cascadeFormat.vue +0 -179
- package/packages/dict/dateFormat.vue +0 -40
- package/packages/dict/form/cascade.vue +0 -61
- package/packages/dict/form/checkbox.vue +0 -90
- package/packages/dict/form/extendMethod.js +0 -22
- package/packages/dict/form/input-base.js +0 -31
- package/packages/dict/form/input.js +0 -20
- package/packages/dict/form/radio.vue +0 -69
- package/packages/dict/form/select.vue +0 -118
- package/packages/dict/form/switch.vue +0 -75
- package/packages/dict/valueFormat.vue +0 -188
- package/packages/directive/dialog/drag.js +0 -86
- package/packages/directive/dialog/dragSize.js +0 -42
- package/packages/directive/index.js +0 -9
- package/packages/directive/insertSlot.js +0 -10
- package/packages/form/contextMenu.js +0 -192
- package/packages/form/draftDrawer.vue +0 -391
- package/packages/form/formAction.vue +0 -97
- package/packages/form/formItem.vue +0 -259
- package/packages/form/index.vue +0 -451
- package/packages/form/props.js +0 -15
- package/packages/grid/cell.vue +0 -65
- package/packages/grid/index.vue +0 -130
- package/packages/group/index.vue +0 -96
- package/packages/tabs/index.vue +0 -290
- package/packages/tooltip/index.js +0 -9
- package/packages/tooltip/tooltip.vue +0 -32
- package/packages/tooltip/tooltipComponent.js +0 -38
- package/packages/verifyInput/index.vue +0 -131
- package/styles/button.scss +0 -3
- package/styles/crud.scss +0 -425
- package/styles/dialog.scss +0 -95
- package/styles/form.scss +0 -532
- package/styles/group.scss +0 -78
- package/styles/index.scss +0 -94
- package/styles/tabs.scss +0 -139
- package/styles/verifyInput.scss +0 -56
- package/vue-jsx-sync.js +0 -90
- package/vue.config.js +0 -54
@@ -1,24 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-position>
|
3
|
-
<template #left>
|
4
|
-
<el-button type="primary">左侧</el-button>
|
5
|
-
</template>
|
6
|
-
<template #right>
|
7
|
-
<el-button type="primary">右侧</el-button>
|
8
|
-
</template>
|
9
|
-
<template #top>
|
10
|
-
<el-button style="width: 100%;" type="primary">顶部</el-button>
|
11
|
-
</template>
|
12
|
-
<template #bottom>
|
13
|
-
<el-button style="width: 100%;" type="primary">底部</el-button>
|
14
|
-
</template>
|
15
|
-
<el-input v-model="value" placeholder="请输入内容" />
|
16
|
-
</sc-position>
|
17
|
-
</template>
|
18
|
-
<script>
|
19
|
-
export default {
|
20
|
-
data() {
|
21
|
-
return { value: "" };
|
22
|
-
},
|
23
|
-
};
|
24
|
-
</script>
|
@@ -1,71 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<h3>表单</h3>
|
4
|
-
<sc-form v-model="form" :options="options">
|
5
|
-
<template #test-left>
|
6
|
-
<el-button>渲染单元格左侧</el-button>
|
7
|
-
</template>
|
8
|
-
<template #test-right>
|
9
|
-
<el-button>渲染单元格右侧</el-button>
|
10
|
-
</template>
|
11
|
-
<template #test-top="scope">
|
12
|
-
<el-button style="width: 100%;">{{
|
13
|
-
scope.row.test || "渲染单元格顶部"
|
14
|
-
}}</el-button>
|
15
|
-
</template>
|
16
|
-
<template #test-bottom>
|
17
|
-
<el-button style="width: 100%;">渲染单元格底部</el-button>
|
18
|
-
</template>
|
19
|
-
</sc-form>
|
20
|
-
<h3>表格</h3>
|
21
|
-
<sc-crud :options="options" :data="data"
|
22
|
-
><template #test-left>
|
23
|
-
<el-button>渲染单元格左侧 </el-button>
|
24
|
-
</template>
|
25
|
-
<template #test-right>
|
26
|
-
<el-button>渲染单元格右侧</el-button>
|
27
|
-
</template>
|
28
|
-
<template #test-top="scope">
|
29
|
-
<el-button style="width: 100%;">{{
|
30
|
-
scope.row.test || "渲染单元格顶部"
|
31
|
-
}}</el-button>
|
32
|
-
</template>
|
33
|
-
<template #test-bottom>
|
34
|
-
<el-button style="width: 100%;">渲染单元格底部</el-button>
|
35
|
-
</template>
|
36
|
-
</sc-crud>
|
37
|
-
</div>
|
38
|
-
</template>
|
39
|
-
|
40
|
-
<script>
|
41
|
-
export default {
|
42
|
-
data() {
|
43
|
-
return {
|
44
|
-
form: {},
|
45
|
-
data: [
|
46
|
-
{
|
47
|
-
test: "",
|
48
|
-
test2: "11111",
|
49
|
-
},
|
50
|
-
],
|
51
|
-
options: {
|
52
|
-
labelWidth: "160px",
|
53
|
-
renderColumns: [
|
54
|
-
{
|
55
|
-
label: "渲染单元格",
|
56
|
-
prop: "test",
|
57
|
-
position: true,
|
58
|
-
comp: {
|
59
|
-
name: "el-input",
|
60
|
-
},
|
61
|
-
},
|
62
|
-
{
|
63
|
-
label: "普通单元格",
|
64
|
-
prop: "test2",
|
65
|
-
},
|
66
|
-
],
|
67
|
-
},
|
68
|
-
};
|
69
|
-
},
|
70
|
-
};
|
71
|
-
</script>
|
@@ -1,85 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-crud
|
3
|
-
:loading.sync="loading"
|
4
|
-
:search.sync="search"
|
5
|
-
:options="options"
|
6
|
-
:data="data"
|
7
|
-
:total="total"
|
8
|
-
@getList="getList"
|
9
|
-
>
|
10
|
-
<template #handleRow>
|
11
|
-
<el-button>操作栏</el-button>
|
12
|
-
</template>
|
13
|
-
<template #handleRow-left>
|
14
|
-
<el-button type="primary">操作栏左侧</el-button>
|
15
|
-
</template>
|
16
|
-
<template #handleRow-right>
|
17
|
-
<el-button type="primary">操作栏右侧</el-button>
|
18
|
-
</template>
|
19
|
-
<template #handleRow-top>
|
20
|
-
<el-button type="primary" style="width: 100%;">操作栏顶部</el-button>
|
21
|
-
</template>
|
22
|
-
<template #handleRow-bottom>
|
23
|
-
<el-button type="primary" style="width: 100%;">操作栏底部</el-button>
|
24
|
-
</template>
|
25
|
-
<template #name-header-left>
|
26
|
-
<el-button type="primary">左侧</el-button>
|
27
|
-
</template>
|
28
|
-
<template #name-header-right>
|
29
|
-
<el-button type="primary">右侧</el-button>
|
30
|
-
</template>
|
31
|
-
<template #name-header-top>
|
32
|
-
<el-button type="primary" style="width: 100%;">顶部</el-button>
|
33
|
-
</template>
|
34
|
-
<template #name-header-bottom>
|
35
|
-
<el-button type="primary" style="width: 100%;">底部</el-button>
|
36
|
-
</template>
|
37
|
-
<template #pagination-left>
|
38
|
-
<el-button type="primary">左侧</el-button>
|
39
|
-
</template>
|
40
|
-
<template #pagination-right>
|
41
|
-
<el-button type="primary">右侧</el-button>
|
42
|
-
</template>
|
43
|
-
<template #pagination-top>
|
44
|
-
<el-button type="primary" style="width: 100%;">顶部</el-button>
|
45
|
-
</template>
|
46
|
-
<template #pagination-bottom>
|
47
|
-
<el-button type="primary" style="width: 100%;">底部</el-button>
|
48
|
-
</template>
|
49
|
-
</sc-crud>
|
50
|
-
</template>
|
51
|
-
|
52
|
-
<script>
|
53
|
-
import { mockApi } from "../mock";
|
54
|
-
export default {
|
55
|
-
data() {
|
56
|
-
return {
|
57
|
-
loading: false,
|
58
|
-
search: {
|
59
|
-
pageNum: 1,
|
60
|
-
pageSize: 2,
|
61
|
-
},
|
62
|
-
options: {
|
63
|
-
init: true,
|
64
|
-
renderColumns: [
|
65
|
-
{ prop: "name", label: "姓名" },
|
66
|
-
{ prop: "gender", label: "性别" },
|
67
|
-
{ prop: "age", label: "年龄" },
|
68
|
-
{ prop: "city", label: "城市" },
|
69
|
-
],
|
70
|
-
},
|
71
|
-
data: [],
|
72
|
-
total: 0,
|
73
|
-
};
|
74
|
-
},
|
75
|
-
methods: {
|
76
|
-
async getList() {
|
77
|
-
this.loading = true;
|
78
|
-
const { data, total } = await mockApi.getList(this.search);
|
79
|
-
this.data = data;
|
80
|
-
this.total = total;
|
81
|
-
this.loading = false;
|
82
|
-
},
|
83
|
-
},
|
84
|
-
};
|
85
|
-
</script>
|
@@ -1,57 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-tabs
|
3
|
-
v-model="activeTab"
|
4
|
-
:tab-list="tabList"
|
5
|
-
all
|
6
|
-
refresh
|
7
|
-
type="card"
|
8
|
-
@tab-click="handleTabClick"
|
9
|
-
>
|
10
|
-
<template #tab1>
|
11
|
-
<div>标签1的内容</div>
|
12
|
-
</template>
|
13
|
-
|
14
|
-
<template #tab2-label="scope">
|
15
|
-
<i class="el-icon-date"></i>
|
16
|
-
{{ scope.label }}
|
17
|
-
</template>
|
18
|
-
|
19
|
-
<template #tab2>
|
20
|
-
<div>标签2的内容</div>
|
21
|
-
</template>
|
22
|
-
</sc-tabs>
|
23
|
-
</template>
|
24
|
-
|
25
|
-
<script>
|
26
|
-
export default {
|
27
|
-
data() {
|
28
|
-
return {
|
29
|
-
activeTab: "tab1",
|
30
|
-
tabList: [
|
31
|
-
{
|
32
|
-
label: "标签1",
|
33
|
-
name: "tab1",
|
34
|
-
icon: "el-icon-date",
|
35
|
-
cache: true,
|
36
|
-
},
|
37
|
-
{
|
38
|
-
label: "标签2",
|
39
|
-
name: "tab2",
|
40
|
-
},
|
41
|
-
{
|
42
|
-
label: "标签3",
|
43
|
-
name: "tab3",
|
44
|
-
render: () => {
|
45
|
-
return <div>标签3的内容</div>;
|
46
|
-
},
|
47
|
-
},
|
48
|
-
],
|
49
|
-
};
|
50
|
-
},
|
51
|
-
methods: {
|
52
|
-
handleTabClick(tab, item) {
|
53
|
-
console.log("点击的标签:", tab, item);
|
54
|
-
},
|
55
|
-
},
|
56
|
-
};
|
57
|
-
</script>
|
@@ -1,195 +0,0 @@
|
|
1
|
-
const renderColumns = [
|
2
|
-
// 输入框类型
|
3
|
-
{
|
4
|
-
label: "用户名",
|
5
|
-
prop: "username",
|
6
|
-
},
|
7
|
-
{
|
8
|
-
label: "描述",
|
9
|
-
prop: "description",
|
10
|
-
comp: {
|
11
|
-
type: "textarea",
|
12
|
-
rows: 3,
|
13
|
-
},
|
14
|
-
},
|
15
|
-
|
16
|
-
// 数字输入框
|
17
|
-
{
|
18
|
-
label: "年龄",
|
19
|
-
prop: "age",
|
20
|
-
comp: {
|
21
|
-
name: "el-input-number",
|
22
|
-
min: 0,
|
23
|
-
max: 100,
|
24
|
-
},
|
25
|
-
},
|
26
|
-
|
27
|
-
// 选择器
|
28
|
-
{
|
29
|
-
label: "状态",
|
30
|
-
prop: "status1111",
|
31
|
-
comp: {
|
32
|
-
name: "el-select",
|
33
|
-
options: [
|
34
|
-
{ label: "启用", value: 1 },
|
35
|
-
{ label: "禁用", value: 0 },
|
36
|
-
],
|
37
|
-
},
|
38
|
-
},
|
39
|
-
|
40
|
-
// 日期选择器
|
41
|
-
{
|
42
|
-
label: "出生日期",
|
43
|
-
prop: "birthday",
|
44
|
-
comp: {
|
45
|
-
name: "el-date-picker",
|
46
|
-
type: "date",
|
47
|
-
valueFormat: "yyyy-MM-dd",
|
48
|
-
},
|
49
|
-
},
|
50
|
-
{
|
51
|
-
label: "时间范围",
|
52
|
-
prop: "timeRange",
|
53
|
-
comp: {
|
54
|
-
name: "el-date-picker",
|
55
|
-
type: "datetimerange",
|
56
|
-
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
57
|
-
},
|
58
|
-
},
|
59
|
-
|
60
|
-
// 时间选择器
|
61
|
-
{
|
62
|
-
label: "上班时间",
|
63
|
-
prop: "workTime",
|
64
|
-
comp: {
|
65
|
-
name: "el-time-picker",
|
66
|
-
isRange: false,
|
67
|
-
valueFormat: "HH:mm:ss",
|
68
|
-
},
|
69
|
-
},
|
70
|
-
|
71
|
-
// 单选框
|
72
|
-
{
|
73
|
-
label: "性别",
|
74
|
-
prop: "gender",
|
75
|
-
comp: {
|
76
|
-
name: "el-radio-group",
|
77
|
-
options: [
|
78
|
-
{ label: "男", value: 1 },
|
79
|
-
{ label: "女", value: 2 },
|
80
|
-
],
|
81
|
-
},
|
82
|
-
},
|
83
|
-
|
84
|
-
// 多选框
|
85
|
-
{
|
86
|
-
label: "爱好",
|
87
|
-
prop: "hobbies",
|
88
|
-
comp: {
|
89
|
-
name: "el-checkbox-group",
|
90
|
-
options: [
|
91
|
-
{ label: "阅读", value: "reading" },
|
92
|
-
{ label: "运动", value: "sports" },
|
93
|
-
{ label: "音乐", value: "music" },
|
94
|
-
],
|
95
|
-
},
|
96
|
-
},
|
97
|
-
|
98
|
-
// 开关
|
99
|
-
{
|
100
|
-
label: "是否启用",
|
101
|
-
prop: "enabled111",
|
102
|
-
comp: {
|
103
|
-
name: "el-switch",
|
104
|
-
activeValue: true,
|
105
|
-
inactiveValue: false,
|
106
|
-
},
|
107
|
-
},
|
108
|
-
|
109
|
-
// 滑块
|
110
|
-
{
|
111
|
-
label: "进度",
|
112
|
-
prop: "progress",
|
113
|
-
comp: {
|
114
|
-
name: "el-slider",
|
115
|
-
min: 0,
|
116
|
-
max: 100,
|
117
|
-
step: 10,
|
118
|
-
},
|
119
|
-
},
|
120
|
-
|
121
|
-
// 评分
|
122
|
-
{
|
123
|
-
label: "评分",
|
124
|
-
prop: "rate",
|
125
|
-
comp: {
|
126
|
-
name: "el-rate",
|
127
|
-
max: 5,
|
128
|
-
allowHalf: true,
|
129
|
-
},
|
130
|
-
},
|
131
|
-
|
132
|
-
// 级联选择器
|
133
|
-
{
|
134
|
-
label: "地区",
|
135
|
-
prop: "area",
|
136
|
-
comp: {
|
137
|
-
name: "el-cascader",
|
138
|
-
props: { checkStrictly: true, multiple: true },
|
139
|
-
options: [
|
140
|
-
{
|
141
|
-
value: "zhejiang",
|
142
|
-
label: "浙江",
|
143
|
-
children: [
|
144
|
-
{
|
145
|
-
value: "hangzhou",
|
146
|
-
label: "杭州",
|
147
|
-
},
|
148
|
-
{
|
149
|
-
value: "ningbo",
|
150
|
-
label: "宁波",
|
151
|
-
},
|
152
|
-
],
|
153
|
-
},
|
154
|
-
{
|
155
|
-
value: "jiangsu",
|
156
|
-
label: "江苏",
|
157
|
-
children: [
|
158
|
-
{
|
159
|
-
value: "nanjing",
|
160
|
-
label: "南京",
|
161
|
-
children: [
|
162
|
-
{
|
163
|
-
value: "nanjing",
|
164
|
-
label: "南京",
|
165
|
-
},
|
166
|
-
{
|
167
|
-
value: "suzhou",
|
168
|
-
label: "苏州",
|
169
|
-
},
|
170
|
-
],
|
171
|
-
},
|
172
|
-
{
|
173
|
-
value: "suzhou",
|
174
|
-
label: "苏州",
|
175
|
-
},
|
176
|
-
],
|
177
|
-
},
|
178
|
-
],
|
179
|
-
},
|
180
|
-
},
|
181
|
-
|
182
|
-
// 穿梭框
|
183
|
-
{
|
184
|
-
label: "权限",
|
185
|
-
prop: "permissions",
|
186
|
-
comp: {
|
187
|
-
name: "el-transfer",
|
188
|
-
data: [
|
189
|
-
{ key: 1, label: "查看" },
|
190
|
-
{ key: 2, label: "编辑" },
|
191
|
-
{ key: 3, label: "删除" },
|
192
|
-
],
|
193
|
-
},
|
194
|
-
},
|
195
|
-
];
|
package/docs/.vuepress/config.js
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
const alias = require("../../build/alias");
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
title: "VueSuperCrud",
|
5
|
-
description: "基于element-ui二次封装,快速开发CRUD业务组件库",
|
6
|
-
theme: "reco",
|
7
|
-
base: "/vue-super-crud/",
|
8
|
-
port: 1235,
|
9
|
-
head: [
|
10
|
-
[
|
11
|
-
"link",
|
12
|
-
{ rel: "shortcut icon", type: "image/x-icon", href: `/favicon.ico` },
|
13
|
-
],
|
14
|
-
],
|
15
|
-
markdown: {
|
16
|
-
// lineNumbers: true // 代码块显示行号
|
17
|
-
},
|
18
|
-
themeConfig: {
|
19
|
-
repo: "https://github.com/Blade-H1kar1/vue-super-crud.git",
|
20
|
-
// 自定义仓库链接文字。
|
21
|
-
repoLabel: "GitHub",
|
22
|
-
sidebarDepth: 3,
|
23
|
-
subSidebar: "auto",
|
24
|
-
searchMaxSuggestions: 10,
|
25
|
-
nav: [
|
26
|
-
{ text: "首页", link: "/" },
|
27
|
-
{ text: "指南", link: "/guide/start/base" },
|
28
|
-
],
|
29
|
-
sidebar: {
|
30
|
-
"/guide/": [
|
31
|
-
{
|
32
|
-
title: "指南",
|
33
|
-
collapsable: true,
|
34
|
-
children: [{ title: "快速使用", path: "start/base" }],
|
35
|
-
},
|
36
|
-
{
|
37
|
-
title: "渲染配置",
|
38
|
-
collapsable: true,
|
39
|
-
children: [
|
40
|
-
"commonConfig/renderType",
|
41
|
-
"commonConfig/jsx",
|
42
|
-
"commonConfig/presetCodeTemplate",
|
43
|
-
],
|
44
|
-
},
|
45
|
-
{
|
46
|
-
title: "字典管理",
|
47
|
-
collapsable: true,
|
48
|
-
children: ["dict/config", "dict/component", "dict/baseUse"],
|
49
|
-
},
|
50
|
-
{
|
51
|
-
title: "方位插槽",
|
52
|
-
collapsable: true,
|
53
|
-
children: ["positionSlot/base"],
|
54
|
-
},
|
55
|
-
{
|
56
|
-
title: "响应式数据格式化",
|
57
|
-
collapsable: true,
|
58
|
-
children: ["formatData/config", "formatData/baseUse"],
|
59
|
-
},
|
60
|
-
{
|
61
|
-
title: "数据模拟",
|
62
|
-
collapsable: true,
|
63
|
-
children: ["mockData/base"],
|
64
|
-
},
|
65
|
-
{
|
66
|
-
title: "crud组件",
|
67
|
-
collapsable: true,
|
68
|
-
children: [
|
69
|
-
"crud/config",
|
70
|
-
"crud/baseUse",
|
71
|
-
"crud/search",
|
72
|
-
"crud/tableEdit",
|
73
|
-
"crud/validate",
|
74
|
-
"crud/contextMenu",
|
75
|
-
"crud/buttons",
|
76
|
-
"crud/selection",
|
77
|
-
"crud/genDynamicColumns",
|
78
|
-
"crud/span",
|
79
|
-
"crud/dataSort",
|
80
|
-
"crud/summary",
|
81
|
-
],
|
82
|
-
},
|
83
|
-
{
|
84
|
-
title: "form组件",
|
85
|
-
collapsable: true,
|
86
|
-
children: ["form/baseUse", "form/detail"],
|
87
|
-
},
|
88
|
-
{
|
89
|
-
title: "dialog组件",
|
90
|
-
collapsable: true,
|
91
|
-
children: ["dialog/baseUse"],
|
92
|
-
},
|
93
|
-
{
|
94
|
-
title: "button组件",
|
95
|
-
collapsable: true,
|
96
|
-
children: ["button/base"],
|
97
|
-
},
|
98
|
-
{
|
99
|
-
title: "tabs组件",
|
100
|
-
collapsable: true,
|
101
|
-
children: ["tabs/base"],
|
102
|
-
},
|
103
|
-
{
|
104
|
-
title: "问题合集",
|
105
|
-
collapsable: true,
|
106
|
-
children: ["question/base"],
|
107
|
-
},
|
108
|
-
],
|
109
|
-
},
|
110
|
-
},
|
111
|
-
configureWebpack: {
|
112
|
-
output: {
|
113
|
-
publicPath: "/vue-super-crud/", // 修改为根路径
|
114
|
-
},
|
115
|
-
module: {
|
116
|
-
rules: [
|
117
|
-
{
|
118
|
-
test: /\.js$/,
|
119
|
-
exclude: /node_modules/,
|
120
|
-
use: {
|
121
|
-
loader: "babel-loader",
|
122
|
-
options: {
|
123
|
-
presets: [
|
124
|
-
"@vue/cli-plugin-babel/preset",
|
125
|
-
[
|
126
|
-
"@vue/babel-preset-jsx",
|
127
|
-
{
|
128
|
-
injectH: false,
|
129
|
-
},
|
130
|
-
],
|
131
|
-
],
|
132
|
-
plugins: ["./vue-jsx-sync"],
|
133
|
-
},
|
134
|
-
},
|
135
|
-
},
|
136
|
-
],
|
137
|
-
},
|
138
|
-
resolve: {
|
139
|
-
alias: {
|
140
|
-
"core-js/library/fn": "core-js/features",
|
141
|
-
...alias,
|
142
|
-
},
|
143
|
-
},
|
144
|
-
},
|
145
|
-
plugins: ["code-copy", "fulltext-search"],
|
146
|
-
};
|