ul-question-test-ui 1.0.4 → 1.0.5
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
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),_=require("@opentiny/vue");function d(n,e,t,o,u,i,T,S){var s=typeof n=="function"?n.options:n;return e&&(s.render=e,s.staticRenderFns=t,s._compiled=!0),i&&(s._scopeId="data-v-"+i),{exports:n,options:s}}const f=a.defineComponent({name:"MyButton",emits:["click"],setup(n,{emit:e}){const t=a.version;return{onClick:u=>e("click",u),vueVersion:t}}});var m=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)},p=[],v=d(f,m,p,!1,null,"11c7ae7a");const l=v.exports;l.install=n=>n.component(l.name,l);const y=a.defineComponent({name:"MyTinyButton",components:{TinyButton:_.Button},props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"}},emits:["handleClick1"],setup(n,{emit:e}){return{handleClick1:o=>e("handleClick1",o),version:a.version}}});var h=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)},k=[],C=d(y,h,k,!1,null,"49c5e92a");const r=C.exports;r.install=n=>n.component(r.name,r);const b=a.defineComponent({name:"MyTinyRadio",components:{TinyRadio:_.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=a.toRefs(n).modelValue,o=i=>{e("change",i)},u=i=>{e("click",i)};return{radioValue:t,version:a.version,handleRadioChange:o,handleRadioClick:u}}});var R=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(o){e.radioValue=o},expression:"radioValue"}},[e.$slots.default?e._e():t("span",[e._v(" "+e._s(`vueVersion: ${e.version} ${e.label}`)+" ")]),e._t("default")],2)},g=[],M=d(b,R,g,!1,null,"7e92122b");const c=M.exports;c.install=n=>n.component(c.name,c);const $=[l,r,c],B=n=>{$.forEach(e=>n.use(e))},V={install:B};exports.MyButton=l;exports.MyTinyButton=r;exports.MyTinyRadio=c;exports.default=V;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ul-question-test-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"./vue2": {
|
|
14
14
|
"import": "./dist/vue2/ul-question-test-ui.es.js",
|
|
15
|
-
"require": "./dist/vue2/ul-question-test-ui.
|
|
15
|
+
"require": "./dist/vue2/ul-question-test-ui.cjs.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
package/dist/vue3/build-v3.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1,142 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"}})}));
|