ylwl-cpscoms 1.0.0 → 1.2.0

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 (48) hide show
  1. package/es/DtTable/index.vue.js +379 -0
  2. package/es/DtTable/index.vue2.js +719 -0
  3. package/es/DtTable/index.vue3.js +6 -0
  4. package/es/SlAlert/index.vue.js +1 -1
  5. package/es/SlAlert/index.vue3.js +1 -1
  6. package/es/SlForm/index.vue.js +1 -1
  7. package/es/SlForm/index.vue3.js +1 -1
  8. package/es/SlPage/index.vue.js +2 -2
  9. package/es/SlPage/index.vue3.js +1 -1
  10. package/es/index.js +3 -1
  11. package/package.json +2 -3
  12. package/src/SlAlert/SlAlert.stories.js +0 -108
  13. package/src/SlAlert/index.vue +0 -54
  14. package/src/SlAlert/remark.md +0 -16
  15. package/src/SlDescriptions/SlDescriptions.stories.js +0 -119
  16. package/src/SlDescriptions/index.vue +0 -60
  17. package/src/SlDescriptions/renderOptions.vue +0 -27
  18. package/src/SlDialog/README-PLUS.md +0 -74
  19. package/src/SlDialog/README.md +0 -114
  20. package/src/SlDialog/dialogPlus.js +0 -160
  21. package/src/SlDialog/index.js +0 -170
  22. package/src/SlDrawer/SlDrawer.stories.js +0 -154
  23. package/src/SlDrawer/index.js +0 -62
  24. package/src/SlForm/SlForm.stories.js +0 -120
  25. package/src/SlForm/index.css +0 -141
  26. package/src/SlForm/index.vue +0 -365
  27. package/src/SlForm/mixinRender.js +0 -228
  28. package/src/SlForm/otherItem/titleItem.vue +0 -31
  29. package/src/SlForm/remark.md +0 -607
  30. package/src/SlGuide/SlGuide.stories.js +0 -100
  31. package/src/SlGuide/index.vue +0 -166
  32. package/src/SlGuide/remark.md +0 -90
  33. package/src/SlMessageBox/index.js +0 -35
  34. package/src/SlPage/README.md +0 -515
  35. package/src/SlPage/SlPage.stories.js +0 -125
  36. package/src/SlPage/index.css +0 -38
  37. package/src/SlPage/index.vue +0 -266
  38. package/src/SlPage/remark.md +0 -283
  39. package/src/SlTable/SlTable.stories.js +0 -118
  40. package/src/SlTable/components/colSetting.vue +0 -86
  41. package/src/SlTable/index.vue +0 -541
  42. package/src/SlTitle/SlTitle.stories.js +0 -98
  43. package/src/SlTitle/index.vue +0 -49
  44. package/src/global.css +0 -5
  45. package/src/index.js +0 -47
  46. package/src/store/index.js +0 -20
  47. package/src/utils/index.js +0 -47
  48. package/src/utils/tableConfig.js +0 -33
