nubomed-ui 1.0.2 → 1.0.3
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.
Potentially problematic release.
This version of nubomed-ui might be problematic. Click here for more details.
- package/.env.bi +13 -0
- package/.env.terminal +13 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +17 -0
- package/index.html +13 -0
- package/nubomed-ui/nubomed-ui.es.js +2005 -0
- package/nubomed-ui/nubomed-ui.umd.js +1 -0
- package/nubomed-ui/style.css +1 -0
- package/package.json +19 -7
- package/src/App.vue +31 -0
- package/src/bi-demos/Header.vue +29 -0
- package/src/bi-demos/Table.vue +69 -0
- package/src/bi-demos/index.vue +132 -0
- package/src/bi-packages/components/Box/images/corner-error.png +0 -0
- package/src/bi-packages/components/Box/images/corner-warning.png +0 -0
- package/src/bi-packages/components/Box/images/corner.png +0 -0
- package/src/bi-packages/components/Box/index.scss +86 -0
- package/src/bi-packages/components/Box/index.vue +53 -0
- package/src/bi-packages/components/Carousel/CarouselItem.vue +0 -0
- package/src/bi-packages/components/Carousel/index.vue +0 -0
- package/src/bi-packages/components/Header/images/left-bg.png +0 -0
- package/src/bi-packages/components/Header/images/logo.png +0 -0
- package/src/bi-packages/components/Header/images/right-bg.png +0 -0
- package/src/bi-packages/components/Header/index.scss +50 -0
- package/src/bi-packages/components/Header/index.vue +54 -0
- package/src/bi-packages/components/Table/TableColgroup.vue +43 -0
- package/src/bi-packages/components/Table/index copy.vue +107 -0
- package/src/bi-packages/components/Table/index.scss +118 -0
- package/src/bi-packages/components/Table/index.vue +108 -0
- package/src/bi-packages/components/TableColumn/index.scss +7 -0
- package/src/bi-packages/components/TableColumn/index.vue +60 -0
- package/src/bi-packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/bi-packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/bi-packages/fonts/font.scss +11 -0
- package/src/bi-packages/iconfont-svg/demo.css +539 -0
- package/src/bi-packages/iconfont-svg/demo_index.html +4811 -0
- package/src/bi-packages/iconfont-svg/iconfont.css +819 -0
- package/src/bi-packages/iconfont-svg/iconfont.js +1 -0
- package/src/bi-packages/iconfont-svg/iconfont.json +1416 -0
- package/src/bi-packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/bi-packages/index.js +34 -0
- package/src/bi-packages/styles/mixin.scss +12 -0
- package/src/bi-packages/styles/var.scss +11 -0
- package/src/demos/ActionBar.vue +59 -0
- package/src/demos/Badge.vue +28 -0
- package/src/demos/Button copy.vue +302 -0
- package/src/demos/Button.vue +116 -0
- package/src/demos/ButtonGroup.vue +40 -0
- package/src/demos/Check.vue +29 -0
- package/src/demos/Dialog.vue +255 -0
- package/src/demos/Empty.vue +38 -0
- package/src/demos/FooterMenu.vue +49 -0
- package/src/demos/Header.vue +71 -0
- package/src/demos/Icons.vue +314 -0
- package/src/demos/Input.vue +87 -0
- package/src/demos/InputKeyboard.vue +30 -0
- package/src/demos/InputNumber.vue +34 -0
- package/src/demos/LeftMenu.vue +128 -0
- package/src/demos/Menus.vue +106 -0
- package/src/demos/OpenCabinetBall.vue +37 -0
- package/src/demos/Statusbar.vue +146 -0
- package/src/demos/Steps.vue +45 -0
- package/src/demos/Tost.vue +35 -0
- package/src/demos/button/button.md +19 -0
- package/src/demos/data/terList.json +145 -0
- package/src/demos/images/cabinets/H3000-D.png +0 -0
- package/src/demos/images/cabinets/H3000-R.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh2.png +0 -0
- package/src/demos/images/cabinets/H3010-R.png +0 -0
- package/src/demos/index.vue +348 -0
- package/src/docs/icons/Icon.vue +72 -0
- package/src/docs/icons/icon.md +21 -0
- package/src/docs/index.html +15 -0
- package/src/docs/index.vue +301 -0
- package/src/main.js +23 -0
- package/src/packages/components/ActionBar/images/error.png +0 -0
- package/src/packages/components/ActionBar/images/loading.gif +0 -0
- package/src/packages/components/ActionBar/images/success.png +0 -0
- package/src/packages/components/ActionBar/images/warning.png +0 -0
- package/src/packages/components/ActionBar/images/warning_yellow.png +0 -0
- package/src/packages/components/ActionBar/index.scss +81 -0
- package/src/packages/components/ActionBar/index.vue +100 -0
- package/src/packages/components/Badge/index.scss +50 -0
- package/src/packages/components/Badge/index.vue +75 -0
- package/src/packages/components/Button/index.scss +241 -0
- package/src/packages/components/Button/index.vue +111 -0
- package/src/packages/components/ButtonGroup/index.scss +54 -0
- package/src/packages/components/ButtonGroup/index.vue +75 -0
- package/src/packages/components/Check/Cate.vue +138 -0
- package/src/packages/components/Check/index.scss +47 -0
- package/src/packages/components/Check/index.vue +105 -0
- package/src/packages/components/Dialog/images/error.png +0 -0
- package/src/packages/components/Dialog/images/success.png +0 -0
- package/src/packages/components/Dialog/images/warning-red.png +0 -0
- package/src/packages/components/Dialog/images/warning-yellow.png +0 -0
- package/src/packages/components/Dialog/index.scss +154 -0
- package/src/packages/components/Dialog/index.vue +305 -0
- package/src/packages/components/Empty/images/empty-abnormal.png +0 -0
- package/src/packages/components/Empty/images/empty-data.png +0 -0
- package/src/packages/components/Empty/images/empty-search.png +0 -0
- package/src/packages/components/Empty/index.vue +68 -0
- package/src/packages/components/Form/FormItem.vue +73 -0
- package/src/packages/components/Form/index.vue +76 -0
- package/src/packages/components/Icon/index.vue +30 -0
- package/src/packages/components/Input/index.scss +184 -0
- package/src/packages/components/Input/index.vue +189 -0
- package/src/packages/components/InputKeyboard/index.scss +63 -0
- package/src/packages/components/InputKeyboard/index.vue +117 -0
- package/src/packages/components/InputNumber/index.scss +103 -0
- package/src/packages/components/InputNumber/index.vue +160 -0
- package/src/packages/components/Menu/index.scss +559 -0
- package/src/packages/components/Menu/index.vue +211 -0
- package/src/packages/components/OpenCabinetBall/CabinetStatus.vue +94 -0
- package/src/packages/components/OpenCabinetBall/index.scss +204 -0
- package/src/packages/components/OpenCabinetBall/index.vue +113 -0
- package/src/packages/components/Statusbar/CabinetList.vue +125 -0
- package/src/packages/components/Statusbar/CabinetListStatus.vue +75 -0
- package/src/packages/components/Statusbar/CabinetListTempHum.vue +108 -0
- package/src/packages/components/Statusbar/index.scss +205 -0
- package/src/packages/components/Statusbar/index.vue +83 -0
- package/src/packages/components/Steps/index.scss +104 -0
- package/src/packages/components/Steps/index.vue +66 -0
- package/src/packages/components/SvgIcon/index.vue +41 -0
- package/src/packages/components/Toast/index.vue +72 -0
- package/src/packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/packages/fonts/font.scss +11 -0
- package/src/packages/iconfont-svg/demo.css +539 -0
- package/src/packages/iconfont-svg/demo_index.html +4811 -0
- package/src/packages/iconfont-svg/iconfont.css +819 -0
- package/src/packages/iconfont-svg/iconfont.js +1 -0
- package/src/packages/iconfont-svg/iconfont.json +1416 -0
- package/src/packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/packages/iconfont-svg/iconfont.woff +0 -0
- package/src/packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/packages/index.js +64 -0
- package/src/packages/styles/var.scss +24 -0
- package/src/utils/create.js +48 -0
- package/src/utils/index.js +13 -0
- package/src/utils/validate.js +3 -0
- package/vite.config.js +47 -0
- package/nubomed-ui.es.js +0 -152
- package/nubomed-ui.umd.js +0 -1
- package/style.css +0 -1
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-06-27 17:07:50
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-08-07 09:08:57
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
import './iconfont-svg/iconfont.js'
|
9
|
+
import './fonts/font.scss'
|
10
|
+
import './styles/var.scss'
|
11
|
+
|
12
|
+
// 引入封装好的组件
|
13
|
+
import Icon from './components/Icon/index.vue'
|
14
|
+
import Button from './components/Button/index.vue'
|
15
|
+
import ButtonGroup from './components/ButtonGroup/index.vue'
|
16
|
+
import Input from './components/Input/index.vue'
|
17
|
+
import InputNumber from './components/InputNumber/index.vue'
|
18
|
+
import Empty from './components/Empty/index.vue'
|
19
|
+
import Badge from './components/Badge/index.vue'
|
20
|
+
import Dialog from './components/Dialog/index.vue'
|
21
|
+
import Form from './components/Form/index.vue'
|
22
|
+
import FormItem from './components/Form/FormItem.vue'
|
23
|
+
import Menu from './components/Menu/index.vue'
|
24
|
+
import Statusbar from './components/Statusbar/index.vue'
|
25
|
+
import Toast from './components/Toast/index.vue'
|
26
|
+
import Check from './components/Check/index.vue'
|
27
|
+
import Steps from './components/Steps/index.vue'
|
28
|
+
import InputKeyboard from './components/InputKeyboard/index.vue'
|
29
|
+
import ActionBar from './components/ActionBar/index.vue'
|
30
|
+
import OpenCabinetBall from './components/OpenCabinetBall/index.vue'
|
31
|
+
|
32
|
+
// 按需引入
|
33
|
+
export { Icon }
|
34
|
+
export { Button }
|
35
|
+
export { ButtonGroup }
|
36
|
+
export { Input }
|
37
|
+
export { Empty }
|
38
|
+
export { Badge }
|
39
|
+
export { InputNumber }
|
40
|
+
export { Dialog }
|
41
|
+
export { Form }
|
42
|
+
export { FormItem }
|
43
|
+
export { Menu }
|
44
|
+
export { Statusbar }
|
45
|
+
export { Toast }
|
46
|
+
export { Check }
|
47
|
+
export { Steps }
|
48
|
+
export { InputKeyboard }
|
49
|
+
export { ActionBar }
|
50
|
+
export { OpenCabinetBall }
|
51
|
+
|
52
|
+
const component = [Icon, Button, ButtonGroup, Input, InputNumber, Empty, Badge, Dialog, Form, FormItem, Menu, Statusbar, Toast, Check, Steps, InputKeyboard, ActionBar, OpenCabinetBall]
|
53
|
+
|
54
|
+
const NuboMedUI = {
|
55
|
+
install(App) {
|
56
|
+
component.forEach((item) => {
|
57
|
+
App.component(item.name, item)
|
58
|
+
})
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
export default NuboMedUI
|
63
|
+
|
64
|
+
window.$nbNotify = Toast
|
@@ -0,0 +1,24 @@
|
|
1
|
+
:root {
|
2
|
+
// 通用
|
3
|
+
--nb-font-family: OPPOSans-M, OPPOSans;
|
4
|
+
--nb-font-bold-family: OPPOSans-B, OPPOSans;
|
5
|
+
--nb-font-color: #181d41;
|
6
|
+
--nb-font-color-2: rgba(24, 29, 65, 0.2);
|
7
|
+
--nb-font-color-5: rgba(24, 29, 65, 0.5);
|
8
|
+
--nb-font-color-7: rgba(24, 29, 65, 0.7);
|
9
|
+
--nb-theme-color: #0066e0;
|
10
|
+
--nb-abnormal-color: #EA255F;
|
11
|
+
|
12
|
+
// 表单输入框、数字输入框、下拉框、日期控件
|
13
|
+
// 正常情况下
|
14
|
+
--nb-input-border-radius: 8px;
|
15
|
+
--nb-input-border-color: #cad0e0;
|
16
|
+
--nb-input-color: var(--nb-font-color);
|
17
|
+
--nb-input-placeholder-text-color: var(--nb-font-color-5);
|
18
|
+
// disabled
|
19
|
+
--nb-input-disabled-color: var(--nb-font-color-2);
|
20
|
+
--nb-input-disabled-background: #f4f6f9;
|
21
|
+
--nb-input-disabled-box-shadow: none;
|
22
|
+
--nb-input-disabled-border-color: #f4f6f9;
|
23
|
+
--nb-input-disabled-background-focus: #f4f6f9;
|
24
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-06-27 09:26:21
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-08-07 09:05:36
|
6
|
+
* @Description: BEM
|
7
|
+
*/
|
8
|
+
export function createNamespace(name) {
|
9
|
+
const prefixedName = `nb-${name}`
|
10
|
+
return [prefixedName, createBEM(prefixedName)]
|
11
|
+
}
|
12
|
+
|
13
|
+
/**
|
14
|
+
* bem helper
|
15
|
+
* b() // 'button'
|
16
|
+
* b('text') // 'button__text'
|
17
|
+
* b({ disabled }) // 'button button--disabled'
|
18
|
+
* b('text', { disabled }) // 'button__text button__text--disabled'
|
19
|
+
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
20
|
+
*/
|
21
|
+
export function createBEM(name) {
|
22
|
+
return (el, mods) => {
|
23
|
+
if (el && typeof el !== 'string') {
|
24
|
+
mods = el
|
25
|
+
el = ''
|
26
|
+
}
|
27
|
+
|
28
|
+
el = el ? `${name}__${el}` : name
|
29
|
+
|
30
|
+
return `${el}${genBem(el, mods)}`
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
function genBem(name, mods) {
|
35
|
+
if (!mods) {
|
36
|
+
return ''
|
37
|
+
}
|
38
|
+
|
39
|
+
if (typeof mods === 'string') {
|
40
|
+
return ` ${name}--${mods}`
|
41
|
+
}
|
42
|
+
|
43
|
+
if (Array.isArray(mods)) {
|
44
|
+
return mods.reduce((ret, item) => ret + genBem(name, item), '')
|
45
|
+
}
|
46
|
+
|
47
|
+
return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? genBem(name, key) : ''), '')
|
48
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* 字符串中间显示省略号...
|
3
|
+
* @param {String} value 字符串
|
4
|
+
* @param {Number} len 前后各显示多少位
|
5
|
+
* @returns 数组
|
6
|
+
*/
|
7
|
+
export function formatEllipsis(value, len) {
|
8
|
+
const showLen = parseInt(len / 2)
|
9
|
+
if (value && value.length > len) {
|
10
|
+
return value.substr(0, showLen) + '...' + value.substr(value.length - showLen)
|
11
|
+
}
|
12
|
+
return value
|
13
|
+
}
|
package/vite.config.js
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-06-27 16:24:35
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-09-13 09:41:01
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
import { defineConfig, loadEnv } from 'vite'
|
9
|
+
import vue from '@vitejs/plugin-vue'
|
10
|
+
import path from 'path'
|
11
|
+
|
12
|
+
// https://vitejs.dev/config/
|
13
|
+
export default ({mode}) => {
|
14
|
+
const env = loadEnv(mode, process.cwd()); // 获取.env文件里定义的环境变量
|
15
|
+
console.log('env', JSON.stringify(env))
|
16
|
+
return defineConfig({
|
17
|
+
plugins: [vue()],
|
18
|
+
build: {
|
19
|
+
outDir: `${env.VITE_BUILD_NAME}`, //输出文件名称
|
20
|
+
lib: {
|
21
|
+
entry: path.resolve(__dirname, `./src/${env.VITE_UI_NAME}/index.js`), //指定组件编译入口文件
|
22
|
+
name: env.VITE_BUILD_NAME,
|
23
|
+
fileName: (format) => `${env.VITE_BUILD_NAME}.${format}.js`
|
24
|
+
}, //库编译模式配置
|
25
|
+
rollupOptions: {
|
26
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
27
|
+
external: ['vue'],
|
28
|
+
output: {
|
29
|
+
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
|
30
|
+
globals: {
|
31
|
+
vue: 'Vue'
|
32
|
+
}
|
33
|
+
}
|
34
|
+
} // rollup打包配置
|
35
|
+
},
|
36
|
+
// 开发服务器选项
|
37
|
+
server: {
|
38
|
+
port: 9999,
|
39
|
+
host: '0.0.0.0',
|
40
|
+
// 是否自动在浏览器打开
|
41
|
+
open: true,
|
42
|
+
// 是否开启 https
|
43
|
+
https: false,
|
44
|
+
hmr: true // 开启热更新
|
45
|
+
}
|
46
|
+
})
|
47
|
+
}
|
package/nubomed-ui.es.js
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
import { computed as f, openBlock as o, createElementBlock as s, normalizeClass as _, unref as m, createCommentVNode as b, renderSlot as g, createElementVNode as l } from "vue";
|
2
|
-
function y(a) {
|
3
|
-
const e = `nb-${a}`;
|
4
|
-
return [e, h(e)];
|
5
|
-
}
|
6
|
-
function h(a) {
|
7
|
-
return (e, t) => (e && typeof e != "string" && (t = e, e = ""), e = e ? `${a}__${e}` : a, `${e}${p(e, t)}`);
|
8
|
-
}
|
9
|
-
function p(a, e) {
|
10
|
-
return e ? typeof e == "string" ? ` ${a}--${e}` : Array.isArray(e) ? e.reduce((t, n) => t + p(a, n), "") : Object.keys(e).reduce((t, n) => t + (e[n] ? p(a, n) : ""), "") : "";
|
11
|
-
}
|
12
|
-
const x = ["disabled"], v = {
|
13
|
-
key: 0,
|
14
|
-
class: "is-loading"
|
15
|
-
}, B = /* @__PURE__ */ l("svg", {
|
16
|
-
viewBox: "0 0 1024 1024",
|
17
|
-
xmlns: "http://www.w3.org/2000/svg"
|
18
|
-
}, [
|
19
|
-
/* @__PURE__ */ l("path", {
|
20
|
-
fill: "currentColor",
|
21
|
-
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
22
|
-
})
|
23
|
-
], -1), $ = [
|
24
|
-
B
|
25
|
-
], k = /* @__PURE__ */ Object.assign({
|
26
|
-
name: "nb-button"
|
27
|
-
}, {
|
28
|
-
__name: "index",
|
29
|
-
props: {
|
30
|
-
// 定义Props
|
31
|
-
// 类型,可选值为 primary warning default
|
32
|
-
type: {
|
33
|
-
type: String,
|
34
|
-
default: "default"
|
35
|
-
},
|
36
|
-
// 尺寸,可选值为 large medium small mini
|
37
|
-
size: {
|
38
|
-
type: String,
|
39
|
-
default: "medium"
|
40
|
-
},
|
41
|
-
// 按钮是否为禁用状态
|
42
|
-
disabled: {
|
43
|
-
type: Boolean,
|
44
|
-
default: !1
|
45
|
-
},
|
46
|
-
// 是否为加载中状态
|
47
|
-
loading: {
|
48
|
-
type: Boolean,
|
49
|
-
default: !1
|
50
|
-
},
|
51
|
-
// 是否为朴素按钮
|
52
|
-
plain: {
|
53
|
-
type: Boolean,
|
54
|
-
default: !1
|
55
|
-
},
|
56
|
-
// 是否为文字按钮
|
57
|
-
text: {
|
58
|
-
type: Boolean,
|
59
|
-
default: !1
|
60
|
-
}
|
61
|
-
},
|
62
|
-
emits: ["click"],
|
63
|
-
setup(a, { emit: e }) {
|
64
|
-
const t = a, [n, i] = y("button"), d = f(() => t.loading ? !0 : t.disabled), r = i([t.size, t.type, { disabled: t.disabled, loading: t.loading, plain: t.plain, text: t.text }]), c = () => {
|
65
|
-
e("click");
|
66
|
-
};
|
67
|
-
return (u, z) => (o(), s("button", {
|
68
|
-
class: _(m(r)),
|
69
|
-
disabled: d.value,
|
70
|
-
onClick: c
|
71
|
-
}, [
|
72
|
-
a.loading ? (o(), s("i", v, $)) : b("", !0),
|
73
|
-
g(u.$slots, "default")
|
74
|
-
], 10, x));
|
75
|
-
}
|
76
|
-
});
|
77
|
-
const L = ["disabled"], w = {
|
78
|
-
key: 0,
|
79
|
-
class: "is-loading"
|
80
|
-
}, C = /* @__PURE__ */ l("svg", {
|
81
|
-
viewBox: "0 0 1024 1024",
|
82
|
-
xmlns: "http://www.w3.org/2000/svg"
|
83
|
-
}, [
|
84
|
-
/* @__PURE__ */ l("path", {
|
85
|
-
fill: "currentColor",
|
86
|
-
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
87
|
-
})
|
88
|
-
], -1), M = [
|
89
|
-
C
|
90
|
-
], V = /* @__PURE__ */ Object.assign({
|
91
|
-
name: "nb-button-group"
|
92
|
-
}, {
|
93
|
-
__name: "index",
|
94
|
-
props: {
|
95
|
-
// 定义Props
|
96
|
-
// 类型,可选值为 primary warning default
|
97
|
-
type: {
|
98
|
-
type: String,
|
99
|
-
default: "default"
|
100
|
-
},
|
101
|
-
// 尺寸,可选值为 large medium small mini
|
102
|
-
size: {
|
103
|
-
type: String,
|
104
|
-
default: "medium"
|
105
|
-
},
|
106
|
-
// 按钮是否为禁用状态
|
107
|
-
disabled: {
|
108
|
-
type: Boolean,
|
109
|
-
default: !1
|
110
|
-
},
|
111
|
-
// 是否为加载中状态
|
112
|
-
loading: {
|
113
|
-
type: Boolean,
|
114
|
-
default: !1
|
115
|
-
},
|
116
|
-
// 是否为朴素按钮
|
117
|
-
plain: {
|
118
|
-
type: Boolean,
|
119
|
-
default: !1
|
120
|
-
},
|
121
|
-
// 是否为文字按钮
|
122
|
-
text: {
|
123
|
-
type: Boolean,
|
124
|
-
default: !1
|
125
|
-
}
|
126
|
-
},
|
127
|
-
emits: ["click"],
|
128
|
-
setup(a, { emit: e }) {
|
129
|
-
const t = a, [n, i] = y("button"), d = f(() => t.loading ? !0 : t.disabled), r = i([t.size, t.type, { disabled: t.disabled, loading: t.loading, plain: t.plain, text: t.text }]), c = () => {
|
130
|
-
e("click");
|
131
|
-
};
|
132
|
-
return (u, z) => (o(), s("button", {
|
133
|
-
class: _(m(r)),
|
134
|
-
disabled: d.value,
|
135
|
-
onClick: c
|
136
|
-
}, [
|
137
|
-
a.loading ? (o(), s("i", w, M)) : b("", !0),
|
138
|
-
g(u.$slots, "default")
|
139
|
-
], 10, L));
|
140
|
-
}
|
141
|
-
}), N = [k, V], E = {
|
142
|
-
install(a) {
|
143
|
-
N.forEach((e) => {
|
144
|
-
a.component(e.name, e);
|
145
|
-
});
|
146
|
-
}
|
147
|
-
};
|
148
|
-
export {
|
149
|
-
k as Button,
|
150
|
-
V as ButtonGroup,
|
151
|
-
E as default
|
152
|
-
};
|
package/nubomed-ui.umd.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
(function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o["nubomed-ui"]={},o.Vue))})(this,function(o,t){"use strict";function f(n){const e=`nb-${n}`;return[e,_(e)]}function _(n){return(e,a)=>(e&&typeof e!="string"&&(a=e,e=""),e=e?`${n}__${e}`:n,`${e}${i(e,a)}`)}function i(n,e){return e?typeof e=="string"?` ${n}--${e}`:Array.isArray(e)?e.reduce((a,l)=>a+i(n,l),""):Object.keys(e).reduce((a,l)=>a+(e[l]?i(n,l):""),""):""}const L="",b=["disabled"],g={key:0,class:"is-loading"},y=[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})],-1)],p=Object.assign({name:"nb-button"},{__name:"index",props:{type:{type:String,default:"default"},size:{type:String,default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},text:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const a=n,[l,s]=f("button"),d=t.computed(()=>a.loading?!0:a.disabled),c=s([a.size,a.type,{disabled:a.disabled,loading:a.loading,plain:a.plain,text:a.text}]),r=()=>{e("click")};return(u,$)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(t.unref(c)),disabled:d.value,onClick:r},[n.loading?(t.openBlock(),t.createElementBlock("i",g,y)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default")],10,b))}}),w="",h=["disabled"],z={key:0,class:"is-loading"},B=[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})],-1)],m=Object.assign({name:"nb-button-group"},{__name:"index",props:{type:{type:String,default:"default"},size:{type:String,default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},text:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const a=n,[l,s]=f("button"),d=t.computed(()=>a.loading?!0:a.disabled),c=s([a.size,a.type,{disabled:a.disabled,loading:a.loading,plain:a.plain,text:a.text}]),r=()=>{e("click")};return(u,$)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(t.unref(c)),disabled:d.value,onClick:r},[n.loading?(t.openBlock(),t.createElementBlock("i",z,B)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default")],10,h))}}),k=[p,m],x={install(n){k.forEach(e=>{n.component(e.name,e)})}};o.Button=p,o.ButtonGroup=m,o.default=x,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/style.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
:root{--van-button-border-radius: 8px;--van-button-primary-color: #ffffff;--van-button-primary-background: linear-gradient(180deg, #3385e6 0%, #0066e0 100%);--van-button-primary-box-shadow: 0px 1px 6px 0px rgba(24, 29, 65, .12);--van-button-primary-border-color: #0066e0;--van-button-primary-background-focus: #007aff;--van-button-warning-color: #ffffff;--van-button-warning-background: linear-gradient(180deg, #ea5765 0%, #e52d3e 100%);--van-button-warning-box-shadow: 0px 1px 6px 0px rgba(24, 29, 65, .12);--van-button-warning-border-color: #e52d3e;--van-button-warning-background-focus: #f94a5a;--van-button-default-color: #181d41;--van-button-default-background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);--van-button-default-box-shadow: 0px 1px 6px 0px rgba(24, 29, 65, .12);--van-button-default-border-color: #cad0e0;--van-button-default-background-focus: #cad0e0;--van-button-plain-background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);--van-button-plain-border-color: #cad0e0;--van-button-disabled-color: #181d4133;--van-button-disabled-background: #f4f6f9;--van-button-disabled-box-shadow: none;--van-button-disabled-border-color: #f4f6f9;--van-button-disabled-background-focus: #f4f6f9;--van-button-large-width: 480px;--van-button-large-height: 80px;--van-button-large-font-size: 28px;--van-button-large-icon-size: 28px;--van-button-medium-width: 220px;--van-button-medium-height: 72px;--van-button-medium-font-size: 28px;--van-button-medium-icon-size: 28px;--van-button-small-width: 220px;--van-button-small-height: 64px;--van-button-small-font-size: 24px;--van-button-small-icon-size: 24px;--van-button-mini-width: 88px;--van-button-mini-height: 48px;--van-button-mini-font-size: 24px;--van-button-mini-icon-size: 24px}.nb-button{display:inline-flex;justify-content:center;align-items:center;line-height:1;white-space:nowrap;cursor:pointer;text-align:center;box-sizing:border-box;outline:none;transition:.1s;user-select:none;vertical-align:middle;-webkit-appearance:none;border-radius:var(--van-button-border-radius);font-family:inherit;font-weight:400}.nb-button:focus{outline:none}.nb-button--large{min-width:var(--van-button-large-width);height:var(--van-button-large-height);font-size:var(--van-button-large-font-size);padding:0 20px}.nb-button--large svg{width:var(--van-button-large-icon-size);height:var(--van-button-large-icon-size);margin-right:8px}.nb-button--medium{min-width:var(--van-button-medium-width);height:var(--van-button-medium-height);font-size:var(--van-button-medium-font-size);padding:0 20px}.nb-button--medium svg{width:var(--van-button-medium-icon-size);height:var(--van-button-medium-icon-size);margin-right:8px}.nb-button--small{min-width:var(--van-button-small-width);height:var(--van-button-small-height);font-size:var(--van-button-small-font-size);padding:0 20px}.nb-button--small svg{width:var(--van-button-small-icon-size);height:var(--van-button-small-icon-size);margin-right:8px}.nb-button--mini{min-width:var(--van-button-mini-width);height:var(--van-button-mini-height);font-size:var(--van-button-mini-font-size);padding:0 20px}.nb-button--mini svg{width:var(--van-button-mini-icon-size);height:var(--van-button-mini-icon-size);margin-right:8px}.nb-button--primary{color:var(--van-button-primary-color);background:var(--van-button-primary-background);box-shadow:var(--van-button-primary-box-shadow);border:1px solid var(--van-button-primary-border-color)}.nb-button--primary:focus{border-color:var(--van-button-primary-background-focus);background-color:var(--van-button-primary-background-focus)}.nb-button--primary.nb-button--plain{color:var(--van-button-primary-border-color)}.nb-button--warning{color:var(--van-button-warning-color);background:var(--van-button-warning-background);box-shadow:var(--van-button-warning-box-shadow);border:1px solid var(--van-button-warning-border-color)}.nb-button--warning:focus{border-color:var(--van-button-warning-background-focus);background-color:var(--van-button-warning-background-focus)}.nb-button--warning.nb-button--plain{color:var(--van-button-warning-border-color)}.nb-button--default{color:var(--van-button-default-color);background:var(--van-button-default-background);box-shadow:var(--van-button-default-box-shadow);border:1px solid var(--van-button-default-border-color)}.nb-button--default:focus{border-color:var(--van-button-default-background-focus);background-color:var(--van-button-default-background-focus)}.nb-button--default.nb-button--plain{color:var(--van-button-default-border-color)}.nb-button--plain{background:var(--van-button-plain-background);border-color:var(--van-button-plain-border-color)}.nb-button--text{min-width:100px;height:64px;background:transparent;border-color:transparent;box-shadow:none;padding:0 10px 0 6px}.nb-button--disabled{cursor:not-allowed;color:var(--van-button-disabled-color);background:var(--van-button-disabled-background);box-shadow:var(--van-button-disabled-box-shadow);border:1px solid var(--van-button-disabled-border-color)}.nb-button--loading{cursor:default;opacity:.5}.nb-button--loading .is-loading{width:28px;height:28px;margin-right:8px;animation:rotating 2s linear infinite}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|