@ajaxjs/ui 1.3.2 → 1.3.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajaxjs/ui",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/iam/iam.ts CHANGED
@@ -19,7 +19,7 @@ export default {
19
19
 
20
20
  if (!accessToken && !token) {
21
21
  console.log('你未登录!');
22
- let target: string = `${loginUrl}?web_url=${encodeURIComponent(thisPageUrl)}`;
22
+ const target = `${loginUrl}?web_url=${encodeURIComponent(thisPageUrl)}`;
23
23
 
24
24
  confirm('你未登录。是否跳转到登录页面?') && location.assign(target);
25
25
 
@@ -51,11 +51,11 @@ export default {
51
51
  };
52
52
 
53
53
  function getQueryParam(variable: string, isParent: boolean): string | null {
54
- var query: string = (isParent ? parent.location : window.location).search.substring(1);
55
- var vars: string[] = query.split("&");
54
+ const query: string = (isParent ? parent.location : window.location).search.substring(1);
55
+ const vars: string[] = query.split("&");
56
56
 
57
- for (var i: number = 0; i < vars.length; i++) {
58
- var pair: string[] = vars[i].split("=");
57
+ for (let i = 0; i < vars.length; i++) {
58
+ const pair: string[] = vars[i].split("=");
59
59
 
60
60
  if (pair[0] == variable)
61
61
  return pair[1];
package/src/iam/user.vue CHANGED
@@ -9,7 +9,7 @@ import Vue from "vue";
9
9
  const logout = "localStorage.removeItem('accessToken');location.reload();";
10
10
 
11
11
  export default Vue.extend({
12
- name: 'IAM',
12
+ name: 'IamUser',
13
13
  data() {
14
14
  return {
15
15
  state: "未登录",
package/src/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  // 动态引入组件
2
2
  const requireComponent = require.context('./', true, /\.vue$/);
3
- // import FooAbc from './FooAbc.vue';
3
+ import List from './iview-ext/list';
4
+ import IAM from './iam/iam';
5
+
4
6
  const components = [];
5
7
 
6
8
  requireComponent.keys().forEach(fileName => {
@@ -44,5 +46,7 @@ if (typeof window !== 'undefined' && window.Vue)
44
46
 
45
47
  export default {
46
48
  install,
49
+ List,
50
+ IAM,
47
51
  ...components//组件也一样要暴露
48
52
  }
@@ -1,7 +1,9 @@
1
- import List from './list';
2
- import { Xhr } from "@ajaxjs/util";
1
+ import Vue from "vue";
2
+ import List from "./list";
3
+ import { Xhr } from '@ajaxjs/util';
3
4
 
4
- export default {
5
+ export default Vue.extend({
6
+ name: "FastViewTable",
5
7
  props: {
6
8
  widgetName: { type: String, required: false },
7
9
  apiUrl: { type: String, required: false }, // 接口地址
@@ -128,4 +130,4 @@ export default {
128
130
  this.getData();
129
131
  }
130
132
  },
131
- };
133
+ });