iov-pro-components 0.0.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/.eslintignore +5 -0
- package/.eslintrc.js +192 -0
- package/.gitignore +3 -0
- package/README.md +4 -0
- package/babel.config.js +5 -0
- package/docs/.vuepress/config.js +169 -0
- package/docs/.vuepress/styles/index.styl +62 -0
- package/docs/.vuepress/styles/palette.styl +20 -0
- package/docs/.vuepress/theme/enhanceApp.js +100 -0
- package/docs/.vuepress/theme/index.js +3 -0
- package/docs/README.md +13 -0
- package/docs/components/description.md +519 -0
- package/docs/components/dialog-select.md +91 -0
- package/docs/components/display.md +36 -0
- package/docs/components/enums.md +33 -0
- package/docs/components/icon.md +406 -0
- package/docs/components/link-group.md +39 -0
- package/docs/components/page-detail.md +48 -0
- package/docs/components/page-module.md +51 -0
- package/docs/components/pro-form.md +958 -0
- package/docs/components/pro-table.md +683 -0
- package/docs/components/request.md +44 -0
- package/docs/components/search-table.md +963 -0
- package/docs/components/space.md +35 -0
- package/docs/components/sub-title.md +24 -0
- package/docs/components/submit-module.md +24 -0
- package/docs/template/add.md +124 -0
- package/docs/template/confirm.md +28 -0
- package/docs/template/detail.md +240 -0
- package/docs/template/dialog.md +339 -0
- package/docs/template/list.md +464 -0
- package/docs/template/tabs-mini.md +32 -0
- package/docs/template/tabs.md +32 -0
- package/jsconfig.json +19 -0
- package/lib/iov-pro-components.css +1 -0
- package/lib/iov-pro-components.min.js +7 -0
- package/lib/postcss.config.js +8 -0
- package/package.json +75 -0
- package/patches/vue-server-renderer+2.7.16.patch +13 -0
- package/rollup.config.mjs +79 -0
- package/src/App.vue +103 -0
- package/src/main.js +33 -0
- package/src/packages/column-tooltip/index.js +7 -0
- package/src/packages/column-tooltip/src/main.vue +127 -0
- package/src/packages/description/index.js +7 -0
- package/src/packages/description/src/main.vue +375 -0
- package/src/packages/description/src/text.vue +103 -0
- package/src/packages/dialog-select/index.js +7 -0
- package/src/packages/dialog-select/src/main.vue +308 -0
- package/src/packages/display/index.js +7 -0
- package/src/packages/display/src/main.vue +44 -0
- package/src/packages/enums/index.js +7 -0
- package/src/packages/enums/src/main.vue +23 -0
- package/src/packages/export/index.js +7 -0
- package/src/packages/export/src/main.vue +316 -0
- package/src/packages/fixed-button-group/index.js +7 -0
- package/src/packages/fixed-button-group/src/main.vue +104 -0
- package/src/packages/form/index.js +7 -0
- package/src/packages/form/src/collapse.vue +149 -0
- package/src/packages/form/src/main.vue +1190 -0
- package/src/packages/form-collapse/index.js +7 -0
- package/src/packages/index.js +86 -0
- package/src/packages/link-group/index.js +7 -0
- package/src/packages/link-group/src/main.vue +52 -0
- package/src/packages/page-detail/index.js +7 -0
- package/src/packages/page-detail/src/main.vue +123 -0
- package/src/packages/page-module/index.js +7 -0
- package/src/packages/page-module/src/main.vue +56 -0
- package/src/packages/preview/index.js +7 -0
- package/src/packages/preview/src/eval-image-viewer.js +50 -0
- package/src/packages/preview/src/image-viewer.vue +366 -0
- package/src/packages/preview/src/main.vue +97 -0
- package/src/packages/request/index.js +7 -0
- package/src/packages/request/src/main.vue +125 -0
- package/src/packages/search-table/index.js +7 -0
- package/src/packages/search-table/src/inner-tabs.vue +237 -0
- package/src/packages/search-table/src/main.vue +472 -0
- package/src/packages/search-table/src/outer-tabs.vue +45 -0
- package/src/packages/search-table-inner-tabs/index.js +7 -0
- package/src/packages/search-table-outer-tabs/index.js +7 -0
- package/src/packages/space/index.js +7 -0
- package/src/packages/space/src/main.vue +74 -0
- package/src/packages/sub-title/index.js +7 -0
- package/src/packages/sub-title/src/main.vue +70 -0
- package/src/packages/submit-module/index.js +7 -0
- package/src/packages/submit-module/src/main.vue +67 -0
- package/src/packages/table/index.js +7 -0
- package/src/packages/table/src/filter.vue +89 -0
- package/src/packages/table/src/main.vue +668 -0
- package/src/packages/table/src/search.vue +90 -0
- package/src/packages/table/src/sort.vue +118 -0
- package/src/packages/theme/index.scss +15 -0
- package/src/packages/theme/src/column-tooltip.scss +23 -0
- package/src/packages/theme/src/common/color.scss +134 -0
- package/src/packages/theme/src/description.scss +56 -0
- package/src/packages/theme/src/dialog-select.scss +32 -0
- package/src/packages/theme/src/fixed-button-group.scss +25 -0
- package/src/packages/theme/src/form.scss +11 -0
- package/src/packages/theme/src/link-group.scss +43 -0
- package/src/packages/theme/src/page-detail.scss +61 -0
- package/src/packages/theme/src/page-module.scss +46 -0
- package/src/packages/theme/src/preview.scss +67 -0
- package/src/packages/theme/src/search-table.scss +185 -0
- package/src/packages/theme/src/space.scss +12 -0
- package/src/packages/theme/src/sub-title.scss +47 -0
- package/src/packages/theme/src/submit-module.scss +13 -0
- package/src/packages/theme/src/table.scss +129 -0
- package/src/packages/theme/src/toolbar.scss +109 -0
- package/src/packages/toolbar/index.js +7 -0
- package/src/packages/toolbar/src/main.vue +126 -0
- package/src/packages/toolbar/src/setting.vue +217 -0
- package/src/packages/toolbar/src/style.vue +68 -0
- package/src/packages/toolbar/src/zoom.vue +65 -0
- package/src/router.js +83 -0
- package/src/utils/config-center.js +218 -0
- package/src/utils/function-eval.js +84 -0
- package/src/utils/index.js +104 -0
- package/src/views/column-tooltip.vue +37 -0
- package/src/views/components/OtherSelect.vue +18 -0
- package/src/views/description.vue +60 -0
- package/src/views/detail.vue +146 -0
- package/src/views/directive/number.js +82 -0
- package/src/views/enums.vue +22 -0
- package/src/views/export.vue +9 -0
- package/src/views/form-collapse.vue +185 -0
- package/src/views/form.vue +402 -0
- package/src/views/link-group.vue +16 -0
- package/src/views/preview.vue +33 -0
- package/src/views/request.vue +56 -0
- package/src/views/search-table.vue +297 -0
- package/src/views/table.vue +145 -0
- package/src/views/toolbar.vue +30 -0
- package/vue.config.js +22 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="search-table-bg">
|
|
3
|
+
<h1>普通</h1>
|
|
4
|
+
<iov-pro-search-table
|
|
5
|
+
:form-items="FORM_ITEMS"
|
|
6
|
+
:table-columns="COLUMNS"
|
|
7
|
+
:request="{ api: demoRequest }"
|
|
8
|
+
>
|
|
9
|
+
<template #action-bar>
|
|
10
|
+
<el-button
|
|
11
|
+
size="small"
|
|
12
|
+
round
|
|
13
|
+
type="primary"
|
|
14
|
+
>新增</el-button>
|
|
15
|
+
</template>
|
|
16
|
+
<template #expand>12121</template>
|
|
17
|
+
<template #desc>33333</template>
|
|
18
|
+
</iov-pro-search-table>
|
|
19
|
+
|
|
20
|
+
<h1>单搜索多表格</h1>
|
|
21
|
+
<iov-pro-search-table-inner-tabs
|
|
22
|
+
:form-items="FORM_ITEMS"
|
|
23
|
+
:config="{ table: { border: true } }"
|
|
24
|
+
>
|
|
25
|
+
<iov-pro-search-table
|
|
26
|
+
title="标题1"
|
|
27
|
+
:table-columns="COLUMNS"
|
|
28
|
+
:request="{ api: demoRequest }"
|
|
29
|
+
>
|
|
30
|
+
<template #action-bar>
|
|
31
|
+
<el-button
|
|
32
|
+
size="small"
|
|
33
|
+
round
|
|
34
|
+
type="primary"
|
|
35
|
+
>新增</el-button>
|
|
36
|
+
</template>
|
|
37
|
+
<template #expand>12121</template>
|
|
38
|
+
<template #desc>33333</template>
|
|
39
|
+
</iov-pro-search-table>
|
|
40
|
+
<iov-pro-search-table
|
|
41
|
+
title="标题1"
|
|
42
|
+
:table-columns="COLUMNS"
|
|
43
|
+
:request="{ api: demoRequest }"
|
|
44
|
+
>
|
|
45
|
+
<template #action-bar>
|
|
46
|
+
<el-button
|
|
47
|
+
size="small"
|
|
48
|
+
round
|
|
49
|
+
type="primary"
|
|
50
|
+
>新增</el-button>
|
|
51
|
+
</template>
|
|
52
|
+
<template #expand>12121</template>
|
|
53
|
+
<template #desc>33333</template>
|
|
54
|
+
</iov-pro-search-table>
|
|
55
|
+
</iov-pro-search-table-inner-tabs>
|
|
56
|
+
|
|
57
|
+
<h1>多搜索表格</h1>
|
|
58
|
+
<iov-pro-search-table-outer-tabs>
|
|
59
|
+
<iov-pro-search-table
|
|
60
|
+
title="标题1"
|
|
61
|
+
:form-items="FORM_ITEMS"
|
|
62
|
+
:table-columns="COLUMNS"
|
|
63
|
+
:request="{ api: demoRequest }"
|
|
64
|
+
>
|
|
65
|
+
<template #action-bar>
|
|
66
|
+
<el-button
|
|
67
|
+
size="small"
|
|
68
|
+
round
|
|
69
|
+
type="primary"
|
|
70
|
+
>新增</el-button>
|
|
71
|
+
</template>
|
|
72
|
+
<template #expand>12121</template>
|
|
73
|
+
<template #desc>33333</template>
|
|
74
|
+
</iov-pro-search-table>
|
|
75
|
+
<iov-pro-search-table
|
|
76
|
+
title="标题2"
|
|
77
|
+
:form-items="FORM_ITEMS"
|
|
78
|
+
:table-columns="COLUMNS"
|
|
79
|
+
:request="{ api: demoRequest }"
|
|
80
|
+
>
|
|
81
|
+
<template #action-bar>
|
|
82
|
+
<el-button
|
|
83
|
+
size="small"
|
|
84
|
+
round
|
|
85
|
+
type="primary"
|
|
86
|
+
>新增</el-button>
|
|
87
|
+
</template>
|
|
88
|
+
<template #expand>12121</template>
|
|
89
|
+
<template #desc>33333</template>
|
|
90
|
+
</iov-pro-search-table>
|
|
91
|
+
</iov-pro-search-table-outer-tabs>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<script>
|
|
96
|
+
const SEX = [
|
|
97
|
+
{ label: '男', value: 1 },
|
|
98
|
+
{ label: '女', value: 2 }
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
const TAGS = [
|
|
102
|
+
{ label: '性格好', value: 1 },
|
|
103
|
+
{ label: '是个好人', value: 2 },
|
|
104
|
+
{ label: '渣男', value: 3 }
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
const FORM_ITEMS = [
|
|
108
|
+
{
|
|
109
|
+
type: 'input',
|
|
110
|
+
label: '姓名',
|
|
111
|
+
name: 'name',
|
|
112
|
+
rules: {
|
|
113
|
+
required: true,
|
|
114
|
+
message: '请输入姓名',
|
|
115
|
+
trigger: 'blur'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'input',
|
|
120
|
+
label: '年龄',
|
|
121
|
+
name: 'age',
|
|
122
|
+
value: 18,
|
|
123
|
+
props: {
|
|
124
|
+
placeholder: '请输入年龄'
|
|
125
|
+
},
|
|
126
|
+
rules: {
|
|
127
|
+
required: true,
|
|
128
|
+
message: '请输入姓名',
|
|
129
|
+
trigger: 'blur'
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'select',
|
|
134
|
+
label: '性别',
|
|
135
|
+
name: 'sex',
|
|
136
|
+
value: options => options[0]?.value,
|
|
137
|
+
options: [
|
|
138
|
+
{ label: '男', value: 1 },
|
|
139
|
+
{ label: '女', value: 2 }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'radio-button',
|
|
144
|
+
label: '是否抽烟',
|
|
145
|
+
name: 'smoke',
|
|
146
|
+
value: 1,
|
|
147
|
+
reloadRequest: true,
|
|
148
|
+
options: [
|
|
149
|
+
{ label: '是', value: 1 },
|
|
150
|
+
{ label: '否', value: 2 }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'select',
|
|
155
|
+
label: ({ sex }) => `最喜欢的${sex === 1 ? '男性' : '女性'}运动`,
|
|
156
|
+
name: 'sport',
|
|
157
|
+
watch: ['sex'],
|
|
158
|
+
labelWidth: '140px',
|
|
159
|
+
value: options => options[0]?.value,
|
|
160
|
+
rules: ({ sex }) => {
|
|
161
|
+
return sex === 1 ? { required: true, message: '请选择' } : null
|
|
162
|
+
},
|
|
163
|
+
props: {
|
|
164
|
+
handler({ sex }) {
|
|
165
|
+
return sex === 2 ? { clearable: false } : {}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
options({ sex }) {
|
|
169
|
+
if (!sex) {
|
|
170
|
+
return new Promise((resolve) => {
|
|
171
|
+
setTimeout(() => {
|
|
172
|
+
resolve([])
|
|
173
|
+
}, 100)
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
return new Promise((resolve) => {
|
|
177
|
+
setTimeout(() => {
|
|
178
|
+
if (sex === 1) {
|
|
179
|
+
resolve([
|
|
180
|
+
{ label: '足球', value: 1 },
|
|
181
|
+
{ label: '篮球', value: 2 }
|
|
182
|
+
])
|
|
183
|
+
} else {
|
|
184
|
+
resolve([
|
|
185
|
+
{ label: '乒乓球', value: 3 },
|
|
186
|
+
{ label: '羽毛球', value: 4 }
|
|
187
|
+
])
|
|
188
|
+
}
|
|
189
|
+
}, 300)
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
type: 'checkbox',
|
|
195
|
+
name: 'location',
|
|
196
|
+
label: '喜欢去的场所',
|
|
197
|
+
labelWidth: '110px',
|
|
198
|
+
span: 12,
|
|
199
|
+
watch: ['sex'],
|
|
200
|
+
options: ({ sex }) => {
|
|
201
|
+
return new Promise((resolve) => {
|
|
202
|
+
setTimeout(() => {
|
|
203
|
+
const options = [
|
|
204
|
+
{ label: '足球', value: 1 },
|
|
205
|
+
{ label: '篮球', value: 2 }
|
|
206
|
+
]
|
|
207
|
+
if (sex === 1) {
|
|
208
|
+
options.push({ label: '翠林', value: 3 })
|
|
209
|
+
}
|
|
210
|
+
if (sex === 2) {
|
|
211
|
+
options.push({ label: '美容院', value: 4 })
|
|
212
|
+
}
|
|
213
|
+
resolve(options)
|
|
214
|
+
}, 300)
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: 'select',
|
|
220
|
+
name: 'tags',
|
|
221
|
+
label: '标签',
|
|
222
|
+
labelWidth: '110px',
|
|
223
|
+
options: TAGS
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'date-picker',
|
|
227
|
+
label: '毕业时间',
|
|
228
|
+
span: 12,
|
|
229
|
+
name: ['startTime', 'endTime'],
|
|
230
|
+
props: {
|
|
231
|
+
type: 'daterange'
|
|
232
|
+
},
|
|
233
|
+
value: ['2024-10-01 00:00:00', '2024-11-01 00:00:00']
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
|
|
237
|
+
const COLUMNS = [
|
|
238
|
+
{ type: 'expand', slotName: 'expand', width: '80px' },
|
|
239
|
+
{ label: '姓名', prop: 'name', width: '120px' },
|
|
240
|
+
{ type: 'img', label: '头像', prop: 'avator', config: { width: '42px', height: '42px' }},
|
|
241
|
+
{ label: '英文名', prop: 'englishName', width: '120px', showOverflowTooltip: true },
|
|
242
|
+
{ type: 'enum', label: '性别', prop: 'sex', enums: SEX },
|
|
243
|
+
{ type: 'tag', label: '人物标签', prop: 'tag', enums: TAGS },
|
|
244
|
+
{ type: 'link', label: '人物简介', prop: 'link', minWidth: '120px' },
|
|
245
|
+
{ type: 'slot', label: '备注信息', prop: 'desc', minWidth: '140px' },
|
|
246
|
+
{ type: 'slot', label: '操作', prop: 'operation', fixed: 'right', width: '160px' }
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
const demoRequest = (params) => {
|
|
250
|
+
console.log('11111 params: ', params)
|
|
251
|
+
return new Promise((resolve) => {
|
|
252
|
+
setTimeout(() => {
|
|
253
|
+
resolve({
|
|
254
|
+
list: [
|
|
255
|
+
{
|
|
256
|
+
name: '小明',
|
|
257
|
+
englishName: 'John',
|
|
258
|
+
sex: 1,
|
|
259
|
+
tag: 3,
|
|
260
|
+
link: '去跳转',
|
|
261
|
+
avator: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
|
262
|
+
desc: '<div style="color: red;">唱跳rap</div>'
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: '小红',
|
|
266
|
+
englishName: 'John',
|
|
267
|
+
sex: 2,
|
|
268
|
+
tag: [1, 2, 3],
|
|
269
|
+
link: '去跳转',
|
|
270
|
+
avator: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
|
271
|
+
desc: '<div style="color: green;">砍人手</div>'
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
totalCount: 21
|
|
275
|
+
})
|
|
276
|
+
}, 300)
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export default {
|
|
281
|
+
name: 'SearchTableDemo',
|
|
282
|
+
data() {
|
|
283
|
+
return {
|
|
284
|
+
FORM_ITEMS,
|
|
285
|
+
COLUMNS,
|
|
286
|
+
demoRequest
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
</script>
|
|
291
|
+
|
|
292
|
+
<style lang="scss">
|
|
293
|
+
.search-table-bg {
|
|
294
|
+
background-color: lightgrey;
|
|
295
|
+
padding: 12px;
|
|
296
|
+
}
|
|
297
|
+
</style>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<iov-pro-table
|
|
3
|
+
:columns="COLUMNS"
|
|
4
|
+
:request="{ api: request }"
|
|
5
|
+
>
|
|
6
|
+
<template #desc="{ row }">
|
|
7
|
+
<div v-html="row.desc" />
|
|
8
|
+
</template>
|
|
9
|
+
<template #operation>
|
|
10
|
+
<iov-pro-link-group max="3">
|
|
11
|
+
<el-link type="primary">详情</el-link>
|
|
12
|
+
<el-link type="primary">编辑</el-link>
|
|
13
|
+
<el-link type="primary">复制</el-link>
|
|
14
|
+
<el-link type="primary">删除</el-link>
|
|
15
|
+
</iov-pro-link-group>
|
|
16
|
+
</template>
|
|
17
|
+
</iov-pro-table>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
const SEX = [
|
|
22
|
+
{ label: '男', value: 1 },
|
|
23
|
+
{ label: '女', value: 2 }
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
const TAGS = [
|
|
27
|
+
{ label: '性格好', value: 1 },
|
|
28
|
+
{ label: '是个好人', value: 2 },
|
|
29
|
+
{ label: '渣男', value: 3 }
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
const COLUMNS = [
|
|
33
|
+
{ type: 'index', label: '序号', width: '80px' },
|
|
34
|
+
{ label: '姓名', prop: 'name', width: '120px', searchable: true },
|
|
35
|
+
{ type: 'img', label: '头像', prop: 'avator', config: { width: '42px', height: '42px', style: 'border-radius: 4px' }},
|
|
36
|
+
{ label: '英文名', prop: 'englishName', width: '120px', showOverflowTooltip: true, searchable: true },
|
|
37
|
+
{ type: 'enum', label: '性别', prop: 'sex', enums: SEX, sortable: true },
|
|
38
|
+
{ label: '排名', prop: 'rank', sortable: true, defaultSort: 'descending' },
|
|
39
|
+
{ type: 'tag', label: '人物标签', prop: 'tag', enums: TAGS, filters: TAGS, sortable: true, defaultSort: '', align: 'center', width: '300px' },
|
|
40
|
+
{ type: 'link', label: '人物简介', prop: 'link', minWidth: '120px' },
|
|
41
|
+
{ type: 'slot', label: '备注信息', prop: 'desc', minWidth: '140px' },
|
|
42
|
+
{ type: 'slot', label: '操作', prop: 'operation', align: 'right', fixed: 'right', width: '160px' }
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
const request = (data) => {
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
console.log(data)
|
|
49
|
+
resolve({
|
|
50
|
+
list: [
|
|
51
|
+
{
|
|
52
|
+
name: '张无忌',
|
|
53
|
+
englishName: 'William·Jefferson·Clinton',
|
|
54
|
+
sex: 1,
|
|
55
|
+
tag: 3,
|
|
56
|
+
link: '去跳转',
|
|
57
|
+
rank: 1,
|
|
58
|
+
desc: '<div style="color: red;">唱跳rap</div>',
|
|
59
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: '赵敏',
|
|
63
|
+
englishName: 'William·Jefferson·Clinton',
|
|
64
|
+
sex: 2,
|
|
65
|
+
tag: [1, 2, 3],
|
|
66
|
+
link: '去跳转',
|
|
67
|
+
rank: 4,
|
|
68
|
+
desc: '<div style="color: green;">砍人手</div>',
|
|
69
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '周芷若',
|
|
73
|
+
englishName: 'William·Jefferson·Clinton',
|
|
74
|
+
sex: 1,
|
|
75
|
+
tag: [2, 3],
|
|
76
|
+
link: '去跳转',
|
|
77
|
+
rank: 3,
|
|
78
|
+
desc: '<div style="color: green;">绿茶</div>',
|
|
79
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: '灭绝师太',
|
|
83
|
+
englishName: 'William·Jefferson·Clinton',
|
|
84
|
+
sex: 2,
|
|
85
|
+
tag: [2, 3],
|
|
86
|
+
link: '去跳转',
|
|
87
|
+
rank: 2,
|
|
88
|
+
desc: '<div style="color: green;">绿茶</div>',
|
|
89
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
totalCount: 4
|
|
93
|
+
})
|
|
94
|
+
}, 300)
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
name: 'TableDemo',
|
|
100
|
+
data() {
|
|
101
|
+
return {
|
|
102
|
+
COLUMNS,
|
|
103
|
+
request,
|
|
104
|
+
dataSource: [
|
|
105
|
+
{
|
|
106
|
+
name: '张无忌',
|
|
107
|
+
englishName: 'William·Jefferson·Clinton',
|
|
108
|
+
sex: 1,
|
|
109
|
+
tag: 3,
|
|
110
|
+
link: '去跳转',
|
|
111
|
+
desc: '<div style="color: red;">唱跳rap</div>',
|
|
112
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: '赵敏',
|
|
116
|
+
englishName: 'William·Jefferson·Clinton',
|
|
117
|
+
sex: 2,
|
|
118
|
+
tag: [1, 2, 3],
|
|
119
|
+
link: '去跳转',
|
|
120
|
+
desc: '<div style="color: green;">砍人手</div>',
|
|
121
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: '周芷若',
|
|
125
|
+
englishName: 'William·Jefferson·Clinton',
|
|
126
|
+
sex: 1,
|
|
127
|
+
tag: [2, 3],
|
|
128
|
+
link: '去跳转',
|
|
129
|
+
desc: '<div style="color: green;">绿茶</div>',
|
|
130
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: '灭绝师太',
|
|
134
|
+
englishName: 'William·Jefferson·Clinton',
|
|
135
|
+
sex: 2,
|
|
136
|
+
tag: [2, 3],
|
|
137
|
+
link: '去跳转',
|
|
138
|
+
desc: '<div style="color: green;">绿茶</div>',
|
|
139
|
+
avator: 'https://q6.itc.cn/q_70/images03/20240713/c52e0205a8824af4b1c0b94063e5a0f7.jpeg'
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<iov-pro-toolbar
|
|
3
|
+
:config="CONFIG"
|
|
4
|
+
/>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
const CONFIG = [
|
|
9
|
+
'refresh',
|
|
10
|
+
'zoom',
|
|
11
|
+
'setting',
|
|
12
|
+
{
|
|
13
|
+
icon: 'icon-search',
|
|
14
|
+
onClick: () => console.log(111111111)
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
image: 'https://pre-tms.cu-sc.com:18100/com-app/favicon.ico',
|
|
18
|
+
onClick: () => console.log(222222222)
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'ToolbarDemo',
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
CONFIG
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
</script>
|
package/vue.config.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const { defineConfig } = require('@vue/cli-service')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
module.exports = defineConfig({
|
|
5
|
+
transpileDependencies: true,
|
|
6
|
+
publicPath: process.env.VUE_APP_ROUTER,
|
|
7
|
+
configureWebpack: {
|
|
8
|
+
// provide the app's title in webpack's name field, so that
|
|
9
|
+
// it can be accessed in index.html to inject the correct title.
|
|
10
|
+
devtool: process.env.NODE_ENV !== 'production' ? 'eval-source-map' : undefined,
|
|
11
|
+
name: 'iov-pro-components',
|
|
12
|
+
resolve: {
|
|
13
|
+
alias: {
|
|
14
|
+
'@': path.join(__dirname, 'src')
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
chainWebpack: (config) => {
|
|
19
|
+
config.resolve.alias
|
|
20
|
+
.set('vue$', 'vue/dist/vue.esm.js')
|
|
21
|
+
}
|
|
22
|
+
})
|