bi-element-ui 1.1.8 → 1.1.91
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/.browserslistrc +3 -3
- package/.eslintignore +1 -1
- package/.prettierrc +8 -8
- package/.prettierrc.json +8 -8
- package/.vscode/extensions.json +3 -3
- package/.vscode/settings.json +2 -2
- package/README.md +148 -148
- package/cypress.json +3 -3
- package/dist/css/about.734427a8.css +1 -0
- package/dist/css/chunk-vendors.8b3b4be2.css +22 -0
- package/dist/css/index.9e71d803.css +1 -0
- package/dist/index.html +1 -1
- package/dist/js/about.4ff3d4f9.js +2 -0
- package/dist/js/chunk-vendors.d907e1f2.js +387 -0
- package/dist/js/index.66b4892a.js +11 -0
- package/lib/{bi-element-ui.common.js → Bi-element-ui.common.js} +190 -61
- package/lib/{bi-element-ui.umd.js → Bi-element-ui.umd.js} +190 -61
- package/lib/{bi-element-ui.umd.min.js → Bi-element-ui.umd.min.js} +5 -5
- package/lib/demo.html +10 -10
- package/package-lock2.json +17309 -17309
- package/package.json +1 -1
- package/src/components/BiDatePicker/datePickerOption.js +163 -163
- package/src/components/BiDatePicker/index.vue +59 -59
- package/src/components/BiTable/columu.vue +81 -81
- package/src/components/BiTable/forced.js +63 -63
- package/src/components/BiTable/index.js +6 -6
- package/src/components/BiTable/render.vue +13 -13
- package/src/components/BiTable/table.vue +179 -179
- package/src/components/BiTableColumn/Group.vue +275 -275
- package/src/components/BiTableColumn/api.js +16 -16
- package/src/components/BiTooltipIcon/index.vue +63 -63
- package/src/components/EditBtn.vue +15 -15
- package/src/components/FreeButton/index.vue +50 -50
- package/src/components/Pagination/index.vue +91 -91
- package/src/components/Pagination/scrollTo.js +65 -65
- package/src/router/index.js +44 -44
- package/src/store/index.js +11 -11
- package/src/table.js +86 -0
- package/src/views/Date.vue +96 -96
- package/src/views/Home.vue +11 -0
- package/src/views/Layout.vue +34 -34
- package/src/views/Scene.vue +111 -111
- package/src/views/Table.vue +190 -173
- package/src/views/showData.vue +2 -2
- package/tests/e2e/.eslintrc.js +10 -10
- package/tests/e2e/plugins/index.js +25 -25
- package/tests/e2e/specs/test.js +8 -8
- package/tests/e2e/support/commands.js +25 -25
- package/tests/e2e/support/index.js +20 -20
- package/tests/unit/example.spec.js +13 -13
- package//345/211/215/347/253/257ui/346/240/267/345/274/217/350/247/204/350/214/203.md +101 -101
- package/dist/css/about.f927ac1d.css +0 -1
- package/dist/css/chunk-vendors.bce393fb.css +0 -1
- package/dist/css/index.9da9fdde.css +0 -1
- package/dist/js/about.49a721d0.js +0 -2
- package/dist/js/chunk-vendors.008a0caf.js +0 -313
- package/dist/js/index.e9532c02.js +0 -11
- package/pnpm-lock.yaml +0 -13329
- /package/lib/{bi-element-ui.css → Bi-element-ui.css} +0 -0
package/src/views/Table.vue
CHANGED
@@ -1,85 +1,101 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
|
4
|
+
<div
|
5
|
+
class="example-table-box"
|
6
|
+
style="padding-top: 20px"
|
7
|
+
>
|
8
|
+
<p>测试表格</p>
|
9
|
+
<div class="test">
|
10
|
+
<el-table
|
11
|
+
v-sticky-header="{offsetTop:0}"
|
12
|
+
v-sticky-footer
|
13
|
+
:data="data"
|
14
|
+
show-summary
|
15
|
+
>
|
16
|
+
|
17
|
+
<el-table-column
|
18
|
+
label="组"
|
19
|
+
fixed="left"
|
20
|
+
width="200px"
|
15
21
|
>
|
16
|
-
<el-table-column
|
17
|
-
label="日期"
|
18
|
-
prop="date"
|
19
|
-
width="160"
|
20
|
-
></el-table-column>
|
21
|
-
<el-table-column
|
22
|
-
label="姓名"
|
23
|
-
prop="name"
|
24
|
-
></el-table-column>
|
25
22
|
<el-table-column
|
26
23
|
label="省份"
|
27
24
|
prop="province"
|
25
|
+
width="100px"
|
26
|
+
fixed="left"
|
28
27
|
></el-table-column>
|
29
28
|
<el-table-column
|
30
|
-
label="
|
31
|
-
prop="
|
32
|
-
|
33
|
-
|
34
|
-
label="地址"
|
35
|
-
prop="address"
|
36
|
-
min-width="200"
|
37
|
-
></el-table-column>
|
38
|
-
<el-table-column
|
39
|
-
label="地址"
|
40
|
-
prop="address2"
|
41
|
-
min-width="200"
|
42
|
-
></el-table-column>
|
43
|
-
<el-table-column
|
44
|
-
label="邮编"
|
45
|
-
prop="zip"
|
46
|
-
fixed="right"
|
29
|
+
label="姓名"
|
30
|
+
prop="name"
|
31
|
+
width="100px"
|
32
|
+
fixed="left"
|
47
33
|
></el-table-column>
|
48
|
-
</el-table>
|
49
|
-
</div>
|
50
34
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
35
|
+
</el-table-column>
|
36
|
+
<el-table-column
|
37
|
+
label="日期"
|
38
|
+
prop="date"
|
39
|
+
width="100px"
|
40
|
+
></el-table-column>
|
41
|
+
<el-table-column
|
42
|
+
label="市区"
|
43
|
+
prop="city"
|
44
|
+
width="100px"
|
45
|
+
></el-table-column>
|
46
|
+
<el-table-column
|
47
|
+
label="地址"
|
48
|
+
prop="address"
|
49
|
+
width="200px"
|
50
|
+
></el-table-column>
|
51
|
+
<el-table-column
|
52
|
+
label="地址"
|
53
|
+
prop="address2"
|
54
|
+
width="200px"
|
55
|
+
></el-table-column>
|
56
|
+
<el-table-column
|
57
|
+
label="邮编"
|
58
|
+
prop="zip"
|
59
|
+
fixed="right"
|
60
|
+
width="200px"
|
61
|
+
></el-table-column>
|
62
|
+
</el-table>
|
59
63
|
</div>
|
60
|
-
<el-button
|
61
|
-
type=""
|
62
|
-
@click="search"
|
63
|
-
>搜索</el-button>
|
64
64
|
|
65
|
-
<
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
:summary-method="getSummaries"
|
80
|
-
></bi-table>
|
81
|
-
</div>
|
65
|
+
<!-- <bi-table
|
66
|
+
border
|
67
|
+
stripe
|
68
|
+
:data="data"
|
69
|
+
:column="basicColumn"
|
70
|
+
show-summary
|
71
|
+
:summary-method="getSummaries"
|
72
|
+
></bi-table> -->
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<el-button
|
76
|
+
type=""
|
77
|
+
@click="search"
|
78
|
+
>搜索</el-button>
|
82
79
|
|
80
|
+
<div
|
81
|
+
class="example-table-box"
|
82
|
+
style="padding-top: 20px"
|
83
|
+
>
|
84
|
+
<p>sticky表格</p>
|
85
|
+
<bi-table
|
86
|
+
ref="table"
|
87
|
+
header-popper-type="asd"
|
88
|
+
border
|
89
|
+
stripe
|
90
|
+
fixed="sticky"
|
91
|
+
:sticky-top="0"
|
92
|
+
:data="data"
|
93
|
+
:column="duojibiaotou"
|
94
|
+
show-summary
|
95
|
+
:summary-method="getSummaries"
|
96
|
+
></bi-table>
|
97
|
+
</div>
|
98
|
+
<template v-if="false">
|
83
99
|
<div style="padding-bottom:600px"></div>
|
84
100
|
<div class="example-table-box">
|
85
101
|
<p>普通固定表头</p>
|
@@ -169,113 +185,114 @@
|
|
169
185
|
</template>
|
170
186
|
</bi-table>
|
171
187
|
</div>
|
172
|
-
</template>
|
173
|
-
<div class="example-table-box">
|
174
|
-
<p>tooltipIcon在表格内的组件使用</p>
|
175
|
-
<p> <el-button @click="tableLoading=!tableLoading">tableLoading</el-button></p>
|
176
|
-
<el-table
|
177
|
-
v-sticky-header="{offsetTop:0}"
|
178
|
-
v-sticky-footer="{offsetBottom:0}"
|
179
|
-
:data="data"
|
180
|
-
:summary-method="getSummaries"
|
181
|
-
show-summary
|
182
|
-
>
|
183
|
-
<el-table-column
|
184
|
-
label="日期"
|
185
|
-
prop="date"
|
186
|
-
fixed
|
187
|
-
></el-table-column>
|
188
|
-
<el-table-column
|
189
|
-
label="姓名"
|
190
|
-
prop="name"
|
191
|
-
fixed
|
192
|
-
></el-table-column>
|
193
|
-
<el-table-column
|
194
|
-
label="省份"
|
195
|
-
prop="province"
|
196
|
-
fixed
|
197
|
-
></el-table-column>
|
198
|
-
<el-table-column
|
199
|
-
label="省份tableLoading3"
|
200
|
-
prop="province"
|
201
|
-
fixed="right"
|
202
|
-
></el-table-column>
|
203
|
-
<el-table-column
|
204
|
-
v-if="tableLoading"
|
205
|
-
label="姓名right1"
|
206
|
-
prop="name"
|
207
|
-
fixed="right"
|
208
|
-
></el-table-column>
|
209
188
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
189
|
+
<div class="example-table-box">
|
190
|
+
<p>tooltipIcon在表格内的组件使用</p>
|
191
|
+
<p> <el-button @click="tableLoading=!tableLoading">tableLoading</el-button></p>
|
192
|
+
<el-table
|
193
|
+
v-sticky-header="{offsetTop:0}"
|
194
|
+
v-sticky-footer="{offsetBottom:0}"
|
195
|
+
:data="data"
|
196
|
+
:summary-method="getSummaries"
|
197
|
+
show-summary
|
198
|
+
>
|
199
|
+
<el-table-column
|
200
|
+
label="日期"
|
201
|
+
prop="date"
|
202
|
+
fixed
|
203
|
+
></el-table-column>
|
204
|
+
<el-table-column
|
205
|
+
label="姓名"
|
206
|
+
prop="name"
|
207
|
+
fixed
|
208
|
+
></el-table-column>
|
209
|
+
<el-table-column
|
210
|
+
label="省份"
|
211
|
+
prop="province"
|
212
|
+
fixed
|
213
|
+
></el-table-column>
|
214
|
+
<el-table-column
|
215
|
+
label="省份tableLoading3"
|
216
|
+
prop="province"
|
217
|
+
fixed="right"
|
218
|
+
></el-table-column>
|
219
|
+
<el-table-column
|
220
|
+
v-if="tableLoading"
|
221
|
+
label="姓名right1"
|
222
|
+
prop="name"
|
223
|
+
fixed="right"
|
224
|
+
></el-table-column>
|
216
225
|
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
226
|
+
<el-table-column
|
227
|
+
v-if="tableLoading"
|
228
|
+
label="姓名right2"
|
229
|
+
prop="name"
|
230
|
+
fixed="right"
|
231
|
+
></el-table-column>
|
221
232
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
233
|
+
<el-table-column
|
234
|
+
label="市区"
|
235
|
+
prop="city"
|
236
|
+
></el-table-column>
|
237
|
+
|
238
|
+
<el-table-column
|
239
|
+
label="地址"
|
240
|
+
prop="address"
|
241
|
+
width="400"
|
242
|
+
></el-table-column>
|
243
|
+
<el-table-column
|
244
|
+
label="地址2"
|
245
|
+
prop="address"
|
246
|
+
width="400"
|
247
|
+
></el-table-column>
|
248
|
+
<el-table-column
|
249
|
+
label="地址3"
|
250
|
+
prop="address"
|
251
|
+
width="400"
|
252
|
+
></el-table-column>
|
253
|
+
<el-table-column
|
254
|
+
label="邮编"
|
255
|
+
prop="zip"
|
256
|
+
></el-table-column>
|
257
|
+
<el-table-column
|
258
|
+
label="操作"
|
259
|
+
prop="cmp"
|
260
|
+
></el-table-column>
|
261
|
+
<el-table-column
|
262
|
+
label="邮编"
|
263
|
+
prop="zip"
|
264
|
+
></el-table-column>
|
265
|
+
<el-table-column
|
266
|
+
label="操作"
|
267
|
+
prop="cmp"
|
268
|
+
></el-table-column>
|
269
|
+
<el-table-column
|
270
|
+
label="邮编"
|
271
|
+
prop="zip"
|
272
|
+
></el-table-column>
|
273
|
+
<el-table-column
|
274
|
+
label="操作"
|
275
|
+
prop="cmp"
|
276
|
+
></el-table-column>
|
277
|
+
<el-table-column
|
278
|
+
label="邮编"
|
279
|
+
prop="zip"
|
280
|
+
></el-table-column>
|
281
|
+
<el-table-column
|
282
|
+
label="操作"
|
283
|
+
prop="cmp"
|
284
|
+
></el-table-column>
|
285
|
+
<el-table-column
|
286
|
+
label="邮编"
|
287
|
+
prop="zip"
|
288
|
+
></el-table-column>
|
289
|
+
<el-table-column
|
290
|
+
label="操作"
|
291
|
+
prop="cmp"
|
292
|
+
></el-table-column>
|
293
|
+
</el-table>
|
294
|
+
</div>
|
295
|
+
</template>
|
279
296
|
</div>
|
280
297
|
</template>
|
281
298
|
|
package/src/views/showData.vue
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<template>
|
2
|
-
<bi-home-data />
|
1
|
+
<template>
|
2
|
+
<bi-home-data />
|
3
3
|
</template>
|
package/tests/e2e/.eslintrc.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
module.exports = {
|
2
|
-
plugins: ['cypress'],
|
3
|
-
env: {
|
4
|
-
mocha: true,
|
5
|
-
'cypress/globals': true
|
6
|
-
},
|
7
|
-
rules: {
|
8
|
-
strict: 'off'
|
9
|
-
}
|
10
|
-
}
|
1
|
+
module.exports = {
|
2
|
+
plugins: ['cypress'],
|
3
|
+
env: {
|
4
|
+
mocha: true,
|
5
|
+
'cypress/globals': true
|
6
|
+
},
|
7
|
+
rules: {
|
8
|
+
strict: 'off'
|
9
|
+
}
|
10
|
+
}
|
@@ -1,25 +1,25 @@
|
|
1
|
-
/* eslint-disable arrow-body-style */
|
2
|
-
// https://docs.cypress.io/guides/guides/plugins-guide.html
|
3
|
-
|
4
|
-
// if you need a custom webpack configuration you can uncomment the following import
|
5
|
-
// and then use the `file:preprocessor` event
|
6
|
-
// as explained in the cypress docs
|
7
|
-
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
|
8
|
-
|
9
|
-
// /* eslint-disable import/no-extraneous-dependencies, global-require */
|
10
|
-
// const webpack = require('@cypress/webpack-preprocessor')
|
11
|
-
|
12
|
-
module.exports = (on, config) => {
|
13
|
-
// on('file:preprocessor', webpack({
|
14
|
-
// webpackOptions: require('@vue/cli-service/webpack.config'),
|
15
|
-
// watchOptions: {}
|
16
|
-
// }))
|
17
|
-
|
18
|
-
return Object.assign({}, config, {
|
19
|
-
fixturesFolder: 'tests/e2e/fixtures',
|
20
|
-
integrationFolder: 'tests/e2e/specs',
|
21
|
-
screenshotsFolder: 'tests/e2e/screenshots',
|
22
|
-
videosFolder: 'tests/e2e/videos',
|
23
|
-
supportFile: 'tests/e2e/support/index.js'
|
24
|
-
})
|
25
|
-
}
|
1
|
+
/* eslint-disable arrow-body-style */
|
2
|
+
// https://docs.cypress.io/guides/guides/plugins-guide.html
|
3
|
+
|
4
|
+
// if you need a custom webpack configuration you can uncomment the following import
|
5
|
+
// and then use the `file:preprocessor` event
|
6
|
+
// as explained in the cypress docs
|
7
|
+
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
|
8
|
+
|
9
|
+
// /* eslint-disable import/no-extraneous-dependencies, global-require */
|
10
|
+
// const webpack = require('@cypress/webpack-preprocessor')
|
11
|
+
|
12
|
+
module.exports = (on, config) => {
|
13
|
+
// on('file:preprocessor', webpack({
|
14
|
+
// webpackOptions: require('@vue/cli-service/webpack.config'),
|
15
|
+
// watchOptions: {}
|
16
|
+
// }))
|
17
|
+
|
18
|
+
return Object.assign({}, config, {
|
19
|
+
fixturesFolder: 'tests/e2e/fixtures',
|
20
|
+
integrationFolder: 'tests/e2e/specs',
|
21
|
+
screenshotsFolder: 'tests/e2e/screenshots',
|
22
|
+
videosFolder: 'tests/e2e/videos',
|
23
|
+
supportFile: 'tests/e2e/support/index.js'
|
24
|
+
})
|
25
|
+
}
|
package/tests/e2e/specs/test.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
// https://docs.cypress.io/api/introduction/api.html
|
2
|
-
|
3
|
-
describe('My First Test', () => {
|
4
|
-
it('Visits the app root url', () => {
|
5
|
-
cy.visit('/')
|
6
|
-
cy.contains('h1', 'Welcome to Your Vue.js App')
|
7
|
-
})
|
8
|
-
})
|
1
|
+
// https://docs.cypress.io/api/introduction/api.html
|
2
|
+
|
3
|
+
describe('My First Test', () => {
|
4
|
+
it('Visits the app root url', () => {
|
5
|
+
cy.visit('/')
|
6
|
+
cy.contains('h1', 'Welcome to Your Vue.js App')
|
7
|
+
})
|
8
|
+
})
|
@@ -1,25 +1,25 @@
|
|
1
|
-
// ***********************************************
|
2
|
-
// This example commands.js shows you how to
|
3
|
-
// create various custom commands and overwrite
|
4
|
-
// existing commands.
|
5
|
-
//
|
6
|
-
// For more comprehensive examples of custom
|
7
|
-
// commands please read more here:
|
8
|
-
// https://on.cypress.io/custom-commands
|
9
|
-
// ***********************************************
|
10
|
-
//
|
11
|
-
//
|
12
|
-
// -- This is a parent command --
|
13
|
-
// Cypress.Commands.add("login", (email, password) => { ... })
|
14
|
-
//
|
15
|
-
//
|
16
|
-
// -- This is a child command --
|
17
|
-
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
18
|
-
//
|
19
|
-
//
|
20
|
-
// -- This is a dual command --
|
21
|
-
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
22
|
-
//
|
23
|
-
//
|
24
|
-
// -- This is will overwrite an existing command --
|
25
|
-
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
1
|
+
// ***********************************************
|
2
|
+
// This example commands.js shows you how to
|
3
|
+
// create various custom commands and overwrite
|
4
|
+
// existing commands.
|
5
|
+
//
|
6
|
+
// For more comprehensive examples of custom
|
7
|
+
// commands please read more here:
|
8
|
+
// https://on.cypress.io/custom-commands
|
9
|
+
// ***********************************************
|
10
|
+
//
|
11
|
+
//
|
12
|
+
// -- This is a parent command --
|
13
|
+
// Cypress.Commands.add("login", (email, password) => { ... })
|
14
|
+
//
|
15
|
+
//
|
16
|
+
// -- This is a child command --
|
17
|
+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
18
|
+
//
|
19
|
+
//
|
20
|
+
// -- This is a dual command --
|
21
|
+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
22
|
+
//
|
23
|
+
//
|
24
|
+
// -- This is will overwrite an existing command --
|
25
|
+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
@@ -1,20 +1,20 @@
|
|
1
|
-
// ***********************************************************
|
2
|
-
// This example support/index.js is processed and
|
3
|
-
// loaded automatically before your test files.
|
4
|
-
//
|
5
|
-
// This is a great place to put global configuration and
|
6
|
-
// behavior that modifies Cypress.
|
7
|
-
//
|
8
|
-
// You can change the location of this file or turn off
|
9
|
-
// automatically serving support files with the
|
10
|
-
// 'supportFile' configuration option.
|
11
|
-
//
|
12
|
-
// You can read more here:
|
13
|
-
// https://on.cypress.io/configuration
|
14
|
-
// ***********************************************************
|
15
|
-
|
16
|
-
// Import commands.js using ES2015 syntax:
|
17
|
-
import './commands'
|
18
|
-
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
20
|
-
// require('./commands')
|
1
|
+
// ***********************************************************
|
2
|
+
// This example support/index.js is processed and
|
3
|
+
// loaded automatically before your test files.
|
4
|
+
//
|
5
|
+
// This is a great place to put global configuration and
|
6
|
+
// behavior that modifies Cypress.
|
7
|
+
//
|
8
|
+
// You can change the location of this file or turn off
|
9
|
+
// automatically serving support files with the
|
10
|
+
// 'supportFile' configuration option.
|
11
|
+
//
|
12
|
+
// You can read more here:
|
13
|
+
// https://on.cypress.io/configuration
|
14
|
+
// ***********************************************************
|
15
|
+
|
16
|
+
// Import commands.js using ES2015 syntax:
|
17
|
+
import './commands'
|
18
|
+
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
20
|
+
// require('./commands')
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { expect } from 'chai'
|
2
|
-
import { shallowMount } from '@vue/test-utils'
|
3
|
-
import HelloWorld from '@/components/HelloWorld.vue'
|
4
|
-
|
5
|
-
describe('HelloWorld.vue', () => {
|
6
|
-
it('renders props.msg when passed', () => {
|
7
|
-
const msg = 'new message'
|
8
|
-
const wrapper = shallowMount(HelloWorld, {
|
9
|
-
propsData: { msg }
|
10
|
-
})
|
11
|
-
expect(wrapper.text()).to.include(msg)
|
12
|
-
})
|
13
|
-
})
|
1
|
+
import { expect } from 'chai'
|
2
|
+
import { shallowMount } from '@vue/test-utils'
|
3
|
+
import HelloWorld from '@/components/HelloWorld.vue'
|
4
|
+
|
5
|
+
describe('HelloWorld.vue', () => {
|
6
|
+
it('renders props.msg when passed', () => {
|
7
|
+
const msg = 'new message'
|
8
|
+
const wrapper = shallowMount(HelloWorld, {
|
9
|
+
propsData: { msg }
|
10
|
+
})
|
11
|
+
expect(wrapper.text()).to.include(msg)
|
12
|
+
})
|
13
|
+
})
|