y-design-ssr 0.0.38-beta.4 → 0.1.0

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.
package/README.md CHANGED
@@ -1,2 +1,8 @@
1
1
 
2
- 一个基于 VUE3 的 UI 组件库
2
+ 一个基于 VUE3 的 UI 组件库
3
+
4
+ node版本:16.9.1
5
+
6
+ v0.0.36 及之前为webpack打包,不支持esm
7
+
8
+ v0.1.0 后改为vite打包,支持esm、umd
package/libs/index.mjs CHANGED
@@ -3845,14 +3845,17 @@ const Popup = /* @__PURE__ */ defineComponent({
3845
3845
  const onClickMask = (event) => {
3846
3846
  emit("clickMask", event);
3847
3847
  if (props.isCloseOnClickMask) {
3848
- emit("update:modelValue", false);
3848
+ visible.value = false;
3849
3849
  }
3850
3850
  };
3851
+ const visible = computed({
3852
+ get: () => props.modelValue,
3853
+ set: (value) => emit("update:modelValue", value)
3854
+ });
3851
3855
  return () => {
3852
3856
  const {
3853
3857
  teleport,
3854
3858
  position,
3855
- modelValue,
3856
3859
  customClass,
3857
3860
  duration,
3858
3861
  onAfterLeave,
@@ -3868,8 +3871,8 @@ const Popup = /* @__PURE__ */ defineComponent({
3868
3871
  zIndex
3869
3872
  }
3870
3873
  }, [createVNode(Mask, {
3871
- "modelValue": modelValue,
3872
- "onUpdate:modelValue": ($event) => modelValue = $event,
3874
+ "modelValue": visible.value,
3875
+ "onUpdate:modelValue": ($event) => visible.value = $event,
3873
3876
  "duration": duration,
3874
3877
  "lockScroll": lockScroll,
3875
3878
  "onClick": onClickMask,
@@ -3884,7 +3887,7 @@ const Popup = /* @__PURE__ */ defineComponent({
3884
3887
  "class": [bem$6("content", {
3885
3888
  [position]: position
3886
3889
  }), customClass]
3887
- }, [((_a = slots.default) == null ? void 0 : _a.call(slots)) || null]), [[vShow, modelValue]])];
3890
+ }, [((_a = slots.default) == null ? void 0 : _a.call(slots)) || null]), [[vShow, visible.value]])];
3888
3891
  }
3889
3892
  })])]
3890
3893
  });
@@ -4574,6 +4577,10 @@ const Input = /* @__PURE__ */ defineComponent({
4574
4577
  limitEl && limitEl.remove();
4575
4578
  limitEl = null;
4576
4579
  });
4580
+ const visible = computed({
4581
+ get: () => props.modelValue,
4582
+ set: (value) => emit("update:modelValue", value)
4583
+ });
4577
4584
  return () => {
4578
4585
  const {
4579
4586
  type,
@@ -4584,7 +4591,6 @@ const Input = /* @__PURE__ */ defineComponent({
4584
4591
  size: inputSize,
4585
4592
  border,
4586
4593
  readonly,
4587
- modelValue,
4588
4594
  autocomplete,
4589
4595
  placeholder
4590
4596
  } = props;
@@ -4611,13 +4617,13 @@ const Input = /* @__PURE__ */ defineComponent({
4611
4617
  if (type === "textarea") {
4612
4618
  return withDirectives(createVNode("textarea", mergeProps(attrs, {
4613
4619
  "rows": rows,
4614
- "onUpdate:modelValue": ($event) => modelValue = $event
4615
- }), null), [[vModelText, modelValue]]);
4620
+ "onUpdate:modelValue": ($event) => visible.value = $event
4621
+ }), null), [[vModelText, visible.value]]);
4616
4622
  }
4617
4623
  return withDirectives(createVNode("input", mergeProps(attrs, {
4618
- "onUpdate:modelValue": ($event) => modelValue = $event,
4624
+ "onUpdate:modelValue": ($event) => visible.value = $event,
4619
4625
  "type": type
4620
- }), null), [[vModelDynamic, modelValue]]);
4626
+ }), null), [[vModelDynamic, visible.value]]);
4621
4627
  };