@@ -1,166 +0,0 @@
1
- <template>
2
- <div></div>
3
- </template>
4
-
5
- <script>
6
- // 运行时动态加载 shepherd.js
7
- // 使用 webpackIgnore 注释避免消费项目的 webpack 在构建时解析此可选依赖
8
- let Shepherd = null
9
-
10
- async function loadShepherd() {
11
- try {
12
- const shepherdModule = await import(/* webpackIgnore: true */ 'shepherd.js')
13
- Shepherd = shepherdModule.default || shepherdModule
14
- await import(/* webpackIgnore: true */ 'shepherd.js/dist/css/shepherd.css')
15
- return true
16
- } catch (e) {
17
- console.warn('[SlGuide] shepherd.js 未安装,引导功能不可用。请执行 npm install shepherd.js 安装依赖。')
18
- return false
19
- }
20
- }
21
-
22
- export default {
23
- name: 'Guide',
24
- props: {
25
- steps: {
26
- type: Array,
27
- required: true
28
- },
29
- options: {
30
- type: Object,
31
- default: () => ({})
32
- },
33
- onNext: {
34
- type: Function,
35
- default: () => {}
36
- }
37
- },
38
- async mounted() {
39
- // 仅在 shepherd.js 已安装时初始化引导
40
- const loaded = await loadShepherd()
41
- if (loaded) {
42
- this.initTour()
43
- }
44
- },
45
- methods: {
46
- initTour() {
47
- const tour = new Shepherd.Tour({
48
- ...this.options,
49
- defaultStepOptions: {
50
- classes: 'shadow-md bg-purple-dark text-light shepherd-has-title',
51
- scrollTo: true,
52
- cancelIcon: {
53
- enabled: false
54
- },
55
- highlightClass: 'highlight-custom-class'
56
- },
57
- exitOnEsc: true,
58
- keyboardNavigation: true,
59
- showCancelLink: false,
60
- useModalOverlay: true
61
- })
62
-
63
- this.steps.forEach((step, index) => {
64
- const customButtons = step.buttons.map(button => ({
65
- ...button,
66
- action: () => {
67
- if (button.actionType === 'next') {
68
- button.action && button.action(tour)
69
-
70
- tour.next()
71
- } else {
72
- button.action(tour)
73
- }
74
- return false
75
- }
76
- }))
77
-
78
- tour.addStep({
79
- ...step,
80
- buttons: customButtons,
81
- beforeShowPromise: () => {
82
- return new Promise(resolve => {
83
- if (step.attachTo && step.attachTo.element) {
84
- const el = document.querySelector(step.attachTo.element)
85
- if (el) {
86
- el.style.pointerEvents = 'none'
87
- el.classList.add('disabled-by-shepherd')
88
- }
89
- }
90
- resolve()
91
- })
92
- },
93
- showOn: () => {
94
- const el = document.querySelector(step.attachTo.element || '')
95
- return Boolean(el)
96
- }
97
- })
98
- })
99
-
100
- tour.start()
101
- }
102
- }
103
- }
104
- </script>
105
- <style lang="css">
106
- .shepherd-element {
107
- background-color: #158dff;
108
- }
109
- .shepherd-element[data-popper-placement=bottom] {
110
- margin-top: 60px !important;
111
- }
112
- .shepherd-element[data-popper-placement=bottom] .shepherd-arrow {
113
- width: 60px;
114
- height: 60px;
115
- /* background: url("~@/assets/images/u11370.svg") center no-repeat; */
116
- left: -60px;
117
- top: -61px;
118
- }
119
- .shepherd-element[data-popper-placement=bottom] .shepherd-arrow::before {
120
- display: none;
121
- }
122
- .shepherd-element .shepherd-header {
123
- height: 40px;
124
- line-height: 40px;
125
- background-color: #158dff;
126
- }
127
- .shepherd-element .shepherd-header .shepherd-title {
128
- font-size: 16px;
129
- font-weight: bold;
130
- color: #fff;
131
- }
132
- .shepherd-element .shepherd-text {
133
- font-size: 14px;
134
- padding: 1em;
135
- line-height: 1.6;
136
- color: #fff;
137
- }
138
- .shepherd-element .shepherd-footer {
139
- padding: 0 1em 1em;
140
- color: #fff;
141
- }
142
- .shepherd-element .shepherd-footer .shepherd-button {
143
- height: 32px;
144
- padding: 0 1.5rem;
145
- line-height: 32px;
146
- background-color: #fff;
147
- color: #158dff;
148
- font-size: 14px;
149
- }
150
- .shepherd-element .shepherd-button-quit {
151
- background: none !important;
152
- color: rgb(201, 202, 202) !important;
153
- }
154
- .shepherd-element .disabled-by-shepherd {
155
- pointer-events: none;
156
- opacity: 0.6;
157
- cursor: not-allowed;
158
- }
159
- </style>
160
- <style scoped lang="css">
161
- @charset "UTF-8";
162
- /* 自定义高亮样式 */
163
- .highlight-custom-class {
164
- background-color: rgba(0, 0, 0, 0.1);
165
- }
166
- </style>
@@ -1,90 +0,0 @@
1
- <template>
2
-
3
- <div>
4
- <el-button id="aaaa" size="small" type="primary" @click="vvvv = true">vvvv</el-button>
5
- <button class="yourButtonClass" id="firstButton">第一个按钮</button>
6
- <button class="yourButtonClass" id="secondButton">第二个按钮</button>
7
-
8
- <Guidess v-if="vvvv" :steps="steps" :options="options" @onNext="handleNext" />
9
- </div>
10
-
11
-
12
- </template>
13
- <script>
14
- import Guidess from '@/components/global/SlGuide'
15
- export default {
16
- components: {
17
- SlPage,
18
- SlTable,
19
- SlMessage,
20
- Guide,
21
- Guidess
22
- },
23
- data() {
24
- return {
25
- vvvv: false,
26
- currentStepIndex: 0,
27
- steps: [
28
- {
29
- id: 'first-step',
30
- text: '这是引导的第一步!',
31
- attachTo: { element: '.yourButtonClass#firstButton', on: 'bottom' }, // 使用类名和ID
32
- buttons: [
33
- {
34
- text: '上一步',
35
- action: (tour) => tour.back(),
36
- classes: 'shepherd-button-secondary'
37
- },
38
- {
39
- text: '下一步',
40
- actionType: 'next', // 标记为下一步
41
- classes: 'shepherd-button-primary'
42
- }
43
- ]
44
- },
45
- {
46
- id: 'second-step',
47
- text: '这是引导的第二步!',
48
- attachTo: { element: '.yourButtonClass#secondButton', on: 'bottom' }, // 使用类名和ID
49
- buttons: [
50
- {
51
- text: '上一步',
52
- action: (tour) => tour.back(),
53
- classes: 'shepherd-button-secondary'
54
- },
55
- {
56
- text: '完成',
57
- actionType: 'next', // 标记为下一步
58
- classes: 'shepherd-button-primary'
59
- }
60
- ]
61
- }
62
- ],
63
- options: {
64
- defaultStepOptions: {
65
- classes: 'shepherd-theme-arrows',
66
- scrollTo: true
67
- }
68
- }
69
- }
70
- },
71
- }
72
- </script>
73
-
74
- <!-- const targetColumnIndex = 1 // “姓名”列的索引
75
- // 找到目标单元格元素
76
- const targetCell = document.querySelector(`.el-table__body tr:nth-child(${1 + 1}) .el-table__cell:nth-child(${targetColumnIndex + 1})`)
77
- const tour = new Shepherd.Tour({
78
- defaultStepOptions: {
79
- classes: 'shadow-md bg-purple-dark text-light',
80
- scrollTo: true,
81
- cancelIcon: {
82
- enabled: true
83
- },
84
- highlightClass: 'highlight-custom-class'
85
- },
86
- exitOnEsc: true,
87
- keyboardNavigation: true,
88
- showCancelLink: false,
89
- useModalOverlay: true
90
- }) -->
@@ -1,35 +0,0 @@
1
-
2
- import { MessageBox, Message } from 'element-ui'
3
-
4
- export function showConfirmMessageBox(options) {
5
- const defaultOptions = {
6
- title: '提示',
7
- confirmButtonText: '确定',
8
- cancelButtonText: '取消',
9
- type: 'warning',
10
- successMessage: '操作成功'
11
- }
12
-
13
- const mergedOptions = { ...defaultOptions, ...options }
14
-
15
- MessageBox.confirm(mergedOptions.message, mergedOptions.title, {
16
- confirmButtonText: mergedOptions.confirmButtonText,
17
- cancelButtonText: mergedOptions.cancelButtonText,
18
- type: mergedOptions.type
19
- }).then(async() => {
20
- if (typeof mergedOptions.api === 'function') {
21
- await mergedOptions.api(mergedOptions.params)
22
- }
23
- if (typeof mergedOptions.onConfirm === 'function') {
24
- mergedOptions.onConfirm()
25
- }
26
- Message({
27
- type: 'success',
28
- message: mergedOptions.successMessage
29
- })
30
- }).catch(() => {
31
- if (typeof mergedOptions.onCancel === 'function') {
32
- mergedOptions.onCancel()
33
- }
34
- })
35
- }