btxui 1.0.1
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 +42 -0
- package/app.vue +162 -0
- package/assets/css/_main.js +73 -0
- package/assets/css/btx.min.css +1 -0
- package/assets/css/btx.mob.min.css +1 -0
- package/assets/css/btx.pad.min.css +1 -0
- package/assets/css/btx.webapp.min.css +1 -0
- package/assets/css/custom_fonts/iconfont.css +37 -0
- package/assets/css/custom_fonts/iconfont.eot +0 -0
- package/assets/css/custom_fonts/iconfont.svg +47 -0
- package/assets/css/custom_fonts/iconfont.ttf +0 -0
- package/assets/css/custom_fonts/iconfont.woff +0 -0
- package/assets/css/custom_fonts/iconfont.woff2 +0 -0
- package/assets/css/res-l.css +47 -0
- package/assets/css/res-m.css +47 -0
- package/assets/css/res-s.css +61 -0
- package/assets/custom_fonts/iconfont.css +37 -0
- package/assets/custom_fonts/iconfont.eot +0 -0
- package/assets/custom_fonts/iconfont.svg +47 -0
- package/assets/custom_fonts/iconfont.ttf +0 -0
- package/assets/custom_fonts/iconfont.woff +0 -0
- package/assets/custom_fonts/iconfont.woff2 +0 -0
- package/assets/js/Btx.js +196 -0
- package/assets/js/Utils.js +421 -0
- package/assets/js/fastclick.js +802 -0
- package/assets/js/lazy.min.js +2 -0
- package/assets/js/touchwipe.js +111 -0
- package/assets/server.js +8 -0
- package/assets/start_site_code_str.js +119 -0
- package/cdn/css/btx.min.css +1 -0
- package/cdn/css/btx.min.css.map +1 -0
- package/cdn/fonts/iconfont.ttf +0 -0
- package/cdn/fonts/iconfont.woff +0 -0
- package/cdn/fonts/iconfont.woff2 +0 -0
- package/components/BTXUI/app/app-wid.vue +182 -0
- package/components/BTXUI/btn/btn-wid.vue +128 -0
- package/components/BTXUI/carousel/carousel-wid.vue +138 -0
- package/components/BTXUI/checkbox/checkbox-wid.vue +72 -0
- package/components/BTXUI/confirm/confirm-wid.vue +279 -0
- package/components/BTXUI/content/content-checkbox-wid.vue +44 -0
- package/components/BTXUI/content/content-node-wid.vue +114 -0
- package/components/BTXUI/content/content-tag-wid.vue +25 -0
- package/components/BTXUI/content/content-wid.vue +254 -0
- package/components/BTXUI/core/anis/ani-fail.vue +46 -0
- package/components/BTXUI/core/anis/ani-loading.vue +32 -0
- package/components/BTXUI/core/anis/ani-notic.vue +47 -0
- package/components/BTXUI/core/anis/ani-success.vue +48 -0
- package/components/BTXUI/core/b-drag.vue +258 -0
- package/components/BTXUI/core/b-grid.vue +84 -0
- package/components/BTXUI/core/b-hot.vue +171 -0
- package/components/BTXUI/core/b-icon.vue +76 -0
- package/components/BTXUI/core/b-img.vue +84 -0
- package/components/BTXUI/core/b-input.vue +198 -0
- package/components/BTXUI/core/b-list.vue +276 -0
- package/components/BTXUI/core/b-text/doc.ts +9 -0
- package/components/BTXUI/core/b-text/index.vue +16 -0
- package/components/BTXUI/core/b-textarea.vue +58 -0
- package/components/BTXUI/core/b-video.vue +35 -0
- package/components/BTXUI/core/b-view/doc.ts +10 -0
- package/components/BTXUI/core/b-view/index.vue +20 -0
- package/components/BTXUI/core/b-webview.vue +20 -0
- package/components/BTXUI/core/lib/ChapterLink.js +49 -0
- package/components/BTXUI/core/lib/Search.vue +60 -0
- package/components/BTXUI/core/styles/doc.ts +55 -0
- package/components/BTXUI/core/styles/index.vue +98 -0
- package/components/BTXUI/core/styles/prestyles.ts +471 -0
- package/components/BTXUI/core/styles/theme.ts +29 -0
- package/components/BTXUI/drawer/drawer-wid.vue +165 -0
- package/components/BTXUI/drawer/title-tag-wid.vue +114 -0
- package/components/BTXUI/form/form-select-wid.vue +57 -0
- package/components/BTXUI/form/form-wid.vue +324 -0
- package/components/BTXUI/formPannel/form-pannel-wid.vue +133 -0
- package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +149 -0
- package/components/BTXUI/index.js +83 -0
- package/components/BTXUI/pageFlip/page-flip-wid.vue +206 -0
- package/components/BTXUI/pannel/pannel-wid.vue +167 -0
- package/components/BTXUI/range/range-wid.vue +134 -0
- package/components/BTXUI/search/search-wid.vue +80 -0
- package/components/BTXUI/select/select-wid.vue +186 -0
- package/components/BTXUI/slider/slider-wid.vue +444 -0
- package/components/BTXUI/tab/tab-wid.vue +109 -0
- package/components/BTXUI/table/table-wid.vue +324 -0
- package/components/BTXUI/tag/tag-wid.vue +183 -0
- package/components/BTXUI/tags/tags-wid.vue +121 -0
- package/components/BTXUI/tooltip/tooltip-wid.vue +146 -0
- package/components/BTXUI/upload/upload-wid.vue +215 -0
- package/components/BTXUI/waterfall/waterfall-wid.vue +166 -0
- package/components/header-info.vue +167 -0
- package/composables/@types.ts +4 -0
- package/composables/api.ts +18 -0
- package/env.d.ts +5 -0
- package/main.js +6 -0
- package/nuxt.config.ts +51 -0
- package/package.json +23 -0
- package/pages/article.vue +16 -0
- package/pages/download.vue +50 -0
- package/pages/example/app_wid/app/data_demo.vue +9 -0
- package/pages/example/app_wid/app/download_demo.vue +9 -0
- package/pages/example/app_wid/app/list_demo.vue +11 -0
- package/pages/example/app_wid/app/system_demo.vue +9 -0
- package/pages/example/app_wid/app_wid_demo.vue +198 -0
- package/pages/example/app_wid/btn_wid_demo.vue +179 -0
- package/pages/example/app_wid/carousel_wid_demo.vue +152 -0
- package/pages/example/app_wid/checkbox_wid_demo.vue +65 -0
- package/pages/example/app_wid/confirm_wid_demo.vue +197 -0
- package/pages/example/app_wid/content_wid_demo.vue +369 -0
- package/pages/example/app_wid/drawer_wid_demo.vue +155 -0
- package/pages/example/app_wid/form_pannel_wid_demo.vue +338 -0
- package/pages/example/app_wid/form_wid_demo.vue +550 -0
- package/pages/example/app_wid/imgs_upload_wid_demo.vue +159 -0
- package/pages/example/app_wid/index.js +158 -0
- package/pages/example/app_wid/page_flip_wid_demo.vue +99 -0
- package/pages/example/app_wid/pannel_wid_demo.vue +177 -0
- package/pages/example/app_wid/range_wid_demo.vue +101 -0
- package/pages/example/app_wid/search_wid_demo.vue +75 -0
- package/pages/example/app_wid/select_wid_demo.vue +217 -0
- package/pages/example/app_wid/slider_wid_demo.vue +143 -0
- package/pages/example/app_wid/tab_wid_demo.vue +170 -0
- package/pages/example/app_wid/table_wid_demo.vue +377 -0
- package/pages/example/app_wid/tag_wid_demo.vue +133 -0
- package/pages/example/app_wid/tags_wid_demo.vue +143 -0
- package/pages/example/app_wid/tooltip_wid_demo.vue +117 -0
- package/pages/example/app_wid/upload_wid_demo.vue +123 -0
- package/pages/example/base_wid/b_drag_demo.vue +159 -0
- package/pages/example/base_wid/b_grid_demo.vue +225 -0
- package/pages/example/base_wid/b_hot_demo.vue +135 -0
- package/pages/example/base_wid/b_icon_demo.vue +80 -0
- package/pages/example/base_wid/b_img_demo.vue +95 -0
- package/pages/example/base_wid/b_input_demo.vue +171 -0
- package/pages/example/base_wid/b_list_demo.vue +241 -0
- package/pages/example/base_wid/b_style_demo.vue +928 -0
- package/pages/example/base_wid/b_text_demo.vue +36 -0
- package/pages/example/base_wid/b_textarea_demo.vue +64 -0
- package/pages/example/base_wid/b_video_demo.vue +42 -0
- package/pages/example/base_wid/b_view_demo.vue +36 -0
- package/pages/example/base_wid/index.js +76 -0
- package/pages/example/content.js +49 -0
- package/pages/example/global_style/animation.vue +197 -0
- package/pages/example/global_style/color.vue +134 -0
- package/pages/example/global_style/decoration.vue +546 -0
- package/pages/example/global_style/icon.vue +345 -0
- package/pages/example/global_style/index.js +52 -0
- package/pages/example/global_style/layout.vue +846 -0
- package/pages/example/global_style/special.vue +37 -0
- package/pages/example/global_style/table.vue +298 -0
- package/pages/example/global_style/text.vue +159 -0
- package/pages/index.vue +29 -0
- package/pages/level_widget.vue +11 -0
- package/pages/start.vue +200 -0
- package/plugins/index.ts +2 -0
- package/public/favicon.gif +0 -0
- package/public/fonts/iconfont.ttf +0 -0
- package/public/fonts/iconfont.woff +0 -0
- package/public/fonts/iconfont.woff2 +0 -0
- package/public/img/banner.jpg +0 -0
- package/public/img/banner2.jpg +0 -0
- package/public/img/bg_pattern.png +0 -0
- package/public/img/btx.jpg +0 -0
- package/public/img/btx_ui.jpg +0 -0
- package/public/img/dir.png +0 -0
- package/public/img/f.png +0 -0
- package/public/img/head.jpg +0 -0
- package/public/img/head2.jpg +0 -0
- package/public/img/home_ico.png +0 -0
- package/public/img/icons.svg +164 -0
- package/public/img/mechanism/b-style.png +0 -0
- package/public/img/mechanism/slider-wid.png +0 -0
- package/public/img/mechanism/upload-wid.png +0 -0
- package/public/img/transform_origin.png +0 -0
- package/sass/animation.scss +400 -0
- package/sass/btx.mob.scss +10 -0
- package/sass/btx.pad.scss +3 -0
- package/sass/btx.scss +22 -0
- package/sass/btx.webapp.scss +22 -0
- package/sass/colors.scss +65 -0
- package/sass/decoration.scss +220 -0
- package/sass/flex.scss +29 -0
- package/sass/icons.scss +100 -0
- package/sass/layout.scss +88 -0
- package/sass/reset.scss +111 -0
- package/sass/response/flex_mixin.scss +91 -0
- package/sass/response/layout_mixin.scss +227 -0
- package/sass/response/main.scss +59 -0
- package/sass/response/text_mixin.scss +65 -0
- package/sass/scroll.scss +100 -0
- package/sass/special.scss +13 -0
- package/sass/table.scss +103 -0
- package/sass/text.scss +86 -0
- package/sass/webpack.config.js +31 -0
- package/tsconfig.json +4 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const fetchData = async (url: string) => {
|
|
2
|
+
const res = await $fetch(url);
|
|
3
|
+
const { datas, error } = JSON.parse(res as string);
|
|
4
|
+
if(error > 0) console.error(error);
|
|
5
|
+
return datas;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// 获取站点元信息
|
|
9
|
+
export const getSiteInfo = async () => await fetchData("http://localhost/BTXphp/index.php/sea/App/get_site_info");
|
|
10
|
+
|
|
11
|
+
// 获取友情链接
|
|
12
|
+
export const getFriendLinks = async () => await fetchData("http://localhost/BTXphp/index.php/sea/Index/get_friend_links");
|
|
13
|
+
|
|
14
|
+
// 获取静态文章
|
|
15
|
+
export const getStatic = async () => await fetchData("http://localhost/BTXphp/index.php/sea/Index/get_static");
|
|
16
|
+
|
|
17
|
+
// 获取文章列表
|
|
18
|
+
export const getArticleList = async () => await fetchData("http://localhost/BTXphp/index.php/sea/Index/get_articles");
|
package/env.d.ts
ADDED
package/main.js
ADDED
package/nuxt.config.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { resolve } from 'path'
|
|
2
|
+
|
|
3
|
+
export default defineNuxtConfig({
|
|
4
|
+
app: {
|
|
5
|
+
head: {
|
|
6
|
+
htmlAttrs: {
|
|
7
|
+
lang: 'en'
|
|
8
|
+
},
|
|
9
|
+
meta: [
|
|
10
|
+
{charset: 'utf-8'},
|
|
11
|
+
{name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no, viewport-fit=cover'},
|
|
12
|
+
{name: 'format-detection', content: 'telephone=no'}
|
|
13
|
+
],
|
|
14
|
+
link: [
|
|
15
|
+
{rel: 'icon', type: 'image/x-icon', href: '/favicon.gif'},
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
vite: {
|
|
21
|
+
css: {
|
|
22
|
+
preprocessorOptions: {
|
|
23
|
+
scss: {
|
|
24
|
+
additionalData: '@import "./sass/btx.scss";',
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
build: {
|
|
29
|
+
cssCodeSplit: false,
|
|
30
|
+
},
|
|
31
|
+
resolve: {
|
|
32
|
+
alias: {
|
|
33
|
+
"@": resolve(__dirname, "./")
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
|
39
|
+
plugins: [],
|
|
40
|
+
|
|
41
|
+
css: ["highlight.js/styles/monokai-sublime.css"],
|
|
42
|
+
|
|
43
|
+
// Auto import components: https://go.nuxtjs.dev/config-components
|
|
44
|
+
components: true,
|
|
45
|
+
|
|
46
|
+
// Modules: https://go.nuxtjs.dev/config-modules
|
|
47
|
+
modules: [],
|
|
48
|
+
|
|
49
|
+
// Build Configuration: https://go.nuxtjs.dev/config-build
|
|
50
|
+
build: {}
|
|
51
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "btxui",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"main": "main.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "nuxt build --dotenv .env.production",
|
|
8
|
+
"dev": "nuxt dev --dotenv .env.development",
|
|
9
|
+
"generate": "nuxt generate",
|
|
10
|
+
"preview": "nuxt preview",
|
|
11
|
+
"postinstall": "nuxt prepare",
|
|
12
|
+
"build:css": "npx sass ./sass/btx.scss ./cdn/css/btx.min.css --style compressed"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^18",
|
|
16
|
+
"nuxt": "^3.4.2",
|
|
17
|
+
"sass": "^1.69.3",
|
|
18
|
+
"typescript": "^5.0.2"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"vue-highlightjs": "^1.3.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<p>BTX·UI 不支持 IE8 及以下版本,因为 BTX·UI 是基于 Vue2.0 开发的,使用了 IE8 无法模拟的 ECMAScript 5 特性。但它支持所有兼容 ECMAScript 5 的浏览器。</p>
|
|
4
|
+
<p></p>
|
|
5
|
+
|
|
6
|
+
<!--更新日志-->
|
|
7
|
+
<section>
|
|
8
|
+
<h5>更新日志</h5>
|
|
9
|
+
<p>最新稳定版本:1.0.0</p>
|
|
10
|
+
<p>每个版本的更新日志见 <a href="https://github.com/btxstudio/BTXUI" class="color-blue" target="_blank">GitHub</a>。</p>
|
|
11
|
+
<p></p>
|
|
12
|
+
</section>
|
|
13
|
+
|
|
14
|
+
<!--全局样式-->
|
|
15
|
+
<section>
|
|
16
|
+
<h5>全局样式</h5>
|
|
17
|
+
<p>全局样式的使用方式和 bootstrap 类似,可以直接通过 <code><script></code> 标签引入。分为 "开发版本" 和 "生产版本",开发版本采用 scss 进行源码构建:</p>
|
|
18
|
+
<p>生产版本中 <code>btx.min.css</code> 提供基础样式库;<code>btx.pad.min.css</code> 提供基于平板(ipadPro 标准)的样式库,建议宽度分段为:740px - 1367px;<code>btx.mob.min.css</code> 提供基于手机端(iPhone6|7|8 PLUS 标准)的样式库,建议宽度分段为:0 - 740px;<code>btx.webapp.min</code> 提供基于 webapp 的基础样式初始化库。</p>
|
|
19
|
+
<p><b>CDN:</b></p>
|
|
20
|
+
<p>基础适配版:<code><link rel="stylesheet" src="http://www.75sea.com/cdn/css/v2/btx.min.css"></script></code></p>
|
|
21
|
+
<p>平板适配版:<code><link rel="stylesheet" src="http://www.75sea.com/cdn/css/v2/btx.pad.min.css"></script></code></p>
|
|
22
|
+
<p>手机适配版:<code><link rel="stylesheet" src="http://www.75sea.com/cdn/css/v2/btx.mob.min.css"></script></code></p>
|
|
23
|
+
<p>webapp 适配版:<code><link rel="stylesheet" src="http://www.75sea.com/cdn/css/v2/btx.webapp.min"></script></code></p>
|
|
24
|
+
<p><b>版本下载:</b></p>
|
|
25
|
+
<div class="flex pcenter color-light">
|
|
26
|
+
<a href="http://75sea.com/cdn/css/v2/scss_download" class="bg-color-green round-lg pad-v-d5 w-15 max-w-s" download="scss_download.zip">
|
|
27
|
+
<i class="ico-download mrg-r-1"></i>开发版本
|
|
28
|
+
</a>
|
|
29
|
+
<a href="http://75sea.com/cdn/css/v2/min_download" class="bg-color-green round-lg pad-v-d5 w-15 mrg-l-2 max-w-s" download="min_download.zip">
|
|
30
|
+
<i class="ico-download mrg-r-1"></i>生产版本
|
|
31
|
+
</a>
|
|
32
|
+
</div>
|
|
33
|
+
<p></p>
|
|
34
|
+
</section>
|
|
35
|
+
|
|
36
|
+
<!--NPM-->
|
|
37
|
+
<section>
|
|
38
|
+
<h5>NPM</h5>
|
|
39
|
+
<P>在用 BTX·UI 构建大型应用时推荐使用 NPM 安装 webapp 版本,除了全局样式更提供了丰富的组件,以便更为灵活且轻松的完成界面及交互的开发工作。NPM 能很好地和诸如 webpack 或 Browserify 模块打包器配合使用。</P>
|
|
40
|
+
<p><b>最新稳定版:</b></p>
|
|
41
|
+
<p><code>$ npm install btx-ui -S</code></P>
|
|
42
|
+
</section>
|
|
43
|
+
</article>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
export default {
|
|
48
|
+
name: "download"
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础使用</h5>
|
|
8
|
+
<p>通过 <code>spread</code> 属性来设置常规分布导航按钮;通过 <code>center</code> 属性则可设置居中主导航按钮;此外 <code>colors</code> 属性可设置组件色彩风格,导航按钮会基于当前路由进行高亮样式显示。</p>
|
|
9
|
+
<p>通过组件 API <code>on_toggle</code> 事件可以响应点击按钮回调,自变量参数为按钮索引。</p>
|
|
10
|
+
<p>【exp】:</p>
|
|
11
|
+
<div class="grid pcenter resize">
|
|
12
|
+
<div class="col-6 pad-h-1">
|
|
13
|
+
<div class="h-20 line line-main thick-1">
|
|
14
|
+
<app-wid v-bind="data_1.props1" />
|
|
15
|
+
</div>
|
|
16
|
+
<div class="mrg-t-1">默认深色,不含中间按钮</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="col-6 pad-h-1">
|
|
19
|
+
<div class="h-20 line line-lgray thick-1">
|
|
20
|
+
<app-wid v-bind="data_1.props2" @on_toggle="show_name1" />
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mrg-t-1">自定义浅色,含中间按钮及点击回调</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<hr>
|
|
26
|
+
<p></p>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<!--图标按钮-->
|
|
30
|
+
<section>
|
|
31
|
+
<h5>图标按钮</h5>
|
|
32
|
+
<p>通过 <code>spread</code> 属性 <b>icon_data</b> 字段即可配置图标按钮。</p>
|
|
33
|
+
<div class="resize">
|
|
34
|
+
<div class="h-20 line line-main thick-1">
|
|
35
|
+
<app-wid v-bind="data_2" />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
</article>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import HeaderInfo from "@/components/header-info"
|
|
45
|
+
import AppWid from "@/components/BTXUI/app/app-wid"
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: "app_wid_demo",
|
|
49
|
+
components: {
|
|
50
|
+
HeaderInfo,
|
|
51
|
+
AppWid,
|
|
52
|
+
},
|
|
53
|
+
data(){
|
|
54
|
+
const spread = [
|
|
55
|
+
{
|
|
56
|
+
nav_id: "data",
|
|
57
|
+
icon_data: {
|
|
58
|
+
icon: "data"
|
|
59
|
+
},
|
|
60
|
+
hot_data: {
|
|
61
|
+
link: "/app_wid_demo/data"
|
|
62
|
+
},
|
|
63
|
+
text: "data",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
nav_id: "download",
|
|
67
|
+
icon_data: {
|
|
68
|
+
icon: "download"
|
|
69
|
+
},
|
|
70
|
+
hot_data: {
|
|
71
|
+
link: "/app_wid_demo/download"
|
|
72
|
+
},
|
|
73
|
+
text: "download",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
nav_id: "list",
|
|
77
|
+
icon_data: {
|
|
78
|
+
icon: "list"
|
|
79
|
+
},
|
|
80
|
+
hot_data: {
|
|
81
|
+
link: "/app_wid_demo/list"
|
|
82
|
+
},
|
|
83
|
+
text: "list",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
nav_id: "system",
|
|
87
|
+
icon_data: {
|
|
88
|
+
icon: "system"
|
|
89
|
+
},
|
|
90
|
+
hot_data: {
|
|
91
|
+
link: "/app_wid_demo/system"
|
|
92
|
+
},
|
|
93
|
+
text: "system",
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
//初始化入参
|
|
100
|
+
header_info: {
|
|
101
|
+
name: AppWid.name,
|
|
102
|
+
...AppWid.introduce,
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
data_1: {
|
|
106
|
+
props1: {
|
|
107
|
+
spread,
|
|
108
|
+
colors: {
|
|
109
|
+
bg: "main"
|
|
110
|
+
},
|
|
111
|
+
goTopBtn: {
|
|
112
|
+
show_distance: false
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
props2: {
|
|
116
|
+
center: {
|
|
117
|
+
nav_id: "",
|
|
118
|
+
icon_data: {
|
|
119
|
+
icon: "home"
|
|
120
|
+
},
|
|
121
|
+
hot_data: {
|
|
122
|
+
link: "http://www.75sea.com"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
spread,
|
|
126
|
+
round: false,
|
|
127
|
+
colors: {
|
|
128
|
+
bg: "lgray",
|
|
129
|
+
bar: "light",
|
|
130
|
+
center: {
|
|
131
|
+
bg: "blue",
|
|
132
|
+
line: "light"
|
|
133
|
+
},
|
|
134
|
+
text: {
|
|
135
|
+
normal: "mgray",
|
|
136
|
+
act: "blue"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
goTopBtn: {
|
|
140
|
+
show_distance: false
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
data_2: {
|
|
146
|
+
center: {
|
|
147
|
+
nav_id: "",
|
|
148
|
+
icon_data: {
|
|
149
|
+
bgImg: require("@/assets/img/icons.svg")
|
|
150
|
+
},
|
|
151
|
+
bg_styles: {
|
|
152
|
+
normal: "bg-size-500% bg-pos-25%|65%"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
spread: [
|
|
156
|
+
{
|
|
157
|
+
nav_id: "data",
|
|
158
|
+
icon_data: {
|
|
159
|
+
bgImg: require("@/assets/img/icons.svg")
|
|
160
|
+
},
|
|
161
|
+
bg_styles: {
|
|
162
|
+
normal: "bg-size-500% bg-pos-0|0",
|
|
163
|
+
act: "bg-size-500% bg-pos-0|32%"
|
|
164
|
+
},
|
|
165
|
+
hot_data: {
|
|
166
|
+
link: "/app_wid_demo/list"
|
|
167
|
+
},
|
|
168
|
+
text: "Home",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
nav_id: "download",
|
|
172
|
+
icon_data: {
|
|
173
|
+
bgImg: require("@/assets/img/icons.svg")
|
|
174
|
+
},
|
|
175
|
+
bg_styles: {
|
|
176
|
+
normal: "bg-size-500% bg-pos-100%|0",
|
|
177
|
+
act: "bg-size-500% bg-pos-100%|32%"
|
|
178
|
+
},
|
|
179
|
+
hot_data: {
|
|
180
|
+
link: "/app_wid_demo/download"
|
|
181
|
+
},
|
|
182
|
+
text: "About",
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
colors: {
|
|
186
|
+
bg: "main"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
methods: {
|
|
193
|
+
show_name1(nav_id){
|
|
194
|
+
nav_id && this.$confirm.toast(nav_id, 2000);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</script>
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础按钮-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础按钮</h5>
|
|
8
|
+
<p>通过 <code>btn-text</code> 属性实现按钮文字。通过 <b>on_click</b> 事件实现点击回调。</p>
|
|
9
|
+
<div class="resize flex">
|
|
10
|
+
<btn-wid btn-text="点击加一" @on_click="$_click1" />
|
|
11
|
+
</div>
|
|
12
|
+
<p>点击次数:<code>{{data_1.click_count}}</code></p>
|
|
13
|
+
<hr>
|
|
14
|
+
<p></p>
|
|
15
|
+
</section>
|
|
16
|
+
|
|
17
|
+
<!--自定义配色按钮-->
|
|
18
|
+
<section>
|
|
19
|
+
<h5>自定义配色按钮</h5>
|
|
20
|
+
<p>通过 <code>btn-color</code> 属性设置按钮颜色风格。其值参数顺序为:["文字色", "背景色", "描边色", "hover文字色", "hover背景色", "hover描边色"]。该属性可缺省,默认风格为:["dgray", "neutral", "neutral", "light", "blue", "blue"]。</p>
|
|
21
|
+
<div class="resize flex">
|
|
22
|
+
<btn-wid btn-text="自定义风格按钮" :btn-color="data_2.btn_color" />
|
|
23
|
+
</div>
|
|
24
|
+
<hr>
|
|
25
|
+
<p></p>
|
|
26
|
+
</section>
|
|
27
|
+
|
|
28
|
+
<!--大圆角按钮-->
|
|
29
|
+
<section>
|
|
30
|
+
<h5>大圆角按钮</h5>
|
|
31
|
+
<p>通过 <code>btn-round</code> 属性可设置按钮为大圆角效果。</p>
|
|
32
|
+
<div class="resize flex">
|
|
33
|
+
<btn-wid btn-text="大圆角按钮" :btn-round="data_3.btn_round" />
|
|
34
|
+
</div>
|
|
35
|
+
<hr>
|
|
36
|
+
<p></p>
|
|
37
|
+
</section>
|
|
38
|
+
|
|
39
|
+
<!--定宽按钮-->
|
|
40
|
+
<section>
|
|
41
|
+
<h5>定宽按钮</h5>
|
|
42
|
+
<p>通过 <code>btn-width</code> 属性可设置按钮固定宽度,其默认单位为 rem。</p>
|
|
43
|
+
<div class="resize">
|
|
44
|
+
<btn-wid btn-text="定宽按钮" :btn-width="data_4.btn_width" />
|
|
45
|
+
</div>
|
|
46
|
+
<hr>
|
|
47
|
+
<p></p>
|
|
48
|
+
</section>
|
|
49
|
+
|
|
50
|
+
<!--渐变按钮-->
|
|
51
|
+
<section>
|
|
52
|
+
<h5>渐变按钮</h5>
|
|
53
|
+
<p>通过 <code>btn-color</code> 属性设置背景色时可以使用数组结构传入多个色值来实现由左向右的线性渐变效果,一旦使用渐变色背景其 hover 样式也必须保持渐变背景色,此时纯色背景会失效。</p>
|
|
54
|
+
<div class="resize">
|
|
55
|
+
<btn-wid btn-text="渐变按钮" :btn-color="data_5.btn_color" :btn-round="data_5.btn_round" :btn-width="data_5.btn_width" />
|
|
56
|
+
</div>
|
|
57
|
+
<hr>
|
|
58
|
+
<p></p>
|
|
59
|
+
</section>
|
|
60
|
+
|
|
61
|
+
<!--链接按钮-->
|
|
62
|
+
<section>
|
|
63
|
+
<h5>链接按钮</h5>
|
|
64
|
+
<p>通过 <code>hotData</code> 属性的 <b>link</b> 字段可设置按钮链接效果,<b>forbid</b> 字段实现点击禁用。</p>
|
|
65
|
+
<div class="resize flex">
|
|
66
|
+
<div class="mrg-r-1">
|
|
67
|
+
<btn-wid btn-text="跳转七武海官网" :hot-data="data_7.hot_data1" />
|
|
68
|
+
</div>
|
|
69
|
+
<div>
|
|
70
|
+
<btn-wid btn-text="禁用链接" :hot-data="data_7.hot_data2" />
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<hr>
|
|
74
|
+
<p></p>
|
|
75
|
+
</section>
|
|
76
|
+
|
|
77
|
+
<!--含图标按钮-->
|
|
78
|
+
<section>
|
|
79
|
+
<h5>含图标按钮</h5>
|
|
80
|
+
<p>通过 <code>iconData</code> 属性可以为按钮插入图标。</p>
|
|
81
|
+
<div class="resize flex">
|
|
82
|
+
<btn-wid v-bind="data_8" />
|
|
83
|
+
</div>
|
|
84
|
+
</section>
|
|
85
|
+
|
|
86
|
+
</article>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script>
|
|
90
|
+
import HeaderInfo from "@/components/header-info"
|
|
91
|
+
import BtnWid from "@/components/BTXUI/btn/btn-wid"
|
|
92
|
+
|
|
93
|
+
export default {
|
|
94
|
+
name: "btn_wid_demo",
|
|
95
|
+
components: {
|
|
96
|
+
HeaderInfo,
|
|
97
|
+
BtnWid
|
|
98
|
+
},
|
|
99
|
+
data(){
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
//初始化入参
|
|
103
|
+
header_info: {
|
|
104
|
+
name: BtnWid.name,
|
|
105
|
+
...BtnWid.introduce,
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
data_1: {
|
|
109
|
+
click_count: 0
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
data_2: {
|
|
113
|
+
btn_color: {
|
|
114
|
+
normal: {
|
|
115
|
+
text: "light",
|
|
116
|
+
bg: "red",
|
|
117
|
+
line: "#b7072c",
|
|
118
|
+
},
|
|
119
|
+
hover: {
|
|
120
|
+
text: "#ffcc00",
|
|
121
|
+
bg: "#444",
|
|
122
|
+
line: "#222",
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
data_3: {
|
|
128
|
+
btn_round: true
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
data_4: {
|
|
132
|
+
btn_width: 17
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
data_5: {
|
|
136
|
+
btn_round: true,
|
|
137
|
+
btn_width: 14,
|
|
138
|
+
btn_color: {
|
|
139
|
+
normal: {
|
|
140
|
+
text: "light",
|
|
141
|
+
bg: ["blue", "green"],
|
|
142
|
+
line: "none",
|
|
143
|
+
},
|
|
144
|
+
hover: {
|
|
145
|
+
text: "#ffcc00",
|
|
146
|
+
bg: ["#222", "#555"],
|
|
147
|
+
line: "none",
|
|
148
|
+
},
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
data_7: {
|
|
153
|
+
hot_data1: {
|
|
154
|
+
link: "http://www.75sea.com",
|
|
155
|
+
},
|
|
156
|
+
hot_data2: {
|
|
157
|
+
forbid: true
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
data_8: {
|
|
162
|
+
btnText: "删除",
|
|
163
|
+
iconData: {
|
|
164
|
+
icon: "del"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
methods: {
|
|
171
|
+
|
|
172
|
+
//点击递增
|
|
173
|
+
$_click1(){
|
|
174
|
+
this.data_1.click_count++;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</script>
|