create-uni-app-tailwindcss 0.1.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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -0
  3. package/dist/cli.js +150 -0
  4. package/dist/templates/default/.eslintrc-auto-import.json +115 -0
  5. package/dist/templates/default/README.md +140 -0
  6. package/dist/templates/default/_npmrc +8 -0
  7. package/dist/templates/default/eslint.config.mjs +27 -0
  8. package/dist/templates/default/index.html +24 -0
  9. package/dist/templates/default/package.json +105 -0
  10. package/dist/templates/default/scripts/app-css-smoke.mjs +69 -0
  11. package/dist/templates/default/scripts/hmr-smoke.mjs +252 -0
  12. package/dist/templates/default/src/App.vue +11 -0
  13. package/dist/templates/default/src/auto-imports.d.ts +109 -0
  14. package/dist/templates/default/src/components/WeappTailwindcss.vue +51 -0
  15. package/dist/templates/default/src/components/sections/CapabilityShowcase.vue +59 -0
  16. package/dist/templates/default/src/components/sections/ExperienceLab.vue +321 -0
  17. package/dist/templates/default/src/components/sections/GradientFeature.vue +128 -0
  18. package/dist/templates/default/src/components/sections/HeroShowcase.vue +14 -0
  19. package/dist/templates/default/src/components/sections/IconGallery.vue +58 -0
  20. package/dist/templates/default/src/components/sections/MacroShowcase.vue +156 -0
  21. package/dist/templates/default/src/env.d.ts +8 -0
  22. package/dist/templates/default/src/main.ts +13 -0
  23. package/dist/templates/default/src/manifest.json +56 -0
  24. package/dist/templates/default/src/pages/index/index.vue +49 -0
  25. package/dist/templates/default/src/pages.json +16 -0
  26. package/dist/templates/default/src/static/.gitkeep +0 -0
  27. package/dist/templates/default/src/static/images/weapp-tailwindcss.png +0 -0
  28. package/dist/templates/default/src/stores/counter.ts +11 -0
  29. package/dist/templates/default/src/tailwind.css +62 -0
  30. package/dist/templates/default/src/theme.json +10 -0
  31. package/dist/templates/default/src/uni.scss +0 -0
  32. package/dist/templates/default/stylelint.config.mjs +3 -0
  33. package/dist/templates/default/tsconfig.json +33 -0
  34. package/dist/templates/default/vite.config.ts +37 -0
  35. package/dist/templates/registry.json +25 -0
  36. package/package.json +53 -0
