vdesign-ui 0.2.20 → 0.3.0
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.
- package/README.md +58 -58
- package/dist/components/actionbar/index.js +8 -8
- package/dist/components/actionbar/index.vue +39 -39
- package/dist/components/actionbar/style.less +44 -44
- package/dist/components/actionbar-cell/index.js +7 -7
- package/dist/components/actionbar-cell/index.vue +42 -42
- package/dist/components/actions/index.js +6 -6
- package/dist/components/actions/index.vue +77 -77
- package/dist/components/actions/style.less +109 -109
- package/dist/components/actions-cell/index.js +6 -6
- package/dist/components/actions-cell/index.vue +94 -94
- package/dist/components/actions-cell/style.less +38 -38
- package/dist/components/activityviews/index.js +8 -8
- package/dist/components/activityviews/index.vue +192 -192
- package/dist/components/activityviews/style.less +161 -161
- package/dist/components/badge/index.js +8 -8
- package/dist/components/badge/index.vue +49 -49
- package/dist/components/badge/style.less +54 -54
- package/dist/components/button/index.js +8 -8
- package/dist/components/button/index.vue +93 -93
- package/dist/components/button/style.less +558 -558
- package/dist/components/calendar/index-element.vue +84 -84
- package/dist/components/calendar/index.js +7 -7
- package/dist/components/calendar/index.vue +53 -53
- package/dist/components/calendar/style.less +138 -138
- package/dist/components/checkbox/index.js +8 -8
- package/dist/components/checkbox/index.vue +161 -161
- package/dist/components/checkbox/style.less +288 -288
- package/dist/components/checkbox-group/index.js +7 -7
- package/dist/components/checkbox-group/index.vue +73 -73
- package/dist/components/common/state/index.vue +33 -33
- package/dist/components/common/state/style.less +47 -47
- package/dist/components/data-list/index.js +10 -10
- package/dist/components/data-list/index.vue +19 -19
- package/dist/components/data-list/style.less +623 -623
- package/dist/components/datetime-picker/index.js +7 -7
- package/dist/components/datetime-picker/index.vue +39 -39
- package/dist/components/datetime-picker/style.less +23 -23
- package/dist/components/dialog/index.js +8 -8
- package/dist/components/dialog/index.vue +164 -164
- package/dist/components/dialog/overlay-manager.js +18 -18
- package/dist/components/dialog/style.less +138 -138
- package/dist/components/divider/index.js +8 -8
- package/dist/components/divider/index.vue +54 -54
- package/dist/components/divider/style.less +92 -92
- package/dist/components/dropdown/index.js +8 -8
- package/dist/components/dropdown/index.vue +218 -218
- package/dist/components/dropdown/style.less +432 -432
- package/dist/components/empty/index.js +8 -8
- package/dist/components/empty/index.vue +138 -138
- package/dist/components/empty/style.less +60 -60
- package/dist/components/footer/index.js +6 -6
- package/dist/components/footer/index.vue +33 -33
- package/dist/components/footer/style.less +20 -20
- package/dist/components/footnav/index.js +6 -6
- package/dist/components/footnav/index.vue +93 -93
- package/dist/components/footnav/style.less +22 -22
- package/dist/components/footnav-item/index.js +6 -6
- package/dist/components/footnav-item/index.vue +50 -50
- package/dist/components/footnav-item/style.less +39 -39
- package/dist/components/form/index.js +6 -6
- package/dist/components/form/index.vue +14 -14
- package/dist/components/headnav/index.js +6 -6
- package/dist/components/headnav/index.vue +185 -185
- package/dist/components/headnav/style.less +231 -231
- package/dist/components/icon/font/iconfont.css +163 -163
- package/dist/components/icon/font/iconfont.js +5 -5
- package/dist/components/icon/index.js +9 -9
- package/dist/components/icon/index.vue +96 -96
- package/dist/components/icon/style.less +44 -44
- package/dist/components/input/calcTextareaHeight.js +162 -162
- package/dist/components/input/index.js +8 -8
- package/dist/components/input/index.vue +345 -345
- package/dist/components/input/style.less +471 -471
- package/dist/components/list/index.js +8 -8
- package/dist/components/list/index.vue +152 -152
- package/dist/components/list/style.less +213 -213
- package/dist/components/loading/index.js +6 -6
- package/dist/components/loading/index.vue +68 -68
- package/dist/components/loading/style.less +53 -53
- package/dist/components/mixins/clickoutside.js +81 -81
- package/dist/components/mixins/dom.js +41 -41
- package/dist/components/mixins/languageMixin.js +43 -43
- package/dist/components/mixins/outlineConfigPlugin.js +45 -45
- package/dist/components/mixins/router-link.js +22 -22
- package/dist/components/mixins/themeMixin.js +43 -43
- package/dist/components/noticebar/index.js +8 -8
- package/dist/components/noticebar/index.vue +258 -258
- package/dist/components/noticebar/style.less +333 -333
- package/dist/components/overlay/index.js +8 -8
- package/dist/components/overlay/index.vue +184 -184
- package/dist/components/overlay/style.less +24 -24
- package/dist/components/pagebreak/index.js +6 -6
- package/dist/components/pagebreak/index.vue +67 -67
- package/dist/components/pagebreak/style.less +41 -41
- package/dist/components/password/index.js +8 -8
- package/dist/components/password/index.vue +64 -64
- package/dist/components/popover/index.js +8 -8
- package/dist/components/popover/index.vue +100 -100
- package/dist/components/popover/style.less +346 -346
- package/dist/components/popover/vue-popover.vue +314 -314
- package/dist/components/popup/index.js +7 -7
- package/dist/components/popup/index.vue +165 -165
- package/dist/components/popup/style.less +78 -78
- package/dist/components/radio/index.js +8 -8
- package/dist/components/radio/index.vue +184 -184
- package/dist/components/radio/style.less +300 -300
- package/dist/components/radio-group/index.js +7 -7
- package/dist/components/radio-group/index.vue +62 -62
- package/dist/components/result/index.js +8 -8
- package/dist/components/result/index.vue +73 -73
- package/dist/components/result/style.less +43 -43
- package/dist/components/search/index.js +8 -8
- package/dist/components/search/index.vue +70 -70
- package/dist/components/selector/index.js +8 -8
- package/dist/components/selector/index.vue +161 -161
- package/dist/components/selector/style.less +484 -484
- package/dist/components/skeleton/index.js +6 -6
- package/dist/components/skeleton/index.vue +207 -207
- package/dist/components/skeleton/style.less +196 -196
- package/dist/components/slider/draggable.js +49 -49
- package/dist/components/slider/index.js +6 -6
- package/dist/components/slider/index.vue +167 -167
- package/dist/components/slider/style.less +99 -99
- package/dist/components/slider/utils.js +59 -59
- package/dist/components/step/index.js +7 -7
- package/dist/components/step/index.vue +48 -48
- package/dist/components/step/style.less +66 -66
- package/dist/components/step-item/index.js +7 -7
- package/dist/components/step-item/index.vue +126 -126
- package/dist/components/step-item/style.less +399 -399
- package/dist/components/stepper/index.js +8 -8
- package/dist/components/stepper/index.vue +150 -150
- package/dist/components/style/index.vue +42 -42
- package/dist/components/switch/index.js +8 -8
- package/dist/components/switch/index.vue +72 -72
- package/dist/components/switch/style.less +56 -56
- package/dist/components/tab/index.js +7 -7
- package/dist/components/tab/index.vue +97 -97
- package/dist/components/tabs/index.js +8 -8
- package/dist/components/tabs/index.vue +356 -356
- package/dist/components/tabs/style.less +504 -504
- package/dist/components/tag/index.js +6 -6
- package/dist/components/tag/index.vue +64 -64
- package/dist/components/tag/style.less +210 -210
- package/dist/components/title/index.js +8 -8
- package/dist/components/title/index.vue +99 -99
- package/dist/components/title/style.less +187 -187
- package/dist/components/toast/index.js +139 -139
- package/dist/components/toast/index.vue +50 -50
- package/dist/components/toast/style.less +58 -58
- package/dist/components/transition/index.js +8 -8
- package/dist/components/transition/index.vue +13 -13
- package/dist/components/transition/style.less +208 -208
- package/dist/components/upload/index.js +6 -6
- package/dist/components/upload/index.vue +106 -106
- package/dist/components/upload/style.less +147 -147
- package/dist/components/utils/assist.js +34 -34
- package/dist/components/utils/env.js +21 -21
- package/dist/locale/ar.js +97 -97
- package/dist/locale/en.js +97 -97
- package/dist/locale/zh.js +97 -97
- package/dist/token.css +9 -9
- package/dist/vdesign-ui.common.js +83 -83
- package/dist/vdesign-ui.umd.js +83 -83
- package/package.json +113 -113
package/README.md
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
# 📦 vdesign-ui 项目结构说明
|
|
3
|
-
|
|
4
|
-
本项目为 `vdesign-ui` 前端组件库,包含组件源码、构建脚本、设计 Tokens、多语言配置等。以下是项目目录结构与主要文件说明。
|
|
5
|
-
|
|
6
|
-
## 📁 目录结构
|
|
7
|
-
|
|
8
|
-
```text
|
|
9
|
-
vdesign-ui/
|
|
10
|
-
├── bin/ # 构建与工具脚本目录
|
|
11
|
-
│ ├── backup-token-css.js # 备份 token.css 文件(保存至 dist-token-history,文件名带时间戳)
|
|
12
|
-
│ ├── build-components.js # 构建 packages/components 下的组件并输出到 dist/components,按需加载,暂未用到
|
|
13
|
-
│ ├── concat-css.js # 合并 tokens 中多个 CSS 文件为 token.css
|
|
14
|
-
│ ├── copy-locales.js # 拷贝 packages/locale 的内容到 dist/locale
|
|
15
|
-
│ └── node.js # 输出官网导航目录
|
|
16
|
-
├── dist/ # 构建输出目录
|
|
17
|
-
│ ├── components/ # 拷贝组件
|
|
18
|
-
│ ├── locale/ # 拷贝语言资源
|
|
19
|
-
│ ├── demo.html # 构建预览页面(可能用于调试或预览组件)
|
|
20
|
-
│ ├── token.css # 当前 Design Token 输出样式
|
|
21
|
-
│ ├── vdesign-ui.common.js # CommonJS 格式构建文件
|
|
22
|
-
│ ├── vdesign-ui.css # 所有样式文件合并后的主 CSS
|
|
23
|
-
│ ├── vdesign-ui.umd.js # UMD 构建文件(未压缩)
|
|
24
|
-
│ ├── vdesign-ui.umd.min.js # UMD 构建文件(压缩版)
|
|
25
|
-
│ └── dist-token-history/ # 历史 Token 样式备份(时间戳命名)
|
|
26
|
-
│ ├── token_20250314_155751.css
|
|
27
|
-
│ ├── token_20250314_160005.css
|
|
28
|
-
│ ├── token_20250314_160803.css
|
|
29
|
-
│ ├── token_20250321_171830.css
|
|
30
|
-
│ ├── token_20250324_152753.css
|
|
31
|
-
│ ├── token_20250324_153128.css
|
|
32
|
-
│ ├── token_20250325_114906.css
|
|
33
|
-
│ └── token_20250326_170122.css
|
|
34
|
-
├── node_modules/ # 项目依赖模块
|
|
35
|
-
├── packages/ # 源码主目录
|
|
36
|
-
│ ├── components/ # Vue 组件源码(Button、Uploader 等)
|
|
37
|
-
│ ├── locale/ # 多语言支持
|
|
38
|
-
│ │ ├── lang/ # 多语言翻译文件(如 zh-CN.js / en-US.js)
|
|
39
|
-
│ │ └── i18nPlugin.js # 国际化插件封装(用于 Vue 插件注册)
|
|
40
|
-
│ └── tokens/ # Design Token 配置(设计样式原子值)
|
|
41
|
-
│ ├── css/ # 生成后的 CSS Token 文件
|
|
42
|
-
│ ├── fonts/ # 字体资源
|
|
43
|
-
│ ├── js/ # 获取以及生成Token数据
|
|
44
|
-
│ ├── index.css # 主样式文件
|
|
45
|
-
│ ├── reset.css # 样式重置文件
|
|
46
|
-
│ └── style.css # 组件通用样式
|
|
47
|
-
│ └──index.js # 项目主入口(可能用于组件库导出)
|
|
48
|
-
├── sites/ # 主要包含该组件库的站点,用于文档描述
|
|
49
|
-
│ ├── assets/ # 静态资源(如图片、图标)
|
|
50
|
-
│ ├── components/ # 站点使用的公共组件
|
|
51
|
-
│ ├── demos/ # 组件演示页面(提供交互效果展示)
|
|
52
|
-
│ ├── docs/ # 文档页面(介绍使用说明、API 参考等)
|
|
53
|
-
│ ├── i18n/ # 站点的国际化支持
|
|
54
|
-
│ ├── json/ # json格式的Token数据
|
|
55
|
-
│ ├── pages/ # 站点页面路由(测试页面)
|
|
56
|
-
│ ├── router/ # Vue 路由配置
|
|
57
|
-
│ ├── App.vue # 站点 Vue 入口文件
|
|
58
|
-
│ ├── insetTables.js # Token数据插入到demo页面
|
|
1
|
+
|
|
2
|
+
# 📦 vdesign-ui 项目结构说明
|
|
3
|
+
|
|
4
|
+
本项目为 `vdesign-ui` 前端组件库,包含组件源码、构建脚本、设计 Tokens、多语言配置等。以下是项目目录结构与主要文件说明。
|
|
5
|
+
|
|
6
|
+
## 📁 目录结构
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
vdesign-ui/
|
|
10
|
+
├── bin/ # 构建与工具脚本目录
|
|
11
|
+
│ ├── backup-token-css.js # 备份 token.css 文件(保存至 dist-token-history,文件名带时间戳)
|
|
12
|
+
│ ├── build-components.js # 构建 packages/components 下的组件并输出到 dist/components,按需加载,暂未用到
|
|
13
|
+
│ ├── concat-css.js # 合并 tokens 中多个 CSS 文件为 token.css
|
|
14
|
+
│ ├── copy-locales.js # 拷贝 packages/locale 的内容到 dist/locale
|
|
15
|
+
│ └── node.js # 输出官网导航目录
|
|
16
|
+
├── dist/ # 构建输出目录
|
|
17
|
+
│ ├── components/ # 拷贝组件
|
|
18
|
+
│ ├── locale/ # 拷贝语言资源
|
|
19
|
+
│ ├── demo.html # 构建预览页面(可能用于调试或预览组件)
|
|
20
|
+
│ ├── token.css # 当前 Design Token 输出样式
|
|
21
|
+
│ ├── vdesign-ui.common.js # CommonJS 格式构建文件
|
|
22
|
+
│ ├── vdesign-ui.css # 所有样式文件合并后的主 CSS
|
|
23
|
+
│ ├── vdesign-ui.umd.js # UMD 构建文件(未压缩)
|
|
24
|
+
│ ├── vdesign-ui.umd.min.js # UMD 构建文件(压缩版)
|
|
25
|
+
│ └── dist-token-history/ # 历史 Token 样式备份(时间戳命名)
|
|
26
|
+
│ ├── token_20250314_155751.css
|
|
27
|
+
│ ├── token_20250314_160005.css
|
|
28
|
+
│ ├── token_20250314_160803.css
|
|
29
|
+
│ ├── token_20250321_171830.css
|
|
30
|
+
│ ├── token_20250324_152753.css
|
|
31
|
+
│ ├── token_20250324_153128.css
|
|
32
|
+
│ ├── token_20250325_114906.css
|
|
33
|
+
│ └── token_20250326_170122.css
|
|
34
|
+
├── node_modules/ # 项目依赖模块
|
|
35
|
+
├── packages/ # 源码主目录
|
|
36
|
+
│ ├── components/ # Vue 组件源码(Button、Uploader 等)
|
|
37
|
+
│ ├── locale/ # 多语言支持
|
|
38
|
+
│ │ ├── lang/ # 多语言翻译文件(如 zh-CN.js / en-US.js)
|
|
39
|
+
│ │ └── i18nPlugin.js # 国际化插件封装(用于 Vue 插件注册)
|
|
40
|
+
│ └── tokens/ # Design Token 配置(设计样式原子值)
|
|
41
|
+
│ ├── css/ # 生成后的 CSS Token 文件
|
|
42
|
+
│ ├── fonts/ # 字体资源
|
|
43
|
+
│ ├── js/ # 获取以及生成Token数据
|
|
44
|
+
│ ├── index.css # 主样式文件
|
|
45
|
+
│ ├── reset.css # 样式重置文件
|
|
46
|
+
│ └── style.css # 组件通用样式
|
|
47
|
+
│ └──index.js # 项目主入口(可能用于组件库导出)
|
|
48
|
+
├── sites/ # 主要包含该组件库的站点,用于文档描述
|
|
49
|
+
│ ├── assets/ # 静态资源(如图片、图标)
|
|
50
|
+
│ ├── components/ # 站点使用的公共组件
|
|
51
|
+
│ ├── demos/ # 组件演示页面(提供交互效果展示)
|
|
52
|
+
│ ├── docs/ # 文档页面(介绍使用说明、API 参考等)
|
|
53
|
+
│ ├── i18n/ # 站点的国际化支持
|
|
54
|
+
│ ├── json/ # json格式的Token数据
|
|
55
|
+
│ ├── pages/ # 站点页面路由(测试页面)
|
|
56
|
+
│ ├── router/ # Vue 路由配置
|
|
57
|
+
│ ├── App.vue # 站点 Vue 入口文件
|
|
58
|
+
│ ├── insetTables.js # Token数据插入到demo页面
|
|
59
59
|
│ └── main.js # 站点主入口文件
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Actionbar from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
Actionbar.install = function (Vue) {
|
|
5
|
-
Vue.component(Actionbar.name, Actionbar);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default Actionbar;
|
|
1
|
+
import Actionbar from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
Actionbar.install = function (Vue) {
|
|
5
|
+
Vue.component(Actionbar.name, Actionbar);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default Actionbar;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vd-actionbar" :class="wrapClasses">
|
|
3
|
-
<div class="vd-actionbar__main">
|
|
4
|
-
<slot></slot>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
const prefixCls = 'vd-actionbar';
|
|
10
|
-
export default {
|
|
11
|
-
name: 'vd-actionbar',
|
|
12
|
-
props: {
|
|
13
|
-
// 默认左右有间距,但是实际设计稿有的没有间距,
|
|
14
|
-
//block属性预留一个填充,如果使用基础图标按钮组件填充,不太好填充。
|
|
15
|
-
block: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
computed: {
|
|
26
|
-
wrapClasses() {
|
|
27
|
-
return [
|
|
28
|
-
{
|
|
29
|
-
[`${prefixCls}__block`]: this.block
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style lang="less">
|
|
38
|
-
@import './style.less';
|
|
39
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-actionbar" :class="wrapClasses">
|
|
3
|
+
<div class="vd-actionbar__main">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
const prefixCls = 'vd-actionbar';
|
|
10
|
+
export default {
|
|
11
|
+
name: 'vd-actionbar',
|
|
12
|
+
props: {
|
|
13
|
+
// 默认左右有间距,但是实际设计稿有的没有间距,
|
|
14
|
+
//block属性预留一个填充,如果使用基础图标按钮组件填充,不太好填充。
|
|
15
|
+
block: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
wrapClasses() {
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
[`${prefixCls}__block`]: this.block
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="less">
|
|
38
|
+
@import './style.less';
|
|
39
|
+
</style>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
@actionbar-prefix-cls: vd-actionbar;
|
|
2
|
-
|
|
3
|
-
.@{actionbar-prefix-cls} {
|
|
4
|
-
|
|
5
|
-
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: var(--height-actionbar-content);
|
|
8
|
-
background-color: var(--color-actionbar-bg);
|
|
9
|
-
padding-inline-start: var(--spacing-actionbar-padding_y);
|
|
10
|
-
padding-inline-end: var(--spacing-actionbar-padding_y);
|
|
11
|
-
|
|
12
|
-
&__block {
|
|
13
|
-
padding-inline-start: 0;
|
|
14
|
-
padding-inline-end: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&__main {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex: 1;
|
|
20
|
-
justify-content: space-around;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.@{actionbar-prefix-cls}-cell {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex: 1;
|
|
27
|
-
align-items: center;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
30
|
-
font-size: var(--en-single-f-d-r-fontSize);
|
|
31
|
-
font-weight: var(--en-single-f-d-r-fontWeight);
|
|
32
|
-
|
|
33
|
-
&--left {
|
|
34
|
-
justify-content: left;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--center {
|
|
38
|
-
justify-content: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&--right {
|
|
42
|
-
justify-content: right;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
@actionbar-prefix-cls: vd-actionbar;
|
|
2
|
+
|
|
3
|
+
.@{actionbar-prefix-cls} {
|
|
4
|
+
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: var(--height-actionbar-content);
|
|
8
|
+
background-color: var(--color-actionbar-bg);
|
|
9
|
+
padding-inline-start: var(--spacing-actionbar-padding_y);
|
|
10
|
+
padding-inline-end: var(--spacing-actionbar-padding_y);
|
|
11
|
+
|
|
12
|
+
&__block {
|
|
13
|
+
padding-inline-start: 0;
|
|
14
|
+
padding-inline-end: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__main {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex: 1;
|
|
20
|
+
justify-content: space-around;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.@{actionbar-prefix-cls}-cell {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex: 1;
|
|
27
|
+
align-items: center;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
30
|
+
font-size: var(--en-single-f-d-r-fontSize);
|
|
31
|
+
font-weight: var(--en-single-f-d-r-fontWeight);
|
|
32
|
+
|
|
33
|
+
&--left {
|
|
34
|
+
justify-content: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--center {
|
|
38
|
+
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--right {
|
|
42
|
+
justify-content: right;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ActionbarCell from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
ActionbarCell.install = function (Vue) {
|
|
4
|
-
Vue.component(ActionbarCell.name, ActionbarCell);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export default ActionbarCell;
|
|
1
|
+
import ActionbarCell from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
ActionbarCell.install = function (Vue) {
|
|
4
|
+
Vue.component(ActionbarCell.name, ActionbarCell);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export default ActionbarCell;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vd-actionbar-cell" :class="wrapClasses">
|
|
3
|
-
<vd-icon v-if="iconName" :name="iconName"></vd-icon>
|
|
4
|
-
<slot></slot>
|
|
5
|
-
</span>
|
|
6
|
-
</template>
|
|
7
|
-
<script>
|
|
8
|
-
import VdIcon from '../icon';
|
|
9
|
-
const prefixCls = 'vd-actionbar'
|
|
10
|
-
export default {
|
|
11
|
-
name: 'vd-actionbar-cell',
|
|
12
|
-
components: {
|
|
13
|
-
VdIcon
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
// 实际使用场景不多,为了设计验收
|
|
17
|
-
iconName: String,
|
|
18
|
-
direction: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: 'center'
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
wrapClasses() {
|
|
30
|
-
return [
|
|
31
|
-
{
|
|
32
|
-
[`${prefixCls}-cell--${this.direction}`]: this.direction
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style lang="less">
|
|
41
|
-
@import './style.less';
|
|
42
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vd-actionbar-cell" :class="wrapClasses">
|
|
3
|
+
<vd-icon v-if="iconName" :name="iconName"></vd-icon>
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</span>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
import VdIcon from '../icon';
|
|
9
|
+
const prefixCls = 'vd-actionbar'
|
|
10
|
+
export default {
|
|
11
|
+
name: 'vd-actionbar-cell',
|
|
12
|
+
components: {
|
|
13
|
+
VdIcon
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
// 实际使用场景不多,为了设计验收
|
|
17
|
+
iconName: String,
|
|
18
|
+
direction: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'center'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
wrapClasses() {
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
[`${prefixCls}-cell--${this.direction}`]: this.direction
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="less">
|
|
41
|
+
@import './style.less';
|
|
42
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Actions from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
Actions.install = function(Vue) {
|
|
4
|
-
Vue.component(Actions.name, Actions)
|
|
5
|
-
}
|
|
6
|
-
|
|
1
|
+
import Actions from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
Actions.install = function(Vue) {
|
|
4
|
+
Vue.component(Actions.name, Actions)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
7
|
export default Actions;
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="wrapClasses">
|
|
3
|
-
<span class="vd-actions__text" :class="textClasses" v-if="text">{{ text }}</span>
|
|
4
|
-
<vd-icon v-if="icon && type === 'list'" class="vd-actions__icon" :class="iconClasses" :name="icon"></vd-icon>
|
|
5
|
-
<span class="vd-actions__content" :class="contentBg" v-if="icon && type === 'card'">
|
|
6
|
-
<vd-icon class="vd-actions__icon" :class="iconClasses" :name="icon"></vd-icon>
|
|
7
|
-
</span>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import VdIcon from '../icon';
|
|
13
|
-
const prefixCls = 'vd-actions'
|
|
14
|
-
export default {
|
|
15
|
-
name: 'vd-actions',
|
|
16
|
-
components: {
|
|
17
|
-
VdIcon
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
type: {
|
|
21
|
-
type: String,
|
|
22
|
-
default:'list'
|
|
23
|
-
},
|
|
24
|
-
colors: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
backgrounds: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
text: {
|
|
31
|
-
type: String,
|
|
32
|
-
},
|
|
33
|
-
icon: {
|
|
34
|
-
type: String,
|
|
35
|
-
},
|
|
36
|
-
disabled:Boolean,
|
|
37
|
-
},
|
|
38
|
-
computed: {
|
|
39
|
-
wrapClasses() {
|
|
40
|
-
return [
|
|
41
|
-
`${prefixCls}`,
|
|
42
|
-
{
|
|
43
|
-
[`${prefixCls}__${this.type}`]: this.type,
|
|
44
|
-
[`${prefixCls}__${this.colors}`]: this.colors,
|
|
45
|
-
[`${prefixCls}__${this.colors}--disabled`]: this.disabled && (this.type ==='list'),
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
contentBg() {
|
|
50
|
-
return [
|
|
51
|
-
{
|
|
52
|
-
[`${prefixCls}__content--${this.backgrounds}`]: this.backgrounds,
|
|
53
|
-
[`${prefixCls}__content--${this.backgrounds}--disabled`]: this.disabled,
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
textClasses(){
|
|
58
|
-
return [
|
|
59
|
-
{
|
|
60
|
-
[`${prefixCls}__text--disabled`]: this.disabled
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
iconClasses(){
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
[`${prefixCls}__icon--disabled`]: this.disabled
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style lang="less">
|
|
76
|
-
@import './style.less';
|
|
77
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="wrapClasses">
|
|
3
|
+
<span class="vd-actions__text" :class="textClasses" v-if="text">{{ text }}</span>
|
|
4
|
+
<vd-icon v-if="icon && type === 'list'" class="vd-actions__icon" :class="iconClasses" :name="icon"></vd-icon>
|
|
5
|
+
<span class="vd-actions__content" :class="contentBg" v-if="icon && type === 'card'">
|
|
6
|
+
<vd-icon class="vd-actions__icon" :class="iconClasses" :name="icon"></vd-icon>
|
|
7
|
+
</span>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import VdIcon from '../icon';
|
|
13
|
+
const prefixCls = 'vd-actions'
|
|
14
|
+
export default {
|
|
15
|
+
name: 'vd-actions',
|
|
16
|
+
components: {
|
|
17
|
+
VdIcon
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
default:'list'
|
|
23
|
+
},
|
|
24
|
+
colors: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
backgrounds: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
text: {
|
|
31
|
+
type: String,
|
|
32
|
+
},
|
|
33
|
+
icon: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
disabled:Boolean,
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
wrapClasses() {
|
|
40
|
+
return [
|
|
41
|
+
`${prefixCls}`,
|
|
42
|
+
{
|
|
43
|
+
[`${prefixCls}__${this.type}`]: this.type,
|
|
44
|
+
[`${prefixCls}__${this.colors}`]: this.colors,
|
|
45
|
+
[`${prefixCls}__${this.colors}--disabled`]: this.disabled && (this.type ==='list'),
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
contentBg() {
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
[`${prefixCls}__content--${this.backgrounds}`]: this.backgrounds,
|
|
53
|
+
[`${prefixCls}__content--${this.backgrounds}--disabled`]: this.disabled,
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
textClasses(){
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
[`${prefixCls}__text--disabled`]: this.disabled
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
iconClasses(){
|
|
65
|
+
return [
|
|
66
|
+
{
|
|
67
|
+
[`${prefixCls}__icon--disabled`]: this.disabled
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style lang="less">
|
|
76
|
+
@import './style.less';
|
|
77
|
+
</style>
|