Skip to content

Commit 1b4a523

Browse files
committed
chore: replace package name
1 parent ec28491 commit 1b4a523

File tree

8 files changed

+403
-161
lines changed

8 files changed

+403
-161
lines changed

examples/vite-vue2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"vue": "^2.7.16"
1111
},
1212
"devDependencies": {
13+
"@layui/unplugin-vue-components": "workspace:*",
1314
"@vitejs/plugin-vue2": "^2.3.3",
1415
"cross-env": "^7.0.3",
15-
"unplugin-vue-components": "workspace:*",
1616
"vite": "^6.3.5"
1717
}
1818
}

examples/vite-vue3/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
"preview": "cross-env DEBUG=unplugin-vue-components:* vite preview"
1010
},
1111
"dependencies": {
12+
"@layui/layui-vue": "^2.22.2",
1213
"vant": "^4.9.19"
1314
},
1415
"devDependencies": {
1516
"@iconify/json": "^2.2.341",
17+
"@layui/unplugin-vue-components": "workspace:*",
1618
"@vitejs/plugin-vue": "^5.2.4",
1719
"@vue/compiler-sfc": "^3.5.14",
1820
"cross-env": "^7.0.3",
1921
"has-pkg": "^0.0.1",
2022
"typescript": "^5.8.3",
2123
"unplugin-icons": "^22.1.0",
22-
"unplugin-vue-components": "workspace:*",
2324
"unplugin-vue-markdown": "^28.3.1",
2425
"vite": "^6.3.5",
2526
"vite-plugin-inspect": "^11.1.0",

examples/vite-vue3/src/App.vue

Lines changed: 15 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,20 @@
1-
<script setup lang='ts'>
2-
import { defineAsyncComponent, ref } from 'vue'
3-
4-
const tree = ref({
5-
label: 'Top Level',
6-
children: [
7-
{ label: 'First Level' },
8-
{ label: 'First Level', children: [{ label: 'Second Level' }] },
9-
],
10-
})
11-
12-
const ComponentAsync = defineAsyncComponent(() => import('./components/ComponentAsync.vue'))
13-
14-
const rate = ref(2.5)
15-
const radio = ref('1')
1+
<script setup lang="ts">
2+
const dataList = [
3+
{
4+
label: '姓名',
5+
content: 'layui-vue',
6+
},
7+
]
168
</script>
179

1810
<template>
19-
<div class="block">
20-
<h1>Basic (4)</h1>
21-
<ComponentA msg="a" />
22-
<component-b msg="b" />
23-
<ComponentC msg="c" />
24-
<ComponentD />
25-
<h3>Recursive Components</h3>
26-
<recursive :data="tree" />
27-
</div>
28-
29-
<div class="block">
30-
<h1>Namespaced (4)</h1>
31-
<!-- Index -->
32-
<Book />
33-
<UiButton />
34-
<UiNestedCheckbox />
35-
<!-- Global -->
36-
<Avatar />
37-
</div>
38-
39-
<div class="block">
40-
<h1>Async (2)</h1>
41-
<ComponentAsync />
42-
</div>
43-
44-
<div class="block">
45-
<h1>Markdown (2)</h1>
46-
<MarkdownA />
47-
<MarkdownB />
48-
</div>
49-
50-
<div class="block">
51-
<h1>Custom Resolvers (1)</h1>
52-
<MyCustom />
53-
</div>
54-
55-
<div class="block">
56-
<h1>UI Library (2)</h1>
57-
<van-rate
58-
v-model="rate"
59-
color="#ffd21e"
60-
void-icon="star"
61-
void-color="#eee"
62-
/>
63-
<br>
64-
<br>
65-
<van-radio-group v-model="radio">
66-
<van-radio name="1">
67-
Radio 1
68-
</van-radio>
69-
<br>
70-
<van-radio name="2">
71-
Radio 2
72-
</van-radio>
73-
</van-radio-group>
74-
<br>
75-
</div>
76-
77-
<div class="block">
78-
<h1>Icons (5)</h1>
79-
<i-fa-solid-dice-five />
80-
<i-heroicons-outline-menu-alt-2 />
81-
<i-ri-apps-2-line />
82-
<i-mdi:dice-d12 />
83-
<i-mdi-light-alarm />
11+
<div>
12+
<lay-descriptions title="数据生成" :data-list="dataList" />
13+
<LayInput />
14+
<!-- <lay-descriptions title="数据生成">
15+
<lay-descriptions-item label="姓名">
16+
layui-vue
17+
</lay-descriptions-item>
18+
</lay-descriptions> -->
8419
</div>
8520
</template>
86-
87-
<style scoped>
88-
.block {
89-
padding: 0px 20px 10px 20px;
90-
margin: 20px 20px;
91-
border: 1px solid #888;
92-
border-radius: 5px;
93-
}
94-
</style>

examples/vite-vue3/vite.config.ts

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import type { UserConfig } from 'vite'
22
import path from 'node:path'
3+
import { LayuiVueResolver } from '@layui/unplugin-vue-components/resolvers'
4+
import Components from '@layui/unplugin-vue-components/vite'
35
import Vue from '@vitejs/plugin-vue'
4-
import IconsResolver from 'unplugin-icons/resolver'
56
import Icons from 'unplugin-icons/vite'
6-
import { VantResolver } from 'unplugin-vue-components/resolvers'
7-
import Components from 'unplugin-vue-components/vite'
87
import Markdown from 'unplugin-vue-markdown/vite'
98
import Inspect from 'vite-plugin-inspect'
109

@@ -22,22 +21,7 @@ const config: UserConfig = {
2221
Icons(),
2322
Inspect(),
2423
Components({
25-
extensions: ['vue', 'md', 'svg'],
26-
directoryAsNamespace: true,
27-
dts: true,
28-
globalNamespaces: ['global'],
29-
include: [/\.vue($|\?)/, /\.md($|\?)/],
30-
resolvers: [
31-
(name) => {
32-
if (name === 'MyCustom')
33-
return path.resolve(__dirname, 'src/CustomResolved.vue').replaceAll('\\', '/')
34-
},
35-
VantResolver(),
36-
IconsResolver({
37-
componentPrefix: 'i',
38-
}),
39-
],
40-
dumpComponentsInfo: true,
24+
resolvers: [LayuiVueResolver()],
4125
}),
4226
],
4327
build: {

examples/vue-cli-vue3/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
},
1414
"devDependencies": {
1515
"@babel/core": "^7.27.1",
16+
"@layui/unplugin-vue-components": "workspace:*",
1617
"@vue/cli-plugin-babel": "~5.0.8",
17-
"@vue/cli-service": "~5.0.8",
18-
"unplugin-vue-components": "workspace:*"
18+
"@vue/cli-service": "~5.0.8"
1919
},
2020
"browserslist": [
2121
"> 1%",

examples/vue-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"vue": "^3.5.14"
1313
},
1414
"devDependencies": {
15+
"@layui/unplugin-vue-components": "workspace:*",
1516
"@vue/cli-plugin-babel": "^5.0.8",
1617
"@vue/cli-plugin-typescript": "^5.0.8",
1718
"@vue/cli-service": "^5.0.8",
1819
"typescript": "^5.8.3",
1920
"unplugin-icons": "^22.1.0",
20-
"unplugin-vue-components": "workspace:*",
2121
"unplugin-vue2-script-setup": "^0.11.4"
2222
}
2323
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy