inl-ui 0.0.3 → 0.0.4

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.
Files changed (46) hide show
  1. package/conf/cp.js +51 -0
  2. package/dist/index.js +55 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/style.css +0 -1
  5. package/dist/theme/dark copy.less +448 -0
  6. package/dist/theme/dark.less +182 -0
  7. package/dist/theme/default.less +1067 -0
  8. package/dist/types/src/pageComponent/api/auth/menuManager.d.ts +5 -5
  9. package/dist/types/src/pageComponent/api/auth/roleManager.d.ts +6 -6
  10. package/dist/types/src/pageComponent/api/auth/userManager.d.ts +10 -10
  11. package/dist/types/src/pageComponent/api/axios.d.ts +1 -1
  12. package/dist/types/src/pageComponent/api/index.d.ts +4 -4
  13. package/dist/types/src/pageComponent/api/logManager.d.ts +2 -2
  14. package/dist/types/src/pageComponent/api/org/depManager.d.ts +13 -13
  15. package/dist/types/src/pageComponent/api/org/postManager.d.ts +5 -5
  16. package/dist/types/src/pageComponent/api/org/teamManager.d.ts +7 -7
  17. package/dist/types/src/pageComponent/api/param.d.ts +6 -6
  18. package/dist/types/src/pageComponent/components/EditPasswordForm.d.ts +1 -1
  19. package/dist/types/src/pageComponent/components/ProFormItem.d.ts +2 -2
  20. package/dist/types/src/pageComponent/components/SearchSelect.d.ts +2 -2
  21. package/dist/types/src/pageComponent/views/systemManager/authManager/userManager/updateUserDialog.d.ts +2 -2
  22. package/dist/types/src/pageComponent/views/systemManager/orgManager/depManager/updateDepDialog.d.ts +1 -1
  23. package/dist/types/src/pageComponent/views/systemManager/orgManager/depManager/updateEmployeeDialog.d.ts +1 -1
  24. package/dist/types/src/pageComponent/views/systemManager/orgManager/postManager/updatePostDialog.d.ts +1 -1
  25. package/dist/types/src/pageComponent/views/systemManager/orgManager/teamManager/updateTeamDialog.d.ts +1 -1
  26. package/dist/types/src/utils/className.d.ts +2 -0
  27. package/dist/types/src/utils/config.d.ts +4 -0
  28. package/dist/types/src/utils/getSlots.d.ts +3 -0
  29. package/dist/types/src/utils/index.d.ts +10 -0
  30. package/dist/types/src/utils/installComponent.d.ts +3 -0
  31. package/package.json +4 -2
  32. package/src/{gl.ts → gl.d.ts} +6 -0
  33. package/src/ht/ht-widget.d.ts +11327 -0
  34. package/src/ht/ht.d.ts +11410 -0
  35. package/src/ht/index.d.ts +4 -0
  36. package/src/pageComponent/api/axios.ts +18 -18
  37. package/src/pageComponent/components/CommonTree.tsx +31 -31
  38. package/src/pageComponent/components/EditPasswordForm.tsx +20 -20
  39. package/src/pageComponent/components/IconSelect.tsx +12 -12
  40. package/src/pageComponent/components/Navbar.tsx +9 -9
  41. package/src/pageComponent/components/ProFormItem.tsx +18 -18
  42. package/src/pageComponent/components/SearchSelect.tsx +20 -20
  43. package/src/pageComponent/components/Sidebar.tsx +11 -11
  44. package/src/pageComponent/config/htconfig.ts +5 -5
  45. package/dist/types/src/gl.d.ts +0 -8
  46. package/dist/types/src/utll.d.ts +0 -2
@@ -6,17 +6,17 @@
6
6
  * @LastEditTime: 2022-04-24 13:58:53
7
7
  */
8
8
 
9
- import { PropType, defineComponent, ref, watch } from 'vue';
10
- import useVModel from '@/hooks/useVModel';
11
- import { instance } from '@/api';
12
- import { isNil, debounce, isEqual } from 'lodash';
13
- import { every } from '@/utils/is';
9
+ import { PropType, defineComponent, ref, watch } from "vue";
10
+ import useVModel from "@/pageComponent/hooks/useVModel";
11
+ import { instance } from "@/pageComponent/api";
12
+ import { isNil, debounce, isEqual } from "lodash";
13
+ import { every } from "@/pageComponent/utils/is";
14
14
 
15
- import { Select, SelectOption } from 'inl-ui';
16
- import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons-vue';
15
+ import { Select, SelectOption } from "ant-design-vue";
16
+ import { ArrowDownOutlined, ArrowUpOutlined } from "@ant-design/icons-vue";
17
17
 
18
18
  const SearchSelect = defineComponent({
19
- emits: ['update:value'],
19
+ emits: ["update:value"],
20
20
  props: {
21
21
  value: {
22
22
  type: [String, Array, Number],
@@ -41,7 +41,7 @@ const SearchSelect = defineComponent({
41
41
  },
42
42
  },
43
43
  setup(props, { emit, attrs }) {
44
- const modelValue = useVModel(props, 'value', emit);
44
+ const modelValue = useVModel(props, "value", emit);
45
45
 
46
46
  /* 列表 */
47
47
  const optionList = ref([]);
@@ -71,15 +71,15 @@ const SearchSelect = defineComponent({
71
71
  }
72
72
  }
73
73
  }, 300);
74
- getOptionList('');
74
+ getOptionList("");
75
75
 
76
76
  watch(
77
77
  () => props.extParams,
78
78
  (curr, prev) => {
79
79
  if (!isEqual(curr, prev)) {
80
- getOptionList('');
80
+ getOptionList("");
81
81
  }
82
- },
82
+ }
83
83
  );
84
84
 
85
85
  watch(
@@ -88,36 +88,36 @@ const SearchSelect = defineComponent({
88
88
  if (isEqual(curr, prev)) return;
89
89
  if (Array.isArray(modelValue.value)) {
90
90
  modelValue.value = modelValue.value.filter(
91
- (item) => !props.excludeValues.includes(item),
91
+ (item) => !props.excludeValues.includes(item)
92
92
  );
93
93
  } else {
94
94
  if (props.excludeValues.includes(modelValue.value)) {
95
95
  modelValue.value = undefined;
96
96
  }
97
97
  }
98
- },
98
+ }
99
99
  );
100
100
 
101
101
  return () => (
102
102
  <Select
103
103
  {...attrs}
104
- notFoundContent={isFetching.value ? '加载中' : '暂无数据'}
104
+ notFoundContent={isFetching.value ? "加载中" : "暂无数据"}
105
105
  showSearch
106
106
  defaultActiveFirstOption={false}
107
107
  showArrow={true}
108
108
  filterOption={false}
109
- v-model={[modelValue.value, 'value']}
109
+ v-model={[modelValue.value, "value"]}
110
110
  onSearch={getOptionList}
111
111
  >
112
112
  {optionList.value.map(
113
113
  (item: any) =>
114
114
  !props.excludeValues.includes(
115
- item[props.valuePorp.key ?? 'id'],
115
+ item[props.valuePorp.key ?? "id"]
116
116
  ) && (
117
- <SelectOption key={item[props.valuePorp.key ?? 'id']}>
118
- {item[props.valuePorp.label ?? 'name']}
117
+ <SelectOption key={item[props.valuePorp.key ?? "id"]}>
118
+ {item[props.valuePorp.label ?? "name"]}
119
119
  </SelectOption>
120
- ),
120
+ )
121
121
  )}
122
122
  </Select>
123
123
  );
@@ -5,9 +5,9 @@ import {
5
5
  h,
6
6
  resolveComponent,
7
7
  watch,
8
- } from 'vue';
9
- import { Menu, MenuItem, SubMenu } from 'inl-ui';
10
- import { useRoute, useRouter } from 'vue-router';
8
+ } from "vue";
9
+ import { Menu, MenuItem, SubMenu } from "ant-design-vue";
10
+ import { useRoute, useRouter } from "vue-router";
11
11
 
