@vunk/form 1.1.9 → 1.1.11

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.
@@ -188,14 +188,10 @@ var _sfc_main$1 = defineComponent({
188
188
  },
189
189
  emits,
190
190
  props,
191
- setup(props2, { emit }) {
192
- const inputBindProps = _VkfInputCtx.createBindProps(props2, [
193
- "inputSlots",
194
- "readonly",
195
- "modelValue",
196
- "type",
197
- "id"
198
- ]);
191
+ setup(props2, {
192
+ emit
193
+ }) {
194
+ const inputBindProps = _VkfInputCtx.createBindProps(props2, ["inputSlots", "readonly", "modelValue", "type", "id"]);
199
195
  const inputOnEmits = _VkfInputCtx.createOnEmits(emit, ["update:modelValue"]);
200
196
  const mapBindProps = _VmGeojsonLayerCtx$1.createBindProps(props2, ["data", "type", "paint"]);
201
197
  const mapOnEmits = _VmGeojsonLayerCtx$1.createOnEmits(emit, ["change"]);
@@ -235,9 +231,9 @@ var _sfc_main$1 = defineComponent({
235
231
  duration: 1500
236
232
  });
237
233
  };
238
- const append = () => /* @__PURE__ */ React.createElement(AppendVue, {
239
- onMapLocationClick: mapFit
240
- });
234
+ const append = () => createVNode(AppendVue, {
235
+ "onMapLocationClick": mapFit
236
+ }, null);
241
237
  return {
242
238
  mapFit,
243
239
  inputBindProps,
@@ -1,7 +1,7 @@
1
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, normalizeClass, createCommentVNode, computed, shallowRef, ref, onMounted, nextTick, mergeProps, toHandlers, withModifiers, renderSlot, resolveDynamicComponent, withDirectives, vShow } from 'vue';
1
2
  import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
2
3
  import { EMPTY_FEATURE_COLLECTION } from '@vumap/core/shared/static';
3
4
  import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
4
- import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, normalizeClass, createCommentVNode, computed, shallowRef, ref, onMounted, nextTick, mergeProps, toHandlers, withModifiers, renderSlot, resolveDynamicComponent, withDirectives, vShow } from 'vue';
5
5
  import { ElButton, ElIcon, ElButtonGroup, ElUpload, ElDialog, ElMessage } from 'element-plus';
6
6
  import { VmMap } from '@vumap/core';
7
7
  import { VmTdtLayers } from '@vumap/core/components/tdt-layers';
@@ -775,12 +775,10 @@ var _sfc_main = defineComponent({
775
775
  },
776
776
  emits,
777
777
  props,
778
- setup(props2, { emit }) {
779
- const inputBindProps = _VkfInputCtx.createBindProps(props2, [
780
- "inputSlots",
781
- "readonly",
782
- "modelValue"
783
- ]);
778
+ setup(props2, {
779
+ emit
780
+ }) {
781
+ const inputBindProps = _VkfInputCtx.createBindProps(props2, ["inputSlots", "readonly", "modelValue"]);
784
782
  const inputOnEmits = _VkfInputCtx.createOnEmits(emit, ["update:modelValue"]);
785
783
  const mapOptions = computed(() => {
786
784
  return {
@@ -834,12 +832,12 @@ var _sfc_main = defineComponent({
834
832
  const map = await mapDef.promise;
835
833
  map.resize();
836
834
  };
837
- const append = () => /* @__PURE__ */ React.createElement(AppendVue, {
838
- dialog: props2.dialogEdit,
839
- disabled: props2.disabled,
840
- onUpload,
841
- onEdit
842
- });
835
+ const append = () => createVNode(AppendVue, {
836
+ "dialog": props2.dialogEdit,
837
+ "disabled": props2.disabled,
838
+ "onUpload": onUpload,
839
+ "onEdit": onEdit
840
+ }, null);
843
841
  async function onUpload(e) {
844
842
  if (!e.raw)
845
843
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {
@@ -4,9 +4,13 @@ export declare const PATTERN: {
4
4
  */
5
5
  normal: RegExp;
6
6
  /**
7
- * 只能由数字或字母组成, 且不能以数字开头
7
+ * 只能由数字、字母、下划线组成, 且不能以下划线和数字开头
8
8
  */
9
9
  code: RegExp;
10
+ /**
11
+ * 只能由数字或字母组成, 且不能以数字开头
12
+ */
13
+ strictCode: RegExp;
10
14
  /**
11
15
  * 只能由字母、数字或特殊字符组成,且长度在8到16之间
12
16
  */
@@ -1,6 +1,7 @@
1
1
  const PATTERN = {
2
2
  normal: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
3
- code: /^[a-zA-Z][a-zA-Z0-9]*$/,
3
+ code: /^[a-zA-Z][a-zA-Z0-9_]*$/,
4
+ strictCode: /^[a-zA-Z][a-zA-Z0-9]*$/,
4
5
  password: /^[a-zA-Z0-9~!@#$%^&*()_+|<>?:{}\.]{8,16}$/,
5
6
  strictPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/,
6
7
  phone: /^1[3456789]\d{9}$/
@@ -10,7 +11,16 @@ const PATTERN_OPTIONS = [
10
11
  { label: "\u5BC6\u7801", value: PATTERN.password, title: "\u53EA\u80FD\u7531\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u7279\u6B8A\u5B57\u7B26\u7EC4\u6210\uFF0C\u4E14\u957F\u5EA6\u57288\u523016\u4E4B\u95F4" },
11
12
  { label: "\u4E25\u683C\u5BC6\u7801", value: PATTERN.strictPassword, title: "\u8981\u6C42\u5BC6\u7801\u5FC5\u987B\u540C\u65F6\u5305\u542B\u81F3\u5C11\u4E00\u4E2A\u5C0F\u5199\u5B57\u6BCD\u3001\u4E00\u4E2A\u5927\u5199\u5B57\u6BCD\u548C\u4E00\u4E2A\u6570\u5B57\uFF0C\u4E14\u957F\u5EA6\u57288\u523016\u4E4B\u95F4" },
12
13
  { label: "\u624B\u673A\u53F7", value: PATTERN.phone, title: "\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801" },
13
- { label: "\u7F16\u7801", value: PATTERN.code, title: "\u53EA\u80FD\u7531\u6570\u5B57\u6216\u5B57\u6BCD\u7EC4\u6210, \u4E14\u4E0D\u80FD\u4EE5\u6570\u5B57\u5F00\u5934" }
14
+ {
15
+ label: "\u7F16\u7801",
16
+ value: PATTERN.code,
17
+ title: "\u53EA\u80FD\u7531\u6570\u5B57\u3001\u5B57\u6BCD\u3001\u4E0B\u5212\u7EBF\u7EC4\u6210, \u4E14\u4E0D\u80FD\u4EE5\u4E0B\u5212\u7EBF\u548C\u6570\u5B57\u5F00\u5934"
18
+ },
19
+ {
20
+ label: "\u4E25\u683C\u7F16\u7801",
21
+ value: PATTERN.strictCode,
22
+ title: "\u53EA\u80FD\u7531\u6570\u5B57\u6216\u5B57\u6BCD\u7EC4\u6210, \u4E14\u4E0D\u80FD\u4EE5\u6570\u5B57\u5F00\u5934"
23
+ }
14
24
  ];
15
25
 
16
26
  export { PATTERN, PATTERN_OPTIONS };