diff --git a/.github/ISSUE_TEMPLATE/bug_report_template.yml b/.github/ISSUE_TEMPLATE/bug_report_template.yml index b10b84a0d7..d7949130ff 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_template.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_template.yml @@ -8,7 +8,7 @@ body: 这个表单仅用于错误报告。对于在使用中遇到的问题,请优先使用以下方式寻找解决方案: - - 查看组件文档 [@nutui/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro) [@nutui/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro) + - 查看组件文档 [@hg/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro) [@hg/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro) - 在 [Issue](https://github.com/jdf2e/nutui/issues) 列表中查找解决方案 - 查看 [常见问题 QA](https://github.com/jdf2e/nutui/issues/2461) @@ -21,8 +21,8 @@ body: multiple: true description: 选择使用的 NutUI NPM 包名 options: - - '@nutui/nutui' - - '@nutui/nutui-taro' + - '@hg/nutui' + - '@hg/nutui-taro' validations: required: true @@ -66,7 +66,7 @@ body: 2、你也可以通过 [CodeSandbox](https://codesandbox.io/s/nutui4-vite-demo-2fw7xh?file=/src/App.vue) 创建一个可复现实例,它支持选择特定版本的 NutUI。 - 3、对于 `@nutui/nutui-taro` 中的问题,建议提供代码仓库。 + 3、对于 `@hg/nutui-taro` 中的问题,建议提供代码仓库。 请不要乱填一个链接,那只会让你的 issue 被直接关闭。 validations: @@ -102,9 +102,9 @@ body: attributes: label: 环境信息 description: | - 对于 `@nutui/nutui-taro`,你可以在项目根目录执行 `taro info`,并将结果粘贴在这里。 + 对于 `@hg/nutui-taro`,你可以在项目根目录执行 `taro info`,并将结果粘贴在这里。 - 对于 `@nutui/nutui`,你可以执行 `npx envinfo --system --npmPackages @nutui/nutui --binaries --browsers`。 + 对于 `@hg/nutui`,你可以执行 `npx envinfo --system --npmPackages @hg/nutui --binaries --browsers`。 - type: textarea id: extra diff --git a/.github/ISSUE_TEMPLATE/feature_request_template.yml b/.github/ISSUE_TEMPLATE/feature_request_template.yml index b1b26db03d..6dff850a6e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_template.yml +++ b/.github/ISSUE_TEMPLATE/feature_request_template.yml @@ -10,7 +10,7 @@ body: 这个表单仅用于新功能请求。如果你有使用上的问题,或者不确定它是否是一个 bug,请先: - - 查看组件文档 [@nutui/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro) [@nutui/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro) + - 查看组件文档 [@hg/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro) [@hg/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro) - 在 [Issue](https://github.com/jdf2e/nutui/issues) 列表中查找解决方案 - 查看 [常见问题 QA](https://github.com/jdf2e/nutui/issues/2461) @@ -21,8 +21,8 @@ body: multiple: true description: 选择使用的 NutUI NPM 包名 options: - - '@nutui/nutui' - - '@nutui/nutui-taro' + - '@hg/nutui' + - '@hg/nutui-taro' validations: required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c92a895231..bd0c809e68 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,8 +25,8 @@ https://github.com/jdf2e/nutui/issues/1671 **这个 PR 涉及以下平台:** -- [ ] NutUI H5 @nutui/nutui -- [ ] NutUI Taro @nutui/nutui-taro +- [ ] NutUI H5 @hg/nutui +- [ ] NutUI Taro @hg/nutui-taro **这个 PR 是否已自测:** diff --git a/.github/workflows/issue-reply.yml b/.github/workflows/issue-reply.yml index 973ad8f293..496f7fd56b 100644 --- a/.github/workflows/issue-reply.yml +++ b/.github/workflows/issue-reply.yml @@ -15,4 +15,4 @@ jobs: actions: 'create-comment' issue-number: ${{ github.event.issue.number }} body: | - 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个最小重现实例以便于我们帮你排查问题。你可以提供一个基于 Taro NutUI4.0 模板项目的 GitHub 仓库链接(`@nutui/nutui-taro`),也可以通过 [CodeSandbox](https://codesandbox.io/s/nutui4-vite-demo-2fw7xh?file=/src/App.vue) 创建一个在线实例(`@nutui/nutui`)。请确保选择准确的版本。 + 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个最小重现实例以便于我们帮你排查问题。你可以提供一个基于 Taro NutUI4.0 模板项目的 GitHub 仓库链接(`@hg/nutui-taro`),也可以通过 [CodeSandbox](https://codesandbox.io/s/nutui4-vite-demo-2fw7xh?file=/src/App.vue) 创建一个在线实例(`@hg/nutui`)。请确保选择准确的版本。 diff --git a/.github/workflows/sync-pkg.yml b/.github/workflows/sync-pkg.yml index 71b82513bc..31aa8ebc63 100644 --- a/.github/workflows/sync-pkg.yml +++ b/.github/workflows/sync-pkg.yml @@ -27,10 +27,10 @@ jobs: - name: Install dependencies run: pnpm install - - name: Build @nutui/nutui + - name: Build @hg/nutui run: pnpm build - - name: Build @nutui/nutui-taro + - name: Build @hg/nutui-taro run: pnpm build:taro - name: Sync diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index adde22717c..d9f2d3aee0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ pnpm i ## 3、项目开发环境 -#### A、启动文档与 H5(@nutui/nutui) demo +#### A、启动文档与 H5(@hg/nutui) demo ```bash pnpm dev @@ -31,7 +31,7 @@ pnpm dev - 英文文档: `doc.en-US.md` - demo 源码: `demo.vue` 或者 `demo/index.vue` -#### B、运行 Taro(@nutui/nutui-taro) demo +#### B、运行 Taro(@hg/nutui-taro) demo ```bash # Taro H5 @@ -55,19 +55,19 @@ pnpm dev:taro tt ## 4、项目构建 ```bash -# 构建 @nutui/nutui,目标产物在 `publish/nutui` 目录下 +# 构建 @hg/nutui,目标产物在 `publish/nutui` 目录下 pnpm build -# 构建 @nutui/nutui-taro,目标产物在 `publish/nutui-taro` 目录下 +# 构建 @hg/nutui-taro,目标产物在 `publish/nutui-taro` 目录下 pnpm build:taro -# 构建 @nutui/nutui 网站文档右侧的 Demo 示例 +# 构建 @hg/nutui 网站文档右侧的 Demo 示例 pnpm build:demo -# 构建 @nutui/nutui-taro 网站文档右侧的 Demo 示例 +# 构建 @hg/nutui-taro 网站文档右侧的 Demo 示例 pnpm build:h5 -# 构建 @nutui/nutui-taro 小程序 Demo 示例 +# 构建 @hg/nutui-taro 小程序 Demo 示例 pnpm build:weapp ``` diff --git a/README.md b/README.md index 892441f39b..8f9429909a 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ coverage - license + license - - + + - - + +

@@ -38,8 +38,8 @@ GitHub Release Date - - jsdelivr + + jsdelivr

@@ -77,9 +77,9 @@ 官网:[nutui.jd.com](https://nutui.jd.com) -[@nutui/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro):适用于移动端 H5 页面开发 +[@hg/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro):适用于移动端 H5 页面开发 -[@nutui/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro):支持开发 Taro 多端小程序(微信、支付宝、京东等小程序)和 Taro-H5 项目 +[@hg/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro):支持开发 Taro 多端小程序(微信、支付宝、京东等小程序)和 Taro-H5 项目 ## 链接 @@ -89,10 +89,10 @@ | 项目 | 描述 | 版本 | | --- | --- | --- | -| [@nutui/nutui](https://github.com/jdf2e/nutui) | NutUI 移动端 H5 版本 | ![nutui](https://img.shields.io/npm/v/@nutui/nutui.svg?label=%20) | -| [@nutui/nutui-taro](https://github.com/jdf2e/nutui) | NutUI Taro 多端版本 | ![nutui](https://img.shields.io/npm/v/@nutui/nutui-taro.svg?label=%20) | -| [@nutui/icons-vue](https://github.com/jdf2e/nutui-icons) | `@nutui/nutui` 使用的图标库 | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue.svg?label=%20) | -| [@nutui/icons-vue-taro](https://github.com/jdf2e/nutui-icons) | `@nutui/nutui-taro` 使用的图标库 | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue-taro.svg?label=%20) | +| [@hg/nutui](https://github.com/jdf2e/nutui) | NutUI 移动端 H5 版本 | ![nutui](https://img.shields.io/npm/v/@hg/nutui.svg?label=%20) | +| [@hg/nutui-taro](https://github.com/jdf2e/nutui) | NutUI Taro 多端版本 | ![nutui](https://img.shields.io/npm/v/@hg/nutui-taro.svg?label=%20) | +| [@nutui/icons-vue](https://github.com/jdf2e/nutui-icons) | `@hg/nutui` 使用的图标库 | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue.svg?label=%20) | +| [@nutui/icons-vue-taro](https://github.com/jdf2e/nutui-icons) | `@hg/nutui-taro` 使用的图标库 | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue-taro.svg?label=%20) | | [@nutui/touch-emulator](packages/nutui-touch-emulator) | 在桌面端使用 NutUI 的辅助库 | ![nutui](https://img.shields.io/npm/v/@nutui/touch-emulator.svg?label=%20) | | [@nutui/auto-import-resolver](packages/nutui-auto-import-resolver) | `unplugin-auto-import` 插件的 resolver 配置 | ![nutui](https://img.shields.io/npm/v/@nutui/auto-import-resolver.svg?label=%20) | | [@nutui/playground](packages/nutui-playground) | NutUI 在线 Playground | - | diff --git a/README_EN.md b/README_EN.md index a8f68679e3..9003be85ca 100644 --- a/README_EN.md +++ b/README_EN.md @@ -13,13 +13,13 @@ coverage - license + license - - + + - - + +

@@ -38,8 +38,8 @@ GitHub Release Date - - jsdelivr + + jsdelivr

@@ -77,9 +77,9 @@ Site: [nutui.jd.com](https://nutui.jd.com) -[@nutui/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro): Mobile H5 Components +[@hg/nutui](https://nutui.jd.com/h5/vue/4x/#/zh-CN/guide/intro): Mobile H5 Components -[@nutui/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro): Taro Mini Programs(weapp, alipay, jd...) & Taro-H5 +[@hg/nutui-taro](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/intro): Taro Mini Programs(weapp, alipay, jd...) & Taro-H5 ## Links @@ -87,10 +87,10 @@ Site: [nutui.jd.com](https://nutui.jd.com) | Project | Description | Version | | --- | --- | --- | -| [@nutui/nutui](https://github.com/jdf2e/nutui) | NutUI H5 | ![nutui](https://img.shields.io/npm/v/@nutui/nutui.svg?label=%20) | -| [@nutui/nutui-taro](https://github.com/jdf2e/nutui) | NutUI Taro | ![nutui](https://img.shields.io/npm/v/@nutui/nutui-taro.svg?label=%20) | -| [@nutui/icons-vue](https://github.com/jdf2e/nutui-icons) | icons of `@nutui/nutui` | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue.svg?label=%20) | -| [@nutui/icons-vue-taro](https://github.com/jdf2e/nutui-icons) | icons of `@nutui/nutui-taro` | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue-taro.svg?label=%20) | +| [@hg/nutui](https://github.com/jdf2e/nutui) | NutUI H5 | ![nutui](https://img.shields.io/npm/v/@hg/nutui.svg?label=%20) | +| [@hg/nutui-taro](https://github.com/jdf2e/nutui) | NutUI Taro | ![nutui](https://img.shields.io/npm/v/@hg/nutui-taro.svg?label=%20) | +| [@nutui/icons-vue](https://github.com/jdf2e/nutui-icons) | icons of `@hg/nutui` | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue.svg?label=%20) | +| [@nutui/icons-vue-taro](https://github.com/jdf2e/nutui-icons) | icons of `@hg/nutui-taro` | ![nutui](https://img.shields.io/npm/v/@nutui/icons-vue-taro.svg?label=%20) | | [@nutui/touch-emulator](packages/nutui-touch-emulator) | Using NutUI in desktop browsers | ![nutui](https://img.shields.io/npm/v/@nutui/touch-emulator.svg?label=%20) | | [@nutui/auto-import-resolver](packages/nutui-auto-import-resolver) | resolver of `unplugin-auto-import` | ![nutui](https://img.shields.io/npm/v/@nutui/auto-import-resolver.svg?label=%20) | | [@nutui/playground](packages/nutui-playground) | NutUI Playground | - | diff --git a/package.json b/package.json index 1e737b26c4..531200d310 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@nutui/nutui", - "version": "4.3.13", + "name": "@hg/nutui", + "version": "4.3.15", "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)", "main": "dist/nutui.umd.js", "module": "dist/nutui.es.js", @@ -83,7 +83,7 @@ "@commitlint/config-conventional": "^19.2.2", "@eslint/config-inspector": "^0.5.1", "@eslint/eslintrc": "^3.1.0", - "@nutui/eslint-config": "workspace:*", + "@hg/eslint-config": "workspace:*", "@nutui/vite-plugins": "workspace:*", "@tarojs/taro": "3.6.34", "@types/node": "^20.14.9", @@ -130,5 +130,6 @@ }, "resolutions": { "@typescript-eslint/utils": "^8.0.0-alpha.16" - } -} \ No newline at end of file + }, + "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca" +} diff --git a/packages/nutui-auto-import-resolver/README.md b/packages/nutui-auto-import-resolver/README.md index b5a749fdb2..3a9c579fbe 100644 --- a/packages/nutui-auto-import-resolver/README.md +++ b/packages/nutui-auto-import-resolver/README.md @@ -97,7 +97,7 @@ export default defineConfig({ css: { preprocessorOptions: { scss: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } } @@ -123,7 +123,7 @@ module.exports = { css: { loaderOptions: { scss: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } } @@ -154,7 +154,7 @@ module.exports = { // 配置全局样式变量 loader: 'sass-loader', options: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } ] diff --git a/packages/nutui-auto-import-resolver/README.zh-CN.md b/packages/nutui-auto-import-resolver/README.zh-CN.md index 2c99c9731b..6396571d3c 100644 --- a/packages/nutui-auto-import-resolver/README.zh-CN.md +++ b/packages/nutui-auto-import-resolver/README.zh-CN.md @@ -97,7 +97,7 @@ export default defineConfig({ css: { preprocessorOptions: { scss: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } } @@ -123,7 +123,7 @@ module.exports = { css: { loaderOptions: { scss: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } } @@ -154,7 +154,7 @@ module.exports = { // 配置全局样式变量 loader: 'sass-loader', options: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` + additionalData: `@import "@hg/nutui/dist/styles/variables.scss";` } } ] diff --git a/packages/nutui-auto-import-resolver/package.json b/packages/nutui-auto-import-resolver/package.json index fe065d3fc7..cd044f7750 100644 --- a/packages/nutui-auto-import-resolver/package.json +++ b/packages/nutui-auto-import-resolver/package.json @@ -1,6 +1,6 @@ { - "name": "@nutui/auto-import-resolver", - "version": "1.0.0", + "name": "@hg/auto-import-resolver", + "version": "1.0.1", "description": "nutui auto import resolver based on unplugin-vue-components", "keywords": [ "nutui", @@ -29,10 +29,6 @@ "build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly", "build": "pnpm clean && vite build && pnpm build:types" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, "repository": { "type": "git", "url": "https://github.com/jdf2e/nutui.git", diff --git a/packages/nutui-auto-import-resolver/src/index.ts b/packages/nutui-auto-import-resolver/src/index.ts index 4e9c9a68ea..3486ce59a7 100644 --- a/packages/nutui-auto-import-resolver/src/index.ts +++ b/packages/nutui-auto-import-resolver/src/index.ts @@ -28,7 +28,7 @@ const nutFunctions = ['showToast', 'showNotify', 'showDialog', 'showImagePreview function getNutResolved(name: string, options: NutUIResolverOptions): ComponentResolveResult { const { importStyle = true, taro = false, autoImport = false } = options - const packageName = taro ? '@nutui/nutui-taro' : '@nutui/nutui' + const packageName = taro ? '@hg/nutui-taro' : '@hg/nutui' if (!importStyle) return { name, from: packageName } diff --git a/packages/nutui-eslint-config/package.json b/packages/nutui-eslint-config/package.json index e891039f4a..6fba348072 100644 --- a/packages/nutui-eslint-config/package.json +++ b/packages/nutui-eslint-config/package.json @@ -1,5 +1,5 @@ { - "name": "@nutui/eslint-config", + "name": "@hg/eslint-config", "version": "0.0.1", "description": "ESLint Config of NutUI Vue", "keywords": [ diff --git a/packages/nutui-playground/README.md b/packages/nutui-playground/README.md deleted file mode 100644 index d3f442d0db..0000000000 --- a/packages/nutui-playground/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# NutUI Vue SFC Playground - -## Run and build - -```sh -pnpm i -pnpm dev -pnpm build -``` - -> Some codes refer to [Vue SFC Playground](https://github.com/vuejs/core/tree/main/packages/sfc-playground) \ No newline at end of file diff --git a/packages/nutui-playground/index.html b/packages/nutui-playground/index.html deleted file mode 100644 index 27d47e03ca..0000000000 --- a/packages/nutui-playground/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - NutUI Playground - - - - -
- - diff --git a/packages/nutui-playground/package.json b/packages/nutui-playground/package.json deleted file mode 100644 index f462ade15d..0000000000 --- a/packages/nutui-playground/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@nutui/playground", - "version": "1.0.0", - "private": true, - "type": "module", - "description": "NutUI Vue SFC Playground", - "keywords": [ - "nutui", - "vue3" - ], - "scripts": { - "clean": "rimraf ./dist", - "dev": "vite", - "build": "vite build", - "serve": "vite preview" - }, - "devDependencies": { - "@types/node": "^20.14.9", - "@vitejs/plugin-vue": "^5.0.5", - "rimraf": "^6.0.0", - "vite": "^5.3.2", - "vue": "^3.4.31" - }, - "dependencies": { - "@vue/repl": "^3.4.0", - "file-saver": "^2.0.5", - "jszip": "^3.10.1" - } -} diff --git a/packages/nutui-playground/public/style.js b/packages/nutui-playground/public/style.js deleted file mode 100644 index 78d9a2c32b..0000000000 --- a/packages/nutui-playground/public/style.js +++ /dev/null @@ -1 +0,0 @@ -// It is empty to be compatible with Functional Component style import diff --git a/packages/nutui-playground/src/App.vue b/packages/nutui-playground/src/App.vue deleted file mode 100644 index 946408b605..0000000000 --- a/packages/nutui-playground/src/App.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/packages/nutui-playground/src/Header.vue b/packages/nutui-playground/src/Header.vue deleted file mode 100644 index 1ab7b3c50f..0000000000 --- a/packages/nutui-playground/src/Header.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - diff --git a/packages/nutui-playground/src/VersionSelect.vue b/packages/nutui-playground/src/VersionSelect.vue deleted file mode 100644 index ab2a8ab0ca..0000000000 --- a/packages/nutui-playground/src/VersionSelect.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/packages/nutui-playground/src/download/download.ts b/packages/nutui-playground/src/download/download.ts deleted file mode 100644 index f07a0d59c1..0000000000 --- a/packages/nutui-playground/src/download/download.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { saveAs } from 'file-saver' - -import index from './template/index.html?raw' -import main from './template/main.js?raw' -import pkg from './template/package.json?raw' -import config from './template/vite.config.js?raw' -import readme from './template/README.md?raw' -import { ReplStore } from '@vue/repl' - -export async function downloadProject(store: ReplStore) { - if (!confirm('Download project files?')) { - return - } - - const { default: JSZip } = await import('jszip') - const zip = new JSZip() - - // basic structure - zip.file('index.html', index) - zip.file('package.json', pkg) - zip.file('vite.config.js', config) - zip.file('README.md', readme) - - // project src - const src = zip.folder('src')! - src.file('main.js', main) - - const files = store.getFiles() - src.file('App.vue', files['App.vue']) - - const blob = await zip.generateAsync({ type: 'blob' }) - saveAs(blob, 'nutui-project.zip') -} diff --git a/packages/nutui-playground/src/download/template/README.md b/packages/nutui-playground/src/download/template/README.md deleted file mode 100644 index e8386c5a18..0000000000 --- a/packages/nutui-playground/src/download/template/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# NutUI Template - -This is a project template using [Vite](https://vitejs.dev/). It requires [Node.js](https://nodejs.org) v12+. - -To start: - -```sh -pnpm i -pnpm dev - -# if using yarn: -yarn -yarn dev - -# if using npm: -npm install -npm run dev -``` diff --git a/packages/nutui-playground/src/download/template/index.html b/packages/nutui-playground/src/download/template/index.html deleted file mode 100644 index 030a6ff51b..0000000000 --- a/packages/nutui-playground/src/download/template/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite App - - -
- - - diff --git a/packages/nutui-playground/src/download/template/main.js b/packages/nutui-playground/src/download/template/main.js deleted file mode 100644 index b8a4106ccd..0000000000 --- a/packages/nutui-playground/src/download/template/main.js +++ /dev/null @@ -1,5 +0,0 @@ -import { createApp } from 'vue' -import App from './App.vue' -import '@nutui/touch-emulator' - -createApp(App).mount('#app') diff --git a/packages/nutui-playground/src/download/template/package.json b/packages/nutui-playground/src/download/template/package.json deleted file mode 100644 index 2164123478..0000000000 --- a/packages/nutui-playground/src/download/template/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "nutui-vite-template", - "version": "1.0.0", - "scripts": { - "dev": "vite", - "build": "vite build", - "serve": "vite preview" - }, - "dependencies": { - "vue": "^3.4.27", - "@nutui/nutui": "^4.3.8", - "@nutui/touch-emulator": "^1.0.0" - }, - "devDependencies": { - "@vitejs/plugin-vue": "^5.0.4", - "vite": "^5.2.11", - "unplugin-vue-components": "^0.27.0" - } -} diff --git a/packages/nutui-playground/src/download/template/vite.config.js b/packages/nutui-playground/src/download/template/vite.config.js deleted file mode 100644 index 6265a0f792..0000000000 --- a/packages/nutui-playground/src/download/template/vite.config.js +++ /dev/null @@ -1,24 +0,0 @@ -// vite.config.js -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' -import Components from 'unplugin-vue-components/vite' -import NutUIResolver from '@nutui/nutui/dist/resolver' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - vue(), - // 开启 unplugin 插件,自动按需引入 NutUI 组件 - Components({ - resolvers: [NutUIResolver()] - }) - ], - // 配置全局样式变量 - css: { - preprocessorOptions: { - scss: { - additionalData: `@import "@nutui/nutui/dist/styles/variables.scss";` - } - } - } -}) diff --git a/packages/nutui-playground/src/icons/Download.vue b/packages/nutui-playground/src/icons/Download.vue deleted file mode 100644 index a7fda5716e..0000000000 --- a/packages/nutui-playground/src/icons/Download.vue +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/packages/nutui-playground/src/icons/GitHub.vue b/packages/nutui-playground/src/icons/GitHub.vue deleted file mode 100644 index 2a6aaf62dd..0000000000 --- a/packages/nutui-playground/src/icons/GitHub.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/packages/nutui-playground/src/icons/Moon.vue b/packages/nutui-playground/src/icons/Moon.vue deleted file mode 100644 index 21f393d4d6..0000000000 --- a/packages/nutui-playground/src/icons/Moon.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/packages/nutui-playground/src/icons/Share.vue b/packages/nutui-playground/src/icons/Share.vue deleted file mode 100644 index 0a3dab6bfd..0000000000 --- a/packages/nutui-playground/src/icons/Share.vue +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/packages/nutui-playground/src/icons/Sun.vue b/packages/nutui-playground/src/icons/Sun.vue deleted file mode 100644 index b824b9d5af..0000000000 --- a/packages/nutui-playground/src/icons/Sun.vue +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/packages/nutui-playground/src/main.ts b/packages/nutui-playground/src/main.ts deleted file mode 100644 index 8422420c35..0000000000 --- a/packages/nutui-playground/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { createApp } from 'vue' -import App from './App.vue' -import './style.css' - -// @ts-expect-error Custom window property -window.VUE_DEVTOOLS_CONFIG = { - defaultSelectedAppId: 'repl' -} - -createApp(App).mount('#app') diff --git a/packages/nutui-playground/src/store.ts b/packages/nutui-playground/src/store.ts deleted file mode 100644 index 129e9db061..0000000000 --- a/packages/nutui-playground/src/store.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { StoreOptions, File, ReplStore, compileFile } from '@vue/repl' -import { ref, computed } from 'vue' - -const style = ref('https://cdn.jsdelivr.net/npm/@nutui/nutui@latest/dist/style.css') - -const appFileCode = ` - - -`.trim() - -const CONTAINER_FILE = 'src/Container.vue' -const APP_FILE = 'src/App.vue' -const INSTALL_FILE = 'src/install-nutui.js' -const IMPORTMAP_FILE = 'import-map.json' -const TSCONFIG_FILE = 'tsconfig.json' - -const containerCode = `\ - - - -` -const installCode = computed( - () => `import NutUI from '@nutui/nutui' -import { getCurrentInstance } from 'vue' - -const appendStyle = () => { - return new Promise((resolve, reject) => { - const style = document.createElement('style') - style.innerHTML = '* { margin: 0; padding: 0; }' - document.body.appendChild(style) - - const link = document.createElement('link') - link.rel = 'stylesheet' - link.href = '${style.value}' - link.onload = resolve - link.onerror = reject - document.body.appendChild(link) - }) -} -await appendStyle() - -export const installNutUI = () => { - const { parent } = window - const instance = getCurrentInstance() - instance.appContext.app.use(NutUI) -} -` -) - -const utoa = (data: string) => { - return btoa(unescape(encodeURIComponent(data))) -} - -const atou = (b64: string) => { - return decodeURIComponent(escape(atob(b64))) -} - -// 不允许修改的文件,不通过 URL 传递 -const filterFiles = [IMPORTMAP_FILE, CONTAINER_FILE, INSTALL_FILE] -export class NutUIStore extends ReplStore { - constructor(storeOptions?: StoreOptions, hash?: string) { - super(storeOptions) - if (hash) { - const saved = JSON.parse(atou(hash)) - for (const filename in saved) { - const newName = filename.startsWith('src/') ? filename : `src/${filename}` - if (!filterFiles.includes(newName)) { - this.addFile(new File(newName, saved[filename])) - } - } - } else { - const main = new File(APP_FILE, appFileCode, false) - this.addFile(main) - } - - const container = new File(CONTAINER_FILE, containerCode, true) - this.addFile(container) - const install = new File(INSTALL_FILE, installCode.value, true) - this.addFile(install) - - this.state.mainFile = CONTAINER_FILE - this.setActive(APP_FILE) - } - - serialize() { - const files = this.getFiles() - delete files[IMPORTMAP_FILE] - delete files[TSCONFIG_FILE] - delete files[CONTAINER_FILE.replace('src/', '')] - delete files[INSTALL_FILE.replace('src/', '')] - return '#' + utoa(JSON.stringify(files)) - } - - setNutUIVersion(v: string) { - style.value = `https://cdn.jsdelivr.net/npm/@nutui/nutui@${v}/dist/style.css` - const install = new File(INSTALL_FILE, installCode.value, true) - this.addFile(install) - compileFile(this, install).then(errs => this.state.errors.push(...errs)) - this.setImportMap({ - imports: { - '@nutui/nutui': `https://cdn.jsdelivr.net/npm/@nutui/nutui@${v}/dist/nutui.js`, - '@nutui/icons-vue': 'https://cdn.jsdelivr.net/npm/@nutui/icons-vue@latest/dist/lib/index.mjs', - '@nutui/touch-emulator': 'https://cdn.jsdelivr.net/npm/@nutui/touch-emulator', - // compatible with Functional Component style import - '@nutui/nutui/dist/packages/toast/style': './style.js', - '@nutui/nutui/dist/packages/dialog/style': './style.js', - '@nutui/nutui/dist/packages/imagepreview/style': './style.js', - '@nutui/nutui/dist/packages/notify/style': './style.js' - } - }) - } -} diff --git a/packages/nutui-playground/src/style.css b/packages/nutui-playground/src/style.css deleted file mode 100644 index 44a295aaa1..0000000000 --- a/packages/nutui-playground/src/style.css +++ /dev/null @@ -1,8 +0,0 @@ -html { - height: 100vh; -} - -body, -#app { - height: 100%; -} diff --git a/packages/nutui-playground/vite.config.ts b/packages/nutui-playground/vite.config.ts deleted file mode 100644 index 84cd6ab6da..0000000000 --- a/packages/nutui-playground/vite.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import fs from 'fs' -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' - -export default defineConfig({ - base: '/playground/', - plugins: [ - vue({ - script: { - // @ts-ignore - fs: { - fileExists: fs.existsSync, - readFile: (file) => fs.readFileSync(file, 'utf-8') - } - } - }) - ], - optimizeDeps: { - exclude: ['@vue/repl'] - } -}) diff --git a/packages/nutui-taro-demo/.editorconfig b/packages/nutui-taro-demo/.editorconfig deleted file mode 100644 index 5760be5836..0000000000 --- a/packages/nutui-taro-demo/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 2 -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/packages/nutui-taro-demo/.eslintrc b/packages/nutui-taro-demo/.eslintrc deleted file mode 100644 index f336bf482e..0000000000 --- a/packages/nutui-taro-demo/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["taro/vue3", "@nutui/eslint-config"] -} diff --git a/packages/nutui-taro-demo/.gitignore b/packages/nutui-taro-demo/.gitignore deleted file mode 100644 index effe8840ce..0000000000 --- a/packages/nutui-taro-demo/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -dist/ -deploy_versions/ -.temp/ -.rn_temp/ -node_modules/ -.DS_Store -.swc -src/app.config.ts -lib -components.d.ts \ No newline at end of file diff --git a/packages/nutui-taro-demo/README.md b/packages/nutui-taro-demo/README.md deleted file mode 100644 index 27dcd7b4dc..0000000000 --- a/packages/nutui-taro-demo/README.md +++ /dev/null @@ -1 +0,0 @@ -# nutui-taro-demo diff --git a/packages/nutui-taro-demo/babel.config.cjs b/packages/nutui-taro-demo/babel.config.cjs deleted file mode 100644 index 17a773af41..0000000000 --- a/packages/nutui-taro-demo/babel.config.cjs +++ /dev/null @@ -1,13 +0,0 @@ -// babel-preset-taro 更多选项和默认值: -// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md -module.exports = { - presets: [ - [ - 'taro', - { - framework: 'vue3', - ts: true - } - ] - ] -} diff --git a/packages/nutui-taro-demo/components.d.ts b/packages/nutui-taro-demo/components.d.ts new file mode 100644 index 0000000000..4da5eaf104 --- /dev/null +++ b/packages/nutui-taro-demo/components.d.ts @@ -0,0 +1,105 @@ +export {} +declare module 'vue' { + export interface GlobalComponents { + NutButton: typeof import('@/packages/__VUE/button/index.taro')['default'] + NutCell: typeof import('@/packages/__VUE/cell/index.taro')['default'] + NutCellGroup: typeof import('@/packages/__VUE/cellgroup/index.taro')['default'] + NutIcon: typeof import('@/packages/__VUE/icon/index.taro.vue')['default'] + NutOverlay: typeof import('@/packages/__VUE/overlay/index.taro')['default'] + NutPopup: typeof import('@/packages/__VUE/popup/index.taro.vue')['default'] + NutConfigProvider: typeof import('@/packages/__VUE/configprovider/index.taro.vue')['default'] + NutLayout: typeof import('@/packages/__VUE/layout/index.taro')['default'] + NutCol: typeof import('@/packages/__VUE/col/index.taro')['default'] + NutRow: typeof import('@/packages/__VUE/row/index.taro')['default'] + NutSticky: typeof import('@/packages/__VUE/sticky/index.taro.vue')['default'] + NutDivider: typeof import('@/packages/__VUE/divider/index.taro')['default'] + NutGrid: typeof import('@/packages/__VUE/grid/index.taro')['default'] + NutGridItem: typeof import('@/packages/__VUE/griditem/index.taro')['default'] + NutSpace: typeof import('@/packages/__VUE/space/index.taro.vue')['default'] + NutNavbar: typeof import('@/packages/__VUE/navbar/index.taro')['default'] + NutFixedNav: typeof import('@/packages/__VUE/fixednav/index.taro.vue')['default'] + NutMenu: typeof import('@/packages/__VUE/menu/index.taro.vue')['default'] + NutMenuItem: typeof import('@/packages/__VUE/menuitem/index.taro.vue')['default'] + NutTabbar: typeof import('@/packages/__VUE/tabbar/index.taro')['default'] + NutTabbarItem: typeof import('@/packages/__VUE/tabbaritem/index.taro')['default'] + NutElevator: typeof import('@/packages/__VUE/elevator/index.taro.vue')['default'] + NutPagination: typeof import('@/packages/__VUE/pagination/index.taro.vue')['default'] + NutTabs: typeof import('@/packages/__VUE/tabs/index.taro.vue')['default'] + NutTabPane: typeof import('@/packages/__VUE/tabpane/index.taro.vue')['default'] + NutIndicator: typeof import('@/packages/__VUE/indicator/index.taro')['default'] + NutSideNavbar: typeof import('@/packages/__VUE/sidenavbar/index.taro.vue')['default'] + NutSideNavbarItem: typeof import('@/packages/__VUE/sidenavbaritem/index.taro.vue')['default'] + NutSubSideNavbar: typeof import('@/packages/__VUE/subsidenavbar/index.taro.vue')['default'] + NutRange: typeof import('@/packages/__VUE/range/index.taro.vue')['default'] + NutSearchbar: typeof import('@/packages/__VUE/searchbar/index.taro.vue')['default'] + NutCascader: typeof import('@/packages/__VUE/cascader/index.taro.vue')['default'] + NutCalendar: typeof import('@/packages/__VUE/calendar/index.taro.vue')['default'] + NutCalendarCard: typeof import('@/packages/__VUE/calendarcard/index.taro')['default'] + NutCheckbox: typeof import('@/packages/__VUE/checkbox/index.taro.vue')['default'] + NutCheckboxGroup: typeof import('@/packages/__VUE/checkboxgroup/index.taro.vue')['default'] + NutDatePicker: typeof import('@/packages/__VUE/datepicker/index.taro.vue')['default'] + NutInputNumber: typeof import('@/packages/__VUE/inputnumber/index.taro')['default'] + NutInput: typeof import('@/packages/__VUE/input/index.taro')['default'] + NutRadio: typeof import('@/packages/__VUE/radio/index.taro')['default'] + NutRadioGroup: typeof import('@/packages/__VUE/radiogroup/index.taro')['default'] + NutRate: typeof import('@/packages/__VUE/rate/index.taro')['default'] + NutPicker: typeof import('@/packages/__VUE/picker/index.taro.vue')['default'] + NutShortPassword: typeof import('@/packages/__VUE/shortpassword/index.taro.vue')['default'] + NutTextarea: typeof import('@/packages/__VUE/textarea/index.taro')['default'] + NutUploader: typeof import('@/packages/__VUE/uploader/index.taro.vue')['default'] + NutNumberKeyboard: typeof import('@/packages/__VUE/numberkeyboard/index.taro.vue')['default'] + NutForm: typeof import('@/packages/__VUE/form/index.taro')['default'] + NutFormItem: typeof import('@/packages/__VUE/formitem/index.taro')['default'] + NutSwipe: typeof import('@/packages/__VUE/swipe/index.taro')['default'] + NutSwipeGroup: typeof import('@/packages/__VUE/swipegroup/index.taro')['default'] + NutActionSheet: typeof import('@/packages/__VUE/actionsheet/index.taro.vue')['default'] + NutBacktop: typeof import('@/packages/__VUE/backtop/index.taro')['default'] + NutDrag: typeof import('@/packages/__VUE/drag/index.taro.vue')['default'] + NutDialog: typeof import('@/packages/__VUE/dialog/index.taro.vue')['default'] + NutNotify: typeof import('@/packages/__VUE/notify/index.taro.vue')['default'] + NutSwitch: typeof import('@/packages/__VUE/switch/index.taro')['default'] + NutToast: typeof import('@/packages/__VUE/toast/index.taro.vue')['default'] + NutAvatar: typeof import('@/packages/__VUE/avatar/index.taro.vue')['default'] + NutAvatarGroup: typeof import('@/packages/__VUE/avatargroup/index.taro.vue')['default'] + NutList: typeof import('@/packages/__VUE/list/index.taro.vue')['default'] + NutProgress: typeof import('@/packages/__VUE/progress/index.taro')['default'] + NutCircleProgress: typeof import('@/packages/__VUE/circleprogress/index.taro')['default'] + NutNoticebar: typeof import('@/packages/__VUE/noticebar/index.taro.vue')['default'] + NutEmpty: typeof import('@/packages/__VUE/empty/index.taro')['default'] + NutSteps: typeof import('@/packages/__VUE/steps/index.taro')['default'] + NutStep: typeof import('@/packages/__VUE/step/index.taro')['default'] + NutSwiper: typeof import('@/packages/__VUE/swiper/index.taro.vue')['default'] + NutSwiperItem: typeof import('@/packages/__VUE/swiperitem/index.taro.vue')['default'] + NutPrice: typeof import('@/packages/__VUE/price/index.taro')['default'] + NutImagePreview: typeof import('@/packages/__VUE/imagepreview/index.taro.vue')['default'] + NutCountup: typeof import('@/packages/__VUE/countup/index.taro.vue')['default'] + NutCountdown: typeof import('@/packages/__VUE/countdown/index.taro')['default'] + NutBadge: typeof import('@/packages/__VUE/badge/index.taro')['default'] + NutTag: typeof import('@/packages/__VUE/tag/index.taro')['default'] + NutPopover: typeof import('@/packages/__VUE/popover/index.taro.vue')['default'] + NutSkeleton: typeof import('@/packages/__VUE/skeleton/index.taro')['default'] + NutCollapse: typeof import('@/packages/__VUE/collapse/index.taro')['default'] + NutCollapseItem: typeof import('@/packages/__VUE/collapseitem/index.taro')['default'] + NutTable: typeof import('@/packages/__VUE/table/index.taro.vue')['default'] + NutAnimate: typeof import('@/packages/__VUE/animate/index.taro')['default'] + NutEllipsis: typeof import('@/packages/__VUE/ellipsis/index.taro.vue')['default'] + NutWatermark: typeof import('@/packages/__VUE/watermark/index.taro')['default'] + NutTrendArrow: typeof import('@/packages/__VUE/trendarrow/index.taro')['default'] + NutTour: typeof import('@/packages/__VUE/tour/index.taro.vue')['default'] + NutAddress: typeof import('@/packages/__VUE/address/index.taro.vue')['default'] + NutBarrage: typeof import('@/packages/__VUE/barrage/index.taro.vue')['default'] + NutSignature: typeof import('@/packages/__VUE/signature/index.taro.vue')['default'] + NutTimeSelect: typeof import('@/packages/__VUE/timeselect/index.taro.vue')['default'] + NutTimePannel: typeof import('@/packages/__VUE/timepannel/index.taro.vue')['default'] + NutTimeDetail: typeof import('@/packages/__VUE/timedetail/index.taro.vue')['default'] + NutSku: typeof import('@/packages/__VUE/sku/index.taro.vue')['default'] + NutCard: typeof import('@/packages/__VUE/card/index.taro.vue')['default'] + NutEcard: typeof import('@/packages/__VUE/ecard/index.taro.vue')['default'] + NutAddressList: typeof import('@/packages/__VUE/addresslist/index.taro.vue')['default'] + NutCategory: typeof import('@/packages/__VUE/category/index.taro.vue')['default'] + NutCategoryPane: typeof import('@/packages/__VUE/categorypane/index.taro.vue')['default'] + NutComment: typeof import('@/packages/__VUE/comment/index.taro.vue')['default'] + NutInvoice: typeof import('@/packages/__VUE/invoice/index.taro')['default'] + NutAvatarCropper: typeof import('@/packages/__VUE/avatarcropper/index.taro.vue')['default'] + } +} \ No newline at end of file diff --git a/packages/nutui-taro-demo/config/dev.ts b/packages/nutui-taro-demo/config/dev.ts deleted file mode 100644 index 88d6564258..0000000000 --- a/packages/nutui-taro-demo/config/dev.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - env: { - NODE_ENV: '"development"' - }, - defineConstants: {}, - mini: {}, - h5: {} -} diff --git a/packages/nutui-taro-demo/config/index.ts b/packages/nutui-taro-demo/config/index.ts deleted file mode 100644 index f7c586e737..0000000000 --- a/packages/nutui-taro-demo/config/index.ts +++ /dev/null @@ -1,116 +0,0 @@ -import path from 'path' -import dev from './dev' -import prod from './prod' - -const config = { - projectName: '@nutui/nutui-taro-demo', - date: '2021-5-29', - designWidth: 375, - deviceRatio: { - 640: 2.34 / 2, - 750: 1, - 828: 1.81 / 2, - 375: 2 / 1 - }, - sourceRoot: 'src', - outputRoot: `dist/${process.env.TARO_ENV === 'h5' ? 'h5' : process.env.TARO_ENV}`, - plugins: [ - '@tarojs/plugin-html', - [ - '@tarojs/plugin-framework-vue3', - { - vueLoaderOption: { - compilerOptions: { - isCustomElement: tag => tag.includes('taro-scroll-view-core'), - whitespace: 'preserve' - } - } - } - ] - ], - alias: { - '@/packages': path.resolve(__dirname, '../../../src/packages'), - '@nutui/nutui-taro': path.resolve(__dirname, '../../../src/packages/taro') - }, - sass: { - resource: [path.resolve(__dirname, '../../../src/packages/styles/variables.scss')] - }, - defineConstants: {}, - copy: { - patterns: [], - options: {} - }, - framework: 'vue3', - compiler: { - type: 'webpack5', - prebundle: { enable: false } - }, - mini: { - compile: { - include: [path.resolve(__dirname, '../../../src')] - }, - webpackChain(chain) { - chain.merge({ - module: { - rule: [ - { - test: /.js$/, - loader: 'babel-loader' - } - ] - } - }) - }, - postcss: { - pxtransform: { - enable: true, - config: {} - }, - url: { - enable: true, - config: { - limit: 1024 // 设定转换尺寸上限 - } - }, - cssModules: { - enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true - config: { - namingPattern: 'module', // 转换模式,取值为 global/module - generateScopedName: '[name]__[local]___[hash:base64:5]' - } - } - } - }, - h5: { - compile: { - include: [path.resolve(__dirname, '../../../src')] - }, - publicPath: '/', - staticDirectory: 'static', - chunkDirectory: 'chunk', - postcss: { - autoprefixer: { - enable: true, - config: {} - }, - pxtransform: { - enable: true, - config: { selectorBlackList: ['nut-'] } - }, - cssModules: { - enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true - config: { - namingPattern: 'module', // 转换模式,取值为 global/module - generateScopedName: '[name]__[local]___[hash:base64:5]' - } - } - } - } -} - -export default function (merge) { - if (process.env.NODE_ENV === 'development') { - return merge({}, config, dev) - } - return merge({}, config, prod) -} diff --git a/packages/nutui-taro-demo/config/prod.ts b/packages/nutui-taro-demo/config/prod.ts deleted file mode 100644 index b95ecb0f50..0000000000 --- a/packages/nutui-taro-demo/config/prod.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - env: { - NODE_ENV: '"production"' - }, - defineConstants: {}, - mini: {}, - h5: { - publicPath: '/taro/vue/4x/demo/' - } -} diff --git a/packages/nutui-taro-demo/package.json b/packages/nutui-taro-demo/package.json deleted file mode 100644 index 5b878e8c23..0000000000 --- a/packages/nutui-taro-demo/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@nutui/nutui-taro-demo", - "version": "1.0.0", - "private": true, - "type": "module", - "description": "nutui-taro-demo", - "templateInfo": { - "name": "default", - "typescript": true, - "css": "sass" - }, - "scripts": { - "dev": "taro build --watch --type", - "build": "taro build --type" - }, - "browserslist": [ - "last 3 versions", - "Android >= 4.1", - "ios >= 8" - ], - "author": "", - "dependencies": { - "@babel/runtime": "^7.24.6", - "@nutui/icons-vue-taro": "^0.0.9", - "@tarojs/components": "3.6.34", - "@tarojs/helper": "3.6.34", - "@tarojs/plugin-framework-vue3": "3.6.34", - "@tarojs/plugin-html": "3.6.34", - "@tarojs/plugin-platform-alipay": "3.6.34", - "@tarojs/plugin-platform-h5": "3.6.34", - "@tarojs/plugin-platform-jd": "3.6.34", - "@tarojs/plugin-platform-qq": "3.6.34", - "@tarojs/plugin-platform-swan": "3.6.34", - "@tarojs/plugin-platform-tt": "3.6.34", - "@tarojs/plugin-platform-weapp": "3.6.34", - "@tarojs/runtime": "3.6.34", - "@tarojs/shared": "3.6.34", - "@tarojs/taro": "3.6.34", - "vue": "^3.4.31" - }, - "devDependencies": { - "@babel/core": "^7.24.6", - "@tarojs/cli": "3.6.34", - "@tarojs/webpack5-runner": "3.6.34", - "@types/webpack-env": "^1.18.5", - "babel-loader": "^9.1.3", - "babel-preset-taro": "3.6.34", - "css-loader": "^7.1.2", - "eslint": "^8.57.0", - "eslint-config-taro": "3.6.34", - "style-loader": "^4.0.0", - "stylelint": "^16.6.0", - "typescript": "^5.4.5", - "vue-loader": "^17.4.2", - "webpack": "^5.91.0" - } -} diff --git a/packages/nutui-taro-demo/project.config.json b/packages/nutui-taro-demo/project.config.json deleted file mode 100644 index 7779bdfe27..0000000000 --- a/packages/nutui-taro-demo/project.config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "miniprogramRoot": "dist/weapp", - "projectname": "@nutui/nutui-taro-demo", - "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "appid": "wxf2b976b67dab3882", - "setting": { - "urlCheck": true, - "es6": false, - "enhance": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": false, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "minifyWXML": true, - "showES6CompileOption": false, - "useCompilerPlugins": false, - "ignoreUploadUnusedFiles": true, - "useStaticServer": true - }, - "compileType": "miniprogram", - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "srcMiniprogramRoot": "dist/", - "libVersion": "widelyUsed", - "packOptions": { - "ignore": [], - "include": [] - }, - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - }, - "condition": { - "miniprogram": {} - } -} \ No newline at end of file diff --git a/packages/nutui-taro-demo/project.tt.json b/packages/nutui-taro-demo/project.tt.json deleted file mode 100644 index 245172b048..0000000000 --- a/packages/nutui-taro-demo/project.tt.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "miniprogramRoot": "./", - "projectname": "@nutui/nutui-taro-demo", - "appid": "touristappid", - "setting": { - "urlCheck": true, - "es6": false, - "postcss": false, - "minified": false - }, - "compileType": "miniprogram" -} diff --git a/packages/nutui-taro-demo/src/app.scss b/packages/nutui-taro-demo/src/app.scss deleted file mode 100644 index d6346f9a34..0000000000 --- a/packages/nutui-taro-demo/src/app.scss +++ /dev/null @@ -1,53 +0,0 @@ -page { - height: 100%; -} - -page, -#app { - font-size: 14px; - min-width: 100vw; - .demo { - box-sizing: border-box; - min-height: 100%; - overflow-x: hidden; - overflow-y: auto; - background: #f7f8fa; - padding: 0 17px 17px 17px; - - &.web { - padding-top: 57px !important; - } - - &.full { - padding: 0; - h2 { - padding-left: 27px; - } - } - - &.bg-w { - background: #fff; - } - - &::-webkit-scrollbar { - width: 0; - background: transparent; - } - > h2 { - margin-top: 30px; - margin-bottom: 10px; - font-size: 14px; - color: rgba(144, 156, 164, 1); - padding: 0 10px; - font-weight: normal; - } - > p { - font-size: 12px; - } - - .card { - padding: 25px 18px; - background: rgba(255, 255, 255, 1); - } - } -} diff --git a/packages/nutui-taro-demo/src/app.ts b/packages/nutui-taro-demo/src/app.ts deleted file mode 100644 index 2f33ac412e..0000000000 --- a/packages/nutui-taro-demo/src/app.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createApp } from 'vue' -import './app.scss' -import NutUI from '@/packages/taro' -import Demo from './components/demo.vue' -// import NutUI from '@nutui/nutui-taro'; -// import '@nutui/nutui-taro/dist/style.css'; -import '@nutui/touch-emulator' // 适配 taro h5 示例桌面端预览 -const App = createApp({ - onShow() {} - // 入口组件不需要实现 render 方法,即使实现了也会被 taro所覆盖 -}).use(NutUI) - -App.component('Demo', Demo) - -export default App diff --git a/packages/nutui-taro-demo/src/basic/pages/button/block.vue b/packages/nutui-taro-demo/src/basic/pages/button/block.vue deleted file mode 100644 index b7d030a0c1..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/block.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/color.vue b/packages/nutui-taro-demo/src/basic/pages/button/color.vue deleted file mode 100644 index b84661127e..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/color.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/disabled.vue b/packages/nutui-taro-demo/src/basic/pages/button/disabled.vue deleted file mode 100644 index 8e59e8f7bb..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/disabled.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/icon.vue b/packages/nutui-taro-demo/src/basic/pages/button/icon.vue deleted file mode 100644 index 96d83e0f94..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/icon.vue +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/index.config.ts b/packages/nutui-taro-demo/src/basic/pages/button/index.config.ts deleted file mode 100644 index 659e5e8934..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/index.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - navigationBarTitleText: 'Button' -} diff --git a/packages/nutui-taro-demo/src/basic/pages/button/index.vue b/packages/nutui-taro-demo/src/basic/pages/button/index.vue deleted file mode 100644 index 978a053403..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/index.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/loading.vue b/packages/nutui-taro-demo/src/basic/pages/button/loading.vue deleted file mode 100644 index 0c66d35f0c..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/loading.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/plain.vue b/packages/nutui-taro-demo/src/basic/pages/button/plain.vue deleted file mode 100644 index f4b237ebf7..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/plain.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/shape.vue b/packages/nutui-taro-demo/src/basic/pages/button/shape.vue deleted file mode 100644 index cb7a925a7b..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/shape.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/size.vue b/packages/nutui-taro-demo/src/basic/pages/button/size.vue deleted file mode 100644 index a189b27aa9..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/size.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/button/type.vue b/packages/nutui-taro-demo/src/basic/pages/button/type.vue deleted file mode 100644 index d52ffc5315..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/button/type.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/align.vue b/packages/nutui-taro-demo/src/basic/pages/cell/align.vue deleted file mode 100644 index f8e3a6b922..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/align.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/basic.vue b/packages/nutui-taro-demo/src/basic/pages/cell/basic.vue deleted file mode 100644 index 55692f987e..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/basic.vue +++ /dev/null @@ -1,11 +0,0 @@ - - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/center.vue b/packages/nutui-taro-demo/src/basic/pages/cell/center.vue deleted file mode 100644 index 405c0bd7cc..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/center.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/desc.vue b/packages/nutui-taro-demo/src/basic/pages/cell/desc.vue deleted file mode 100644 index fdb7432309..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/desc.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/group.vue b/packages/nutui-taro-demo/src/basic/pages/cell/group.vue deleted file mode 100644 index 8d4207e80c..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/group.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/icon.vue b/packages/nutui-taro-demo/src/basic/pages/cell/icon.vue deleted file mode 100644 index f69b6e5ebe..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/icon.vue +++ /dev/null @@ -1,10 +0,0 @@ - - diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/index.config.ts b/packages/nutui-taro-demo/src/basic/pages/cell/index.config.ts deleted file mode 100644 index 400228e0dd..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/index.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - navigationBarTitleText: 'Cell' -} diff --git a/packages/nutui-taro-demo/src/basic/pages/cell/index.vue b/packages/nutui-taro-demo/src/basic/pages/cell/index.vue deleted file mode 100644 index 1642b295ee..0000000000 --- a/packages/nutui-taro-demo/src/basic/pages/cell/index.vue +++ /dev/null @@ -1,74 +0,0 @@ -