ul-question-test-ui 1.0.0 → 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.
@@ -0,0 +1 @@
1
+ .my-btn[data-v-11c7ae7a]{padding:6px 12px;background:#409eff;color:#fff;border:none;border-radius:4px}.my-tiny-button[data-v-49c5e92a]{border-radius:20px}.my-tiny-radio[data-v-7e92122b]{margin:4px 0}
@@ -0,0 +1,142 @@
1
+ import { defineComponent as c, version as p, createElementBlock as k, openBlock as u, createTextVNode as C, renderSlot as m, toDisplayString as f, resolveComponent as $, createBlock as h, withCtx as V, toRefs as v, createCommentVNode as _ } from "vue";
2
+ import { Button as g, Radio as B } from "@opentiny/vue";
3
+ const y = (e, n) => {
4
+ const o = e.__vccOpts || e;
5
+ for (const [t, a] of n)
6
+ o[t] = a;
7
+ return o;
8
+ }, R = c({
9
+ name: "MyButton",
10
+ emits: ["click"],
11
+ setup(e, { emit: n }) {
12
+ return {
13
+ onClick: (a) => n("click", a),
14
+ vueVersion: p
15
+ };
16
+ }
17
+ });
18
+ function S(e, n, o, t, a, i) {
19
+ return u(), k("button", {
20
+ class: "my-btn",
21
+ onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
22
+ }, [
23
+ C(f("vue-version:" + e.vueVersion) + " ", 1),
24
+ m(e.$slots, "default", {}, void 0, !0)
25
+ ]);
26
+ }
27
+ const s = /* @__PURE__ */ y(R, [["render", S], ["__scopeId", "data-v-11c7ae7a"]]);
28
+ s.install = (e) => e.component(s.name, s);
29
+ const T = c({
30
+ name: "MyTinyButton",
31
+ components: {
32
+ TinyButton: g
33
+ },
34
+ props: {
35
+ type: { type: String, default: "primary" },
36
+ size: { type: String, default: "medium" }
37
+ },
38
+ emits: ["handleClick1"],
39
+ setup(e, { emit: n }) {
40
+ return {
41
+ handleClick1: (t) => n("handleClick1", t),
42
+ version: p
43
+ };
44
+ }
45
+ });
46
+ function M(e, n, o, t, a, i) {
47
+ const l = $("tiny-button", !0);
48
+ return u(), h(l, {
49
+ type: e.type,
50
+ size: e.size,
51
+ onClick: e.handleClick1
52
+ }, {
53
+ default: V(() => [
54
+ C(f("vueVersion:" + e.version) + " ", 1),
55
+ m(e.$slots, "default", {}, void 0, !0)
56
+ ]),
57
+ _: 3
58
+ }, 8, ["type", "size", "onClick"]);
59
+ }
60
+ const d = /* @__PURE__ */ y(T, [["render", M], ["__scopeId", "data-v-49c5e92a"]]);
61
+ d.install = (e) => e.component(d.name, d);
62
+ const z = c({
63
+ name: "MyTinyRadio",
64
+ components: {
65
+ TinyRadio: B
66
+ // 注册组件(模板中使用 tiny-radio 小写形式)
67
+ },
68
+ props: {
69
+ // 继承 tiny-radio 核心属性
70
+ label: {
71
+ type: [String, Number, Boolean],
72
+ required: !0
73
+ // radio 的唯一标识,必须传入
74
+ },
75
+ modelValue: {
76
+ type: [String, Number, Boolean],
77
+ default: void 0
78
+ // 双向绑定值(v-model)
79
+ },
80
+ name: {
81
+ type: String,
82
+ default: ""
83
+ // 原生 name 属性
84
+ },
85
+ disabled: {
86
+ type: Boolean,
87
+ default: !1
88
+ // 是否禁用
89
+ }
90
+ },
91
+ emits: ["update:modelValue", "change", "click"],
92
+ // 声明事件
93
+ setup(e, { emit: n }) {
94
+ return {
95
+ radioValue: v(e).modelValue,
96
+ version: p,
97
+ // 暴露 Vue 版本
98
+ handleRadioChange: (i) => {
99
+ n("change", i);
100
+ },
101
+ handleRadioClick: (i) => {
102
+ n("click", i);
103
+ }
104
+ };
105
+ }
106
+ }), N = { key: 0 };
107
+ function I(e, n, o, t, a, i) {
108
+ const l = $("tiny-radio", !0);
109
+ return u(), h(l, {
110
+ modelValue: e.radioValue,
111
+ "onUpdate:modelValue": n[0] || (n[0] = (b) => e.radioValue = b),
112
+ label: e.label,
113
+ name: e.name,
114
+ disabled: e.disabled,
115
+ onChange: e.handleRadioChange,
116
+ onClick: e.handleRadioClick,
117
+ class: "my-tiny-radio"
118
+ }, {
119
+ default: V(() => [
120
+ e.$slots.default ? _("", !0) : (u(), k("span", N, f(`vueVersion: ${e.version} ${e.label}`), 1)),
121
+ m(e.$slots, "default", {}, void 0, !0)
122
+ ]),
123
+ _: 3
124
+ }, 8, ["modelValue", "label", "name", "disabled", "onChange", "onClick"]);
125
+ }
126
+ const r = /* @__PURE__ */ y(z, [["render", I], ["__scopeId", "data-v-7e92122b"]]);
127
+ r.install = (e) => e.component(r.name, r);
128
+ const E = [
129
+ s,
130
+ d,
131
+ r
132
+ // MyElButton,
133
+ // MyTinyButton1
134
+ ], q = (e) => {
135
+ E.forEach((n) => e.use(n));
136
+ }, O = { install: q };
137
+ export {
138
+ s as MyButton,
139
+ d as MyTinyButton,
140
+ r as MyTinyRadio,
141
+ O as default
142
+ };
@@ -0,0 +1 @@
1
+ (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@opentiny/vue")):typeof define=="function"&&define.amd?define(["exports","vue","@opentiny/vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.MyVueUi={},t.Vue,t.Tiny))})(this,(function(t,n,m){"use strict";const u=(e,o)=>{const i=e.__vccOpts||e;for(const[a,l]of o)i[a]=l;return i},y=n.defineComponent({name:"MyButton",emits:["click"],setup(e,{emit:o}){const i=n.version;return{onClick:l=>o("click",l),vueVersion:i}}});function f(e,o,i,a,l,s){return n.openBlock(),n.createElementBlock("button",{class:"my-btn",onClick:o[0]||(o[0]=(...p)=>e.onClick&&e.onClick(...p))},[n.createTextVNode(n.toDisplayString("vue-version:"+e.vueVersion)+" ",1),n.renderSlot(e.$slots,"default",{},void 0,!0)])}const d=u(y,[["render",f],["__scopeId","data-v-11c7ae7a"]]);d.install=e=>e.component(d.name,d);const k=n.defineComponent({name:"MyTinyButton",components:{TinyButton:m.Button},props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"}},emits:["handleClick1"],setup(e,{emit:o}){return{handleClick1:a=>o("handleClick1",a),version:n.version}}});function C(e,o,i,a,l,s){const p=n.resolveComponent("tiny-button",!0);return n.openBlock(),n.createBlock(p,{type:e.type,size:e.size,onClick:e.handleClick1},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString("vueVersion:"+e.version)+" ",1),n.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["type","size","onClick"])}const r=u(k,[["render",C],["__scopeId","data-v-49c5e92a"]]);r.install=e=>e.component(r.name,r);const h=n.defineComponent({name:"MyTinyRadio",components:{TinyRadio:m.Radio},props:{label:{type:[String,Number,Boolean],required:!0},modelValue:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","click"],setup(e,{emit:o}){const i=n.toRefs(e).modelValue,a=s=>{o("change",s)},l=s=>{o("click",s)};return{radioValue:i,version:n.version,handleRadioChange:a,handleRadioClick:l}}}),$={key:0};function B(e,o,i,a,l,s){const p=n.resolveComponent("tiny-radio",!0);return n.openBlock(),n.createBlock(p,{modelValue:e.radioValue,"onUpdate:modelValue":o[0]||(o[0]=_=>e.radioValue=_),label:e.label,name:e.name,disabled:e.disabled,onChange:e.handleRadioChange,onClick:e.handleRadioClick,class:"my-tiny-radio"},{default:n.withCtx(()=>[e.$slots.default?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",$,n.toDisplayString(`vueVersion: ${e.version} ${e.label}`),1)),n.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","label","name","disabled","onChange","onClick"])}const c=u(h,[["render",B],["__scopeId","data-v-7e92122b"]]);c.install=e=>e.component(c.name,c);const V=[d,r,c],b={install:e=>{V.forEach(o=>e.use(o))}};t.MyButton=d,t.MyTinyButton=r,t.MyTinyRadio=c,t.default=b,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "ul-question-test-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
- "files": ["dist"],
5
+ "files": [
6
+ "dist"
7
+ ],
6
8
  "exports": {
7
9
  ".": {
8
10
  "import": "./dist/vue3/ul-question-test-ui.es.js",
@@ -29,4 +31,4 @@
29
31
  "build": "pnpm build:v2 && pnpm build:v3",
30
32
  "pub": "pnpm build && pnpm publish --access public"
31
33
  }
32
- }
34
+ }