12
12
  // props
13
13
  const props = {
@@ -17,7 +17,7 @@ const props = {
17
17
  },
18
18
  path: {
19
19
  type: String,
20
- default: '',
20
+ default: "",
21
21
  },
22
22
  };
23
23
 
@@ -46,11 +46,11 @@ export default defineComponent({
46
46
  watch(
47
47
  route,
48
48
  (nVal) => {
49
- const urlList = nVal.path.split('/');
49
+ const urlList = nVal.path.split("/");
50
50
  state.openKeys = [urlList[urlList.length - 2]];
51
51
  state.selectedKeys = [urlList[urlList.length - 1]];
52
52
  },
53
- { deep: true, immediate: true },
53
+ { deep: true, immediate: true }
54
54
  );
55
55
 
56
56
  const toPath = (path: string) => {
@@ -78,8 +78,8 @@ export default defineComponent({
78
78
  ele = (
79
79
  <MenuItem
80
80
  key={item.path}
81
- onClick={() => toPath((fPath ? `${fPath}/` : '') + item.path)}
82
- v-slots={getSlots(meta.title, meta?.icon || 'container-outlined')}
81
+ onClick={() => toPath((fPath ? `${fPath}/` : "") + item.path)}
82
+ v-slots={getSlots(meta.title, meta?.icon || "container-outlined")}
83
83
  >
84
84
  {meta.title}
85
85
  </MenuItem>
@@ -110,10 +110,10 @@ export default defineComponent({
110
110
 
111
111
  return () => (
112
112
  <Menu
113
- mode='inline'
113
+ mode="inline"
114
114
  v-models={[
115
- [state.selectedKeys, 'selectedKeys'],
116
- [state.openKeys, 'openKeys'],
115
+ [state.selectedKeys, "selectedKeys"],
116
+ [state.openKeys, "openKeys"],
117
117
  ]}
118
118
  >
119
119
  {getSubMenu(prop.menu)}
@@ -2,10 +2,10 @@ window.htconfig = {
2
2
  Default: {
3
3
  toolTipDelay: 100,
4
4
  toolTipContinual: true,
5
- debugTipBackground: 'rgba(61,61,61,0.6)',
6
- debugTipLabelColor: '#fff',
5
+ debugTipBackground: "rgba(61,61,61,0.6)",
6
+ debugTipLabelColor: "#fff",
7
7
  convertURL: (url: string) => {
8
- const storagePrefix = '/ht_';
8
+ const storagePrefix = "/ht_";
9
9
  if (
10
10
  storagePrefix &&
11
11
  url &&
@@ -16,9 +16,9 @@ window.htconfig = {
16
16
  url = `${storagePrefix}/${url}`;
17
17
  }
18
18
  // append timestamp
19
- url += `${url.indexOf('?') >= 0 ? '&' : '?'}ts=${Date.now()}`;
19
+ url += `${url.indexOf("?") >= 0 ? "&" : "?"}ts=${Date.now()}`;
20
20
  // append sid
21
- const match = window.location.href.match('sid=([0-9a-z-]*)');
21
+ const match = window.location.href.match("sid=([0-9a-z-]*)");
22
22
  if (match) {
23
23
  // eslint-disable-next-line prefer-destructuring
24
24
  window.sid = match[1];
@@ -1,8 +0,0 @@
1
- import Store from "./pageComponent/config/install";
2
- import { instance } from "./pageComponent/api";
3
- declare module "@vue/runtime-core" {
4
- interface ComponentCustomProperties {
5
- $store: typeof Store;
6
- $axios: typeof instance;
7
- }
8
- }
@@ -1,2 +0,0 @@
1
- import utils from "inl-util";
2
- export default utils;