@nstc-business/tbm 1.0.1 → 1.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/package.json +5 -2
- package/src/components/invoiceDetail/invoiceLog.vue +1 -1
- package/src/components/invoiceDetail/invoiceTemplateDetail.vue +1 -1
- package/src/components/invoiceDetail/occupationLog.vue +4 -1
- package/src/components/invoiceDetail/quotaInfor.vue +6 -0
- package/src/components/test/index.js +8 -0
- package/src/components/test/src/index.vue +28 -0
- package/src/index.js +24 -0
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nstc-business/tbm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"private": false,
|
|
5
|
+
"main": "src/index.js",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"serve": "vue-cli-service serve",
|
|
7
8
|
"test": "vue-cli-service serve --test",
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"dayjs": "^1.10.7",
|
|
21
22
|
"el-table-draggable": "^1.4.4",
|
|
22
23
|
"element-ui": "^2.15.6",
|
|
24
|
+
"numerify": "*",
|
|
23
25
|
"n20-common-lib": "2.7.57",
|
|
24
26
|
"vxe-table": "^3.6.17",
|
|
25
27
|
"qrcode": "^1.5.0",
|
|
@@ -30,7 +32,8 @@
|
|
|
30
32
|
"vuex": "^3.6.2"
|
|
31
33
|
},
|
|
32
34
|
"files": [
|
|
33
|
-
"src/components"
|
|
35
|
+
"src/components",
|
|
36
|
+
"src/index.js"
|
|
34
37
|
],
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
:columns="columns"
|
|
34
34
|
@sort-change-method="sortChange"
|
|
35
35
|
@filter-change-method="filterChange"
|
|
36
|
+
:key="key"
|
|
36
37
|
/>
|
|
37
38
|
<div slot="footer" class="flex-box flex-lr m-t-s">
|
|
38
39
|
<div class="flex-box flex-v">
|
|
@@ -203,7 +204,8 @@ export default {
|
|
|
203
204
|
current: 1,
|
|
204
205
|
pageSize: 200,
|
|
205
206
|
totalSize: 0
|
|
206
|
-
}
|
|
207
|
+
},
|
|
208
|
+
key: 0
|
|
207
209
|
}
|
|
208
210
|
},
|
|
209
211
|
mounted() {
|
|
@@ -262,6 +264,7 @@ export default {
|
|
|
262
264
|
return obj
|
|
263
265
|
})
|
|
264
266
|
}
|
|
267
|
+
this.key++
|
|
265
268
|
},
|
|
266
269
|
filterChange(filters) {
|
|
267
270
|
Object.keys(filters).forEach(key => {
|
|
@@ -382,8 +382,14 @@
|
|
|
382
382
|
</template>
|
|
383
383
|
|
|
384
384
|
<script>
|
|
385
|
+
import numerify from 'numerify'
|
|
385
386
|
export default {
|
|
386
387
|
components: {},
|
|
388
|
+
filter: {
|
|
389
|
+
toThousands(val) {
|
|
390
|
+
return numerify(val, '0,0.00')
|
|
391
|
+
}
|
|
392
|
+
},
|
|
387
393
|
props: {
|
|
388
394
|
tradeId: {
|
|
389
395
|
type: [String, Number],
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- <span>测试组件</span> -->
|
|
4
|
+
<el-button type="primary" @click="setInfo">发票详情</el-button>
|
|
5
|
+
<!-- 发票详情组件 -->
|
|
6
|
+
<invoiceDetail ref="invoiceDetail"></invoiceDetail>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import invoiceDetail from '@/components/invoiceDetail'
|
|
12
|
+
export default {
|
|
13
|
+
name: 'Test',
|
|
14
|
+
components: {
|
|
15
|
+
invoiceDetail
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {}
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
setInfo() {
|
|
22
|
+
this.$refs['invoiceDetail'].setInfo({ invoiceId: 275 })
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style lang="less" scoped></style>
|
package/src/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// 组件导入
|
|
2
|
+
import Test from './components/test/index.js'
|
|
3
|
+
|
|
4
|
+
const components = [Test]
|
|
5
|
+
|
|
6
|
+
const install = function (Vue, options = { prefix: '' }) {
|
|
7
|
+
components.forEach(component => {
|
|
8
|
+
let name = component.name
|
|
9
|
+
if (!name) return console.error('必须设置组件名称:', component)
|
|
10
|
+
name = options.prefix + name.replace(name[0], name[0].toUpperCase())
|
|
11
|
+
Vue.component(name, component)
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* istanbul ignore if */
|
|
16
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
17
|
+
install(window.Vue)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
version: '0.1.0',
|
|
22
|
+
install,
|
|
23
|
+
Test
|
|
24
|
+
}
|