0.0.26 • Published 2 years ago

@gpdi_ds_platform/plugin-vue2 v0.0.26

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

插件配置接入简要说明

本插件适用于 Vue2.x 构建的应用,主要用于应用外挂插件。

preivew

接入说明

  • 前端
  1. 安装依赖
npm install @gpdi_ds_platform/plugin-vue2
  1. 引入
// main.js
import DSPlatformPlugin from '@gpdi_ds_platform/plugin-vue2'
import '@gpdi_ds_platform/plugin-vue2/lib/ds_platform_plugin.css'
Vue.use(DSPlatformPlugin)
  1. 使用
<!-- Layout/index.vue2 -->
<template>
  <div id="Layout">
    <!-- ... -->
    <index-interpretation :token="token"  :baseUrl="baseUrl" />
  </div>
</template>

<script>
// token 及 baseUrl 请自行获取传入
import { getToken } from '@/utils/auth'
export default {
  name: 'Layout',
  data() {
    return {
      token: getToken(),
      baseUrl: '/toPlugin'
    }
  }
}
</script>
  • 后端

需要修改 nginx 配置,解析 baseUrl 到插件中心,如:

  location ^~/toPlugin {
       proxy_pass http://172.16.1.98:9999/dev-api;
       proxy_set_header Host                $host:$server_port;
       proxy_set_header X-Forwarded-For     $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto   $scheme;
       proxy_set_header X-Forwarded-Port    $server_port;
    }
0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago