jobsys-explore 1.0.1

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 (127) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.cjs +38 -0
  3. package/.prettierrc.cjs +38 -0
  4. package/README.md +42 -0
  5. package/components/button/ExButton.jsx +119 -0
  6. package/components/button/index.js +4 -0
  7. package/components/button/index.less +8 -0
  8. package/components/form/ExAddress.jsx +125 -0
  9. package/components/form/ExCascader.jsx +98 -0
  10. package/components/form/ExCheckbox.jsx +59 -0
  11. package/components/form/ExDate.jsx +130 -0
  12. package/components/form/ExDatetime.jsx +152 -0
  13. package/components/form/ExField.jsx +123 -0
  14. package/components/form/ExFieldUploader.jsx +44 -0
  15. package/components/form/ExForm.jsx +395 -0
  16. package/components/form/ExNumber.jsx +49 -0
  17. package/components/form/ExRadio.jsx +58 -0
  18. package/components/form/ExRate.jsx +47 -0
  19. package/components/form/ExSelect.jsx +151 -0
  20. package/components/form/ExSlider.jsx +53 -0
  21. package/components/form/ExSwitch.jsx +49 -0
  22. package/components/form/ExTime.jsx +104 -0
  23. package/components/form/FormItem.jsx +229 -0
  24. package/components/form/PickerWrapper.jsx +111 -0
  25. package/components/form/addressData.json +1 -0
  26. package/components/form/index.js +37 -0
  27. package/components/form/index.less +108 -0
  28. package/components/form/utils.js +47 -0
  29. package/components/grid/ExGrid.jsx +53 -0
  30. package/components/grid/index.js +4 -0
  31. package/components/grid/index.less +3 -0
  32. package/components/index.js +9 -0
  33. package/components/pagination/ExPagination.jsx +148 -0
  34. package/components/pagination/index.js +5 -0
  35. package/components/pagination/index.less +15 -0
  36. package/components/provider/ExProvider.jsx +91 -0
  37. package/components/provider/index.js +4 -0
  38. package/components/qrcode/ExQrcode.jsx +86 -0
  39. package/components/qrcode/index.js +5 -0
  40. package/components/qrcode/index.less +8 -0
  41. package/components/result/ExResult.jsx +122 -0
  42. package/components/result/index.js +5 -0
  43. package/components/result/index.less +60 -0
  44. package/components/search/ExSearch.jsx +252 -0
  45. package/components/search/components/Expand.jsx +77 -0
  46. package/components/search/components/Field.jsx +27 -0
  47. package/components/search/components/Quick.jsx +53 -0
  48. package/components/search/components/index.js +5 -0
  49. package/components/search/index.js +5 -0
  50. package/components/search/index.less +119 -0
  51. package/components/search/utils.js +30 -0
  52. package/components/theme/ExTheme.jsx +10 -0
  53. package/components/theme/index.js +4 -0
  54. package/components/theme/index.less +97 -0
  55. package/components/uploader/ExUploader.jsx +248 -0
  56. package/components/uploader/index.js +5 -0
  57. package/components/utils.js +150 -0
  58. package/dist/__vite-browser-external-2447137e.mjs +5 -0
  59. package/dist/__vite-browser-external-2447137e.mjs.map +1 -0
  60. package/dist/__vite-browser-external-b3701507.js +2 -0
  61. package/dist/__vite-browser-external-b3701507.js.map +1 -0
  62. package/dist/hooks.cjs +2 -0
  63. package/dist/hooks.cjs.map +1 -0
  64. package/dist/hooks.js +35 -0
  65. package/dist/hooks.js.map +1 -0
  66. package/dist/index-82d74e5f.mjs +2120 -0
  67. package/dist/index-82d74e5f.mjs.map +1 -0
  68. package/dist/index-b8729555.js +2 -0
  69. package/dist/index-b8729555.js.map +1 -0
  70. package/dist/jobsys-explore.cjs +9 -0
  71. package/dist/jobsys-explore.cjs.map +1 -0
  72. package/dist/jobsys-explore.js +18673 -0
  73. package/dist/jobsys-explore.js.map +1 -0
  74. package/dist/style.css +1 -0
  75. package/docgen.config.cjs +9 -0
  76. package/docs/.vitepress/cache/deps/_metadata.json +19 -0
  77. package/docs/.vitepress/cache/deps/package.json +3 -0
  78. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +162 -0
  79. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  80. package/docs/.vitepress/cache/deps/vue.js +10795 -0
  81. package/docs/.vitepress/cache/deps/vue.js.map +7 -0
  82. package/docs/.vitepress/config.mjs +43 -0
  83. package/docs/.vitepress/dist/404.html +19 -0
  84. package/docs/.vitepress/dist/assets/app.e0eb4814.js +1 -0
  85. package/docs/.vitepress/dist/assets/chunks/framework.7a64ad8e.js +2 -0
  86. package/docs/.vitepress/dist/assets/chunks/theme.ffc5f35c.js +7 -0
  87. package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2 +0 -0
  88. package/docs/.vitepress/dist/assets/inter-italic-cyrillic.ea42a392.woff2 +0 -0
  89. package/docs/.vitepress/dist/assets/inter-italic-greek-ext.4fbe9427.woff2 +0 -0
  90. package/docs/.vitepress/dist/assets/inter-italic-greek.8f4463c4.woff2 +0 -0
  91. package/docs/.vitepress/dist/assets/inter-italic-latin-ext.bd8920cc.woff2 +0 -0
  92. package/docs/.vitepress/dist/assets/inter-italic-latin.bd3b6f56.woff2 +0 -0
  93. package/docs/.vitepress/dist/assets/inter-italic-vietnamese.6ce511fb.woff2 +0 -0
  94. package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.e75737ce.woff2 +0 -0
  95. package/docs/.vitepress/dist/assets/inter-roman-cyrillic.5f2c6c8c.woff2 +0 -0
  96. package/docs/.vitepress/dist/assets/inter-roman-greek-ext.ab0619bc.woff2 +0 -0
  97. package/docs/.vitepress/dist/assets/inter-roman-greek.d5a6d92a.woff2 +0 -0
  98. package/docs/.vitepress/dist/assets/inter-roman-latin-ext.0030eebd.woff2 +0 -0
  99. package/docs/.vitepress/dist/assets/inter-roman-latin.2ed14f66.woff2 +0 -0
  100. package/docs/.vitepress/dist/assets/inter-roman-vietnamese.14ce25a6.woff2 +0 -0
  101. package/docs/.vitepress/dist/assets/style.6747f984.css +1 -0
  102. package/docs/.vitepress/dist/hashmap.json +1 -0
  103. package/docs/.vitepress/theme/index.css +0 -0
  104. package/docs/.vitepress/theme/index.js +12 -0
  105. package/hooks/cipher.js +40 -0
  106. package/hooks/form.js +176 -0
  107. package/hooks/index.js +4 -0
  108. package/hooks/network.js +153 -0
  109. package/hooks/utils.js +61 -0
  110. package/index.html +17 -0
  111. package/index.js +10 -0
  112. package/package.json +75 -0
  113. package/playground/App.vue +45 -0
  114. package/playground/TestButton.vue +15 -0
  115. package/playground/TestForm.vue +271 -0
  116. package/playground/TestFormItem.vue +110 -0
  117. package/playground/TestGrid.vue +22 -0
  118. package/playground/TestPagination.vue +89 -0
  119. package/playground/TestQrcode.vue +7 -0
  120. package/playground/TestResult.vue +12 -0
  121. package/playground/TestSearch.vue +84 -0
  122. package/playground/http.js +23 -0
  123. package/playground/main.js +12 -0
  124. package/postcss.config.cjs +8 -0
  125. package/utils/style.js +13 -0
  126. package/utils/withInstall.js +7 -0
  127. package/vite.config.js +52 -0
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <ExPagination :search="{ columns, keyword: 'title' }" auto-load url="http://192.168.50.28/api/v1/weapp/topic">
3
+ <template #renderItem="{ item }">
4
+ <p style="margin-bottom: 100px">{{ item.title }}</p>
5
+ </template>
6
+ </ExPagination>
7
+ </template>
8
+
9
+ <script setup>
10
+ import ExPagination from "../components/pagination/ExPagination.jsx"
11
+ import { ref } from "vue"
12
+
13
+ const columns = ref([
14
+ {
15
+ key: "college",
16
+ type: "select",
17
+ title: "学院",
18
+ quick: true,
19
+ options: [
20
+ { text: "信息学院", value: "12" },
21
+ { text: "会计学院", value: "13" },
22
+ ],
23
+ },
24
+ {
25
+ key: "college1",
26
+ type: "select",
27
+ title: "学院",
28
+ expandable: "multiple",
29
+ options: [
30
+ { text: "信息学院", value: "12" },
31
+ { text: "会计学院", value: "13" },
32
+ ],
33
+ },
34
+ {
35
+ key: "age",
36
+ title: "年龄",
37
+ },
38
+ {
39
+ key: "gender",
40
+ type: "select",
41
+ title: "性别",
42
+ expandable: true,
43
+ options: [
44
+ { text: "男", value: "man" },
45
+ { text: "女", value: "female" },
46
+ ],
47
+ },
48
+ {
49
+ key: "cascade",
50
+ title: "级联选择器",
51
+ type: "cascade",
52
+ quick: true,
53
+ options: [
54
+ {
55
+ value: "zhejiang",
56
+ label: "Zhejiang",
57
+ children: [
58
+ {
59
+ value: "hangzhou",
60
+ label: "Hangzhou",
61
+ children: [
62
+ {
63
+ value: "xihu",
64
+ label: "West Lake",
65
+ },
66
+ ],
67
+ },
68
+ ],
69
+ },
70
+ {
71
+ value: "jiangsu",
72
+ label: "Jiangsu",
73
+ children: [
74
+ {
75
+ value: "nanjing",
76
+ label: "Nanjing",
77
+ children: [
78
+ {
79
+ value: "zhonghuamen",
80
+ label: "Zhong Hua Men",
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ ],
87
+ },
88
+ ])
89
+ </script>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <ExQrcode text="Hello world!" center :margin="10" :size="200"></ExQrcode>
3
+ </template>
4
+
5
+ <script setup>
6
+ import ExQrcode from "../components/qrcode/ExQrcode.jsx"
7
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <ExResult type="success" title="恭喜你" description="支付成功了">
3
+ <template #extra>
4
+ <Button type="primary" icon="arrow-left">返回</Button>
5
+ </template>
6
+ </ExResult>
7
+ </template>
8
+
9
+ <script setup>
10
+ import ExResult from "../components/result/ExResult.jsx"
11
+ import { Button } from "vant"
12
+ </script>
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <ExSearch :columns="columns"></ExSearch>
3
+ </template>
4
+
5
+ <script setup>
6
+ import ExSearch from "../components/search/ExSearch.jsx"
7
+
8
+ const columns = [
9
+ {
10
+ key: "college",
11
+ type: "select",
12
+ title: "学院",
13
+ quick: true,
14
+ options: [
15
+ { text: "信息学院", value: "12" },
16
+ { text: "会计学院", value: "13" },
17
+ ],
18
+ },
19
+ {
20
+ key: "college1",
21
+ type: "select",
22
+ title: "学院",
23
+ expandable: "multiple",
24
+ options: [
25
+ { text: "信息学院", value: "12" },
26
+ { text: "会计学院", value: "13" },
27
+ ],
28
+ },
29
+ {
30
+ key: "age",
31
+ title: "年龄",
32
+ },
33
+ {
34
+ key: "gender",
35
+ type: "select",
36
+ title: "性别",
37
+ expandable: true,
38
+ options: [
39
+ { text: "男", value: "man" },
40
+ { text: "女", value: "female" },
41
+ ],
42
+ },
43
+ {
44
+ key: "cascade",
45
+ title: "级联选择器",
46
+ type: "cascade",
47
+ quick: true,
48
+ options: [
49
+ {
50
+ value: "zhejiang",
51
+ label: "Zhejiang",
52
+ children: [
53
+ {
54
+ value: "hangzhou",
55
+ label: "Hangzhou",
56
+ children: [
57
+ {
58
+ value: "xihu",
59
+ label: "West Lake",
60
+ },
61
+ ],
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ value: "jiangsu",
67
+ label: "Jiangsu",
68
+ children: [
69
+ {
70
+ value: "nanjing",
71
+ label: "Nanjing",
72
+ children: [
73
+ {
74
+ value: "zhonghuamen",
75
+ label: "Zhong Hua Men",
76
+ },
77
+ ],
78
+ },
79
+ ],
80
+ },
81
+ ],
82
+ },
83
+ ]
84
+ </script>
@@ -0,0 +1,23 @@
1
+ import axios from "axios"
2
+
3
+ export default {
4
+ install(app, options) {
5
+ options = options || {}
6
+ axios.defaults.baseURL = options.baseUrl || "/"
7
+ axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"
8
+ axios.defaults.withCredentials = false
9
+
10
+ axios.interceptors.response.use(
11
+ (response) => {
12
+ return response && response.data
13
+ },
14
+ (error) => {
15
+ return Promise.reject(error)
16
+ },
17
+ )
18
+
19
+ app.config.globalProperties.$http = axios
20
+
21
+ app.provide("http", axios)
22
+ },
23
+ }
@@ -0,0 +1,12 @@
1
+ import { createApp } from "vue"
2
+ import App from "./App.vue"
3
+ import "vant/lib/index.css"
4
+ import http from "./http.js"
5
+ import ExTheme from "../components/theme"
6
+
7
+ const app = createApp(App)
8
+
9
+ app.use(ExTheme)
10
+ app.use(http)
11
+
12
+ app.mount("#app")
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ plugins: {
3
+ "postcss-pxtorem": {
4
+ rootValue: 37.5,
5
+ propList: ["*"],
6
+ },
7
+ },
8
+ }
package/utils/style.js ADDED
@@ -0,0 +1,13 @@
1
+ import { isNull, isNumber, isUndefined } from "lodash-es"
2
+
3
+ const genPixel = (num) => {
4
+ if (isNull(num) || isUndefined(num)) {
5
+ return 0
6
+ } else if (isNumber(num)) {
7
+ return `${num}px`
8
+ }
9
+
10
+ return num
11
+ }
12
+
13
+ export { genPixel }
@@ -0,0 +1,7 @@
1
+ export default (component) => {
2
+ component.install = (app) => {
3
+ const name = component.name || component.__name
4
+ app.component(name, component)
5
+ }
6
+ return component
7
+ }
package/vite.config.js ADDED
@@ -0,0 +1,52 @@
1
+ import { defineConfig } from "vite"
2
+ import vue from "@vitejs/plugin-vue"
3
+ import Components from "unplugin-vue-components/vite"
4
+ import { VantResolver } from "unplugin-vue-components/resolvers"
5
+ import vueJsx from "@vitejs/plugin-vue-jsx"
6
+ import eslintPlugin from "vite-plugin-eslint"
7
+
8
+ // https://vitejs.dev/config/
9
+ export default defineConfig({
10
+ plugins: [
11
+ vue(),
12
+ vueJsx(),
13
+ Components({
14
+ resolvers: [VantResolver()],
15
+ }),
16
+ eslintPlugin({
17
+ include: ["components/**/*.{js,vue,jsx}"],
18
+ }),
19
+ ],
20
+ build: {
21
+ lib: {
22
+ entry: ["./index.js", "./hooks/index.js"],
23
+ fileName: (format, entryName) => {
24
+ const extension = format === "es" ? "js" : "cjs"
25
+ return `${entryName}.${extension}`
26
+ },
27
+ },
28
+ sourcemap: true,
29
+ rollupOptions: {
30
+ input: {
31
+ "jobsys-explore": "./index.js",
32
+ hooks: "./hooks/index.js",
33
+ },
34
+ // make sure to externalize deps that shouldn't be bundledinto your library
35
+ external: ["vue", "vant", "axios", "lodash-es"],
36
+ output: {
37
+ exports: "named",
38
+ globals: {
39
+ vue: "Vue",
40
+ axios: "axios",
41
+ dayjs: "dayjs",
42
+ vant: "vant",
43
+ "lodash-es": "lodash",
44
+ },
45
+ },
46
+ },
47
+ },
48
+ server: {
49
+ host: true,
50
+ port: 3000,
51
+ },
52
+ })