easybill-ui 1.0.20 → 1.0.23

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 (77) hide show
  1. package/README.md +51 -51
  2. package/components/ConstantStatus/index.ts +5 -5
  3. package/components/ConstantStatus/src/ConstantStatus.vue +63 -63
  4. package/components/ConstantStatus/src/index.ts +3 -3
  5. package/components/ConstantStatus/src/types.ts +18 -18
  6. package/components/CurdForm/index.ts +9 -9
  7. package/components/CurdForm/src/CurdForm.vue +225 -225
  8. package/components/CurdForm/src/FormItem.vue +96 -96
  9. package/components/CurdForm/src/FormTooltip.vue +55 -55
  10. package/components/CurdForm/src/components/index.ts +48 -48
  11. package/components/CurdForm/src/components/schema-form-autocomplete.vue +25 -25
  12. package/components/CurdForm/src/components/schema-form-cascader.vue +24 -24
  13. package/components/CurdForm/src/components/schema-form-checkbox.vue +51 -51
  14. package/components/CurdForm/src/components/schema-form-color-picker.vue +24 -24
  15. package/components/CurdForm/src/components/schema-form-date-picker.vue +30 -30
  16. package/components/CurdForm/src/components/schema-form-input-number.vue +30 -30
  17. package/components/CurdForm/src/components/schema-form-input.vue +28 -28
  18. package/components/CurdForm/src/components/schema-form-radio.vue +56 -56
  19. package/components/CurdForm/src/components/schema-form-select.vue +85 -85
  20. package/components/CurdForm/src/components/schema-form-switch.vue +30 -30
  21. package/components/CurdForm/src/components/schema-form-time-picker.vue +30 -30
  22. package/components/CurdForm/src/components/schema-form-value.vue +25 -25
  23. package/components/CurdForm/src/directive/index.ts +57 -57
  24. package/components/CurdForm/src/hooks/index.ts +6 -6
  25. package/components/CurdForm/src/index.ts +3 -3
  26. package/components/CurdForm/src/types.ts +122 -123
  27. package/components/CurdForm/src/utils/ajax.ts +125 -125
  28. package/components/CurdForm/src/utils/common.ts +17 -17
  29. package/components/CurdForm/src/utils/is.ts +104 -104
  30. package/components/CurdTable/index.ts +5 -5
  31. package/components/CurdTable/src/CurdTable.vue +464 -464
  32. package/components/CurdTable/src/STableColumnControl.vue +86 -86
  33. package/components/CurdTable/src/STableDetail.vue +50 -50
  34. package/components/CurdTable/src/STableFilter.vue +51 -51
  35. package/components/CurdTable/src/STableItem.vue +109 -109
  36. package/components/CurdTable/src/STableItemFilter.vue +53 -53
  37. package/components/CurdTable/src/STableItemHeader.vue +36 -36
  38. package/components/CurdTable/src/STableItemHeaderTooltip.vue +35 -35
  39. package/components/CurdTable/src/STableMenu.vue +70 -70
  40. package/components/CurdTable/src/hooks/useColumnHook.ts +80 -80
  41. package/components/CurdTable/src/index.ts +2 -2
  42. package/components/CurdTable/src/types.ts +160 -160
  43. package/components/CurdTable/utils/common.ts +33 -33
  44. package/components/CurdTable/utils/is.ts +104 -104
  45. package/components/CurdTable/utils/tabelToExcel.ts +68 -68
  46. package/components/DetailInfo/index.ts +5 -5
  47. package/components/DetailInfo/src/DetailInfo.vue +105 -105
  48. package/components/DetailInfo/src/DetailInfoContent.vue +27 -27
  49. package/components/DetailInfo/src/DetailInfoTooltip.vue +36 -36
  50. package/components/DetailInfo/src/types.ts +23 -23
  51. package/components/FormDialog/index.ts +3 -3
  52. package/components/FormDialog/src/FormDialog.vue +157 -157
  53. package/components/FormDialog/src/index.ts +37 -37
  54. package/components/FormDialog/src/types.ts +15 -15
  55. package/components/TableFilter/index.ts +6 -6
  56. package/components/TableFilter/src/FilterExternal/FilterExternal.vue +104 -102
  57. package/components/TableFilter/src/FilterSearchBox.vue +65 -56
  58. package/components/TableFilter/src/TableFilter.vue +218 -209
  59. package/components/TableFilter/src/components/FilterItem.vue +93 -93
  60. package/components/TableFilter/src/components/FilterTags.vue +122 -122
  61. package/components/TableFilter/src/components/FilterToggle.vue +40 -40
  62. package/components/TableFilter/src/components/FilterType.vue +77 -77
  63. package/components/TableFilter/src/components/containers/TagsSelect.vue +91 -91
  64. package/components/TableFilter/types.ts +25 -25
  65. package/index.ts +21 -21
  66. package/package.json +3 -3
  67. package/theme-chalk/curd-table.css +1 -1
  68. package/theme-chalk/index.css +1 -1
  69. package/theme-chalk/table-filter.css +1 -1
  70. package/utils/common/Storage.ts +127 -127
  71. package/utils/common/index.ts +74 -74
  72. package/utils/hooks/useGlobalConfig.ts +30 -30
  73. package/utils/index.ts +3 -3
  74. package/utils/vue/index.ts +3 -3
  75. package/utils/vue/install.ts +16 -16
  76. package/utils/vue/make-installer.ts +16 -16
  77. package/utils/vue/typescript.ts +7 -7
package/README.md CHANGED
@@ -1,51 +1,51 @@
1
- # `easybill-ui`
2
-
3
- > A component library for easybill
4
-
5
- ## 安装
6
-
7
- #### 环境支持
8
-
9
- Easybill Ui 与 Element Plus 的环境支持保持一致。
10
-
11
- Element Plus 可以在支持 ES2018 和 ResizeObserver 的浏览器上运行。 如果您确实需要支持旧版本的浏览器,请自行添加 Babel 和相应的 Polyfill 。
12
-
13
- 由于 Vue 3 不再支持 IE11,Element Plus 也不再支持 IE 浏览器。
14
-
15
- | Edge | Firefox | Chrome | Safari |
16
- | --------- | ------------ | ----------- | ----------- |
17
- | Edge ≥ 79 | Firefox ≥ 78 | Chrome ≥ 64 | Safari ≥ 12 |
18
-
19
- #### 包管理器安装
20
-
21
- ```shell
22
- # 选择一个你喜欢的包管理器
23
-
24
- # NPM
25
- $ npm install easybill-ui --save
26
-
27
- # Yarn
28
- $ yarn add easybill-ui
29
-
30
- # pnpm
31
- $ pnpm install easybill-ui
32
- ```
33
-
34
- #### 快速开始
35
-
36
- ```typescript
37
- // main.ts
38
- import { createApp } from "vue"
39
- import App from "./App.vue"
40
-
41
- import ElementPlus from "element-plus"
42
- import "element-plus/dist/index.css"
43
-
44
- import EasybillUi from "easybill-ui"
45
- import "easybill-ui/theme-chalk/index.css"
46
-
47
- const app = createApp(App)
48
-
49
- app.use(ElementPlus).use(EasybillUi)
50
- app.mount("#app")
51
- ```
1
+ # `easybill-ui`
2
+
3
+ > A component library for easybill
4
+
5
+ ## 安装
6
+
7
+ #### 环境支持
8
+
9
+ Easybill Ui 与 Element Plus 的环境支持保持一致。
10
+
11
+ Element Plus 可以在支持 ES2018 和 ResizeObserver 的浏览器上运行。 如果您确实需要支持旧版本的浏览器,请自行添加 Babel 和相应的 Polyfill 。
12
+
13
+ 由于 Vue 3 不再支持 IE11,Element Plus 也不再支持 IE 浏览器。
14
+
15
+ | Edge | Firefox | Chrome | Safari |
16
+ | --------- | ------------ | ----------- | ----------- |
17
+ | Edge ≥ 79 | Firefox ≥ 78 | Chrome ≥ 64 | Safari ≥ 12 |
18
+
19
+ #### 包管理器安装
20
+
21
+ ```shell
22
+ # 选择一个你喜欢的包管理器
23
+
24
+ # NPM
25
+ $ npm install easybill-ui --save
26
+
27
+ # Yarn
28
+ $ yarn add easybill-ui
29
+
30
+ # pnpm
31
+ $ pnpm install easybill-ui
32
+ ```
33
+
34
+ #### 快速开始
35
+
36
+ ```typescript
37
+ // main.ts
38
+ import { createApp } from "vue"
39
+ import App from "./App.vue"
40
+
41
+ import ElementPlus from "element-plus"
42
+ import "element-plus/dist/index.css"
43
+
44
+ import EasybillUi from "easybill-ui"
45
+ import "easybill-ui/theme-chalk/index.css"
46
+
47
+ const app = createApp(App)
48
+
49
+ app.use(ElementPlus).use(EasybillUi)
50
+ app.mount("#app")
51
+ ```
@@ -1,5 +1,5 @@
1
- import Instance from "./src"
2
- import { withInstall } from "../../utils"
3
- export const ConstantStatus = withInstall(Instance)
4
- export default ConstantStatus
5
- export * from "./src/types"
1
+ import Instance from "./src"
2
+ import { withInstall } from "../../utils"
3
+ export const ConstantStatus = withInstall(Instance)
4
+ export default ConstantStatus
5
+ export * from "./src/types"
@@ -1,63 +1,63 @@
1
- <template>
2
- <el-tag v-if="current" class="constant-status" :class="{ 'dot-status': current.dot }" v-bind="currentProps">
3
- <el-icon v-if="(current.icon || current.iconClass) && !current.dot" :class="current.iconClass" style="margin-right: 5px">
4
- <component :is="current.icon" v-if="current.icon" class="icon" :size="14" style="width: 12px; height: 12px" />
5
- </el-icon>
6
- <span v-if="current.dot" class="dot"></span>
7
- <span v-if="current.html" class="name" v-html="current.label"></span>
8
- <span v-else class="name">{{ current.label }}</span>
9
- </el-tag>
10
- <span v-else>{{ typeof value === "undefined" || value === "" ? "--" : value }}</span>
11
- </template>
12
- <script lang="ts">
13
- export default {
14
- name: "ConstantStatus",
15
- }
16
- </script>
17
- <script lang="ts" setup>
18
- import { computed, PropType } from "vue"
19
- import { OptionItem } from "./types"
20
- const props = defineProps({
21
- value: {
22
- type: [String, Number, Boolean],
23
- default: undefined,
24
- },
25
- options: {
26
- type: Array as PropType<Array<OptionItem>>,
27
- default: () => [],
28
- },
29
- })
30
- const current = computed(() => {
31
- const result = props.options || []
32
- const value = props.value
33
- if (typeof value == "string" && value.indexOf(",") > -1) {
34
- var curs = result.filter((a) => value.indexOf(a.value + "") > -1)
35
- return {
36
- ...curs[0],
37
- label: curs.map((a) => a.label).join(","),
38
- }
39
- }
40
- if (value === "" || value === undefined) {
41
- return undefined
42
- }
43
- return result && result.find((a) => a.value == props.value)
44
- })
45
- const currentProps = computed(() => {
46
- const defaults = { type: "", label: "", value: "", class: [""], style: {} } as OptionItem
47
- const result = props.options || []
48
- const cur = result.find((a) => a.value == props.value)
49
- if (!cur) return {}
50
- const { label, value, border, type, ...args } = cur
51
- if (typeof border !== "undefined") {
52
- defaults.class = ["no-border"]
53
- defaults.style = args.color ? { color: args.color, backgroundColor: "transparent" } : {}
54
- }
55
- // 判断type在不在里面
56
- if (type && ["success", "info", "warning", "danger"].includes(String(type))) {
57
- defaults.type = type
58
- } else {
59
- defaults.class.push("el-tag--" + (type || "default"))
60
- }
61
- return { ...defaults, ...args }
62
- })
63
- </script>
1
+ <template>
2
+ <el-tag v-if="current" class="constant-status" :class="{ 'dot-status': current.dot }" v-bind="currentProps">
3
+ <el-icon v-if="(current.icon || current.iconClass) && !current.dot" :class="current.iconClass" style="margin-right: 5px">
4
+ <component :is="current.icon" v-if="current.icon" class="icon" :size="14" style="width: 12px; height: 12px" />
5
+ </el-icon>
6
+ <span v-if="current.dot" class="dot"></span>
7
+ <span v-if="current.html" class="name" v-html="current.label"></span>
8
+ <span v-else class="name">{{ current.label }}</span>
9
+ </el-tag>
10
+ <span v-else>{{ typeof value === "undefined" || value === "" ? "--" : value }}</span>
11
+ </template>
12
+ <script lang="ts">
13
+ export default {
14
+ name: "ConstantStatus",
15
+ }
16
+ </script>
17
+ <script lang="ts" setup>
18
+ import { computed, PropType } from "vue"
19
+ import { OptionItem } from "./types"
20
+ const props = defineProps({
21
+ value: {
22
+ type: [String, Number, Boolean],
23
+ default: undefined,
24
+ },
25
+ options: {
26
+ type: Array as PropType<Array<OptionItem>>,
27
+ default: () => [],
28
+ },
29
+ })
30
+ const current = computed(() => {
31
+ const result = props.options || []
32
+ const value = props.value
33
+ if (typeof value == "string" && value.indexOf(",") > -1) {
34
+ var curs = result.filter((a) => value.indexOf(a.value + "") > -1)
35
+ return {
36
+ ...curs[0],
37
+ label: curs.map((a) => a.label).join(","),
38
+ }
39
+ }
40
+ if (value === "" || value === undefined) {
41
+ return undefined
42
+ }
43
+ return result && result.find((a) => a.value == props.value)
44
+ })
45
+ const currentProps = computed(() => {
46
+ const defaults = { type: "", label: "", value: "", class: [""], style: {} } as OptionItem
47
+ const result = props.options || []
48
+ const cur = result.find((a) => a.value == props.value)
49
+ if (!cur) return {}
50
+ const { label, value, border, type, ...args } = cur
51
+ if (typeof border !== "undefined") {
52
+ defaults.class = ["no-border"]
53
+ defaults.style = args.color ? { color: args.color, backgroundColor: "transparent" } : {}
54
+ }
55
+ // 判断type在不在里面
56
+ if (type && ["success", "info", "warning", "danger"].includes(String(type))) {
57
+ defaults.type = type
58
+ } else {
59
+ defaults.class.push("el-tag--" + (type || "default"))
60
+ }
61
+ return { ...defaults, ...args }
62
+ })
63
+ </script>
@@ -1,3 +1,3 @@
1
- import ConstantStatus from "./ConstantStatus.vue"
2
- export { ConstantStatus }
3
- export default ConstantStatus
1
+ import ConstantStatus from "./ConstantStatus.vue"
2
+ export { ConstantStatus }
3
+ export default ConstantStatus
@@ -1,18 +1,18 @@
1
- export interface OptionItem extends Record<string, any> {
2
- label: string
3
- value: string | number | boolean
4
- disabled?: boolean
5
- type?: string | "default" | "primary" | "success" | "info" | "warning" | "danger" | "blue" | "blue-dark" | "yellow" | "blueness" | "red-purple" | "error"
6
- icon?: any
7
- hit?: boolean
8
- color?: string
9
- size?: string | "large" | "default" | "small"
10
- effect?: string | "dark" | "light" | "plain"
11
- round?: boolean
12
- border?: boolean
13
- className?: string
14
- iconClass?: string | string[]
15
- dot?: boolean
16
- tooltip?: any
17
- html?: string
18
- }
1
+ export interface OptionItem extends Record<string, any> {
2
+ label: string
3
+ value: string | number | boolean
4
+ disabled?: boolean
5
+ type?: string | "default" | "primary" | "success" | "info" | "warning" | "danger" | "blue" | "blue-dark" | "yellow" | "blueness" | "red-purple" | "error"
6
+ icon?: any
7
+ hit?: boolean
8
+ color?: string
9
+ size?: string | "large" | "default" | "small"
10
+ effect?: string | "dark" | "light" | "plain"
11
+ round?: boolean
12
+ border?: boolean
13
+ className?: string
14
+ iconClass?: string | string[]
15
+ dot?: boolean
16
+ tooltip?: any
17
+ html?: string
18
+ }
@@ -1,9 +1,9 @@
1
- import Instance from "./src/index"
2
- import FormItem from "./src/CurdFormItem.vue"
3
- import { withInstall } from "../../utils"
4
- export const CurdForm = withInstall(Instance)
5
- export const CurdFormItem = withInstall(FormItem)
6
- export default CurdForm
7
- export * from "./src/types"
8
- export * from "./src/directive"
9
- export * from "./src/hooks"
1
+ import Instance from "./src/index"
2
+ import FormItem from "./src/CurdFormItem.vue"
3
+ import { withInstall } from "../../utils"
4
+ export const CurdForm = withInstall(Instance)
5
+ export const CurdFormItem = withInstall(FormItem)
6
+ export default CurdForm
7
+ export * from "./src/types"
8
+ export * from "./src/directive"
9
+ export * from "./src/hooks"