zhytech-ui-mobile 1.0.0 → 1.0.2

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 (84) hide show
  1. package/.eslintignore +11 -0
  2. package/.eslintrc.cjs +253 -0
  3. package/.prettierignore +0 -0
  4. package/.prettierrc.json +9 -0
  5. package/.vscode/settings.json +131 -0
  6. package/index.html +39 -0
  7. package/package.json +4 -26
  8. package/shims-uni.d.ts +7 -0
  9. package/src/App.vue +24 -0
  10. package/src/components/dynamicForm/componentRenderer.vue +207 -0
  11. package/src/components/dynamicForm/components/advanced/index.ts +13 -0
  12. package/src/components/dynamicForm/components/advanced/upload.vue +108 -0
  13. package/src/components/dynamicForm/components/advanced/uploadImage.vue +107 -0
  14. package/src/components/dynamicForm/components/answerSheetPopup/answerSheetItem.vue +58 -0
  15. package/src/components/dynamicForm/components/answerSheetPopup/index.vue +111 -0
  16. package/src/components/dynamicForm/components/application/employee.vue +140 -0
  17. package/src/components/dynamicForm/components/application/grade.vue +183 -0
  18. package/src/components/dynamicForm/components/application/index.ts +14 -0
  19. package/src/components/dynamicForm/components/application/post.vue +136 -0
  20. package/src/components/dynamicForm/components/base/checkbox.vue +143 -0
  21. package/src/components/dynamicForm/components/base/index.ts +15 -0
  22. package/src/components/dynamicForm/components/base/input.vue +99 -0
  23. package/src/components/dynamicForm/components/base/label.vue +29 -0
  24. package/src/components/dynamicForm/components/base/radio.vue +155 -0
  25. package/src/components/dynamicForm/components/componentType.ts +16 -0
  26. package/src/components/dynamicForm/components/layout/groupLayout.vue +103 -0
  27. package/src/components/dynamicForm/components/layout/index.ts +12 -0
  28. package/src/components/dynamicForm/formRenderer.vue +567 -0
  29. package/src/components/dynamicForm/index.ts +21 -0
  30. package/src/components/dynamicForm/types/componentAttribute/advanced/uploadAttribute.ts +35 -0
  31. package/src/components/dynamicForm/types/componentAttribute/application/employeeAttribute.ts +42 -0
  32. package/src/components/dynamicForm/types/componentAttribute/application/gradeAttribute.ts +54 -0
  33. package/src/components/dynamicForm/types/componentAttribute/application/postAttribute.ts +42 -0
  34. package/src/components/dynamicForm/types/componentAttribute/base/checkboxAttribute.ts +38 -0
  35. package/src/components/dynamicForm/types/componentAttribute/base/inputAttribute.ts +31 -0
  36. package/src/components/dynamicForm/types/componentAttribute/base/radioAttribute.ts +30 -0
  37. package/src/components/dynamicForm/types/componentAttribute/baseAttribute.ts +110 -0
  38. package/src/components/dynamicForm/types/componentAttribute/editAttribute.ts +70 -0
  39. package/src/components/dynamicForm/types/componentAttribute/index.ts +37 -0
  40. package/src/components/dynamicForm/types/componentAttribute/layout/groupLayoutAttribute.ts +39 -0
  41. package/src/components/dynamicForm/types/documentView.ts +110 -0
  42. package/src/components/dynamicForm/types/enum.ts +109 -0
  43. package/src/components/dynamicForm/types/formAttribute.ts +93 -0
  44. package/src/components/dynamicForm/types/uploadOption.ts +31 -0
  45. package/src/env.d.ts +8 -0
  46. package/src/hooks/useMessage.ts +44 -0
  47. package/src/hooks/useToast.ts +29 -0
  48. package/src/hooks/useUtils.ts +201 -0
  49. package/src/index.ts +59 -0
  50. package/src/main.ts +19 -0
  51. package/src/manifest.json +72 -0
  52. package/src/pages/dynamicFormDemo.vue +1260 -0
  53. package/src/pages/dynamicFormExaminationDemo.vue +567 -0
  54. package/src/pages.json +58 -0
  55. package/src/shime-uni.d.ts +6 -0
  56. package/src/uni.scss +76 -0
  57. package/src/unocss/index.ts +20 -0
  58. package/src/unocss/rules.ts +139 -0
  59. package/src/unocss/shortcuts.ts +53 -0
  60. package/src/unocss/theme/index.ts +13 -0
  61. package/src/unocss/theme/themeOption/dark.ts +35 -0
  62. package/src/unocss/theme/themeOption/primary.ts +33 -0
  63. package/src/unocss/variants.ts +110 -0
  64. package/tsconfig.json +19 -0
  65. package/uno.config.ts +63 -0
  66. package/vite.config.ts +83 -0
  67. package/dist/build/h5/style.css +0 -1
  68. package/dist/build/h5/zhytech-ui-mobile.es.js +0 -19661
  69. package/dist/build/h5/zhytech-ui-mobile.umd.js +0 -1
  70. package/dist/dev/true/style.css +0 -455
  71. package/dist/dev/true/zhytech-ui-mobile.es.js +0 -3440
  72. package/dist/dev/true/zhytech-ui-mobile.umd.js +0 -3443
  73. /package/{dist/build/h5 → src}/static/iconfont/iconfont.css +0 -0
  74. /package/{dist/build/h5 → src}/static/iconfont/iconfont.ttf +0 -0
  75. /package/{dist/build/h5 → src}/static/iconfont/iconfont.woff +0 -0
  76. /package/{dist/build/h5 → src}/static/iconfont/iconfont.woff2 +0 -0
  77. /package/{dist/build/h5 → src}/static/scss/actionSheet.scss +0 -0
  78. /package/{dist/build/h5 → src}/static/scss/button.scss +0 -0
  79. /package/{dist/build/h5 → src}/static/scss/checkbox.scss +0 -0
  80. /package/{dist/build/h5 → src}/static/scss/form.scss +0 -0
  81. /package/{dist/build/h5 → src}/static/scss/index.scss +0 -0
  82. /package/{dist/build/h5 → src}/static/scss/input.scss +0 -0
  83. /package/{dist/build/h5 → src}/static/scss/picker.scss +0 -0
  84. /package/{dist/build/h5 → src}/static/scss/radio.scss +0 -0