@@ -0,0 +1,69 @@
1
+ import { readFile } from 'node:fs/promises'
2
+ import postcss from 'postcss'
3
+
4
+ const appCssUrl = new URL('../dist/build/app/app.css', import.meta.url)
5
+ const manifestUrl = new URL('../dist/build/app/manifest.json', import.meta.url)
6
+
7
+ const css = await readFile(appCssUrl, 'utf8')
8
+ const manifest = JSON.parse(await readFile(manifestUrl, 'utf8'))
9
+ const root = postcss.parse(css)
10
+
11
+ function assert(condition, message) {
12
+ if (!condition) {
13
+ throw new Error(message)
14
+ }
15
+ }
16
+
17
+ function findRule(selectorFragment) {
18
+ let match
19
+ root.walkRules((rule) => {
20
+ if (!match && rule.selector.includes(selectorFragment)) {
21
+ match = rule
22
+ }
23
+ })
24
+ assert(match, `Missing App CSS rule containing ${selectorFragment}`)
25
+ return match
26
+ }
27
+
28
+ function declarationValues(rule) {
29
+ const values = new Map()
30
+ rule.walkDecls((declaration) => {
31
+ const existing = values.get(declaration.prop) ?? []
32
+ existing.push(declaration.value)
33
+ values.set(declaration.prop, existing)
34
+ })
35
+ return values
36
+ }
37
+
38
+ let hasSpacingTheme = false
39
+ root.walkDecls('--spacing', (declaration) => {
40
+ hasSpacingTheme ||= declaration.value === '0.25rem'
41
+ })
42
+ assert(hasSpacingTheme, 'Missing Tailwind --spacing theme variable')
43
+
44
+ const paddingValues = declarationValues(findRule('.p-5'))
45
+ assert(
46
+ paddingValues.get('padding')?.includes('calc(var(--spacing) * 5)'),
47
+ 'p-5 must preserve its runtime --spacing calculation',
48
+ )
49
+
50
+ const spaceYValues = declarationValues(findRule('.space-y-5'))
51
+ assert(spaceYValues.get('--tw-space-y-reverse')?.includes('0'), 'space-y-5 must initialize its reverse variable')
52
+ assert(
53
+ spaceYValues.get('margin-block-start')?.includes('calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse))'),
54
+ 'space-y-5 must preserve its start-margin reverse formula',
55
+ )
56
+ assert(
57
+ spaceYValues.get('margin-block-end')?.includes('calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))'),
58
+ 'space-y-5 must preserve its end-margin reverse formula',
59
+ )
60
+
61
+ const clipValues = declarationValues(findRule('.bg-clip-text'))
62
+ assert(clipValues.get('-webkit-background-clip')?.includes('text'), 'bg-clip-text must include the WebKit fallback')
63
+ assert(clipValues.get('background-clip')?.includes('text'), 'bg-clip-text must retain the standard declaration')
64
+
65
+ for (const platform of ['android', 'iPhone', 'iPad']) {
66
+ assert(manifest['@platforms']?.includes(platform), `App manifest must include ${platform}`)
67
+ }
68
+
69
+ console.log('App CSS compatibility smoke test passed')
@@ -0,0 +1,252 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from 'node:child_process'
4
+ import { existsSync, promises as fs } from 'node:fs'
5
+ import path from 'node:path'
6
+ import process from 'node:process'
7
+
8
+ const cwd = process.cwd()
9
+ const args = parseArgs(process.argv.slice(2))
10
+ const platform = args.platform
11
+ const devScript = args.script ?? `dev:${platform}`
12
+ const timeoutMs = Number(args.timeout ?? 180_000)
13
+ const pollMs = Number(args.poll ?? 700)
14
+
15
+ const targetVueFile = path.join(cwd, 'src', 'components', 'WeappTailwindcss.vue')
16
+ const initialContent = 'before:content-[\'现在,让我们开始神奇的_tailwindcss_开发之旅吧!\']'
17
+ const updatedContent = 'before:content-[\'现在,让我们继续神奇的_tailwindcss_HMR_回归之旅吧!\']'
18
+ const initialCssContent = '现在,让我们开始神奇的 tailwindcss 开发之旅吧!'
19
+ const updatedCssContent = '现在,让我们继续神奇的 tailwindcss HMR 回归之旅吧!'
20
+ const iconNeedles = ['github-circle', 'mdi--star']
21
+ const styleExtensions = new Set(['.css', '.wxss', '.acss', '.ttss', '.qss'])
22
+
23
+ let devProcess
24
+ let originalTargetContent
25
+
26
+ main().catch((error) => {
27
+ console.error(`\n[hmr-smoke] FAILED: ${error instanceof Error ? error.message : String(error)}`)
28
+ process.exitCode = 1
29
+ }).finally(async () => {
30
+ await restoreTargetFile()
31
+ await stopDevProcess()
32
+ })
33
+
34
+ async function main() {
35
+ if (!platform) {
36
+ throw new Error('Missing required argument: --platform <platform>')
37
+ }
38
+
39
+ originalTargetContent = await fs.readFile(targetVueFile, 'utf8')
40
+ if (!originalTargetContent.includes(initialContent)) {
41
+ throw new Error(`Cannot find Iconify content HMR fixture in ${path.relative(cwd, targetVueFile)}`)
42
+ }
43
+
44
+ console.log(`[hmr-smoke] platform=${platform}`)
45
+ console.log(`[hmr-smoke] script=${devScript}`)
46
+
47
+ const outputDir = path.join(cwd, 'dist', 'dev', platform)
48
+ await fs.rm(outputDir, { recursive: true, force: true })
49
+ devProcess = runDevScript(devScript)
50
+
51
+ const initialSnapshot = await waitForCssSnapshot(outputDir, cssIncludesInitialFixture, 'initial Iconify CSS')
52
+ console.log(`[hmr-smoke] initial css files=${initialSnapshot.files.length}`)
53
+
54
+ const beforeMtime = await getLatestMtimeMs(outputDir)
55
+ await fs.writeFile(targetVueFile, originalTargetContent.replace(initialContent, updatedContent), 'utf8')
56
+ console.log(`[hmr-smoke] updated ${path.relative(cwd, targetVueFile)} content fixture`)
57
+
58
+ await waitForDirMtimeBump(outputDir, beforeMtime)
59
+ const updatedSnapshot = await waitForCssSnapshot(outputDir, cssIncludesUpdatedFixture, 'updated Iconify CSS')
60
+ console.log(`[hmr-smoke] updated css files=${updatedSnapshot.files.length}`)
61
+ console.log('[hmr-smoke] PASS')
62
+ }
63
+
64
+ function runDevScript(scriptName) {
65
+ const pnpmCommand = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'
66
+ const child = spawn(pnpmCommand, ['run', scriptName], {
67
+ cwd,
68
+ detached: process.platform !== 'win32',
69
+ stdio: ['ignore', 'pipe', 'pipe'],
70
+ env: {
71
+ ...process.env,
72
+ FORCE_COLOR: '0',
73
+ },
74
+ })
75
+
76
+ child.stdout.on('data', (chunk) => {
77
+ process.stdout.write(`[dev:${platform}] ${chunk}`)
78
+ })
79
+ child.stderr.on('data', (chunk) => {
80
+ process.stderr.write(`[dev:${platform}:err] ${chunk}`)
81
+ })
82
+ child.on('exit', (code, signal) => {
83
+ if (code !== null) {
84
+ console.log(`[hmr-smoke] dev exited with code=${code}`)
85
+ }
86
+ if (signal) {
87
+ console.log(`[hmr-smoke] dev terminated by signal=${signal}`)
88
+ }
89
+ })
90
+
91
+ return child
92
+ }
93
+
94
+ async function waitForCssSnapshot(dir, predicate, phase) {
95
+ const startedAt = Date.now()
96
+ let lastSnapshot = { files: [], css: '' }
97
+
98
+ while (Date.now() - startedAt < timeoutMs) {
99
+ lastSnapshot = await readCssSnapshot(dir)
100
+ if (lastSnapshot.files.length > 0 && predicate(lastSnapshot.css)) {
101
+ console.log(`[hmr-smoke] ${phase}: expected Iconify/content markers found`)
102
+ return lastSnapshot
103
+ }
104
+ await sleep(pollMs)
105
+ }
106
+
107
+ throw new Error(
108
+ `${phase}: timed out under ${path.relative(cwd, dir)}; files=${lastSnapshot.files.join(', ')}; cssTail=${lastSnapshot.css.slice(-1000)}`,
109
+ )
110
+ }
111
+
112
+ async function readCssSnapshot(dir) {
113
+ if (!existsSync(dir)) {
114
+ return { files: [], css: '' }
115
+ }
116
+
117
+ const files = []
118
+ const stack = [dir]
119
+
120
+ while (stack.length > 0) {
121
+ const current = stack.pop()
122
+ const entries = await fs.readdir(current, { withFileTypes: true })
123
+ for (const entry of entries) {
124
+ const fullPath = path.join(current, entry.name)
125
+ if (entry.isDirectory()) {
126
+ stack.push(fullPath)
127
+ continue
128
+ }
129
+ if (styleExtensions.has(path.extname(entry.name))) {
130
+ files.push(fullPath)
131
+ }
132
+ }
133
+ }
134
+
135
+ const cssParts = await Promise.all(files.sort().map(async file => await fs.readFile(file, 'utf8')))
136
+ return {
137
+ files: files.map(file => path.relative(cwd, file)),
138
+ css: cssParts.join('\n'),
139
+ }
140
+ }
141
+
142
+ function cssIncludesInitialFixture(css) {
143
+ return cssIncludesIcons(css) && css.includes(initialCssContent)
144
+ }
145
+
146
+ function cssIncludesUpdatedFixture(css) {
147
+ return cssIncludesIcons(css) && css.includes(updatedCssContent)
148
+ }
149
+
150
+ function cssIncludesIcons(css) {
151
+ return iconNeedles.every(needle => css.includes(needle))
152
+ }
153
+
154
+ async function waitForDirMtimeBump(dir, beforeMtime) {
155
+ const startedAt = Date.now()
156
+ while (Date.now() - startedAt < timeoutMs) {
157
+ const currentMtime = await getLatestMtimeMs(dir)
158
+ if (currentMtime > beforeMtime) {
159
+ console.log('[hmr-smoke] platform artifacts updated')
160
+ return
161
+ }
162
+ await sleep(Math.min(pollMs, 500))
163
+ }
164
+ throw new Error(`Timed out waiting for incremental rebuild under ${path.relative(cwd, dir)}`)
165
+ }
166
+
167
+ async function getLatestMtimeMs(dir) {
168
+ if (!existsSync(dir)) {
169
+ return 0
170
+ }
171
+
172
+ let latest = 0
173
+ const stack = [dir]
174
+ while (stack.length > 0) {
175
+ const current = stack.pop()
176
+ const entries = await fs.readdir(current, { withFileTypes: true })
177
+ for (const entry of entries) {
178
+ const fullPath = path.join(current, entry.name)
179
+ if (entry.isDirectory()) {
180
+ stack.push(fullPath)
181
+ continue
182
+ }
183
+ const stat = await fs.stat(fullPath)
184
+ latest = Math.max(latest, stat.mtimeMs)
185
+ }
186
+ }
187
+ return latest
188
+ }
189
+
190
+ async function restoreTargetFile() {
191
+ if (!originalTargetContent) {
192
+ return
193
+ }
194
+ await fs.writeFile(targetVueFile, originalTargetContent, 'utf8')
195
+ }
196
+
197
+ async function stopDevProcess() {
198
+ if (!devProcess || devProcess.exitCode !== null) {
199
+ return
200
+ }
201
+
202
+ if (process.platform !== 'win32' && devProcess.pid) {
203
+ try {
204
+ process.kill(-devProcess.pid, 'SIGTERM')
205
+ }
206
+ catch {
207
+ devProcess.kill('SIGTERM')
208
+ }
209
+ }
210
+ else {
211
+ devProcess.kill('SIGTERM')
212
+ }
213
+
214
+ await waitForExit(devProcess, 8_000)
215
+ if (devProcess.exitCode === null && devProcess.pid) {
216
+ devProcess.kill('SIGKILL')
217
+ await waitForExit(devProcess, 3_000)
218
+ }
219
+ }
220
+
221
+ function waitForExit(child, timeout) {
222
+ return new Promise((resolve) => {
223
+ const timer = setTimeout(resolve, timeout)
224
+ child.once('exit', () => {
225
+ clearTimeout(timer)
226
+ resolve()
227
+ })
228
+ })
229
+ }
230
+
231
+ function parseArgs(rawArgs) {
232
+ const parsed = {}
233
+ for (let index = 0; index < rawArgs.length; index += 1) {
234
+ const arg = rawArgs[index]
235
+ if (!arg.startsWith('--') || arg === '--') {
236
+ continue
237
+ }
238
+ const key = arg.slice(2)
239
+ const value = rawArgs[index + 1]
240
+ if (!value || value.startsWith('--')) {
241
+ parsed[key] = true
242
+ continue
243
+ }
244
+ parsed[key] = value
245
+ index += 1
246
+ }
247
+ return parsed
248
+ }
249
+
250
+ function sleep(ms) {
251
+ return new Promise(resolve => setTimeout(resolve, ms))
252
+ }
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ onLaunch(() => {
3
+ console.log('App Launch')
4
+ })
5
+ onShow(() => {
6
+ console.log('App Show')
7
+ })
8
+ onHide(() => {
9
+ console.log('App Hide')
10
+ })
11
+ </script>
@@ -0,0 +1,109 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // noinspection JSUnusedGlobalSymbols
5
+ // Generated by unplugin-auto-import
6
+ // biome-ignore lint: disable
7
+ export {}
8
+ declare global {
9
+ const EffectScope: typeof import('vue').EffectScope
10
+ const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
11
+ const computed: typeof import('vue').computed
12
+ const createApp: typeof import('vue').createApp
13
+ const createPinia: typeof import('pinia').createPinia
14
+ const customRef: typeof import('vue').customRef
15
+ const defineAsyncComponent: typeof import('vue').defineAsyncComponent
16
+ const defineComponent: typeof import('vue').defineComponent
17
+ const defineStore: typeof import('pinia').defineStore
18
+ const effectScope: typeof import('vue').effectScope
19
+ const getActivePinia: typeof import('pinia').getActivePinia
20
+ const getCurrentInstance: typeof import('vue').getCurrentInstance
21
+ const getCurrentScope: typeof import('vue').getCurrentScope
22
+ const getCurrentWatcher: typeof import('vue').getCurrentWatcher
23
+ const h: typeof import('vue').h
24
+ const inject: typeof import('vue').inject
25
+ const isProxy: typeof import('vue').isProxy
26
+ const isReactive: typeof import('vue').isReactive
27
+ const isReadonly: typeof import('vue').isReadonly
28
+ const isRef: typeof import('vue').isRef
29
+ const isShallow: typeof import('vue').isShallow
30
+ const mapActions: typeof import('pinia').mapActions
31
+ const mapGetters: typeof import('pinia').mapGetters
32
+ const mapState: typeof import('pinia').mapState
33
+ const mapStores: typeof import('pinia').mapStores
34
+ const mapWritableState: typeof import('pinia').mapWritableState
35
+ const markRaw: typeof import('vue').markRaw
36
+ const nextTick: typeof import('vue').nextTick
37
+ const onActivated: typeof import('vue').onActivated
38
+ const onAddToFavorites: typeof import('@dcloudio/uni-app').onAddToFavorites
39
+ const onBackPress: typeof import('@dcloudio/uni-app').onBackPress
40
+ const onBeforeMount: typeof import('vue').onBeforeMount
41
+ const onBeforeUnmount: typeof import('vue').onBeforeUnmount
42
+ const onBeforeUpdate: typeof import('vue').onBeforeUpdate
43
+ const onDeactivated: typeof import('vue').onDeactivated
44
+ const onError: typeof import('@dcloudio/uni-app').onError
45
+ const onErrorCaptured: typeof import('vue').onErrorCaptured
46
+ const onHide: typeof import('@dcloudio/uni-app').onHide
47
+ const onLaunch: typeof import('@dcloudio/uni-app').onLaunch
48
+ const onLoad: typeof import('@dcloudio/uni-app').onLoad
49
+ const onMounted: typeof import('vue').onMounted
50
+ const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app').onNavigationBarButtonTap
51
+ const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputChanged
52
+ const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputClicked
53
+ const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputConfirmed
54
+ const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputFocusChanged
55
+ const onPageNotFound: typeof import('@dcloudio/uni-app').onPageNotFound
56
+ const onPageScroll: typeof import('@dcloudio/uni-app').onPageScroll
57
+ const onPullDownRefresh: typeof import('@dcloudio/uni-app').onPullDownRefresh
58
+ const onReachBottom: typeof import('@dcloudio/uni-app').onReachBottom
59
+ const onReady: typeof import('@dcloudio/uni-app').onReady
60
+ const onRenderTracked: typeof import('vue').onRenderTracked
61
+ const onRenderTriggered: typeof import('vue').onRenderTriggered
62
+ const onResize: typeof import('@dcloudio/uni-app').onResize
63
+ const onScopeDispose: typeof import('vue').onScopeDispose
64
+ const onServerPrefetch: typeof import('vue').onServerPrefetch
65
+ const onShareAppMessage: typeof import('@dcloudio/uni-app').onShareAppMessage
66
+ const onShareTimeline: typeof import('@dcloudio/uni-app').onShareTimeline
67
+ const onShow: typeof import('@dcloudio/uni-app').onShow
68
+ const onTabItemTap: typeof import('@dcloudio/uni-app').onTabItemTap
69
+ const onThemeChange: typeof import('@dcloudio/uni-app').onThemeChange
70
+ const onUnhandledRejection: typeof import('@dcloudio/uni-app').onUnhandledRejection
71
+ const onUnload: typeof import('@dcloudio/uni-app').onUnload
72
+ const onUnmounted: typeof import('vue').onUnmounted
73
+ const onUpdated: typeof import('vue').onUpdated
74
+ const onWatcherCleanup: typeof import('vue').onWatcherCleanup
75
+ const provide: typeof import('vue').provide
76
+ const reactive: typeof import('vue').reactive
77
+ const readonly: typeof import('vue').readonly
78
+ const ref: typeof import('vue').ref
79
+ const resolveComponent: typeof import('vue').resolveComponent
80
+ const setActivePinia: typeof import('pinia').setActivePinia
81
+ const setMapStoreSuffix: typeof import('pinia').setMapStoreSuffix
82
+ const shallowReactive: typeof import('vue').shallowReactive
83
+ const shallowReadonly: typeof import('vue').shallowReadonly
84
+ const shallowRef: typeof import('vue').shallowRef
85
+ const storeToRefs: typeof import('pinia').storeToRefs
86
+ const toRaw: typeof import('vue').toRaw
87
+ const toRef: typeof import('vue').toRef
88
+ const toRefs: typeof import('vue').toRefs
89
+ const toValue: typeof import('vue').toValue
90
+ const triggerRef: typeof import('vue').triggerRef
91
+ const unref: typeof import('vue').unref
92
+ const useAttrs: typeof import('vue').useAttrs
93
+ const useCssModule: typeof import('vue').useCssModule
94
+ const useCssVars: typeof import('vue').useCssVars
95
+ const useId: typeof import('vue').useId
96
+ const useModel: typeof import('vue').useModel
97
+ const useSlots: typeof import('vue').useSlots
98
+ const useTemplateRef: typeof import('vue').useTemplateRef
99
+ const watch: typeof import('vue').watch
100
+ const watchEffect: typeof import('vue').watchEffect
101
+ const watchPostEffect: typeof import('vue').watchPostEffect
102
+ const watchSyncEffect: typeof import('vue').watchSyncEffect
103
+ }
104
+ // for type re-export
105
+ declare global {
106
+ // @ts-ignore
107
+ export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
108
+ import('vue')
109
+ }
@@ -0,0 +1,51 @@
1
+ <script setup>
2
+ function copy(data) {
3
+ uni.setClipboardData({
4
+ data,
5
+ })
6
+ }
7
+ </script>
8
+
9
+ <template>
10
+ <view class="space-y-1.5 px-4 text-center">
11
+ <view class="px-[48px]">
12
+ <image
13
+ class="aspect-[1329/214] h-auto w-full"
14
+ src="/static/images/weapp-tailwindcss.png"
15
+ mode="aspectFit"
16
+ />
17
+ </view>
18
+ <view
19
+ class="flex items-center justify-center text-gray-600/75"
20
+ @click="copy('https://github.com/sonofmagic/weapp-tailwindcss')"
21
+ >
22
+ <view class="i-[mdi--github-circle] mx-2 text-[32px] text-black" />
23
+ <view class="text-[22px]">
24
+ +
25
+ </view>
26
+ <view class="i-[mdi--star] mx-2 text-[32px] text-yellow-400" />
27
+ </view>
28
+ <view
29
+ class="
30
+ bg-linear-to-r from-green-400 to-sky-400 bg-clip-text text-2xl
31
+ font-extrabold text-transparent underline
32
+ "
33
+ @click="copy('https://tw.icebreaker.top/')"
34
+ >
35
+ tw.icebreaker.top
36
+ </view>
37
+ <view class="text-xs text-gray-600/75">
38
+ 你可以在上方的官网上,找到大量的提效解决方案
39
+ </view>
40
+ <view class="text-xs text-gray-600/75">
41
+ 在使用这个模板之前,确保你安装了 Nodejs@22 和 Vscode,然后安装了 eslint 插件,本模板使用 eslint 进行错误校验和格式化
42
+ </view>
43
+ <view
44
+ class="
45
+ mb-2 text-center
46
+ before:text-xs before:text-sky-400
47
+ before:content-['现在,让我们开始神奇的_tailwindcss_开发之旅吧!']
48
+ "
49
+ />
50
+ </view>
51
+ </template>
@@ -0,0 +1,59 @@
1
+ <script setup lang="ts">
2
+ const timelineShots = [
3
+ {
4
+ icon: 'i-[mdi--speedometer]',
5
+ title: '极速原子',
6
+ detail: 'tailwind 原子能力 1:1 传递到小程序。',
7
+ tone: 'border-sky-200/70 bg-sky-50/80 text-sky-700',
8
+ },
9
+ {
10
+ icon: 'i-[mdi--earth]',
11
+ title: '多端统一',
12
+ detail: 'wx / not-wx 用同一套语法拆分不同宿主。',
13
+ tone: 'border-violet-200/70 bg-violet-50/80 text-violet-700',
14
+ },
15
+ {
16
+ icon: 'i-[mdi--toolbox-outline]',
17
+ title: '工程提效',
18
+ detail: 'Pinia、iconify、@layer 定制组件。',
19
+ tone: 'border-emerald-200/70 bg-emerald-50/80 text-emerald-700',
20
+ },
21
+ ]
22
+ </script>
23
+
24
+ <template>
25
+ <view
26
+ class="
27
+ rounded-[32rpx] border border-slate-100/70 bg-white/80 p-5
28
+ shadow-[0_20px_40px_rgba(15,23,42,0.08)] backdrop-blur-xl
29
+ "
30
+ >
31
+ <view class="text-xs uppercase tracking-[6rpx] text-slate-400">
32
+ 能力速览
33
+ </view>
34
+ <view class="text-2xl font-semibold text-slate-800">
35
+ 一份模板,串联更多设计场景
36
+ </view>
37
+ <view
38
+ class="
39
+ mt-4 flex flex-col gap-4
40
+ md:grid md:grid-cols-3
41
+ "
42
+ >
43
+ <view
44
+ v-for="shot in timelineShots"
45
+ :key="shot.title"
46
+ class="rounded-[24rpx] border px-4 py-3 text-sm leading-relaxed"
47
+ :class="shot.tone"
48
+ >
49
+ <view class="flex items-center gap-2 font-semibold">
50
+ <text class="text-[30px]" :class="[shot.icon]" />
51
+ <view>{{ shot.title }}</view>
52
+ </view>
53
+ <view class="mt-2 text-[26rpx] opacity-80">
54
+ {{ shot.detail }}
55
+ </view>
56
+ </view>
57
+ </view>
58
+ </view>
59
+ </template>