br-dionysus 1.6.5 → 1.6.7

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 (115) hide show
  1. package/README.md +90 -52
  2. package/attributes.json +1 -1
  3. package/dist/br-dionysus.es.js +4659 -4595
  4. package/dist/br-dionysus.umd.js +8 -8
  5. package/dist/index.css +1 -1
  6. package/dist/packages/MTable/src/MTable.vue.d.ts +21 -0
  7. package/dist/packages/MTable/src/token.d.ts +10 -1
  8. package/docs/assets/README-BIIm2ID5.css +1 -0
  9. package/docs/assets/README-BVC502ud.js +1 -0
  10. package/docs/assets/README-BaVHXTcr.js +1 -0
  11. package/docs/assets/README-BkoXPzeT.js +1 -0
  12. package/docs/assets/README-BpY9wwJ5.js +1 -0
  13. package/docs/assets/README-BxVIiLkB.css +1 -0
  14. package/docs/assets/README-C8q4oePg.css +1 -0
  15. package/docs/assets/README-C9E9QEak.js +1 -0
  16. package/docs/assets/README-CJnIKztR.css +1 -0
  17. package/docs/assets/README-CPi9K5cm.css +1 -0
  18. package/docs/assets/README-CVikrcuu.js +1 -0
  19. package/docs/assets/README-CwxKEz5n.js +1 -0
  20. package/docs/assets/README-D-sCcuuV.js +1 -0
  21. package/docs/assets/README-D1NyMPDh.css +1 -0
  22. package/docs/assets/README-D8dRnWkj.css +1 -0
  23. package/docs/assets/README-DC5fWcO7.css +1 -0
  24. package/docs/assets/README-DFookNbq.js +1 -0
  25. package/docs/assets/README-DJM0QNOa.css +1 -0
  26. package/docs/assets/README-DJsWJjpr.js +2 -0
  27. package/docs/assets/README-DZH0ZBFE.js +1 -0
  28. package/docs/assets/README-DuLXE9ma.css +1 -0
  29. package/docs/assets/README-DxdjMTiZ.js +1 -0
  30. package/docs/assets/README-DxzXrur_.js +1 -0
  31. package/docs/assets/README-ZSEyYWl3.css +1 -0
  32. package/docs/assets/empty-BHv0FmNK.png +0 -0
  33. package/docs/assets/index-B3d27dSP.js +66 -0
  34. package/docs/assets/index-BeGJML3j.css +1 -0
  35. package/docs/index.html +14 -0
  36. package/docs/packages/Hook/usePackageConfig/README.md +35 -0
  37. package/docs/packages/Hook/usePackageConfig/demo.vue +28 -0
  38. package/docs/packages/Hook/usePackageConfig/usePackageConfig.ts +39 -0
  39. package/docs/packages/Hook/useRemainingSpace/README.md +26 -0
  40. package/docs/packages/Hook/useRemainingSpace/useRemainingSpace.ts +148 -0
  41. package/docs/packages/Hook/useTableConfig/README.md +50 -0
  42. package/docs/packages/Hook/useTableConfig/demo.vue +134 -0
  43. package/docs/packages/Hook/useTableConfig/useTableConfig.ts +173 -0
  44. package/docs/packages/Hook/useZIndex/README.md +6 -0
  45. package/docs/packages/Hook/useZIndex/useGlobalZIndex.ts +34 -0
  46. package/docs/packages/MDialog/docs/README.md +26 -0
  47. package/docs/packages/MDialog/docs/demo.vue +72 -0
  48. package/docs/packages/MDialog/index.ts +10 -0
  49. package/docs/packages/MDialog/src/MDialog.vue +150 -0
  50. package/docs/packages/MInline/docs/README.md +26 -0
  51. package/docs/packages/MInline/docs/demo.vue +138 -0
  52. package/docs/packages/MInline/index.ts +10 -0
  53. package/docs/packages/MInline/src/MInline.vue +284 -0
  54. package/docs/packages/MInputNumber/docs/README.md +35 -0
  55. package/docs/packages/MInputNumber/docs/demo.vue +17 -0
  56. package/docs/packages/MInputNumber/index.ts +10 -0
  57. package/docs/packages/MInputNumber/src/MInputNumber.vue +268 -0
  58. package/docs/packages/MSelect/docs/README.md +20 -0
  59. package/docs/packages/MSelect/docs/demo.vue +36 -0
  60. package/docs/packages/MSelect/index.ts +17 -0
  61. package/docs/packages/MSelect/src/MOption.vue +43 -0
  62. package/docs/packages/MSelect/src/MSelect.vue +57 -0
  63. package/docs/packages/MSelect/src/token.ts +8 -0
  64. package/docs/packages/MSelectTable/docs/README.md +88 -0
  65. package/docs/packages/MSelectTable/docs/demo.vue +196 -0
  66. package/docs/packages/MSelectTable/index.ts +10 -0
  67. package/docs/packages/MSelectTable/src/MSelectTable.vue +493 -0
  68. package/docs/packages/MSelectTableV1/docs/README.md +49 -0
  69. package/docs/packages/MSelectTableV1/docs/demo.vue +77 -0
  70. package/docs/packages/MSelectTableV1/index.ts +10 -0
  71. package/docs/packages/MSelectTableV1/src/MSelectTableV1.vue +460 -0
  72. package/docs/packages/MSelectV2/docs/README.md +31 -0
  73. package/docs/packages/MSelectV2/docs/demo.vue +36 -0
  74. package/docs/packages/MSelectV2/index.ts +10 -0
  75. package/docs/packages/MSelectV2/src/MSelectV2.vue +116 -0
  76. package/docs/packages/MTable/docs/README.md +40 -0
  77. package/docs/packages/MTable/docs/demo.vue +93 -0
  78. package/docs/packages/MTable/index.ts +10 -0
  79. package/docs/packages/MTable/src/MTable.vue +228 -0
  80. package/docs/packages/MTable/src/token.ts +9 -0
  81. package/docs/packages/MTableColumn/docs/README.md +22 -0
  82. package/docs/packages/MTableColumn/docs/demo.vue +110 -0
  83. package/docs/packages/MTableColumn/index.ts +10 -0
  84. package/docs/packages/MTableColumn/src/MTableColumn.vue +345 -0
  85. package/docs/packages/MTableColumnSet/docs/README.md +31 -0
  86. package/docs/packages/MTableColumnSet/docs/demo.vue +36 -0
  87. package/docs/packages/MTableColumnSet/index.ts +10 -0
  88. package/docs/packages/MTableColumnSet/src/MTableColumnSet.vue +310 -0
  89. package/docs/packages/README.md +10 -0
  90. package/docs/packages/SkinConfig/docs/README.md +42 -0
  91. package/docs/packages/SkinConfig/docs/demo.vue +680 -0
  92. package/docs/packages/SkinConfig/index.ts +10 -0
  93. package/docs/packages/SkinConfig/src/SkinConfig.vue +478 -0
  94. package/docs/packages/SkinConfig/src/useSkin.ts +230 -0
  95. package/docs/packages/TabPage/docs/README.md +10 -0
  96. package/docs/packages/TabPage/docs/demo.vue +96 -0
  97. package/docs/packages/TabPage/index.ts +10 -0
  98. package/docs/packages/TabPage/src/TabPage.vue +566 -0
  99. package/docs/packages/Tool/moneyFormat/README.md +15 -0
  100. package/docs/packages/Tool/moneyFormat/moneyFormat.ts +69 -0
  101. package/docs/packages/index.ts +61 -0
  102. package/docs/packages/list.json +80 -0
  103. package/docs/packages/typings/class.ts +22 -0
  104. package/docs/packages/typings/enum.ts +9 -0
  105. package/docs/packages/typings/global.d.ts +69 -0
  106. package/docs/packages/typings/interface.ts +6 -0
  107. package/package.json +1 -1
  108. package/packages/MTable/docs/README.md +22 -17
  109. package/packages/MTable/docs/demo.vue +15 -1
  110. package/packages/MTable/src/MTable.vue +54 -6
  111. package/packages/MTable/src/token.ts +11 -2
  112. package/packages/MTableColumn/docs/README.md +8 -8
  113. package/packages/MTableColumn/src/MTableColumn.vue +73 -6
  114. package/tags.json +1 -1
  115. package/web-types.json +1 -1
@@ -0,0 +1,10 @@
1
+ <script setup>
2
+ import demo from './demo.vue'
3
+ </script>
4
+
5
+ 标签页组件
6
+ =================
7
+
8
+ <Preview comp-name="TabPage" demo-name="demo">
9
+ <demo />
10
+ </Preview>
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div class="g-demo-tab-page-box">
3
+ <tab-page
4
+ v-model="list"
5
+ :activeKey="activeKey"
6
+ @close="close($event[0])"
7
+ @click="open"
8
+ >
9
+ <template #icon>
10
+ <!--<lay-icon-->
11
+ <!-- v-for="item in list"-->
12
+ <!-- :key="item.key"-->
13
+ <!-- :type="item.icon"-->
14
+ <!-- :data-key="item.key"-->
15
+ <!--&gt;</lay-icon>-->
16
+ <div
17
+ v-for="item in list"
18
+ :key="item.key"
19
+ :type="item.icon"
20
+ :data-key="item.key"
21
+ >
22
+ {{ item.icon }}
23
+ </div>
24
+ </template>
25
+ </tab-page>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import { ref } from 'vue'
31
+
32
+ const list = ref<any[]>([])
33
+ const activeKey = ref<string | number>('0')
34
+
35
+ list.value = [{
36
+ key: '0',
37
+ title: '要货需求列表',
38
+ icon: '<i>111</i>'
39
+ }, {
40
+ key: '1',
41
+ title: '需求汇总',
42
+ icon: '<i>222</i>'
43
+ }, {
44
+ key: '2',
45
+ title: '要货需求',
46
+ icon: '<i>333</i>'
47
+ }, {
48
+ key: '3',
49
+ title: '需求汇总',
50
+ icon: '<i>444</i>'
51
+ }, {
52
+ key: '4',
53
+ title: '要货需求'
54
+ }, {
55
+ key: '5',
56
+ title: '需求汇总'
57
+ }, {
58
+ key: '6',
59
+ title: '要货需求'
60
+ }, {
61
+ key: '7',
62
+ title: '需求汇总'
63
+ }, {
64
+ key: '8',
65
+ title: '要货需求'
66
+ }, {
67
+ key: '9',
68
+ title: '需求汇总'
69
+ }, {
70
+ key: '10',
71
+ title: '要货需求'
72
+ }, {
73
+ key: '11',
74
+ title: '要货需求'
75
+ }, {
76
+ key: '12',
77
+ title: '需求汇总'
78
+ }, {
79
+ key: '13',
80
+ title: '要货需求'
81
+ }]
82
+
83
+ const close = (data: string | number) => {
84
+ list.value = list.value.filter(item => item.key !== data)
85
+ }
86
+
87
+ const open = (data: string | number) => {
88
+ activeKey.value = data
89
+ }
90
+ </script>
91
+
92
+ <style scoped>
93
+ .g-demo-tab-page-box {
94
+ max-width: 1000px;
95
+ }
96
+ </style>
@@ -0,0 +1,10 @@
1
+ import { App, Plugin } from 'vue'
2
+ import TabPage from './src/TabPage.vue'
3
+
4
+ export const TabPagePlugin: Plugin = {
5
+ install (app: App) {
6
+ app.component('TabPage', TabPage)
7
+ }
8
+ }
9
+
10
+ export { TabPage }
@@ -0,0 +1,566 @@
1
+ <template>
2
+ <div class="g-box">
3
+ <button
4
+ class="u-page-btn s-previous-btn"
5
+ v-if="isHorizontal"
6
+ @click="previous"
7
+ >
8
+ <svg
9
+ t="1704703004061"
10
+ class="icon"
11
+ viewBox="0 0 1024 1024"
12
+ version="1.1"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ p-id="4356"
15
+ width="16"
16
+ height="16"
17
+ >
18
+ <path
19
+ d="M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z"
20
+ fill="#272636"
21
+ p-id="4357"
22
+ ></path>
23
+ </svg>
24
+ </button>
25
+ <div class="g-dionysus-box">
26
+ <ul
27
+ class="g-tab-page-box j-dionysus-list-box"
28
+ :style="ulStyle"
29
+ @mouseleave="hoverKey = -1"
30
+ >
31
+ <li
32
+ class="u-li j-li"
33
+ v-for="item in props.modelValue"
34
+ :key="item.key"
35
+ :data-active="props.activeKey === item.key"
36
+ :data-active-before="activeBeforeKey === item.key"
37
+ :data-active-after="activeAfterKey === item.key"
38
+ @mouseenter="hoverKey = item.key"
39
+ :data-hover="hoverKey === item.key"
40
+ :data-hover-before="hoverBeforeKey === item.key"
41
+ :data-hover-after="hoverAfterKey === item.key"
42
+ @click="openPage(item.key)"
43
+ >
44
+ <div class="u-gp">
45
+ <!--<el-icon class="u-icon">-->
46
+ <!-- <component :is="item.icon"></component>-->
47
+ <!--</el-icon>-->
48
+ <i class="u-icon j-icon">
49
+ <!--<div v-html="item.icon"></div>-->
50
+ </i>
51
+ <!--<div v-html="item.icon"></div>-->
52
+ <span class="u-sn">{{ item.title }}</span>
53
+ <div
54
+ class="u-btn"
55
+ @click.stop="close([item.key])"
56
+ >
57
+ <i class="s-icon"></i>
58
+ </div>
59
+ </div>
60
+ </li>
61
+ </ul>
62
+ </div>
63
+ <div class="u-icon-box">
64
+ <slot name="icon"></slot>
65
+ </div>
66
+ <button
67
+ class="u-page-btn s-next-btn"
68
+ v-if="isHorizontal"
69
+ @click="next"
70
+ >
71
+ <svg
72
+ t="1704703004061"
73
+ class="icon"
74
+ viewBox="0 0 1024 1024"
75
+ version="1.1"
76
+ xmlns="http://www.w3.org/2000/svg"
77
+ p-id="4356"
78
+ width="16"
79
+ height="16"
80
+ >
81
+ <path
82
+ d="M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z"
83
+ fill="#272636"
84
+ p-id="4357"
85
+ ></path>
86
+ </svg>
87
+ </button>
88
+ </div>
89
+ </template>
90
+
91
+ <script setup lang="ts">
92
+ import { ref, computed, watch, onMounted, nextTick } from 'vue'
93
+
94
+ const isContentOverflowing = (element: Element) => {
95
+ return {
96
+ horizontal: element.scrollWidth > element.clientWidth,
97
+ vertical: element.scrollHeight > element.clientHeight
98
+ }
99
+ }
100
+
101
+ interface MenuItem {
102
+ title: string,
103
+ key: string
104
+ }
105
+
106
+ const props = withDefaults(defineProps<{
107
+ modelValue?: MenuItem[], // 菜单数组
108
+ activeKey?: string, // 当前激活key
109
+ showRightClickMenu?: boolean, // 是否显示右键菜单
110
+ primaryColor?: string, // 主题色
111
+ primaryBackgroundColor?: string | null // 主题背景色
112
+ }>(), {
113
+ modelValue: () => [],
114
+ activeKey: '',
115
+ showRightClickMenu: false,
116
+ primaryColor: '#646CFFFF',
117
+ primaryBackgroundColor: null
118
+ })
119
+
120
+ const adjustColor = (hex: string, percent: number = 100) => {
121
+ hex = hex.replace('#', '').toLowerCase()
122
+
123
+ if (hex.length === 3) {
124
+ hex = hex.split('').map(c => c + c).join('')
125
+ }
126
+
127
+ let r: any = parseInt(hex.substring(0, 2), 16)
128
+ let g: any = parseInt(hex.substring(2, 4), 16)
129
+ let b: any = parseInt(hex.substring(4, 6), 16)
130
+
131
+ r += Math.round((255 - r) * (percent / 100))
132
+ g += Math.round((255 - g) * (percent / 100))
133
+ b += Math.round((255 - b) * (percent / 100))
134
+
135
+ r = r.toString(16).padStart(2, '0')
136
+ g = g.toString(16).padStart(2, '0')
137
+ b = b.toString(16).padStart(2, '0')
138
+
139
+ // 返回十六进制颜色值
140
+ return `#${r}${g}${b}`
141
+ }
142
+
143
+ onMounted(() => {
144
+ document.documentElement.style.setProperty('--br-dionysus-primary-color', props.primaryColor)
145
+ if (props.primaryBackgroundColor) return false
146
+ document.documentElement.style.setProperty('--br-dionysus-primary-bg-color', adjustColor(props.primaryColor, 90))
147
+ })
148
+
149
+ const activeKey = ref(props.activeKey)
150
+ watch(
151
+ () => props.activeKey,
152
+ (newVal: string) => {
153
+ activeKey.value = newVal
154
+ }
155
+ )
156
+
157
+ const emit = defineEmits(['close', 'click'])
158
+
159
+ const list = computed(() => {
160
+ return props.modelValue.map((item: MenuItem) => {
161
+ return {
162
+ key: item.key,
163
+ title: item.title
164
+ }
165
+ })
166
+ })
167
+
168
+ // 渲染图标
169
+ const renderIcon = () => {
170
+ list.value.forEach((item, index) => {
171
+ const className = '.j-dionysus-list-box .j-li:nth-of-type(' + (index + 1) + ') .j-icon'
172
+ const targetContainer: Element | null = document.querySelector(className)
173
+ if (!targetContainer || targetContainer.children.length) return false
174
+ const sourceElement: Element | null = document.querySelector('[data-key="' + item.key + '"]')
175
+ if (!sourceElement) return false
176
+ const clonedElement: Node = sourceElement.cloneNode(true)
177
+ targetContainer.appendChild(clonedElement)
178
+ })
179
+ }
180
+
181
+ watch(
182
+ () => list.value,
183
+ () => {
184
+ nextTick(() => {
185
+ renderIcon()
186
+ })
187
+ }
188
+ )
189
+ onMounted(() => {
190
+ renderIcon()
191
+ })
192
+
193
+ const isHorizontal = ref(false)
194
+ const horizontalMaxSize = ref(0)
195
+ const horizontalSize = ref(0)
196
+
197
+ const ulStyle = computed(() => {
198
+ const size = horizontalSize.value > horizontalMaxSize.value ? horizontalMaxSize.value : horizontalSize.value
199
+ return {
200
+ transform: 'translateX(-' + (isHorizontal.value ? size : 0) + 'px)'
201
+ }
202
+ })
203
+
204
+ const previous = () => {
205
+ horizontalSize.value = horizontalSize.value < 300 ? 0 : horizontalSize.value - 300
206
+ }
207
+
208
+ const next = () => {
209
+ horizontalSize.value = horizontalSize.value > horizontalMaxSize.value - 300 ? horizontalMaxSize.value : horizontalSize.value + 300
210
+ }
211
+
212
+ const checkHorizontal = () => {
213
+ const el = document.querySelector('.g-tab-page-box')
214
+ if (!el) return false
215
+ const { horizontal } = isContentOverflowing(el)
216
+ isHorizontal.value = horizontal
217
+ if (horizontal) horizontalMaxSize.value = el.scrollWidth - el.clientWidth
218
+ }
219
+
220
+ watch(
221
+ () => list.value,
222
+ () => {
223
+ nextTick(() => {
224
+ checkHorizontal()
225
+ })
226
+ }
227
+ )
228
+ onMounted(() => {
229
+ checkHorizontal()
230
+ })
231
+
232
+ const resizeObserver = new ResizeObserver(() => {
233
+ checkHorizontal()
234
+ })
235
+ onMounted(() => {
236
+ const el: Element | null = document.querySelector('.g-tab-page-box')
237
+ if (!el) return false
238
+ resizeObserver.observe(el)
239
+ })
240
+
241
+ const activeBeforeKey = computed(() => {
242
+ const index = list.value.findIndex(item => item.key === props.activeKey)
243
+ if (index === -1) return -1
244
+ return list.value[index - 1]?.key
245
+ })
246
+ const activeAfterKey = computed(() => {
247
+ const index = list.value.findIndex(item => item.key === props.activeKey)
248
+ if (index === -1) return -1
249
+ return list.value[index + 1]?.key
250
+ })
251
+
252
+ const hoverKey: any = ref(2)
253
+ const hoverBeforeKey = computed(() => {
254
+ const index = list.value.findIndex(item => item.key === hoverKey.value)
255
+ if (index === -1) return -1
256
+ return list.value[index - 1]?.key
257
+ })
258
+ const hoverAfterKey = computed(() => {
259
+ const index = list.value.findIndex(item => item.key === hoverKey.value)
260
+ if (index === -1) return -1
261
+ return list.value[index + 1]?.key
262
+ })
263
+
264
+ // const contextMenuConfig = [{
265
+ // title: '关闭当前',
266
+ // callback () {
267
+ // close([props.activeKey])
268
+ // }
269
+ // }, {
270
+ // title: '关闭其他',
271
+ // callback () {
272
+ // const keys = list.value.filter((item: TabPage) => item.key !== props.activeKey).map((item: TabPage) => item.key)
273
+ // close(keys)
274
+ // }
275
+ // }, {
276
+ // title: '关闭右侧',
277
+ // callback () {
278
+ // const keys = list.value.slice(list.value.findIndex(item => item.key === props.activeKey) + 1).map(item => item.key)
279
+ // close(keys)
280
+ // }
281
+ // }, {
282
+ // title: '关闭左侧',
283
+ // callback () {
284
+ // const keys = list.value.slice(0, list.value.findIndex(item => item.key === props.activeKey)).map(item => item.key)
285
+ // close(keys)
286
+ // }
287
+ // }]
288
+ // console.log('contextMenuConfig', contextMenuConfig)
289
+
290
+ // 打开标签页
291
+ const openPage = (key: string) => {
292
+ emit('click', key)
293
+ }
294
+
295
+ // 关闭标签页
296
+ const close = (keys: string[] = []) => {
297
+ emit('close', keys)
298
+ }
299
+ </script>
300
+
301
+ <style scoped>
302
+ :root {
303
+ --br-dionysus-primary-color: #646CFFFF;
304
+ --br-dionysus-primary-bg-color: #979fff;
305
+ }
306
+
307
+ .u-icon-box {
308
+ display: none;
309
+ }
310
+
311
+ .g-box {
312
+ position: relative;
313
+ overflow: hidden;
314
+ padding-left: 16px;
315
+ padding-right: 16px;
316
+ width: 100%;
317
+ background-color: #fff;
318
+ box-sizing: border-box;
319
+ }
320
+
321
+ .g-box .u-page-btn {
322
+ position: absolute;
323
+ bottom: 0;
324
+ height: 33px;
325
+ border: 0;
326
+ box-sizing: border-box;
327
+ background-color: #fff;
328
+ opacity: 0.6;
329
+ cursor: pointer;
330
+ }
331
+
332
+ .g-box .s-previous-btn {
333
+ left: 0;
334
+ }
335
+
336
+ .g-box .s-next-btn {
337
+ right: 0;
338
+ transform: rotate(180deg);
339
+ }
340
+
341
+ .g-dionysus-box {
342
+ overflow: hidden;
343
+ width: 100%;
344
+ }
345
+
346
+ .g-tab-page-box {
347
+ display: flex;
348
+ color: #4a4a4a;
349
+ white-space: nowrap;
350
+ box-sizing: border-box;
351
+ box-shadow: 2px 0 8px #1d23290d;
352
+ transform: translateX(0);
353
+ transition: .2s;
354
+ }
355
+
356
+ .g-tab-page-box .u-li {
357
+ display: inline-block;
358
+ position: relative;
359
+ height: 33px;
360
+ font-size: 14px;
361
+ box-sizing: border-box;
362
+ cursor: pointer;
363
+ /*hover*/
364
+ /*激活*/
365
+ }
366
+
367
+ .g-tab-page-box .u-li .u-gp {
368
+ display: flex;
369
+ position: relative;
370
+ z-index: 1;
371
+ padding: 6px 8px;
372
+ height: 100%;
373
+ align-items: center;
374
+ background-color: #fff;
375
+ border-radius: 6px 6px 0 0;
376
+ box-sizing: border-box;
377
+ }
378
+
379
+ .g-tab-page-box .u-li .u-gp:after {
380
+ position: absolute;
381
+ bottom: 0;
382
+ right: 0;
383
+ z-index: 1;
384
+ content: '';
385
+ width: 12px;
386
+ height: 12px;
387
+ border-radius: 6px 6px 0 6px;
388
+ pointer-events: none;
389
+ }
390
+
391
+ .g-tab-page-box .u-li .u-gp:before {
392
+ position: absolute;
393
+ bottom: 0;
394
+ left: 0;
395
+ z-index: 1;
396
+ content: '';
397
+ width: 12px;
398
+ height: 12px;
399
+ border-radius: 6px 6px 6px 0;
400
+ pointer-events: none;
401
+ }
402
+
403
+ .g-tab-page-box .u-li:after {
404
+ position: absolute;
405
+ bottom: 0;
406
+ right: 0;
407
+ z-index: 2;
408
+ content: '';
409
+ width: 12px;
410
+ height: 12px;
411
+ border-radius: 6px;
412
+ pointer-events: none;
413
+ }
414
+
415
+ .g-tab-page-box .u-li:before {
416
+ position: absolute;
417
+ bottom: 0;
418
+ left: 0;
419
+ z-index: 2;
420
+ content: '';
421
+ width: 12px;
422
+ height: 12px;
423
+ border-radius: 6px;
424
+ pointer-events: none;
425
+ }
426
+
427
+ .g-tab-page-box .u-li[data-hover="true"] .u-gp, .g-tab-page-box .u-li[data-hover="true"] .u-gp:after, .g-tab-page-box .u-li[data-hover="true"] .u-gp:before, .g-tab-page-box .u-li[data-hover="true"][data-active="false"]:after, .g-tab-page-box .u-li[data-hover="true"][data-active="false"]:before {
428
+ background-color: #dfe1e5;
429
+ }
430
+
431
+ .g-tab-page-box .u-li[data-hover-before="true"] .u-gp:after {
432
+ background-color: #dfe1e5;
433
+ }
434
+
435
+ .g-tab-page-box .u-li[data-hover-before="true"]:after {
436
+ background-color: #fff;
437
+ }
438
+
439
+ .g-tab-page-box .u-li[data-hover-after="true"] .u-gp:before {
440
+ background-color: #dfe1e5;
441
+ }
442
+
443
+ .g-tab-page-box .u-li[data-hover-after="true"]:before {
444
+ background-color: #fff;
445
+ }
446
+
447
+ .g-tab-page-box .u-li[data-active-before="true"] .u-gp:after {
448
+ background-color: var(--br-dionysus-primary-bg-color);
449
+ }
450
+
451
+ .g-tab-page-box .u-li[data-active-before="true"]:after {
452
+ background-color: #fff;
453
+ }
454
+
455
+ .g-tab-page-box .u-li[data-active-after="true"] .u-gp:before {
456
+ background-color: var(--br-dionysus-primary-bg-color);
457
+ }
458
+
459
+ .g-tab-page-box .u-li[data-active-after="true"]:before {
460
+ background-color: #fff;
461
+ }
462
+
463
+ .g-tab-page-box .u-li[data-active="true"] {
464
+ color: var(--br-dionysus-primary-color);
465
+ }
466
+
467
+ .g-tab-page-box .u-li[data-active="true"] .u-gp, .g-tab-page-box .u-li[data-active="true"] .u-gp:before, .g-tab-page-box .u-li[data-active="true"] .u-gp:after, .g-tab-page-box .u-li[data-active="true"]:after, .g-tab-page-box .u-li[data-active="true"]:before {
468
+ background-color: var(--br-dionysus-primary-bg-color);
469
+ }
470
+
471
+ .g-tab-page-box .u-li .u-icon {
472
+ margin-right: 8px;
473
+ pointer-events: none;
474
+ }
475
+
476
+ .g-tab-page-box .u-li .u-sn {
477
+ pointer-events: none;
478
+ }
479
+
480
+ .g-tab-page-box .u-li .u-btn {
481
+ position: relative;
482
+ margin-left: 4px;
483
+ width: 14px;
484
+ height: 14px;
485
+ font-size: 14px;
486
+ border-radius: 50%;
487
+ }
488
+
489
+ .g-tab-page-box .u-li .u-btn:after {
490
+ position: absolute;
491
+ top: 0;
492
+ left: 0;
493
+ z-index: 1;
494
+ width: 100%;
495
+ height: 100%;
496
+ content: '';
497
+ border-radius: 50%;
498
+ }
499
+
500
+ .g-tab-page-box .u-li .u-btn:hover {
501
+ color: #fff;
502
+ background-color: #9ca3af;
503
+ }
504
+
505
+ .g-tab-page-box .u-li[data-active="true"] .u-btn:hover {
506
+ color: #fff;
507
+ background-color: var(--br-dionysus-primary-color);
508
+ }
509
+
510
+ .g-tab-page-box .s-icon {
511
+ display: block;
512
+ position: relative;
513
+ width: 14px;
514
+ height: 14px;
515
+ }
516
+
517
+ .g-tab-page-box .s-icon:after {
518
+ position: absolute;
519
+ top: 50%;
520
+ left: 50%;
521
+ content: '';
522
+ width: 1px;
523
+ height: 10px;
524
+ background-color: rgba(48, 49, 51);
525
+ transform: translate(-50%, -50%) rotate(45deg);
526
+ }
527
+
528
+ .g-tab-page-box .s-icon:before {
529
+ position: absolute;
530
+ top: 50%;
531
+ left: 50%;
532
+ content: '';
533
+ width: 1px;
534
+ height: 10px;
535
+ background-color: rgba(48, 49, 51);
536
+ transform: translate(-50%, -50%) rotate(-45deg);
537
+ }
538
+
539
+ .g-tab-page-box .u-li[data-active="true"] .s-icon:after, .g-tab-page-box .u-li[data-active="true"] .s-icon:before {
540
+ background-color: var(--br-dionysus-primary-color);
541
+ }
542
+
543
+ .g-tab-page-box .u-li .u-btn:hover .s-icon:after, .g-tab-page-box .u-li .u-btn:hover .s-icon:before {
544
+ background-color: #fff;
545
+ }
546
+
547
+ .g-tab-page-box .u-li[data-active="true"] .u-btn:hover .s-icon:after, .g-tab-page-box .u-li[data-active="true"] .u-btn:hover .s-icon:before {
548
+ background-color: #fff;
549
+ }
550
+
551
+ .g-tab-page-box .u-li[data-active="false"][data-hover="false"][data-active-before="false"][data-hover-before="false"] .u-sn:after {
552
+ position: absolute;
553
+ top: 50%;
554
+ right: 0;
555
+ z-index: 2;
556
+ content: '';
557
+ width: 1px;
558
+ height: 50%;
559
+ transform: translateY(-50%);
560
+ background-color: #4a4a4a;
561
+ }
562
+
563
+ .g-tab-page-box .u-li:nth-last-of-type(1)[data-active="false"][data-hover="false"] .u-sn:after {
564
+ background-color: rgba(0, 0, 0, 0) !important;
565
+ }
566
+ </style>
@@ -0,0 +1,15 @@
1
+
2
+ ### 1) moneyFormat
3
+
4
+ | 参数 | 描述 | 类型 | 默认值 |
5
+ | ----------- | -------------- | ------------- | ------ |
6
+ | val | 要转换的数字 | number,string | 0 |
7
+ | isThousands | 是否需要千分位 | boolean | true |
8
+ | roundDTo | 四舍五入位数 | number | 2 |
9
+ | config | 配置项 | ConfigType | {} |
10
+
11
+ ### 2) ConfigType
12
+ | 参数 | 描述 | 类型 | 默认值 |
13
+ | ----------- | ------------ | ------ | ------ |
14
+ | moneySymbol | 补的金钱符号 | string | - |
15
+ | repairZero | 末尾补几位零 | number | - |