package/.eslintignore ADDED
@@ -0,0 +1,11 @@
1
+ #排除文件,不让ESLint监测
2
+ vite.config.ts
3
+ *.d.ts
4
+ src/utils/*.*
5
+ src/types/*.*
6
+ src/main.ts
7
+ src/components/zb-table/*.*
8
+ src/components/zb-table/*/*.*
9
+ src/components/tnCalendar/*.*
10
+ src/components/tnCalendar/*/*.*
11
+ src/static/iconfont.js
package/.eslintrc.cjs ADDED
@@ -0,0 +1,253 @@
1
+ /* eslint-disable id-match */
2
+ /*
3
+ * FilePath : \.eslintrc.cjs
4
+ * Author : 苏军志
5
+ * Date : 2023-05-07 08:45
6
+ * LastEditors : 来江禹
7
+ * LastEditTime : 2024-08-07 10:53
8
+ * Description : ESLint规则
9
+ * CodeIterationRecord:
10
+ */
11
+
12
+ require("@rushstack/eslint-patch/modern-module-resolution");
13
+
14
+ module.exports = {
15
+ env: {
16
+ browser: true,
17
+ es2021: true,
18
+ commonjs: true,
19
+ es6: true,
20
+ node: true
21
+ },
22
+ root: true,
23
+ extends: [
24
+ "plugin:vue/vue3-essential",
25
+ "eslint:recommended",
26
+ "@vue/eslint-config-typescript",
27
+ "@vue/eslint-config-prettier/skip-formatting",
28
+ "./.eslintrc-auto-import.json"
29
+ ],
30
+ globals: {
31
+ defineEmits: "readonly",
32
+ defineProps: "readonly",
33
+ defineExpose: "readonly",
34
+ withDefaults: "readonly",
35
+ // 以下是自定义全局类型
36
+ uni: "readonly",
37
+ wx: "readonly",
38
+ getCurrentPages: "readonly",
39
+ CascaderList: "readonly",
40
+ MQMessage: "readonly",
41
+ OptionType: "readonly",
42
+ SheetDictionaryType: "readonly",
43
+ AdministrationParams: "readonly",
44
+ FilterItemType: "readonly",
45
+ DocumentView: "readonly",
46
+ SettingDictionaryParams: "readonly",
47
+ TableView: "readonly",
48
+ TableColumn: "readonly"
49
+ },
50
+ parserOptions: {
51
+ ecmaVersion: "latest"
52
+ },
53
+ // "off" 或 0 - 关闭规则
54
+ // "warn" 或 1 - 启用并视作警告(不影响退出)。
55
+ // "error" 或 2 - 启用并视作错误(触发时退出代码为 1)
56
+ rules: {
57
+ "vue/multi-word-component-names": 0, // 关闭多词命名
58
+ "no-alert": 2, // 禁止使用alert confirm prompt
59
+ "no-array-constructor": 2, // 禁止使用数组构造器
60
+ "no-bitwise": 0, // 禁止使用按位运算符
61
+ "no-caller": 1, // 禁止使用arguments.caller或arguments.callee
62
+ "no-catch-shadow": 2, // 禁止catch子句参数与外部作用域变量同名
63
+ "no-class-assign": 2, // 禁止给类赋值
64
+ "no-cond-assign": 2, // 禁止在条件表达式中使用赋值语句
65
+ "no-console": 1, // 禁止使用console
66
+ "no-const-assign": 2, // 禁止修改const声明的变量
67
+ "no-constant-condition": 2, // 禁止在条件中使用常量表达式 if(true) if(1)
68
+ "no-continue": 0, // 禁止使用continue
69
+ "no-control-regex": 2, // 禁止在正则表达式中使用控制字符
70
+ "no-debugger": 2, // 禁止使用debugger
71
+ "no-delete-var": 2, // 不能对var声明的变量使用delete操作符
72
+ "no-div-regex": 1, // 不能使用看起来像除法的正则表达式/=foo/
73
+ "no-dupe-keys": 2, // 在创建对象字面量时不允许键重复 {a:1,a:1}
74
+ "no-dupe-args": 2, // 函数参数不能重复
75
+ "no-duplicate-case": 2, // switch中的case标签不能重复
76
+ "no-else-return": 2, // 如果if语句里面有return,后面不能跟else语句
77
+ "no-empty": 2, // 块语句中的内容不能为空
78
+ "no-empty-character-class": 2, // 正则表达式中的[]内容不能为空
79
+ "no-eq-null": 2, // 禁止对null使用==或!=运算符
80
+ "no-eval": 0, // 禁止使用eval
81
+ "no-ex-assign": 2, // 禁止给catch语句中的异常参数赋值
82
+ "no-extend-native": 0, // 禁止扩展native对象
83
+ "no-extra-bind": 2, // 禁止不必要的函数绑定
84
+ "no-extra-boolean-cast": 2, // 禁止不必要的bool转换
85
+ "no-extra-parens": 0, // 禁止非必要的括号
86
+ "no-extra-semi": 2, // 禁止多余的冒号
87
+ "no-fallthrough": 2, // 禁止switch穿透
88
+ "no-floating-decimal": 2, // 禁止省略浮点数中的0 .5 3.
89
+ "no-func-assign": 2, // 禁止重复的函数声明
90
+ "no-implicit-coercion": 1, // 禁止隐式转换
91
+ "no-implied-eval": 0, // 禁止使用隐式eval
92
+ "no-inline-comments": 0, // 禁止行内备注
93
+ "no-inner-declarations": [2, "functions"], // 禁止在块语句中使用声明(变量或函数)
94
+ "no-invalid-regexp": 2, // 禁止无效的正则表达式
95
+ "no-invalid-this": 2, // 禁止无效的this,只能用在构造器,类,对象字面量
96
+ "no-irregular-whitespace": 2, // 不能有不规则的空格
97
+ "no-iterator": 2, // 禁止使用__iterator__ 属性
98
+ "no-label-var": 2, // label名不能与var声明的变量名相同
99
+ "no-labels": 2, // 禁止标签声明
100
+ "no-lone-blocks": 2, // 禁止不必要的嵌套块
101
+ "no-lonely-if": 2, // 禁止else语句内只有if语句
102
+ "no-loop-func": 1, // 禁止在循环中使用函数(如果没有引用外部变量不形成闭包就可以)
103
+ "no-mixed-requires": [0, false], // 声明时不能混用声明类型
104
+ "no-mixed-spaces-and-tabs": 1, // 禁止混用tab和空格
105
+ "linebreak-style": [0, "windows"], // 换行风格
106
+ "no-multi-spaces": 1, // 不能用多余的空格
107
+ "no-multi-str": 2, // 字符串不能用\换行
108
+ "no-multiple-empty-lines": [1, { max: 1 }], // 空行最多不能超过1行
109
+ "no-native-reassign": 2, // 不能重写native对象
110
+ "no-negated-in-lhs": 2, // in 操作符的左边不能有!
111
+ "no-nested-ternary": 0, // 禁止使用嵌套的三目运算
112
+ "no-new": 1, // 禁止在使用new构造一个实例后不赋值
113
+ "no-new-func": 1, // 禁止使用new Function
114
+ "no-new-object": 2, // 禁止使用new Object()
115
+ "no-new-require": 2, // 禁止使用new require
116
+ "no-new-wrappers": 2, // 禁止使用new创建包装实例,new String new Boolean new Number
117
+ "no-obj-calls": 2, // 不能调用内置的全局对象,比如Math() JSON()
118
+ "no-octal": 2, // 禁止使用八进制数字
119
+ "no-octal-escape": 2, // 禁止使用八进制转义序列
120
+ "no-param-reassign": 2, // 禁止给参数重新赋值
121
+ "no-path-concat": 0, // node中不能使用__dirname或__filename做路径拼接
122
+ "no-plusplus": 0, // 禁止使用++,--
123
+ "no-process-env": 0, // 禁止使用process.env
124
+ "no-process-exit": 0, // 禁止使用process.exit()
125
+ "no-proto": 2, // 禁止使用__proto__属性
126
+ "no-redeclare": 2, // 禁止重复声明变量
127
+ "no-regex-spaces": 2, // 禁止在正则表达式字面量中使用多个空格 /foo bar/
128
+ "no-restricted-modules": 0, // 如果禁用了指定模块,使用就会报错
129
+ "no-return-assign": 0, // return 语句中不能有赋值表达式
130
+ "no-script-url": 0, // 禁止使用javascript:void(0)
131
+ "no-self-compare": 2, // 不能比较自身
132
+ "no-sequences": 0, // 禁止使用逗号运算符
133
+ "no-shadow": 0, // 外部作用域中的变量不能与它所包含的作用域中的变量或参数同名
134
+ "no-shadow-restricted-names": 2, // 严格模式中规定的限制标识符不能作为声明时的变量名使用
135
+ "no-spaced-func": 2, // 函数调用时 函数名与()之间不能有空格
136
+ "no-sparse-arrays": 2, // 禁止稀疏数组, [1,,2]
137
+ "no-sync": 0, // nodejs 禁止同步方法
138
+ "no-ternary": 0, // 禁止使用三目运算符
139
+ "no-trailing-spaces": ["error", { ignoreComments: true }], // 一行结束后面不要有空格
140
+ "no-this-before-super": 0, // 在调用super()之前不能使用this或super
141
+ "no-throw-literal": 2, // 禁止抛出字面量错误 throw "error";
142
+ "no-undef": 2, // 不能有未定义的变量
143
+ "no-undef-init": 0, // 变量初始化时不能直接给它赋值为undefined
144
+ "no-undefined": 0, // 不能使用undefined
145
+ "no-unexpected-multiline": 2, // 避免多行表达式
146
+ "no-underscore-dangle": 0, // 标识符不能以_开头或结尾
147
+ "no-unneeded-ternary": 2, // 禁止不必要的嵌套 var isYes = answer === 1 ? true : false;
148
+ "no-unreachable": 2, // 不能有无法执行的代码
149
+ "no-unused-expressions": 0, // 禁止无用的表达式
150
+ "@typescript-eslint/no-unused-vars": ["warn", { args: "after-used" }], // 不能有声明后未被使用的变量或参数
151
+ "no-use-before-define": 0, // 未定义前不能使用
152
+ "no-useless-call": 2, // 禁止不必要的call和apply
153
+ "no-void": 2, // 禁用void操作符
154
+ "no-var": 2, // 禁用var,用let和const代替
155
+ "no-warning-comments": [1, { terms: ["todo", "fixme", "xxx"], location: "start" }], // 不能有警告备注
156
+ "no-with": 2, // 禁用with
157
+ "array-bracket-spacing": [2, "never"], // 是否允许非空数组里面有多余的空格
158
+ "arrow-parens": 2, // 箭头函数用小括号括起来
159
+ "arrow-spacing": 0, // =>的前/后括号
160
+ "accessor-pairs": 0, // 在对象中使用getter/setter
161
+ "block-scoped-var": 2, // 块语句中使用var
162
+ "brace-style": [1, "1tbs"], // 大括号风格
163
+ "callback-return": 1, // 避免多次调用回调什么的
164
+ camelcase: 2, // 强制驼峰法命名
165
+ "comma-dangle": 1, // 对象字面量项尾不能有逗号
166
+ "comma-spacing": 0, // 逗号前后的空格
167
+ "comma-style": [2, "last"], // 逗号风格,换行时在行首还是行尾
168
+ complexity: [0, 11], // 循环复杂度
169
+ "computed-property-spacing": [0, "never"], // 是否允许计算后的键名什么的
170
+ "consistent-return": 0, // return 后面是否允许省略
171
+ "consistent-this": [2, "that"], // this别名
172
+ "constructor-super": 0, // 非派生类不能调用super,派生类必须调用super
173
+ curly: [2, "all"], // 必须使用 if(){} 中的{}
174
+ "default-case": 2, // switch语句最后必须有default
175
+ "dot-location": 0, // 对象访问符的位置,换行的时候在行首还是行尾
176
+ "dot-notation": [0, { allowKeywords: true }], // 避免不必要的方括号
177
+ "eol-last": 0, // 文件以单一的换行符结束
178
+ eqeqeq: 1, // 必须使用全等
179
+ "func-names": 0, // 函数表达式必须有名字
180
+ "func-style": [0, "declaration"], // 函数风格,规定只能使用函数声明/函数表达式
181
+ "generator-star-spacing": 0, // 生成器函数*的前后空格
182
+ "guard-for-in": 0, // for in循环要用if语句过滤
183
+ "handle-callback-err": 0, // nodejs 处理错误
184
+ "id-length": 0, // 变量名长度
185
+ indent: ["error", 2, { SwitchCase: 1 }], // 缩进风格
186
+ "init-declarations": 0, // 声明时必须赋初值
187
+ "key-spacing": [0, { beforeColon: false, afterColon: true }], // 对象字面量中冒号的前后空格
188
+ "lines-around-comment": 0, // 行前/行后备注
189
+ "max-depth": [0, 4], // 嵌套块深度
190
+ "max-len": [0, 80, 4], // 字符串最大长度
191
+ "max-nested-callbacks": [0, 2], // 回调嵌套深度
192
+ "max-params": [0, 3], // 函数最多只能有3个参数
193
+ "max-statements": [0, 10], // 函数内最多有几个声明
194
+ "new-cap": 0, // 函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用
195
+ "new-parens": 2, // new时必须加小括号
196
+ "newline-after-var": 0, // 变量声明后是否需要空一行
197
+ "object-curly-spacing": [0, "never"], // 大括号内是否允许不必要的空格
198
+ "object-shorthand": 0, // 强制对象字面量缩写语法
199
+ "one-var": 0, // 连续声明
200
+ "operator-assignment": [0, "always"], // 赋值运算符 += -=什么的
201
+ "operator-linebreak": [2, "after", { overrides: { "?": "ignore", ":": "ignore" } }], // 换行时运算符在行尾还是行首
202
+ "padded-blocks": 0, // 块语句内行首行尾是否要空行
203
+ "prefer-const": 0, // 首选const
204
+ "prefer-spread": 0, // 首选展开运算
205
+ "prefer-reflect": 0, // 首选Reflect的方法
206
+ quotes: [1, "double"], // 引号类型 `` "" ''
207
+ "quote-props": [0, "always"], // 对象字面量中的属/性名是否强制双引号
208
+ radix: 0, // parseInt必须指定第二个参数
209
+ // 命名检测,命名符合指定正则表达式,这里正则使用首字母小写,驼峰
210
+ // id-match有以下选项
211
+ // "properties": false(默认)不检查对象属性
212
+ // "properties": true 要求对象字面量属性和成员表达式赋值属性匹配指定的正则表达式
213
+ // "classFields": false(默认)不分类字段名
214
+ // "classFields": true 要求类字段名匹配指定的正则表达式
215
+ // "onlyDeclarations": false(默认)要求所有变量名匹配指定的正则表达式
216
+ // "onlyDeclarations": true 只需要 var、function 和 class 声明来匹配指定的正则表达式
217
+ // "ignoreDestructuring": false(默认)对解构标识符强制执行 id-match
218
+ // "ignoreDestructuring": true 不检查解构标识符
219
+ "id-match": [
220
+ 2,
221
+ "^[a-z]+([A-Z]|[a-z]+|[0-9])*$",
222
+ {
223
+ properties: true,
224
+ classFields: true,
225
+ onlyDeclarations: true,
226
+ ignoreDestructuring: true
227
+ }
228
+ ],
229
+ "require-yield": 0, // 生成器函数必须有yield
230
+ semi: [2, "always"], // 语句强制分号结尾
231
+ "semi-spacing": [0, { before: false, after: true }], // 分号前后空格
232
+ "sort-vars": 0, // 变量声明时排序
233
+ "space-after-keywords": [0, "always"], // 关键字后面是否要空一格
234
+ "space-before-blocks": [0, "always"], // 不以新行开始的块{前面要不要有空格
235
+ "space-before-function-paren": [0, "always"], // 函数定义时括号前面要不要有空格
236
+ "space-in-parens": [0, "never"], // 小括号里面要不要有空格
237
+ "space-infix-ops": 0, // 中缀操作符周围要不要有空格
238
+ "space-unary-ops": [0, { words: true, nonwords: false }], // 一元运算符的前/后要不要加空格
239
+ "spaced-comment": ["error", "always", { markers: ["#region", "#endregion"] }], // 注释风格要不要有空格什么的
240
+ "keyword-spacing": 2, // return throw case后面要不要加空格
241
+ strict: 2, // 使用严格模式
242
+ "use-isnan": 2, // 禁止比较时使用NaN,只能用isNaN()
243
+ "valid-jsdoc": 0, // jsdoc规则
244
+ "valid-typeof": 2, // 必须使用合法的typeof的值
245
+ "vars-on-top": 2, // var必须放在作用域顶部
246
+ "wrap-iife": [2, "inside"], // 立即执行函数表达式的小括号风格
247
+ "wrap-regex": 0, // 正则表达式字面量用小括号包起来
248
+ yoda: [2, "never"], // 禁止尤达条件
249
+ "no-empty-pattern": 1,
250
+ "no-useless-escape": 1, // 在字符串、模板字面和正则表达式中省略非特殊字符不会有任何影响
251
+ "no-case-declarations": 1 // 不允许在 case/default 子句中进行 lexical 声明(let、const、function 和 class)
252
+ }
253
+ };
File without changes
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": true,
4
+ "tabWidth": 2,
5
+ "singleQuote": false,
6
+ "printWidth": 140,
7
+ "trailingComma": "none",
8
+ "bracketSpacing": true
9
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ //开启自动修复
3
+ "editor.codeActionsOnSave": {
4
+ "source.fixAll": "explicit",
5
+ "source.fixAll.eslint": "explicit",
6
+ "source.fixAll.stylelint": "explicit"
7
+ },
8
+ // tab 大小为2个空格
9
+ "editor.tabSize": 2,
10
+ // 保存时格式化
11
+ "editor.formatOnSave": true,
12
+ // 开启 vscode 文件路径导航
13
+ "breadcrumbs.enabled": true,
14
+ // prettier 设置语句末尾加分号
15
+ "prettier.semi": true,
16
+ // prettier 设置强制单引号,false则是强制双引号
17
+ "prettier.singleQuote": false,
18
+ // 显示 markdown 中英文切换时产生的特殊字符
19
+ "editor.renderControlCharacters": true,
20
+ // 配置语言的文件关联
21
+ "files.associations": {
22
+ "pages.json": "jsonc", // pages.json 可以写注释
23
+ "manifest.json": "jsonc" // manifest.json 可以写注释
24
+ },
25
+ // 默认格式化工具选择prettier
26
+ "[vue]": {
27
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
28
+ },
29
+ "[scss]": {
30
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
31
+ },
32
+ "[typescript]": {
33
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
34
+ },
35
+ "[jsonc]": {
36
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
37
+ },
38
+
39
+ // 方法体注释模板
40
+ "fileheader.cursorMode": {
41
+ "description": "",
42
+ "param": "",
43
+ "return": ""
44
+ },
45
+ // 通用配置
46
+ "fileheader.configObj": {
47
+ // 自动添加头部注释黑名单
48
+ "prohibitAutoAdd": ["md"],
49
+ "dateFormat": "YYYY-MM-DD HH:mm", // 默认格式
50
+ "autoAdd": true, // 默认开启,
51
+ "autoAlready": true, // 只有支持的语言才自动生成
52
+ "wideSame": true, // 设置为true开启
53
+ "wideNum": 13, // 字段长度 默认为13
54
+ "functionParamsShape": "no type", // 移除参数外形`{*}`
55
+ "moveCursor": true, // 自动移动光标到Description所在行,
56
+ "NoMatchParams": "no show param and return", // 匹配不到参数和返回值 不显示param那一行
57
+ "language": {
58
+ "vue": {
59
+ "head": "<!--",
60
+ "middle": " * ",
61
+ "end": " -->",
62
+ // 函数自定义注释符号:如果有此配置 会默认使用
63
+ "functionSymbol": {
64
+ "head": "/**", // 统一增加几个*号
65
+ "middle": " * @",
66
+ "end": " */"
67
+ },
68
+ "functionParams": "typescript" // 函数注释使用ts语言的解析逻辑
69
+ },
70
+ "ts/js": {
71
+ "head": "/*",
72
+ "middle": " * ",
73
+ "end": " */",
74
+ // 函数自定义注释符号:如果有此配置 会默认使用
75
+ "functionSymbol": {
76
+ "head": "/**", // 统一增加几个*号
77
+ "middle": " * @",
78
+ "end": " */"
79
+ },
80
+ "functionParams": "typescript" // 函数注释使用ts语言的解析逻辑
81
+ }
82
+ }
83
+ },
84
+ "unocss.root": "d:/work/CaseManagement/case-management-mobile",
85
+ "editor.quickSuggestions": {
86
+ "strings": true
87
+ },
88
+ "template-string-converter.validLanguages": ["svelte", "typescript", "javascript", "typescriptreact", "javascriptreact", "vue"],
89
+ "cSpell.words": [
90
+ "Aplipay",
91
+ "automator",
92
+ "autoscan",
93
+ "climblee",
94
+ "commitlint",
95
+ "Datas",
96
+ "dcloudio",
97
+ "demi",
98
+ "easycom",
99
+ "iconfont",
100
+ "iconify",
101
+ "kuaishou",
102
+ "micromessenger",
103
+ "miniprogram",
104
+ "Palceholder",
105
+ "persistedstate",
106
+ "postupgrade",
107
+ "qrcode",
108
+ "quickapp",
109
+ "refresherrefresh",
110
+ "scrolltolower",
111
+ "stacktracey",
112
+ "tabbar",
113
+ "Toutiao",
114
+ "uniapp",
115
+ "unibest",
116
+ "unocss",
117
+ "unplugin",
118
+ "uvui",
119
+ "Wechat",
120
+ "WechatMiniprogram",
121
+ "Weixin",
122
+ "zhytech"
123
+ ],
124
+ "typescript.tsdk": "node_modules\\typescript\\lib",
125
+ "explorer.fileNesting.enabled": true,
126
+ "explorer.fileNesting.expand": false,
127
+ "explorer.fileNesting.patterns": {
128
+ ".eslintrc.cjs": ".eslintignore,.prettierignore,.prettierrc.*,.eslintrc-auto-import.json"
129
+ },
130
+ "marscode.chatLanguage": "cn"
131
+ }
package/index.html ADDED
@@ -0,0 +1,39 @@
1
+ <!--
2
+ * FilePath : \index.html
3
+ * Author : 苏军志
4
+ * Date : 2024-04-19 14:12
5
+ * LastEditors : 苏军志
6
+ * LastEditTime : 2025-09-04 10:11
7
+ * Description : 软件入口
8
+ * CodeIterationRecord:
9
+ -->
10
+ <!DOCTYPE html>
11
+ <html>
12
+ <head>
13
+ <meta charset="UTF-8" />
14
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
15
+ <meta http-equiv="Pragma" content="no-cache" />
16
+ <meta http-equiv="Expires" content="0" />
17
+ <script>
18
+ var coverSupport =
19
+ "CSS" in window && typeof CSS.supports === "function" && (CSS.supports("top: env(a)") || CSS.supports("top: constant(a)"));
20
+ document.write(
21
+ '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
22
+ (coverSupport ? ", viewport-fit=cover" : "") +
23
+ '" />'
24
+ );
25
+ const refreshPage = localStorage.getItem("refreshPage");
26
+ if (refreshPage !== "1") {
27
+ localStorage.setItem("refreshPage", "1");
28
+ location.reload();
29
+ } else {
30
+ localStorage.setItem("refreshPage", "0");
31
+ }
32
+ </script>
33
+ <title></title>
34
+ </head>
35
+ <body>
36
+ <div id="app"></div>
37
+ <script type="module" src="/src/main.ts"></script>
38
+ </body>
39
+ </html>
package/package.json CHANGED
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "zhytech-ui-mobile",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "scripts": {
5
5
  "dev": "uni",
6
6
  "build": "uni build",
7
7
  "build:mp-weixin": "uni build -p mp-weixin",
8
8
  "type-check": "vue-tsc --noEmit"
9
9
  },
