Browse Source

[Fix][UI Next] Fix build standalone error. (#8590)

3.0.0/version-upgrade
songjianet 3 years ago committed by GitHub
parent
commit
f2c6fbb452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-ui-next/.env.production
  2. 4
      dolphinscheduler-ui-next/src/router/index.ts
  3. 4
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts
  4. 2
      dolphinscheduler-ui-next/vite.config.ts

2
dolphinscheduler-ui-next/.env.production

@ -15,4 +15,4 @@
NODE_ENV=production NODE_ENV=production
VITE_APP_PROD_WEB_URL='' VITE_APP_PROD_WEB_URL='http://127.0.0.1:12345'

4
dolphinscheduler-ui-next/src/router/index.ts

@ -32,7 +32,9 @@ import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(
import.meta.env.MODE === 'production' ? '/dolphinscheduler/ui/' : '/'
),
routes routes
}) })

4
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts

@ -28,7 +28,9 @@ export function useProcedure(model: { [field: string]: any }): IJsonItem[] {
props: { props: {
language: 'sql', language: 'sql',
placeholder: t('project.node.procedure_method_tips'), placeholder: t('project.node.procedure_method_tips'),
defaultValue: model.method? model.method : t('project.node.procedure_method_snippet') defaultValue: model.method
? model.method
: t('project.node.procedure_method_snippet')
}, },
validate: { validate: {
trigger: ['input', 'trigger'], trigger: ['input', 'trigger'],

2
dolphinscheduler-ui-next/vite.config.ts

@ -22,7 +22,7 @@ import viteCompression from 'vite-plugin-compression'
import path from 'path' import path from 'path'
export default defineConfig({ export default defineConfig({
base: process.env.NODE_ENV === 'production' ? './' : '/', base: process.env.NODE_ENV === 'production' ? '/dolphinscheduler/ui/' : '/',
plugins: [ plugins: [
vue(), vue(),
vueJsx(), vueJsx(),

Loading…
Cancel
Save