-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
4,063 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { defineComponent, toRefs, createVNode } from 'vue' | ||
const buttonProps = { | ||
type: { | ||
type: String, | ||
default: 'secondary' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
block: { | ||
type: Boolean, | ||
default: false | ||
} | ||
} | ||
var Button = defineComponent({ | ||
name: 'SButton', | ||
props: buttonProps, | ||
setup(props, { slots }) { | ||
const { type, size, disabled, block } = toRefs(props) | ||
return () => { | ||
const defaultSlot = slots.default ? slots.default() : '\u6309\u94AE' | ||
const blockCls = block.value ? 's-btn--block' : '' | ||
return createVNode( | ||
'button', | ||
{ | ||
disabled: disabled.value, | ||
class: `s-btn s-btn--${type.value} s-btn--${size.value} ${blockCls}` | ||
}, | ||
[defaultSlot] | ||
) | ||
} | ||
} | ||
}) | ||
var index = { | ||
install(app) { | ||
app.component(Button.name, Button) | ||
} | ||
} | ||
export { Button, index as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
;(function (e, t) { | ||
typeof exports == 'object' && typeof module != 'undefined' | ||
? t(exports, require('vue')) | ||
: typeof define == 'function' && define.amd | ||
? define(['exports', 'vue'], t) | ||
: ((e = typeof globalThis != 'undefined' ? globalThis : e || self), | ||
t((e.index = {}), e.Vue)) | ||
})(this, function (e, t) { | ||
'use strict' | ||
const d = { | ||
type: { type: String, default: 'secondary' }, | ||
size: { type: String, default: 'medium' }, | ||
disabled: { type: Boolean, default: !1 }, | ||
block: { type: Boolean, default: !1 } | ||
} | ||
var n = t.defineComponent({ | ||
name: 'SButton', | ||
props: d, | ||
setup(o, { slots: u }) { | ||
const { type: s, size: a, disabled: i, block: f } = t.toRefs(o) | ||
return () => { | ||
const p = u.default ? u.default() : '\u6309\u94AE', | ||
r = f.value ? 's-btn--block' : '' | ||
return t.createVNode( | ||
'button', | ||
{ | ||
disabled: i.value, | ||
class: `s-btn s-btn--${s.value} s-btn--${a.value} ${r}` | ||
}, | ||
[p] | ||
) | ||
} | ||
} | ||
}), | ||
l = { | ||
install(o) { | ||
o.component(n.name, n) | ||
} | ||
} | ||
;(e.Button = n), | ||
(e.default = l), | ||
Object.defineProperties(e, { | ||
__esModule: { value: !0 }, | ||
[Symbol.toStringTag]: { value: 'Module' } | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "button", | ||
"version": "0.0.2", | ||
"main": "index.umd.js", | ||
"module": "index.umd.js", | ||
"author": "杨村长", | ||
"description": "羊村第一个组件库Sheep-UI,以后村里羊圈能不能建好就看它了!", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/57code/sheep-ui.git" | ||
}, | ||
"keywords": ["vue3", "组件库", "tsx", "UI"], | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/57code/sheep-ui/issues" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "sheep-ui", | ||
"version": "0.0.2", | ||
"main": "sheep-ui.umd.js", | ||
"module": "sheep-ui.es.js", | ||
"author": "杨村长", | ||
"description": "羊村第一个组件库Sheep-UI,以后村里羊圈能不能建好就看它了!", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/57code/sheep-ui.git" | ||
}, | ||
"keywords": ["vue3", "组件库", "tsx", "UI"], | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/57code/sheep-ui/issues" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { defineComponent, toRefs, createVNode } from 'vue' | ||
const buttonProps = { | ||
type: { | ||
type: String, | ||
default: 'secondary' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
block: { | ||
type: Boolean, | ||
default: false | ||
} | ||
} | ||
var Button = defineComponent({ | ||
name: 'SButton', | ||
props: buttonProps, | ||
setup(props, { slots }) { | ||
const { type, size, disabled, block } = toRefs(props) | ||
return () => { | ||
const defaultSlot = slots.default ? slots.default() : '\u6309\u94AE' | ||
const blockCls = block.value ? 's-btn--block' : '' | ||
return createVNode( | ||
'button', | ||
{ | ||
disabled: disabled.value, | ||
class: `s-btn s-btn--${type.value} s-btn--${size.value} ${blockCls}` | ||
}, | ||
[defaultSlot] | ||
) | ||
} | ||
} | ||
}) | ||
var ButtonPlugin = { | ||
install(app) { | ||
app.component(Button.name, Button) | ||
} | ||
} | ||
const installs = [ButtonPlugin] | ||
var entry = { | ||
install(app) { | ||
installs.forEach(p => app.use(p)) | ||
} | ||
} | ||
export { Button, entry as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
;(function (e, t) { | ||
typeof exports == 'object' && typeof module != 'undefined' | ||
? t(exports, require('vue')) | ||
: typeof define == 'function' && define.amd | ||
? define(['exports', 'vue'], t) | ||
: ((e = typeof globalThis != 'undefined' ? globalThis : e || self), | ||
t((e['sheep-ui'] = {}), e.Vue)) | ||
})(this, function (e, t) { | ||
'use strict' | ||
const l = { | ||
type: { type: String, default: 'secondary' }, | ||
size: { type: String, default: 'medium' }, | ||
disabled: { type: Boolean, default: !1 }, | ||
block: { type: Boolean, default: !1 } | ||
} | ||
var u = t.defineComponent({ | ||
name: 'SButton', | ||
props: l, | ||
setup(n, { slots: o }) { | ||
const { type: i, size: f, disabled: r, block: p } = t.toRefs(n) | ||
return () => { | ||
const c = o.default ? o.default() : '\u6309\u94AE', | ||
b = p.value ? 's-btn--block' : '' | ||
return t.createVNode( | ||
'button', | ||
{ | ||
disabled: r.value, | ||
class: `s-btn s-btn--${i.value} s-btn--${f.value} ${b}` | ||
}, | ||
[c] | ||
) | ||
} | ||
} | ||
}), | ||
s = { | ||
install(n) { | ||
n.component(u.name, u) | ||
} | ||
} | ||
const a = [s] | ||
var d = { | ||
install(n) { | ||
a.forEach(o => n.use(o)) | ||
} | ||
} | ||
;(e.Button = u), | ||
(e.default = d), | ||
Object.defineProperties(e, { | ||
__esModule: { value: !0 }, | ||
[Symbol.toStringTag]: { value: 'Module' } | ||
}) | ||
}) |
Oops, something went wrong.