lew-ui 1.0.2 → 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.
Files changed (73) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +20 -0
  3. package/README.md +16 -0
  4. package/index.html +18 -0
  5. package/package.json +19 -12
  6. package/{components/base → packages/avatar}/LewAvatar.vue +0 -0
  7. package/packages/avatar/index.ts +9 -0
  8. package/{directives → packages/directives}/index.ts +0 -0
  9. package/{directives → packages/directives}/tooltips.ts +0 -0
  10. package/{hooks → packages/hooks}/index.ts +0 -0
  11. package/{hooks → packages/hooks}/useDOMCreate.ts +0 -0
  12. package/packages/index.ts +17 -0
  13. package/prettier.config.js +38 -0
  14. package/public/favicon.ico +0 -0
  15. package/src/App.vue +251 -0
  16. package/src/assets/logo.png +0 -0
  17. package/src/assets/style/hljs.scss +86 -0
  18. package/src/assets/style/main.scss +87 -0
  19. package/src/assets/style/reset.scss +107 -0
  20. package/src/assets/style/var.scss +90 -0
  21. package/src/components/demo/DemoBox.vue +105 -0
  22. package/src/components/directive/lewTooltips.ts +23 -0
  23. package/{components → src/components}/feedback/LewAlert.vue +0 -0
  24. package/{components → src/components}/feedback/LewMessage.vue +0 -0
  25. package/{components → src/components}/feedback/LewModal.vue +1 -1
  26. package/{components → src/components}/form/LewCheckbox.vue +0 -0
  27. package/{components → src/components}/form/LewCheckboxGroup.vue +1 -1
  28. package/{components/form/FormItem.vue → src/components/form/LewFormItem.vue} +0 -0
  29. package/{components → src/components}/form/LewInput.vue +0 -0
  30. package/{components → src/components}/form/LewRadio.vue +0 -0
  31. package/{components → src/components}/form/LewRadioGroup.vue +1 -1
  32. package/{components → src/components}/form/LewSelect.vue +1 -1
  33. package/{components → src/components}/form/LewSwitch.vue +0 -0
  34. package/{components → src/components}/form/LewTabs.vue +0 -0
  35. package/{components → src/components}/form/LewTextarea.vue +0 -0
  36. package/src/components/general/LewAvatar.vue +107 -0
  37. package/{components/base → src/components/general}/LewBadge.vue +0 -0
  38. package/{components/base → src/components/general}/LewButton.vue +0 -0
  39. package/{components/base → src/components/general}/LewTitle.vue +0 -0
  40. package/src/components/hooks/useDOMCreate.ts +13 -0
  41. package/src/components/index.ts +37 -0
  42. package/src/components/layout/LewSiderbar.vue +98 -0
  43. package/src/env.d.ts +11 -0
  44. package/src/main.ts +22 -0
  45. package/src/router/index.ts +59 -0
  46. package/src/views/demo/feedback/LewAlert.vue +194 -0
  47. package/src/views/demo/feedback/LewDialog.vue +20 -0
  48. package/src/views/demo/feedback/LewMessage.vue +20 -0
  49. package/src/views/demo/feedback/LewModal.vue +127 -0
  50. package/src/views/demo/feedback/LewPopover.vue +20 -0
  51. package/src/views/demo/feedback/LewResult.vue +20 -0
  52. package/src/views/demo/feedback/LewTooltip.vue +164 -0
  53. package/src/views/demo/form/LewCascader.vue +24 -0
  54. package/src/views/demo/form/LewCheckbox.vue +158 -0
  55. package/src/views/demo/form/LewForm.vue +232 -0
  56. package/src/views/demo/form/LewInput.vue +55 -0
  57. package/src/views/demo/form/LewInputTag.vue +25 -0
  58. package/src/views/demo/form/LewRadio.vue +104 -0
  59. package/src/views/demo/form/LewSelect.vue +83 -0
  60. package/src/views/demo/form/LewSwitch.vue +61 -0
  61. package/src/views/demo/form/LewTabs.vue +75 -0
  62. package/src/views/demo/form/LewTextarea.vue +56 -0
  63. package/src/views/demo/general/LewAvatar copy.vue +58 -0
  64. package/src/views/demo/general/LewAvatar.vue +79 -0
  65. package/src/views/demo/general/LewBadge.vue +98 -0
  66. package/src/views/demo/general/LewButton.vue +66 -0
  67. package/src/views/demo/general/LewTitle.vue +47 -0
  68. package/tsconfig.json +18 -0
  69. package/tsconfig.node.json +8 -0
  70. package/vite.config.ts +16 -0
  71. package/vscode.setting.json +26 -0
  72. package/components/index.ts +0 -35
  73. package/index.ts +0 -3
