@dazhicheng/ui 1.5.213 → 1.5.215

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.
@@ -41,7 +41,11 @@ export declare const TtRadioGroup: import('../../../../utils/src').SFCWithInstal
41
41
  change: (val: import('./type').TtRadioGroupValueType | undefined) => any;
42
42
  "update:modelValue": (value: import('./type').TtRadioGroupValueType) => any;
43
43
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
44
- $slots: any;
44
+ $slots: Readonly<{
45
+ default?: () => import('vue').VNodeChild;
46
+ }> & {
47
+ default?: () => import('vue').VNodeChild;
48
+ };
45
49
  })> & Record<string, any>;
46
50
  export default TtRadioGroup;
47
51
  export type TtRadioGroupInstance = InstanceType<typeof TtRadioGroup>;
@@ -1,11 +1,18 @@
1
1
  import { TtRadioGroupProp, TtRadioGroupValueType } from './type';
2
+ import { VNodeChild } from 'vue';
2
3
  type __VLS_Props = TtRadioGroupProp;
3
4
  type __VLS_PublicProps = {
4
5
  modelValue?: TtRadioGroupValueType;
5
6
  } & __VLS_Props;
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
8
- slots: any;
9
+ slots: Readonly<{
10
+ /** 单选项内容 */
11
+ default?: () => VNodeChild;
12
+ }> & {
13
+ /** 单选项内容 */
14
+ default?: () => VNodeChild;
15
+ };
9
16
  refs: {};
10
17
  rootEl: any;
11
18
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as B, mergeModels as m, useModel as k, useAttrs as P, computed as w, ref as d, watch as x, createBlock as L, openBlock as M, unref as c, mergeProps as R, createSlots as S, renderList as $, withCtx as z, renderSlot as A, normalizeProps as D, guardReactiveProps as F } from "vue";
1
+ import { defineComponent as V, mergeModels as d, useModel as y, useAttrs as B, computed as k, ref as p, watch as x, createBlock as w, openBlock as L, unref as m, mergeProps as M, withCtx as P, renderSlot as A } from "vue";
2
2
  import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
3
- import { useDesign as G } from "../../packages/hooks/src/useDesign.js";
3
+ import { useDesign as D } from "../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
5
- import { useFormItem as U, ElRadioGroup as E } from "element-plus";
5
+ import { useFormItem as F, ElRadioGroup as G } from "element-plus";
6
6
  import "dayjs";
7
7
  import "xe-utils";
8
8
  import "dayjs/plugin/utc";
@@ -12,12 +12,12 @@ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
12
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
13
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
14
  import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
- import { omit as f } from "lodash-es";
16
- const ee = /* @__PURE__ */ B({
15
+ import { omit as c } from "lodash-es";
16
+ const O = /* @__PURE__ */ V({
17
17
  name: "TtRadioGroup",
18
18
  inheritAttrs: !1,
19
19
  __name: "index",
20
- props: /* @__PURE__ */ m({
20
+ props: /* @__PURE__ */ d({
21
21
  id: {},
22
22
  size: {},
23
23
  disabled: { type: Boolean },
@@ -35,46 +35,44 @@ const ee = /* @__PURE__ */ B({
35
35
  modelValue: { type: [String, Number, Boolean] },
36
36
  modelModifiers: {}
37
37
  }),
38
- emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
39
- setup(i, { emit: g }) {
40
- const l = i, a = k(i, "modelValue"), s = g, v = P(), { prefixCls: h } = G("radio-group"), C = w(() => ({
41
- ...f(l, ["clearable", "beforeChange", "modelValue"]),
42
- ...f(v, ["onUpdate:modelValue", "onChange", "class"])
43
- })), r = d(a.value), { formItem: n } = U(), u = d(!1);
44
- async function b(e) {
45
- const o = a.value;
38
+ emits: /* @__PURE__ */ d(["change"], ["update:modelValue"]),
39
+ setup(n, { emit: f }) {
40
+ const a = n, l = y(n, "modelValue"), s = f, g = B(), { prefixCls: v } = D("radio-group"), h = k(() => ({
41
+ ...c(a, ["clearable", "beforeChange", "modelValue"]),
42
+ ...c(g, ["onUpdate:modelValue", "onChange", "class"])
43
+ })), r = p(l.value), { formItem: i } = F(), u = p(!1);
44
+ async function C(e) {
45
+ const o = l.value;
46
46
  let t = !0;
47
- l.beforeChange && (t = await l.beforeChange(e, o)), t ? (a.value = e, s("change", e)) : r.value = o;
47
+ a.beforeChange && (t = await a.beforeChange(e, o)), t ? (l.value = e, s("change", e)) : r.value = o;
48
48
  }
49
- function V(e) {
50
- if (!l.clearable) return;
49
+ function b(e) {
50
+ if (!a.clearable || a.disabled) return;
51
51
  const t = e.target.closest(".el-radio, .el-radio-button");
52
- t != null && t.classList.contains("is-checked") && (e.stopPropagation(), e.preventDefault(), a.value = void 0, r.value = void 0, s("change", void 0));
52
+ t != null && t.classList.contains("is-checked") && (t.classList.contains("is-disabled") || (e.stopPropagation(), e.preventDefault(), l.value = void 0, r.value = void 0, s("change", void 0)));
53
53
  }
54
54
  return x(
55
- a,
55
+ l,
56
56
  (e) => {
57
- r.value = e, u.value && (n == null || n.validate("change").catch((o) => {
57
+ r.value = e, u.value && (i == null || i.validate("change").catch((o) => {
58
58
  })), u.value = !0;
59
59
  },
60
60
  { immediate: !0 }
61
- ), (e, o) => (M(), L(c(E), R(C.value, {
61
+ ), (e, o) => (L(), w(m(G), M(h.value, {
62
62
  modelValue: r.value,
63
63
  "onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
64
- class: [c(h), e.$attrs.class],
64
+ class: [m(v), e.$attrs.class],
65
65
  "validate-event": !1,
66
- onClickCapture: V,
67
- onChange: b
68
- }), S({ _: 2 }, [
69
- $(e.$slots, (t, p) => ({
70
- name: p,
71
- fn: z((y) => [
72
- A(e.$slots, p, D(F(y)))
73
- ])
74
- }))
75
- ]), 1040, ["modelValue", "class"]));
66
+ onClickCapture: b,
67
+ onChange: C
68
+ }), {
69
+ default: P(() => [
70
+ A(e.$slots, "default")
71
+ ]),
72
+ _: 3
73
+ }, 16, ["modelValue", "class"]));
76
74
  }
77
75
  });
78
76
  export {
79
- ee as default
77
+ O as default
80
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.5.213",
3
+ "version": "1.5.215",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",