4622
4628
  }
4623
4629
  });
@@ -4878,7 +4884,7 @@ const Dialog = /* @__PURE__ */ defineComponent({
4878
4884
  confirm: false
4879
4885
  });
4880
4886
  const update = (value) => {
4881
- emit("update:modelValue", value);
4887
+ visible.value = value;
4882
4888
  };
4883
4889
  const onClose = (actionType) => {
4884
4890
  var _a;
@@ -4928,9 +4934,12 @@ const Dialog = /* @__PURE__ */ defineComponent({
4928
4934
  num2 /= multiple || 2;
4929
4935
  return processing ? `${processing(num2)}px` : `${num2}px`;
4930
4936
  };
4937
+ const visible = computed({
4938
+ get: () => props.modelValue,
4939
+ set: (value) => emit("update:modelValue", value)
4940
+ });
4931
4941
  return () => {
4932
4942
  const {
4933
- modelValue,
4934
4943
  width,
4935
4944
  title,
4936
4945
  titleAlign,
@@ -4947,8 +4956,8 @@ const Dialog = /* @__PURE__ */ defineComponent({
4947
4956
  teleport
4948
4957
  } = props;
4949
4958
  return createVNode(Popup, mergeProps({
4950
- "modelValue": modelValue,
4951
- "onUpdate:modelValue": ($event) => modelValue = $event,
4959
+ "modelValue": visible.value,
4960
+ "onUpdate:modelValue": ($event) => visible.value = $event,
4952
4961
  "customClass": bem$1(),
4953
4962
  "customStyle": {
4954
4963
  width: parseUnit(width)
package/libs/index.umd.js CHANGED
@@ -3848,14 +3848,17 @@
3848
3848
  const onClickMask = (event) => {
3849
3849
  emit("clickMask", event);
3850
3850
  if (props.isCloseOnClickMask) {
3851
- emit("update:modelValue", false);
3851
+ visible.value = false;
3852
3852
  }
3853
3853
  };
3854
+ const visible = vue.computed({
3855
+ get: () => props.modelValue,
3856
+ set: (value) => emit("update:modelValue", value)
3857
+ });
3854
3858
  return () => {
3855
3859
  const {
3856
3860
  teleport,
3857
3861
  position,
3858
- modelValue,
3859
3862
  customClass,
3860
3863
  duration,
3861
3864
  onAfterLeave,
@@ -3871,8 +3874,8 @@
3871
3874
  zIndex
3872
3875
  }
3873
3876
  }, [vue.createVNode(Mask, {
3874
- "modelValue": modelValue,
3875
- "onUpdate:modelValue": ($event) => modelValue = $event,
3877
+ "modelValue": visible.value,
3878
+ "onUpdate:modelValue": ($event) => visible.value = $event,
3876
3879
  "duration": duration,
3877
3880
  "lockScroll": lockScroll,
3878
3881
  "onClick": onClickMask,
@@ -3887,7 +3890,7 @@
3887
3890
  "class": [bem$6("content", {
3888
3891
  [position]: position
3889
3892
  }), customClass]
3890
- }, [((_a = slots.default) == null ? void 0 : _a.call(slots)) || null]), [[vue.vShow, modelValue]])];
3893
+ }, [((_a = slots.default) == null ? void 0 : _a.call(slots)) || null]), [[vue.vShow, visible.value]])];
3891
3894
  }
3892
3895
  })])]
3893
3896
  });
@@ -4577,6 +4580,10 @@
4577
4580
  limitEl && limitEl.remove();
4578
4581
  limitEl = null;
4579
4582
  });
4583
+ const visible = vue.computed({
4584
+ get: () => props.modelValue,
4585
+ set: (value) => emit("update:modelValue", value)
4586
+ });
4580
4587
  return () => {
4581
4588
  const {
4582
4589
  type,
@@ -4587,7 +4594,6 @@
4587
4594
  size: inputSize,
4588
4595
  border,
4589
4596
  readonly,
4590
- modelValue,
4591
4597
  autocomplete,
4592
4598
  placeholder
4593
4599
  } = props;
@@ -4614,13 +4620,13 @@
4614
4620
  if (type === "textarea") {
4615
4621
  return vue.withDirectives(vue.createVNode("textarea", vue.mergeProps(attrs, {
4616
4622
  "rows": rows,
4617
- "onUpdate:modelValue": ($event) => modelValue = $event
4618
- }), null), [[vue.vModelText, modelValue]]);
4623
+ "onUpdate:modelValue": ($event) => visible.value = $event
4624
+ }), null), [[vue.vModelText, visible.value]]);
4619
4625
  }
4620
4626
  return vue.withDirectives(vue.createVNode("input", vue.mergeProps(attrs, {
4621
- "onUpdate:modelValue": ($event) => modelValue = $event,
4627
+ "onUpdate:modelValue": ($event) => visible.value = $event,
4622
4628
  "type": type
4623
- }), null), [[vue.vModelDynamic, modelValue]]);
4629
+ }), null), [[vue.vModelDynamic, visible.value]]);
4624
4630
  };
4625
4631
  }
4626
4632
  });
@@ -4881,7 +4887,7 @@
4881
4887
  confirm: false
4882
4888
  });
4883
4889
  const update = (value) => {
4884
- emit("update:modelValue", value);
4890
+ visible.value = value;
4885
4891
  };
4886
4892
  const onClose = (actionType) => {
4887
4893
  var _a;
@@ -4931,9 +4937,12 @@
4931
4937
  num2 /= multiple || 2;
4932
4938
  return processing ? `${processing(num2)}px` : `${num2}px`;
4933
4939
  };
4940
+ const visible = vue.computed({
4941
+ get: () => props.modelValue,
4942
+ set: (value) => emit("update:modelValue", value)
4943
+ });
4934
4944
  return () => {
4935
4945
  const {
4936
- modelValue,
4937
4946
  width,
4938
4947
  title,
4939
4948
  titleAlign,
@@ -4950,8 +4959,8 @@
4950
4959
  teleport
4951
4960
  } = props;
4952
4961
  return vue.createVNode(Popup, vue.mergeProps({
4953
- "modelValue": modelValue,
4954
- "onUpdate:modelValue": ($event) => modelValue = $event,
4962
+ "modelValue": visible.value,
4963
+ "onUpdate:modelValue": ($event) => visible.value = $event,
4955
4964
  "customClass": bem$1(),
4956
4965
  "customStyle": {
4957
4966
  width: parseUnit(width)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "y-design-ssr",
3
- "version": "0.0.38-beta.4",
3
+ "version": "0.1.0",
4
4
  "description": "SSR component library of YUI with Vue3",
5
5
  "author": "yux-fe",
6
6
  "license": "MIT",
@@ -22,11 +22,12 @@
22
22
  "import": "./libs/index.mjs",
23
23
  "require": "./libs/index.umd.js"
24
24
  },
25
- "./yui.css": "./libs/index.css"
25
+ "./yui.css": "./libs/style.css"
26
26
  },
27
27
  "types": "./libs/index.d.ts",
28
28
  "scripts": {
29
29
  "dev": "webpack serve --open --config config/webpack.dev.js",
30
+ "vite-dev": "vite --config vite.dev.config.js",
30
31
  "build:docs": "webpack --config config/webpack.docs.js",
31
32
  "build:packages": "rm -rf libs && webpack --config config/webpack.libs.js",
32
33
  "vite-build:packages": "rm -rf vite-libs && vite build",
@@ -118,7 +119,7 @@
118
119
  "webpack-merge": "^5.7.3"
119
120
  },
120
121
  "dependencies": {
121
- "vue": "^3.2.0"
122
+ "vue": "^3.2.33"
122
123
  },
123
124
  "yui": {
124
125
  "scssPreData": [