ul-question-test-ui 1.0.5 → 1.0.6
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,19 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ul-question-test-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
8
|
+
"main": "./dist/vue2/ul-question-test-ui.cjs.js",
|
|
9
|
+
"module": "./dist/vue2/ul-question-test-ui.es.js",
|
|
8
10
|
"exports": {
|
|
9
11
|
".": {
|
|
10
|
-
"import": "./dist/
|
|
11
|
-
"require": "./dist/
|
|
12
|
+
"import": "./dist/vue2/ul-question-test-ui.es.js",
|
|
13
|
+
"require": "./dist/vue2/ul-question-test-ui.cjs.js"
|
|
12
14
|
},
|
|
13
15
|
"./vue2": {
|
|
14
16
|
"import": "./dist/vue2/ul-question-test-ui.es.js",
|
|
15
17
|
"require": "./dist/vue2/ul-question-test-ui.cjs.js"
|
|
16
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./vue3": {
|
|
20
|
+
"import": "./dist/vue3/ul-question-test-ui.es.js",
|
|
21
|
+
"require": "./dist/vue3/ul-question-test-ui.umd.js"
|
|
22
|
+
},
|
|
23
|
+
"./dist/style.css": "./dist/style.css"
|
|
17
24
|
},
|
|
18
25
|
"peerDependencies": {
|
|
19
26
|
"vue": ">=2.0.0 || >=3.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("@opentiny/vue")):typeof define=="function"&&define.amd?define(["exports","vue","@opentiny/vue"],i):(o=typeof globalThis<"u"?globalThis:o||self,i(o.MyVueUi={},o.Vue,o.Tiny))})(this,(function(o,i,f){"use strict";function _(n,e,t,a,u,s,S,x){var d=typeof n=="function"?n.options:n;return e&&(d.render=e,d.staticRenderFns=t,d._compiled=!0),s&&(d._scopeId="data-v-"+s),{exports:n,options:d}}const m=i.defineComponent({name:"MyButton",emits:["click"],setup(n,{emit:e}){const t=i.version;return{onClick:u=>e("click",u),vueVersion:t}}});var p=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("button",{staticClass:"my-btn",on:{click:e.onClick}},[e._v(" "+e._s("vue-version:"+e.vueVersion)+" "),e._t("default")],2)},y=[],v=_(m,p,y,!1,null,"11c7ae7a");const l=v.exports;l.install=n=>n.component(l.name,l);const h=i.defineComponent({name:"MyTinyButton",components:{TinyButton:f.Button},props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"}},emits:["handleClick1"],setup(n,{emit:e}){return{handleClick1:a=>e("handleClick1",a),version:i.version}}});var k=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("tiny-button",{attrs:{type:e.type,size:e.size},on:{click:e.handleClick1}},[e._v(" "+e._s("vueVersion:"+e.version)+" "),e._t("default")],2)},C=[],b=_(h,k,C,!1,null,"49c5e92a");const r=b.exports;r.install=n=>n.component(r.name,r);const R=i.defineComponent({name:"MyTinyRadio",components:{TinyRadio:f.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(n,{emit:e}){const t=i.toRefs(n).modelValue,a=s=>{e("change",s)},u=s=>{e("click",s)};return{radioValue:t,version:i.version,handleRadioChange:a,handleRadioClick:u}}});var M=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("tiny-radio",{staticClass:"my-tiny-radio",attrs:{label:e.label,name:e.name,disabled:e.disabled},on:{change:e.handleRadioChange,click:e.handleRadioClick},model:{value:e.radioValue,callback:function(a){e.radioValue=a},expression:"radioValue"}},[e.$slots.default?e._e():t("span",[e._v(" "+e._s(`vueVersion: ${e.version} ${e.label}`)+" ")]),e._t("default")],2)},T=[],V=_(R,M,T,!1,null,"7e92122b");const c=V.exports;c.install=n=>n.component(c.name,c);const B=[l,r,c],g={install:n=>{B.forEach(e=>n.use(e))}};o.MyButton=l,o.MyTinyButton=r,o.MyTinyRadio=c,o.default=g,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|