vue2-client 1.3.20 → 1.3.22

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +328 -318
  2. package/index.js +30 -30
  3. package/package.json +76 -76
  4. package/public/img/login/background.svg +3 -0
  5. package/src/assets/login/illustration.svg +3 -0
  6. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  7. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +551 -551
  8. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  9. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  10. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  11. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  12. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  13. package/src/base-client/components/common/Upload/Upload.vue +167 -162
  14. package/src/base-client/components/common/XAddForm/XAddForm.vue +354 -354
  15. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +327 -327
  16. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  17. package/src/base-client/components/common/XForm/XForm.vue +274 -274
  18. package/src/base-client/components/common/XForm/XFormItem.vue +389 -389
  19. package/src/base-client/components/common/XFormTable/index.md +96 -96
  20. package/src/base-client/components/common/XTable/XTable.vue +278 -278
  21. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -376
  22. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  23. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  24. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  25. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  26. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  27. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  28. package/src/base-client/plugins/AppData.js +69 -69
  29. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  30. package/src/base-client/plugins/PagedList.js +177 -177
  31. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  32. package/src/base-client/plugins/i18n-extend.js +32 -32
  33. package/src/components/Ellipsis/index.md +38 -38
  34. package/src/components/NumberInfo/index.md +43 -43
  35. package/src/components/STable/README.md +341 -341
  36. package/src/components/STable/index.js +318 -318
  37. package/src/components/Trend/index.md +45 -45
  38. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  39. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  40. package/src/components/exception/ExceptionPage.vue +70 -70
  41. package/src/components/form/FormRow.vue +52 -52
  42. package/src/components/index.js +36 -36
  43. package/src/components/menu/SideMenu.vue +62 -62
  44. package/src/components/menu/menu.js +273 -273
  45. package/src/components/setting/Setting.vue +235 -235
  46. package/src/components/table/StandardTable.vue +141 -141
  47. package/src/components/table/advance/ActionColumns.vue +158 -158
  48. package/src/components/table/advance/SearchArea.vue +355 -355
  49. package/src/components/tool/AStepItem.vue +60 -60
  50. package/src/components/tool/AvatarList.vue +68 -68
  51. package/src/components/tool/Drawer.vue +142 -142
  52. package/src/components/tool/TagSelect.vue +83 -83
  53. package/src/components/transition/PageToggleTransition.vue +97 -97
  54. package/src/config/default/setting.config.js +41 -41
  55. package/src/config/replacer/resolve.config.js +67 -67
  56. package/src/layouts/AdminLayout.vue +174 -174
  57. package/src/layouts/header/AdminHeader.vue +104 -104
  58. package/src/layouts/header/HeaderNotice.vue +167 -167
  59. package/src/layouts/header/HeaderSearch.vue +67 -67
  60. package/src/layouts/header/InstitutionDetail.vue +181 -181
  61. package/src/layouts/tabs/TabsHead.vue +190 -190
  62. package/src/layouts/tabs/TabsView.vue +379 -379
  63. package/src/mock/goods/index.js +108 -108
  64. package/src/pages/CreateQueryPage.vue +65 -65
  65. package/src/pages/login/Login.vue +359 -277
  66. package/src/pages/report/ReportTable.js +124 -124
  67. package/src/pages/report/ReportTableHome.vue +28 -28
  68. package/src/pages/resourceManage/orgListManage.vue +98 -98
  69. package/src/pages/system/dictionary/index.vue +43 -43
  70. package/src/pages/system/file/index.vue +317 -317
  71. package/src/pages/system/queryParams/index.vue +43 -43
  72. package/src/pages/system/ticket/index.vue +17 -2
  73. package/src/pages/system/ticket/submitTicketSuccess.vue +3 -1
  74. package/src/router/async/config.async.js +27 -27
  75. package/src/router/async/router.map.js +56 -56
  76. package/src/router/index.js +27 -27
  77. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  78. package/src/services/api/LogDetailsViewApi.js +10 -10
  79. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  80. package/src/services/api/TicketDetailsViewApi.js +34 -34
  81. package/src/services/api/common.js +58 -58
  82. package/src/services/api/commonTempTable.js +10 -10
  83. package/src/services/api/index.js +17 -17
  84. package/src/services/api/manage.js +8 -8
  85. package/src/store/mutation-types.js +2 -2
  86. package/src/theme/default/nprogress.less +76 -76
  87. package/src/theme/default/style.less +47 -47
  88. package/src/utils/colors.js +103 -103
  89. package/src/utils/excel/Blob.js +180 -180
  90. package/src/utils/excel/Export2Excel.js +141 -141
  91. package/src/utils/formatter.js +68 -68
  92. package/src/utils/i18n.js +80 -80
  93. package/src/utils/request.js +225 -225
  94. package/src/utils/routerUtil.js +364 -364
  95. package/src/utils/theme-color-replacer-extend.js +91 -91
  96. package/src/utils/themeUtil.js +100 -100
  97. package/src/utils/util.js +230 -230
  98. package/vue.config.js +99 -99