@@ -0,0 +1,59 @@
1
+ import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
2
+ const LewAvatar = () => import('../views/demo/general/LewAvatar.vue');
3
+ const LewBadge = () => import('../views/demo/general/LewBadge.vue');
4
+ const LewButton = () => import('../views/demo/general/LewButton.vue');
5
+
6
+ const LewTitle = () => import('../views/demo/general/LewTitle.vue');
7
+
8
+ const LewCascader = () => import('../views/demo/form/LewCascader.vue');
9
+ const LewCheckbox = () => import('../views/demo/form/LewCheckbox.vue');
10
+ const LewInputTag = () => import('../views/demo/form/LewInputTag.vue');
11
+ const LewRadio = () => import('../views/demo/form/LewRadio.vue');
12
+ const LewSelect = () => import('../views/demo/form/LewSelect.vue');
13
+ const LewSwitch = () => import('../views/demo/form/LewSwitch.vue');
14
+ const LewTextarea = () => import('../views/demo/form/LewTextarea.vue');
15
+ const LewInput = () => import('../views/demo/form/LewInput.vue');
16
+ const LewForm = () => import('../views/demo/form/LewForm.vue');
17
+ const LewTabs = () => import('../views/demo/form/LewTabs.vue');
18
+ const LewAlert = () => import('../views/demo/feedback/LewAlert.vue');
19
+
20
+ const LewDialog = () => import('../views/demo/feedback/LewDialog.vue');
21
+ const LewMessage = () => import('../views/demo/feedback/LewMessage.vue');
22
+ const LewModal = () => import('../views/demo/feedback/LewModal.vue');
23
+ const LewPopover = () => import('../views/demo/feedback/LewPopover.vue');
24
+ const LewResult = () => import('../views/demo/feedback/LewResult.vue');
25
+ const LewTooltip = () => import('../views/demo/feedback/LewTooltip.vue');
26
+
27
+ const routes: Array<RouteRecordRaw> = [
28
+ { path: '/', name: 'Home', component: LewAvatar },
29
+ { path: '/Avatar', name: 'LewAvatar', component: LewAvatar },
30
+ { path: '/Badge', name: 'LewBadge', component: LewBadge },
31
+ { path: '/Title', name: 'LewTitle', component: LewTitle },
32
+ { path: '/Button', name: 'LewButton', component: LewButton },
33
+ { path: '/Tabs', name: 'LewTabs', component: LewTabs },
34
+
35
+ { path: '/Form', name: 'LewForm', component: LewForm },
36
+ { path: '/Cascader', name: 'LewCascader', component: LewCascader },
37
+ { path: '/Checkbox', name: 'LewCheckbox', component: LewCheckbox },
38
+ { path: '/Input', name: 'LewInput', component: LewInput },
39
+ { path: '/Radio', name: 'LewRadio', component: LewRadio },
40
+ { path: '/Select', name: 'LewSelect', component: LewSelect },
41
+ { path: '/Switch', name: 'LewSwitch', component: LewSwitch },
42
+ { path: '/Textarea', name: 'LewTextarea', component: LewTextarea },
43
+ { path: '/InputTag', name: 'LewInputTag', component: LewInputTag },
44
+
45
+ { path: '/Alert', name: 'LewAlert', component: LewAlert },
46
+ { path: '/Result', name: 'LewResult', component: LewResult },
47
+ { path: '/Dialog', name: 'LewDialog', component: LewDialog },
48
+ { path: '/Popover', name: 'LewPopover', component: LewPopover },
49
+ { path: '/Tooltip', name: 'LewTooltip', component: LewTooltip },
50
+
51
+ { path: '/Modal', name: 'LewModal', component: LewModal },
52
+ { path: '/Message', name: 'LewMessage', component: LewMessage },
53
+ ];
54
+ const router = createRouter({
55
+ history: createWebHashHistory(),
56
+ routes,
57
+ });
58
+
59
+ export default router;
@@ -0,0 +1,194 @@
1
+ <script setup lang="ts">
2
+ import DemoBox from '../../../components/demo/DemoBox.vue';
3
+ import { ref } from 'vue';
4
+ import { LewTitle, LewAlert, LewButton } from '../../../components';
5
+
6
+ type Options = {
7
+ type: string;
8
+ title: string;
9
+ content: string;
10
+ };
11
+
12
+ let alertList = ref<Options[]>([]);
13
+
14
+ const addAlert = (e: Options) => {
15
+ alertList.value.unshift(e);
16
+ };
17
+ const close = (e: number) => {
18
+ alertList.value.splice(e, 1);
19
+ };
20
+
21
+ let pre1 = ref(`<script setup lang="ts">
22
+ import { ref } from 'vue';
23
+ import { LewAlert, LewButton } from '../../../components';
24
+
25
+ type Options = {
26
+ type: string;
27
+ title: string;
28
+ content: string;
29
+ };
30
+
31
+ let alertList = ref<Options[]>([]);
32
+
33
+ const addAlert = (e: Options) => {
34
+ alertList.value.unshift(e);
35
+ };
36
+ const close = (e: number) => {
37
+ alertList.value.splice(e, 1);
38
+ };
39
+
40
+ <\/script>
41
+
42
+ <template>
43
+ <LewButton
44
+ type="primary"
45
+ style="margin-right: 10px"
46
+ @click="
47
+ addAlert({
48
+ type: 'primary',
49
+ title: '成功发送一条消息',
50
+ content: '',
51
+ })
52
+ "
53
+ >点我</LewButton
54
+ >
55
+ <LewButton
56
+ type="danger"
57
+ style="margin-right: 10px"
58
+ @click="
59
+ addAlert({
60
+ type: 'danger',
61
+ title: '成功发送一条消息',
62
+ content: '',
63
+ })
64
+ "
65
+ >点我</LewButton
66
+ >
67
+ <LewButton
68
+ type="warning"
69
+ style="margin-right: 10px"
70
+ @click="
71
+ addAlert({
72
+ type: 'warning',
73
+ title: '成功发送一条消息',
74
+ content: '',
75
+ })
76
+ "
77
+ >点我</LewButton
78
+ >
79
+ <LewButton
80
+ type="success"
81
+ style="margin-right: 10px"
82
+ @click="
83
+ addAlert({
84
+ type: 'success',
85
+ title: '成功发送一条消息',
86
+ content: '',
87
+ })
88
+ "
89
+ >点我</LewButton
90
+ >
91
+ <LewButton
92
+ type="normal"
93
+ style="margin-right: 10px"
94
+ @click="
95
+ addAlert({
96
+ type: 'normal',
97
+ title: '成功发送一条消息',
98
+ content: 'Well the Ukraine girls really knock me out
99
+ They leave the West behind
100
+ And Moscow girls make me sing and shout
101
+ That Georgia's always on my mind
102
+ Aw come on!',
103
+ })
104
+ "
105
+ >点我</LewButton
106
+ >
107
+ <div style="margin-top: 20px">
108
+ <LewAlert :alert-list="alertList" @close="close"></LewAlert>
109
+ </div>
110
+ </template>
111
+ `);
112
+ </script>
113
+
114
+ <template>
115
+ <div class="demo-wrapper">
116
+ <lew-title>Alert</lew-title>
117
+ <demo-box title="警报" :code="pre1">
118
+ <LewButton
119
+ type="primary"
120
+ style="margin-right: 10px"
121
+ @click="
122
+ addAlert({
123
+ type: 'primary',
124
+ title: '成功发送一条消息',
125
+ content: '',
126
+ })
127
+ "
128
+ >点我</LewButton
129
+ >
130
+ <LewButton
131
+ type="danger"
132
+ style="margin-right: 10px"
133
+ @click="
134
+ addAlert({
135
+ type: 'danger',
136
+ title: '成功发送一条消息',
137
+ content: '',
138
+ })
139
+ "
140
+ >点我</LewButton
141
+ >
142
+ <LewButton
143
+ type="warning"
144
+ style="margin-right: 10px"
145
+ @click="
146
+ addAlert({
147
+ type: 'warning',
148
+ title: '成功发送一条消息',
149
+ content: '',
150
+ })
151
+ "
152
+ >点我</LewButton
153
+ >
154
+ <LewButton
155
+ type="success"
156
+ style="margin-right: 10px"
157
+ @click="
158
+ addAlert({
159
+ type: 'success',
160
+ title: '成功发送一条消息',
161
+ content: '',
162
+ })
163
+ "
164
+ >点我</LewButton
165
+ >
166
+ <LewButton
167
+ type="normal"
168
+ style="margin-right: 10px"
169
+ @click="
170
+ addAlert({
171
+ type: 'normal',
172
+ title: '成功发送一条消息',
173
+ content:
174
+ 'Well the Ukraine girls really knock me out They leave the West behind And Moscow girls make me sing and shout That Georgia s always on my mind Aw come on!',
175
+ })
176
+ "
177
+ >点我</LewButton
178
+ >
179
+ <div style="margin-top: 20px">
180
+ <LewAlert :alert-list="alertList" @close="close"></LewAlert>
181
+ </div>
182
+ </demo-box>
183
+ </div>
184
+ </template>
185
+
186
+ <style lang="scss" scoped>
187
+ .main {
188
+ width: 100%;
189
+ margin: 0 auto;
190
+ > div {
191
+ margin: 30px 0px;
192
+ }
193
+ }
194
+ </style>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { LewTitle } from '../../../components';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="demo-wrapper">
7
+ <lew-title>Dialog</lew-title>
8
+ <div>开发中···</div>
9
+ </div>
10
+ </template>
11
+
12
+ <style lang="scss" scoped>
13
+ .main {
14
+ width: 100%;
15
+ margin: 0 auto;
16
+ > div {
17
+ margin: 30px 0px;
18
+ }
19
+ }
20
+ </style>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { LewTitle } from '../../../components';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="demo-wrapper">
7
+ <lew-title>Message</lew-title>
8
+ <div>开发中···</div>
9
+ </div>
10
+ </template>
11
+
12
+ <style lang="scss" scoped>
13
+ .main {
14
+ width: 100%;
15
+ margin: 0 auto;
16
+ > div {
17
+ margin: 30px 0px;
18
+ }
19
+ }
20
+ </style>
@@ -0,0 +1,127 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue';
3
+ import {
4
+ LewTitle,
5
+ LewButton,
6
+ LewModal,
7
+ LewInput,
8
+ LewFormItem,
9
+ } from '../../../components';
10
+ import DemoBox from '../../../components/demo/DemoBox.vue';
11
+
12
+ const modalVisible = ref(false);
13
+
14
+ let pre1 = ref(`<script setup lang="ts">
15
+ import { ref } from 'vue';
16
+ import {
17
+ LewTitle,
18
+ LewButton,
19
+ LewModal,
20
+ LewInput,
21
+ LewFormItem,
22
+ } from '../../../components';
23
+
24
+ const modalVisible = ref(false);
25
+ <\/script>
26
+
27
+ <template>
28
+ <lew-button @click="modalVisible = true">登录</lew-button>
29
+ <lew-modal
30
+ :visible="modalVisible"
31
+ @mask-click="modalVisible = false"
32
+ width="350px"
33
+ >
34
+ <div class="modal-body">
35
+ <lew-title :bold="700" style="margin-bottom: 20px"
36
+ >登录你的账户</lew-title
37
+ >
38
+ <lew-form-item direction="y" title="账号">
39
+ <lew-input
40
+ /></lew-form-item>
41
+ <lew-form-item
42
+ style="margin-bottom: 30px"
43
+ direction="y"
44
+ title="密码"
45
+ >
46
+ <lew-input
47
+ /></lew-form-item>
48
+
49
+ <div>
50
+ <lew-button
51
+ type="normal"
52
+ style="margin-right: 20px"
53
+ @click="modalVisible = false"
54
+ >关闭</lew-button
55
+ >
56
+ <lew-button @click="modalVisible = false">立即登录</lew-button>
57
+ </div>
58
+ </div>
59
+ </lew-modal>
60
+ </template>
61
+
62
+ <style lang="scss" scoped>
63
+ .modal-body {
64
+ width: 100%;
65
+ height: 100%;
66
+ display: flex;
67
+ flex-direction: column;
68
+ padding: 40px;
69
+ box-sizing: border-box;
70
+ }
71
+ </style>
72
+ `);
73
+ </script>
74
+
75
+ <template>
76
+ <div class="demo-wrapper">
77
+ <lew-title>Modal</lew-title>
78
+
79
+ <demo-box title="模态框" :code="pre1">
80
+ <lew-button @click="modalVisible = true">登录</lew-button>
81
+ <lew-modal
82
+ :visible="modalVisible"
83
+ width="350px"
84
+ @mask-click="modalVisible = false"
85
+ >
86
+ <div class="modal-body">
87
+ <lew-title :bold="700" style="margin-bottom: 20px"
88
+ >登录你的账户</lew-title
89
+ >
90
+ <lew-form-item direction="y" title="账号">
91
+ <lew-input
92
+ /></lew-form-item>
93
+ <lew-form-item
94
+ style="margin-bottom: 30px"
95
+ direction="y"
96
+ title="密码"
97
+ >
98
+ <lew-input
99
+ /></lew-form-item>
100
+
101
+ <div>
102
+ <lew-button
103
+ type="normal"
104
+ style="margin-right: 20px"
105
+ @click="modalVisible = false"
106
+ >关闭</lew-button
107
+ >
108
+ <lew-button @click="modalVisible = false"
109
+ >立即登录</lew-button
110
+ >
111
+ </div>
112
+ </div>
113
+ </lew-modal></demo-box
114
+ >
115
+ </div>
116
+ </template>
117
+
118
+ <style lang="scss" scoped>
119
+ .modal-body {
120
+ width: 100%;
121
+ height: 100%;
122
+ display: flex;
123
+ flex-direction: column;
124
+ padding: 40px;
125
+ box-sizing: border-box;
126
+ }
127
+ </style>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { LewTitle } from '../../../components';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="demo-wrapper">
7
+ <lew-title>Popover</lew-title>
8
+ <div>开发中···</div>
9
+ </div>
10
+ </template>
11
+
12
+ <style lang="scss" scoped>
13
+ .main {
14
+ width: 100%;
15
+ margin: 0 auto;
16
+ > div {
17
+ margin: 30px 0px;
18
+ }
19
+ }
20
+ </style>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { LewTitle } from '../../../components';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="demo-wrapper">
7
+ <lew-title>Result</lew-title>
8
+ <div>开发中···</div>
9
+ </div>
10
+ </template>
11
+
12
+ <style lang="scss" scoped>
13
+ .main {
14
+ width: 100%;
15
+ margin: 0 auto;
16
+ > div {
17
+ margin: 30px 0px;
18
+ }
19
+ }
20
+ </style>
@@ -0,0 +1,164 @@
1
+ <script setup lang="ts">
2
+ import DemoBox from '../../../components/demo/DemoBox.vue';
3
+ import { LewTitle, LewButton } from '../../../components';
4
+ import { ref } from 'vue';
5
+ let pre1 = ref(`<template>
6
+ <LewButton
7
+ v-tooltip="{
8
+ content: '西伯利亚雪橇犬',
9
+ placement: 'top',
10
+ trigger: 'mouseenter',
11
+ }"
12
+ >上方</LewButton
13
+ >
14
+ <LewButton
15
+ v-tooltip="{
16
+ content: '西伯利亚雪橇犬',
17
+ placement: 'bottom',
18
+ trigger: 'mouseenter',
19
+ }"
20
+ >下方</LewButton
21
+ >
22
+ <LewButton
23
+ v-tooltip="{
24
+ content: '西伯利亚雪橇犬',
25
+ placement: 'left',
26
+ trigger: 'mouseenter',
27
+ }"
28
+ >左方</LewButton
29
+ >
30
+ <LewButton
31
+ v-tooltip="{
32
+ content: '西伯利亚雪橇犬',
33
+ placement: 'right',
34
+ trigger: 'mouseenter',
35
+ }"
36
+ >右方</LewButton
37
+ >
38
+ </template>
39
+ `);
40
+
41
+ let pre2 = ref(`<template>
42
+ <LewButton
43
+ v-tooltip="{
44
+ content:
45
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
46
+ placement: 'top',
47
+ trigger: 'click',
48
+ }"
49
+ >上方</LewButton
50
+ >
51
+ <LewButton
52
+ v-tooltip="{
53
+ content:
54
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
55
+ placement: 'bottom',
56
+ trigger: 'click',
57
+ }"
58
+ >下方</LewButton
59
+ >
60
+ <LewButton
61
+ v-tooltip="{
62
+ content:
63
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
64
+ placement: 'left',
65
+ trigger: 'click',
66
+ }"
67
+ >左方</LewButton
68
+ >
69
+ <LewButton
70
+ v-tooltip="{
71
+ content:
72
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
73
+ placement: 'right',
74
+ trigger: 'click',
75
+ }"
76
+ >右方</LewButton
77
+ >
78
+ </template>
79
+ `);
80
+ </script>
81
+
82
+ <template>
83
+ <div class="demo-wrapper">
84
+ <lew-title>Tooltip</lew-title>
85
+ <DemoBox title="悬浮显示" badge="推荐" :code="pre1">
86
+ <LewButton
87
+ v-tooltip="{
88
+ content: '西伯利亚雪橇犬',
89
+ placement: 'top',
90
+ trigger: 'mouseenter',
91
+ }"
92
+ >上方</LewButton
93
+ >
94
+ <LewButton
95
+ v-tooltip="{
96
+ content: '西伯利亚雪橇犬',
97
+ placement: 'bottom',
98
+ trigger: 'mouseenter',
99
+ }"
100
+ >下方</LewButton
101
+ >
102
+ <LewButton
103
+ v-tooltip="{
104
+ content: '西伯利亚雪橇犬',
105
+ placement: 'left',
106
+ trigger: 'mouseenter',
107
+ }"
108
+ >左方</LewButton
109
+ >
110
+ <LewButton
111
+ v-tooltip="{
112
+ content: '西伯利亚雪橇犬',
113
+ placement: 'right',
114
+ trigger: 'mouseenter',
115
+ }"
116
+ >右方</LewButton
117
+ ></DemoBox
118
+ >
119
+ <DemoBox title="点击事件触发" :code="pre2">
120
+ <LewButton
121
+ v-tooltip="{
122
+ content:
123
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
124
+ placement: 'top',
125
+ trigger: 'click',
126
+ }"
127
+ >上方</LewButton
128
+ >
129
+ <LewButton
130
+ v-tooltip="{
131
+ content:
132
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
133
+ placement: 'bottom',
134
+ trigger: 'click',
135
+ }"
136
+ >下方</LewButton
137
+ >
138
+ <LewButton
139
+ v-tooltip="{
140
+ content:
141
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
142
+ placement: 'left',
143
+ trigger: 'click',
144
+ }"
145
+ >左方</LewButton
146
+ >
147
+ <LewButton
148
+ v-tooltip="{
149
+ content:
150
+ '哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。哈士奇一般指西伯利亚雪橇犬。',
151
+ placement: 'right',
152
+ trigger: 'click',
153
+ }"
154
+ >右方</LewButton
155
+ ></DemoBox
156
+ >
157
+ </div>
158
+ </template>
159
+
160
+ <style lang="scss" scoped>
161
+ .lew-button {
162
+ margin-right: 20px;
163
+ }
164
+ </style>
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import { LewTitle, LewBadge } from '../../../components';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="demo-wrapper">
7
+ <lew-title>Cascader</lew-title>
8
+ <div>
9
+ <LewBadge type="primary">Github</LewBadge>
10
+ <LewBadge type="primary">Vue</LewBadge>
11
+ <LewBadge type="primary">Golang</LewBadge>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <style lang="scss" scoped>
17
+ .main {
18
+ width: 100%;
19
+ margin: 0 auto;
20
+ > div {
21
+ margin: 30px 0px;
22
+ }
23
+ }
24
+ </style>