10
- "files": [
11
- "dist"
12
- ],
13
10
  "description": "一个基于Vue3 + wot-design-uni + TypeScript + unocss封装的前端UI组件库",
14
11
  "author": "SJZ",
15
12
  "keywords": [
@@ -34,44 +31,25 @@
34
31
  "./dist/style.css": "./dist/style.css"
35
32
  },
36
33
  "publishConfig": {
37
- "registry": "https://registry.npmjs.org/"
34
+ "registry": "https://registry.npmjs.org/",
35
+ "directory": "dist/build/h5"
38
36
  },
39
37
  "volta": {
40
38
  "node": "18.16.0"
41
39
  },
42
40
  "dependencies": {
43
41
  "@dcloudio/uni-app": "3.0.0-4000820240401001",
44
- "@dcloudio/uni-app-plus": "3.0.0-4000820240401001",
45
42
  "@dcloudio/uni-components": "3.0.0-4000820240401001",
46
43
  "@dcloudio/uni-h5": "3.0.0-4000820240401001",
47
- "@dcloudio/uni-mp-alipay": "3.0.0-4000820240401001",
48
- "@dcloudio/uni-mp-baidu": "3.0.0-4000820240401001",
49
- "@dcloudio/uni-mp-jd": "3.0.0-4000820240401001",
50
- "@dcloudio/uni-mp-kuaishou": "3.0.0-4000820240401001",
51
- "@dcloudio/uni-mp-lark": "3.0.0-4000820240401001",
52
- "@dcloudio/uni-mp-qq": "3.0.0-4000820240401001",
53
- "@dcloudio/uni-mp-toutiao": "3.0.0-4000820240401001",
54
44
  "@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001",
55
- "@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001",
56
- "@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001",
57
45
  "@dcloudio/uni-ui": "^1.5.11",
58
- "@stomp/stompjs": "^7.1.1",
59
46
  "@vueuse/core": "^10.11.1",
60
- "pinia": "2.0.27",
61
- "pinia-plugin-persistedstate": "^3.2.3",
62
- "qs": "5.0.0",
63
- "vconsole": "^3.15.1",
64
47
  "vue": "3.3.11",
65
- "weixin-js-sdk": "^1.6.5",
66
48
  "wot-design-uni": "^1.12.4"
67
49
  },
