From ee8c179a8720014a02c52971c79a7ea87a652f2a Mon Sep 17 00:00:00 2001 From: zhouxinyong Date: Fri, 22 Jul 2022 20:22:46 +0800 Subject: [PATCH] docs: change codesandbox code --- .github/workflows/release.yml | 2 +- docs/.vuepress/components/createCodeSandBox.js | 12 ++++++++---- packages/components/package.json | 1 + yarn.lock | 7 ++++++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 652214d..938dc17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: ref: main - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 registry-url: https://registry.npmjs.org/ - run: | yarn -v diff --git a/docs/.vuepress/components/createCodeSandBox.js b/docs/.vuepress/components/createCodeSandBox.js index 80f03a2..06a343f 100644 --- a/docs/.vuepress/components/createCodeSandBox.js +++ b/docs/.vuepress/components/createCodeSandBox.js @@ -62,7 +62,6 @@ export function createCodeSandBox(codeStr) { '@formily/core': 'latest', '@formily/vue': 'latest', '@formily/antdv-x3': 'latest', - axios: '^0.21.1', 'core-js': '^3.8.3', 'ant-design-vue': '^3.2.6', vue: '^3.2.37', @@ -71,20 +70,25 @@ export function createCodeSandBox(codeStr) { '@vue/cli-plugin-babel': '~5.0.0', '@vue/cli-service': '~5.0.0', less: 'latest', - 'less-loader': '^5.0.0', + 'less-loader': 'latest', }, babel: { presets: ['@vue/cli-plugin-babel/preset'], }, vue: { devServer: { + headers: { + 'Access-Control-Allow-Origin': '*', + }, host: '0.0.0.0', - disableHostCheck: true, // 必须 + allowedHosts: 'all', }, css: { loaderOptions: { less: { - javascriptEnabled: true, + lessOptions: { + javascriptEnabled: true, + }, }, }, }, diff --git a/packages/components/package.json b/packages/components/package.json index 8afc17c..b6f8fce 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -46,6 +46,7 @@ "@formily/reactive-vue": "^2.1.4", "@formily/shared": "^2.1.4", "@formily/vue": "^2.1.4", + "moment": "^2.29.4", "vue-slicksort": "^2.0.0-alpha.5" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index fd5765b..a1c0177 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2119,7 +2119,7 @@ "@vuepress/core" "2.0.0-beta.38" prismjs "^1.27.0" -"@vuepress/plugin-search@2.0.0-beta.38", "@vuepress/plugin-search@^2.0.0-beta.37": +"@vuepress/plugin-search@^2.0.0-beta.37": version "2.0.0-beta.38" resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-2.0.0-beta.38.tgz#aecbd09cf228f6f0552c1ee94d9abebb238dd6a8" integrity sha512-bv5rDpXFjssYiP6wDdskObcKm9cEevKXVThx/F+0rwN0mVACqbEET0RvLeoU3uE5PYWJYB6lmh7xdn/74fPkWg== @@ -7587,6 +7587,11 @@ moment@^2.29.3: resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== +moment@^2.29.4: + version "2.29.4" + resolved "https://pkgs.d.xiaomi.net:443/artifactory/api/npm/mi-npm/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha1-Pb4FKIn+fBsu2Wb8s6dzKJZO8Qg= + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"