@@ -1,177 +1,177 @@
1
- import Vue from 'vue'
2
- import { nanoid } from 'nanoid'
3
-
4
- export default class PagedList {
5
- // 用url及pageSize构造
6
- // url - 加载数据的url
7
- // pageSize - 每页数据个数
8
- // params - 除正常查询条件外,附加到后台sql中的参数,可以为空。格式为:{参数名:参数值}
9
- // sums - 需要求和的字段。格式为:{参数名:参数值}
10
- // isBlank - 是否使用空行填充表格,值为true或者 false
11
- // comp - 调用时的组件名,方便调试
12
- // aoteEncrypt - 加密类型, 不传使用全局的
13
- // encryKey - 加密key, 不传使用全局的
14
- // timeout - 查询超时时间, 默认50秒
15
- constructor (url, pageSize, params, sums, isBlank, comp, aoteEncrypt, encryKey, timeout) {
16
- // 正在查询标志位
17
- this.seaching = false
18
- this.url = url
19
- this.pageSize = pageSize
20
- this.pageIndex = 0
21
- this.isBlank = isBlank
22
- this.aoteEncrypt = aoteEncrypt || Vue.mmType
23
- this.encryKey = encryKey || Vue.mm
24
- this.timeout = timeout || 50000
25
-
26
- // 登记组件名
27
- if (comp) {
28
- this.comp = comp
29
- }
30
-
31
- // 登记参数源码,查询前,执行参数源码,获得实际参数值
32
- if (params) {
33
- this.paramSource = params
34
- }
35
- // 查询时,提交后台的参数值
36
- this.params = {}
37
-
38
- // 求和的字段
39
- this.sums = sums
40
- // 符合条件的数据总数
41
- this.count = 0
42
- // 符合条件的数据总页数
43
- this.totalPage = 0
44
- // 加载过来的数据
45
- this.rows = []
46
- // 状态,字符串型,包括:初始(默认),查询,错误,正确
47
- this.state = '初始'
48
- // 出现错误时的错误内容,没找到符合条件的数据当错误处理
49
- this.error = '请输入条件, 进行查询'
50
-
51
- // 每次加载所需要的条件
52
- this.condition = null
53
- this.model = null
54
- this.condValue = null
55
-
56
- // 初始填充数据空行
57
- // isNuN标记本行是否为空行
58
- if (isBlank === true) {
59
- for (let i = 1; i <= pageSize; i++) {
60
- this.rows.push({ isNuN: 'true' })
61
- }
62
- }
63
- }
64
-
65
- // 执行查询过程,加载数据汇总信息
66
- // condition - 查询组件产生的查询条件
67
- // model - 查询组件收集到的输入数据
68
- // condValue - 交给后台的查询条件,可以为空
69
- search (condition, model, condValue) {
70
- let param
71
- // 保存条件,以便加载某页时可以直接调用
72
- this.condition = condition
73
- this.model = model
74
- this.condValue = condValue
75
- this.state = '查询'
76
- this.procParams()
77
- this.seaching = true
78
- if (this.sums) {
79
- const totals = []
80
- for (const key in this.sums) {
81
- totals.push(key)
82
- param = { data: this.params, sums: totals }
83
- }
84
- } else {
85
- param = { data: this.params }
86
- }
87
- // 发生请求时,不进行任何提醒
88
- return Vue.resetpost(`${this.url}/n`, param, {
89
- timeout: this.timeout,
90
- rejectMsg: null,
91
- aoteEncrypt: this.aoteEncrypt,
92
- encryKey: this.encryKey
93
- }).then(response => {
94
- this.seaching = false
95
- if (response.n === 0) {
96
- this.state = '错误'
97
- this.error = '没有符合条件的记录'
98
- this.rows = []
99
- return
100
- }
101
- this.state = '正确'
102
- this.count = response.n
103
- for (const key in this.sums) {
104
- this.sums[key] = response[key]
105
- }
106
- this.totalPage = Math.ceil(this.count / this.pageSize)
107
- // 加载第一页数据
108
- return this.loadPage(1, this.pageSize)
109
- }).catch((error) => {
110
- this.seaching = false
111
- if (error.status !== 603) {
112
- this.state = '错误'
113
- this.error = `提取数据出错,错误码: ${error.status}, 错误信息:${error.data},组件:${this.comp}`
114
- }
115
- })
116
- }
117
-
118
- // 重新进行查询
119
- refresh () {
120
- this.search(this.condition, this.model, this.condValue)
121
- }
122
-
123
- // 加载一页数据
124
- loadPage (pageNo, pageSize) {
125
- this.pageIndex = pageNo
126
- this.pageSize = pageSize
127
- this.state = '查询'
128
- return this.postGen(pageNo, pageSize)
129
- }
130
-
131
- postGen (pageNo, pageSize) {
132
- this.seaching = true
133
- return Vue.resetpost(`${this.url}?pageNo=${pageNo}&pageSize=${pageSize}`, { data: this.params }, {
134
- aoteEncrypt: this.aoteEncrypt,
135
- encryKey: this.encryKey,
136
- resolveMsg: null,
137
- rejectMsg: null
138
- }).then(response => {
139
- this.state = '正确'
140
- // a-table需要每条数据都加上一个字符传类型的key 这里通过一个生成uuid的库加入
141
- this.rows = response.map(item => {
142
- item.nanoid = nanoid()
143
- return item
144
- })
145
- if (this.isBlank === true) {
146
- const size = response.length % this.pageSize
147
- if (pageNo === this.totalPage) {
148
- for (let i = 1; i <= this.pageSize - size; i++) {
149
- this.rows.push({ isNuN: 'true' })
150
- }
151
- }
152
- }
153
- this.pageIndex = pageNo
154
- this.seaching = false
155
- }).catch(error => {
156
- this.seaching = false
157
- this.state = '错误'
158
- this.error = JSON.stringify(error)
159
- throw error
160
- })
161
- }
162
-
163
- // 处理查询参数,把condition以及condValue附加到参数列表中,condValue指后台查询条件
164
- procParams () {
165
- this.params.condition = this.condition
166
- if (this.condValue) {
167
- this.params.condValue = this.condValue
168
- }
169
- if (!this.paramSource) {
170
- return
171
- }
172
- // 对附加参数进行计算
173
- for (const name in this.paramSource) {
174
- this.params[name] = this.paramSource[name]
175
- }
176
- }
177
- }
1
+ import Vue from 'vue'
2
+ import { nanoid } from 'nanoid'
3
+
4
+ export default class PagedList {
5
+ // 用url及pageSize构造
6
+ // url - 加载数据的url
7
+ // pageSize - 每页数据个数
8
+ // params - 除正常查询条件外,附加到后台sql中的参数,可以为空。格式为:{参数名:参数值}
9
+ // sums - 需要求和的字段。格式为:{参数名:参数值}
10
+ // isBlank - 是否使用空行填充表格,值为true或者 false
11
+ // comp - 调用时的组件名,方便调试
12
+ // aoteEncrypt - 加密类型, 不传使用全局的
13
+ // encryKey - 加密key, 不传使用全局的
14
+ // timeout - 查询超时时间, 默认50秒
15
+ constructor (url, pageSize, params, sums, isBlank, comp, aoteEncrypt, encryKey, timeout) {
16
+ // 正在查询标志位
17
+ this.seaching = false
18
+ this.url = url
19
+ this.pageSize = pageSize
20
+ this.pageIndex = 0
21
+ this.isBlank = isBlank
22
+ this.aoteEncrypt = aoteEncrypt || Vue.mmType
23
+ this.encryKey = encryKey || Vue.mm
24
+ this.timeout = timeout || 50000
25
+
26
+ // 登记组件名
27
+ if (comp) {
28
+ this.comp = comp
29
+ }
30
+
31
+ // 登记参数源码,查询前,执行参数源码,获得实际参数值
32
+ if (params) {
33
+ this.paramSource = params
34
+ }
35
+ // 查询时,提交后台的参数值
36
+ this.params = {}
37
+
38
+ // 求和的字段
39
+ this.sums = sums
40
+ // 符合条件的数据总数
41
+ this.count = 0
42
+ // 符合条件的数据总页数
43
+ this.totalPage = 0
44
+ // 加载过来的数据
45
+ this.rows = []
46
+ // 状态,字符串型,包括:初始(默认),查询,错误,正确
47
+ this.state = '初始'
48
+ // 出现错误时的错误内容,没找到符合条件的数据当错误处理
49
+ this.error = '请输入条件, 进行查询'
50
+
51
+ // 每次加载所需要的条件
52
+ this.condition = null
53
+ this.model = null
54
+ this.condValue = null
55
+
56
+ // 初始填充数据空行
57
+ // isNuN标记本行是否为空行
58
+ if (isBlank === true) {
59
+ for (let i = 1; i <= pageSize; i++) {
60
+ this.rows.push({ isNuN: 'true' })
61
+ }
62
+ }
63
+ }
64
+
65
+ // 执行查询过程,加载数据汇总信息
66
+ // condition - 查询组件产生的查询条件
67
+ // model - 查询组件收集到的输入数据
68
+ // condValue - 交给后台的查询条件,可以为空
69
+ search (condition, model, condValue) {
70
+ let param
71
+ // 保存条件,以便加载某页时可以直接调用
72
+ this.condition = condition
73
+ this.model = model
74
+ this.condValue = condValue
75
+ this.state = '查询'
76
+ this.procParams()
77
+ this.seaching = true
78
+ if (this.sums) {
79
+ const totals = []
80
+ for (const key in this.sums) {
81
+ totals.push(key)
82
+ param = { data: this.params, sums: totals }
83
+ }
84
+ } else {
85
+ param = { data: this.params }
86
+ }
87
+ // 发生请求时,不进行任何提醒
88
+ return Vue.resetpost(`${this.url}/n`, param, {
89
+ timeout: this.timeout,
90
+ rejectMsg: null,
91
+ aoteEncrypt: this.aoteEncrypt,
92
+ encryKey: this.encryKey
93
+ }).then(response => {
94
+ this.seaching = false
95
+ if (response.n === 0) {
96
+ this.state = '错误'
97
+ this.error = '没有符合条件的记录'
98
+ this.rows = []
99
+ return
100
+ }
101
+ this.state = '正确'
102
+ this.count = response.n
103
+ for (const key in this.sums) {
104
+ this.sums[key] = response[key]
105
+ }
106
+ this.totalPage = Math.ceil(this.count / this.pageSize)
107
+ // 加载第一页数据
108
+ return this.loadPage(1, this.pageSize)
109
+ }).catch((error) => {
110
+ this.seaching = false
111
+ if (error.status !== 603) {
112
+ this.state = '错误'
113
+ this.error = `提取数据出错,错误码: ${error.status}, 错误信息:${error.data},组件:${this.comp}`
114
+ }
115
+ })
116
+ }
117
+
118
+ // 重新进行查询
119
+ refresh () {
120
+ this.search(this.condition, this.model, this.condValue)
121
+ }
122
+
123
+ // 加载一页数据
124
+ loadPage (pageNo, pageSize) {
125
+ this.pageIndex = pageNo
126
+ this.pageSize = pageSize
127
+ this.state = '查询'
128
+ return this.postGen(pageNo, pageSize)
129
+ }
130
+
131
+ postGen (pageNo, pageSize) {
132
+ this.seaching = true
133
+ return Vue.resetpost(`${this.url}?pageNo=${pageNo}&pageSize=${pageSize}`, { data: this.params }, {
134
+ aoteEncrypt: this.aoteEncrypt,
135
+ encryKey: this.encryKey,
136
+ resolveMsg: null,
137
+ rejectMsg: null
138
+ }).then(response => {
139
+ this.state = '正确'
140
+ // a-table需要每条数据都加上一个字符传类型的key 这里通过一个生成uuid的库加入
141
+ this.rows = response.map(item => {
142
+ item.nanoid = nanoid()
143
+ return item
144
+ })
145
+ if (this.isBlank === true) {
146
+ const size = response.length % this.pageSize
147
+ if (pageNo === this.totalPage) {
148
+ for (let i = 1; i <= this.pageSize - size; i++) {
149
+ this.rows.push({ isNuN: 'true' })
150
+ }
151
+ }
152
+ }
153
+ this.pageIndex = pageNo
154
+ this.seaching = false
155
+ }).catch(error => {
156
+ this.seaching = false
157
+ this.state = '错误'
158
+ this.error = JSON.stringify(error)
159
+ throw error
160
+ })
161
+ }
162
+
163
+ // 处理查询参数,把condition以及condValue附加到参数列表中,condValue指后台查询条件
164
+ procParams () {
165
+ this.params.condition = this.condition
166
+ if (this.condValue) {
167
+ this.params.condValue = this.condValue
168
+ }
169
+ if (!this.paramSource) {
170
+ return
171
+ }
172
+ // 对附加参数进行计算
173
+ for (const name in this.paramSource) {
174
+ this.params[name] = this.paramSource[name]
175
+ }
176
+ }
177
+ }
@@ -1,20 +1,20 @@
1
- import { get } from '@vue2-client/services/api'
2
- import Vue from 'vue'
3
-
4
- async function loginStart (name, password) {
5
- const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
6
- console.log('登陆获取', resource)
7
- Vue.$login.f = resource
8
- await Promise.all([Vue.$appdata.load()])
9
- const login = {
10
- f: Vue.$login.f,
11
- jwt: Vue.$login.f.id,
12
- r: Vue.$login.r
13
- }
14
- Vue.$store.commit('account/setLogin', login)
15
- return resource
16
- }
17
-
18
- export {
19
- loginStart
20
- }
1
+ import { get } from '@vue2-client/services/api'
2
+ import Vue from 'vue'
3
+
4
+ async function loginStart (name, password) {
5
+ const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
6
+ console.log('登陆获取', resource)
7
+ Vue.$login.f = resource
8
+ await Promise.all([Vue.$appdata.load()])
9
+ const login = {
10
+ f: Vue.$login.f,
11
+ jwt: Vue.$login.f.id,
12
+ r: Vue.$login.r
13
+ }
14
+ Vue.$store.commit('account/setLogin', login)
15
+ return resource
16
+ }
17
+
18
+ export {
19
+ loginStart
20
+ }
@@ -1,32 +1,32 @@
1
- // 语句模式
2
- const MODE = {
3
- STATEMENTS: 's', // 语句模式
4
- PHRASAL: 'p' // 词组模式
5
- }
6
-
7
- const VueI18nPlugin = {
8
- install: function (Vue) {
9
- Vue.mixin({
10
- methods: {
11
- $ta (syntaxKey, mode) {
12
- const _mode = mode || MODE.STATEMENTS
13
- const keys = syntaxKey.split('|')
14
- const _this = this
15
- const locale = this.$i18n.locale
16
- let message = ''
17
- const splitter = locale === 'US' ? ' ' : ''
18
- // 拼接 message
19
- keys.forEach(key => {
20
- message += _this.$t(key) + splitter
21
- })
22
- // 英文环境语句模式下,转换单词大小写
23
- if (keys.length > 0 && _mode === MODE.STATEMENTS && locale === 'US') {
24
- message = message.charAt(0).toUpperCase() + message.toLowerCase().substring(1)
25
- }
26
- return message
27
- }
28
- }
29
- })
30
- }
31
- }
32
- export default VueI18nPlugin
1
+ // 语句模式
2
+ const MODE = {
3
+ STATEMENTS: 's', // 语句模式
4
+ PHRASAL: 'p' // 词组模式
5
+ }
6
+
7
+ const VueI18nPlugin = {
8
+ install: function (Vue) {
9
+ Vue.mixin({
10
+ methods: {
11
+ $ta (syntaxKey, mode) {
12
+ const _mode = mode || MODE.STATEMENTS
13
+ const keys = syntaxKey.split('|')
14
+ const _this = this
15
+ const locale = this.$i18n.locale
16
+ let message = ''
17
+ const splitter = locale === 'US' ? ' ' : ''
18
+ // 拼接 message
19
+ keys.forEach(key => {
20
+ message += _this.$t(key) + splitter
21
+ })
22
+ // 英文环境语句模式下,转换单词大小写
23
+ if (keys.length > 0 && _mode === MODE.STATEMENTS && locale === 'US') {
24
+ message = message.charAt(0).toUpperCase() + message.toLowerCase().substring(1)
25
+ }
26
+ return message
27
+ }
28
+ }
29
+ })
30
+ }
31
+ }
32
+ export default VueI18nPlugin
@@ -1,38 +1,38 @@
1
- # Ellipsis 文本自动省略号
2
-
3
- 文本过长自动处理省略号,支持按照文本长度和最大行数两种方式截取。
4
-
5
-
6
-
7
- 引用方式:
8
-
9
- ```javascript
10
- import Ellipsis from '@vue2-client/components/Ellipsis'
11
-
12
- export default {
13
- components: {
14
- Ellipsis
15
- }
16
- }
17
- ```
18
-
19
-
20
-
21
- ## 代码演示 [demo](https://pro.loacg.com/test/home)
22
-
23
- ```html
24
- <ellipsis :length="100" tooltip>
25
- There were injuries alleged in three cases in 2015, and a
26
- fourth incident in September, according to the safety recall report. After meeting with US regulators in October, the firm decided to issue a voluntary recall.
27
- </ellipsis>
28
- ```
29
-
30
-
31
-
32
- ## API
33
-
34
-
35
- | 参数 | 说明 | 类型 | 默认值 |
36
- |---------|--------------------------|---------|-----|
37
- | tooltip | 移动到文本展示完整内容的提示 | boolean | - |
38
- | length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | - |
1
+ # Ellipsis 文本自动省略号
2
+
3
+ 文本过长自动处理省略号,支持按照文本长度和最大行数两种方式截取。
4
+
5
+
6
+
7
+ 引用方式:
8
+
9
+ ```javascript
10
+ import Ellipsis from '@vue2-client/components/Ellipsis'
11
+
12
+ export default {
13
+ components: {
14
+ Ellipsis
15
+ }
16
+ }
17
+ ```
18
+
19
+
20
+
21
+ ## 代码演示 [demo](https://pro.loacg.com/test/home)
22
+
23
+ ```html
24
+ <ellipsis :length="100" tooltip>
25
+ There were injuries alleged in three cases in 2015, and a
26
+ fourth incident in September, according to the safety recall report. After meeting with US regulators in October, the firm decided to issue a voluntary recall.
27
+ </ellipsis>
28
+ ```
29
+
30
+
31
+
32
+ ## API
33
+
34
+
35
+ | 参数 | 说明 | 类型 | 默认值 |
36
+ |---------|--------------------------|---------|-----|
37
+ | tooltip | 移动到文本展示完整内容的提示 | boolean | - |
38
+ | length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | - |
@@ -1,43 +1,43 @@
1
- # NumberInfo 数据文本
2
-
3
- 常用在数据卡片中,用于突出展示某个业务数据。
4
-
5
-
6
-
7
- 引用方式:
8
-
9
- ```javascript
10
- import NumberInfo from '@vue2-client/components/NumberInfo'
11
-
12
- export default {
13
- components: {
14
- NumberInfo
15
- }
16
- }
17
- ```
18
-
19
-
20
-
21
- ## 代码演示 [demo](https://pro.loacg.com/test/home)
22
-
23
- ```html
24
- <number-info
25
- :sub-title="() => { return 'Visits this week' }"
26
- :total="12321"
27
- status="up"
28
- :sub-total="17.1"></number-info>
29
- ```
30
-
31
-
32
-
33
- ## API
34
-
35
- | 参数 | 说明 | 类型 | 默认值 |
36
- |----------|------------------|------------|---------|
37
- | title | 标题 | ReactNode\ | string | -
38
- | subTitle | 子标题 | ReactNode\ | string | -
39
- | total | 总量 | ReactNode\ | string | -
40
- | subTotal | 子总量 | ReactNode\ | string | -
41
- | status | 增加状态 | 'up \ | down' | -
42
- | theme | 状态样式 | string | 'light' |
43
- | gap | 设置数字和描述之间的间距(像素) | number | 8 |
1
+ # NumberInfo 数据文本
2
+
3
+ 常用在数据卡片中,用于突出展示某个业务数据。
4
+
5
+
6
+
7
+ 引用方式:
8
+
9
+ ```javascript
10
+ import NumberInfo from '@vue2-client/components/NumberInfo'
11
+
12
+ export default {
13
+ components: {
14
+ NumberInfo
15
+ }
16
+ }
17
+ ```
18
+
19
+
20
+
21
+ ## 代码演示 [demo](https://pro.loacg.com/test/home)
22
+
23
+ ```html
24
+ <number-info
25
+ :sub-title="() => { return 'Visits this week' }"
26
+ :total="12321"
27
+ status="up"
28
+ :sub-total="17.1"></number-info>
29
+ ```
30
+
31
+
32
+
33
+ ## API
34
+
35
+ | 参数 | 说明 | 类型 | 默认值 |
36
+ |----------|------------------|------------|---------|
37
+ | title | 标题 | ReactNode\ | string | -
38
+ | subTitle | 子标题 | ReactNode\ | string | -
39
+ | total | 总量 | ReactNode\ | string | -
40
+ | subTotal | 子总量 | ReactNode\ | string | -
41
+ | status | 增加状态 | 'up \ | down' | -
42
+ | theme | 状态样式 | string | 'light' |
43
+ | gap | 设置数字和描述之间的间距(像素) | number | 8 |