68
50
  "devDependencies": {
69
- "@dcloudio/types": "^3.4.19",
70
- "@dcloudio/uni-automator": "3.0.0-4000820240401001",
71
- "@dcloudio/uni-cli-shared": "3.0.0-4000820240401001",
72
- "@dcloudio/uni-stacktracey": "3.0.0-4000820240401001",
51
+ "@dcloudio/types": "^3.4.19",
73
52
  "@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001",
74
- "@rushstack/eslint-patch": "^1.12.0",
75
53
  "@types/node": "^24.3.1",
76
54
  "@types/wechat-miniprogram": "^3.4.8",
77
55
  "@uni-helper/uni-app-types": "^0.5.13",
package/shims-uni.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ /// <reference types='@dcloudio/types' />
2
+ import "vue";
3
+
4
+ declare module "@vue/runtime-core" {
5
+ type Hooks = App.AppInstance & Page.PageInstance;
6
+ interface ComponentCustomOptions extends Hooks {}
7
+ }
package/src/App.vue ADDED
@@ -0,0 +1,24 @@
1
+ <!--
2
+ * FilePath : \src\App.vue
3
+ * Author : 苏军志
4
+ * Date : 2024-04-19 14:12
5
+ * LastEditors : 苏军志
6
+ * LastEditTime : 2025-09-05 11:18
7
+ * Description :
8
+ * CodeIterationRecord:
9
+ -->
10
+ <template><view></view></template>
11
+ <style lang="scss">
12
+ @import "./static/iconfont/iconfont.css";
13
+ body {
14
+ overflow: hidden;
15
+ font-family: "Microsoft Yahei", "Avenir", Helvetica, Arial, sans-serif, "Times New Roman";
16
+ }
17
+ uni-page-body {
18
+ height: 100%;
19
+ }
20
+ .uni-tabbar__icon {
21
+ margin-top: 5px !important;
22
+ height: 20px !important;
23
+ }
24
+ </style>