├── .npmignore
├── src
├── utils
│ ├── util.js
│ └── validatorProps.js
├── assets
│ ├── icon.png
│ ├── logo.png
│ ├── icon-ext.png
│ ├── loading-0.gif
│ ├── loading-1.gif
│ ├── loading-2.gif
│ ├── font
│ │ ├── iconfont.eot
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ ├── lay-date
│ │ └── font
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.ttf
│ │ │ ├── iconfont.woff
│ │ │ └── iconfont.svg
│ └── vue-layui.css
├── components
│ ├── time-picker
│ │ ├── src
│ │ │ ├── utils
│ │ │ │ └── index.js
│ │ │ ├── header
│ │ │ │ └── index.vue
│ │ │ ├── content
│ │ │ │ └── time-table.vue
│ │ │ ├── main
│ │ │ │ └── index.vue
│ │ │ └── date-picker.vue
│ │ ├── index.js
│ │ └── README.md
│ ├── row
│ │ ├── index.js
│ │ └── src
│ │ │ └── row.vue
│ ├── col
│ │ ├── index.js
│ │ └── src
│ │ │ └── col.vue
│ ├── body
│ │ ├── src
│ │ │ └── body.vue
│ │ └── index.js
│ ├── footer
│ │ ├── src
│ │ │ └── footer.vue
│ │ └── index.js
│ ├── header
│ │ ├── src
│ │ │ └── header.vue
│ │ └── index.js
│ ├── button
│ │ ├── index.js
│ │ └── src
│ │ │ ├── button-group.vue
│ │ │ ├── button-container.vue
│ │ │ └── button.vue
│ ├── logo
│ │ ├── src
│ │ │ └── logo.vue
│ │ └── index.js
│ ├── date-picker
│ │ ├── index.js
│ │ ├── README.md
│ │ └── src
│ │ │ ├── utils
│ │ │ └── index.js
│ │ │ ├── content
│ │ │ ├── month-table.vue
│ │ │ ├── year-table.vue
│ │ │ └── date-table.vue
│ │ │ ├── header
│ │ │ └── index.vue
│ │ │ └── date-picker.vue
│ ├── timeline
│ │ ├── src
│ │ │ ├── timeline.vue
│ │ │ └── timeline-item.vue
│ │ └── index.js
│ ├── button-group
│ │ └── index.js
│ ├── menu
│ │ ├── index.js
│ │ └── src
│ │ │ ├── menu-child-item.vue
│ │ │ ├── menu.vue
│ │ │ └── menu-item.vue
│ ├── rate
│ │ ├── index.js
│ │ └── src
│ │ │ └── rate.vue
│ ├── admin
│ │ ├── index.js
│ │ └── src
│ │ │ └── admin.vue
│ ├── card
│ │ ├── index.js
│ │ └── src
│ │ │ └── card.vue
│ ├── form
│ │ ├── index.js
│ │ └── src
│ │ │ ├── form.vue
│ │ │ └── form-item.vue
│ ├── line
│ │ ├── index.js
│ │ └── src
│ │ │ └── line.vue
│ ├── side
│ │ ├── index.js
│ │ └── src
│ │ │ └── side.vue
│ ├── tabs
│ │ ├── index.js
│ │ └── src
│ │ │ ├── tab-pane.vue
│ │ │ └── tabs.vue
│ ├── alert
│ │ ├── index.js
│ │ └── src
│ │ │ └── alert.vue
│ ├── badge
│ │ ├── index.js
│ │ └── src
│ │ │ └── badge.vue
│ ├── block
│ │ ├── index.js
│ │ └── src
│ │ │ └── block.vue
│ ├── button-container
│ │ └── index.js
│ ├── input
│ │ ├── index.js
│ │ └── src
│ │ │ └── input.vue
│ ├── radio
│ │ ├── index.js
│ │ └── src
│ │ │ └── radio.vue
│ ├── slider
│ │ ├── index.js
│ │ └── src
│ │ │ ├── slider-btn.vue
│ │ │ └── slider.vue
│ ├── table
│ │ ├── index.js
│ │ └── src
│ │ │ ├── table-column.vue
│ │ │ ├── table-header.vue
│ │ │ ├── table-colgroup.vue
│ │ │ ├── table-tr.vue
│ │ │ └── table.vue
│ ├── select
│ │ ├── index.js
│ │ └── src
│ │ │ └── select.vue
│ ├── switch
│ │ ├── index.js
│ │ └── src
│ │ │ └── switch.vue
│ ├── carousel
│ │ ├── index.js
│ │ └── src
│ │ │ ├── carousel-item.vue
│ │ │ └── carousel.vue
│ ├── checkbox
│ │ ├── index.js
│ │ └── src
│ │ │ └── checkbox.vue
│ ├── collapse
│ │ ├── index.js
│ │ └── src
│ │ │ ├── collapse.vue
│ │ │ └── collapse-item.vue
│ ├── menu-item
│ │ └── index.js
│ ├── progress
│ │ ├── index.js
│ │ └── src
│ │ │ └── progress.vue
│ ├── tab-pane
│ │ └── index.js
│ ├── textarea
│ │ ├── index.js
│ │ └── src
│ │ │ └── textarea.vue
│ ├── container
│ │ ├── index.js
│ │ └── src
│ │ │ └── container.vue
│ ├── form-item
│ │ └── index.js
│ ├── breadcrumb
│ │ ├── index.js
│ │ └── src
│ │ │ ├── breadcrumb-item.vue
│ │ │ └── breadcrumb.vue
│ ├── pagination
│ │ └── index.js
│ ├── color-picker
│ │ ├── index.js
│ │ └── src
│ │ │ ├── color.js
│ │ │ ├── color-box.vue
│ │ │ ├── color-side.vue
│ │ │ └── color-picker.vue
│ ├── table-column
│ │ └── index.js
│ ├── menu-child-item
│ │ └── index.js
│ ├── carousel-item
│ │ └── index.js
│ ├── collapse-item
│ │ └── index.js
│ ├── timeline-item
│ │ └── index.js
│ └── breadcrumb-item
│ │ └── index.js
├── mixins
│ ├── eventHub.js
│ ├── popper.js
│ └── emitter.js
└── index.js
├── .postcssrc.js
├── public
├── favicon.ico
└── index.html
├── lib
├── img
│ ├── icon.551539f8.png
│ ├── icon-ext.ba81b24c.png
│ └── loading-0.a72011cc.gif
└── fonts
│ ├── iconfont.0208023e.eot
│ ├── iconfont.d8583a84.ttf
│ └── iconfont.e9caaa06.woff
├── examples
└── doc
│ ├── views
│ ├── Admin.vue
│ ├── Auxiliar.vue
│ ├── Test.vue
│ ├── Timeline.vue
│ ├── Rate.vue
│ ├── Animation.vue
│ ├── Layer.vue
│ ├── DatePicker.md
│ ├── ColorPicker.vue
│ ├── Laypage.vue
│ ├── Badge.vue
│ ├── Progress.vue
│ ├── Slider.vue
│ ├── Carousel.vue
│ ├── Tabs.vue
│ ├── Table.vue
│ ├── Home.vue
│ └── Panel.vue
│ ├── main.js
│ ├── components
│ └── demo-block.vue
│ └── router.js
├── .gitignore
├── babel.config.js
├── README.md
├── webpack.config.js
├── .eslintrc.js
├── .github
└── workflows
│ └── build-docs.yml
├── LICENSE
├── vue.config.js
└── package.json
/.npmignore:
--------------------------------------------------------------------------------
1 | public
2 | src
--------------------------------------------------------------------------------
/src/utils/util.js:
--------------------------------------------------------------------------------
1 | export const noop = () => {};
2 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/icon.png
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/lib/img/icon.551539f8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/img/icon.551539f8.png
--------------------------------------------------------------------------------
/src/assets/icon-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/icon-ext.png
--------------------------------------------------------------------------------
/src/assets/loading-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/loading-0.gif
--------------------------------------------------------------------------------
/src/assets/loading-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/loading-1.gif
--------------------------------------------------------------------------------
/src/assets/loading-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/loading-2.gif
--------------------------------------------------------------------------------
/lib/img/icon-ext.ba81b24c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/img/icon-ext.ba81b24c.png
--------------------------------------------------------------------------------
/lib/img/loading-0.a72011cc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/img/loading-0.a72011cc.gif
--------------------------------------------------------------------------------
/src/assets/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/font/iconfont.eot
--------------------------------------------------------------------------------
/src/assets/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/font/iconfont.ttf
--------------------------------------------------------------------------------
/src/assets/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/font/iconfont.woff
--------------------------------------------------------------------------------
/lib/fonts/iconfont.0208023e.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/fonts/iconfont.0208023e.eot
--------------------------------------------------------------------------------
/lib/fonts/iconfont.d8583a84.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/fonts/iconfont.d8583a84.ttf
--------------------------------------------------------------------------------
/lib/fonts/iconfont.e9caaa06.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/lib/fonts/iconfont.e9caaa06.woff
--------------------------------------------------------------------------------
/src/assets/lay-date/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/lay-date/font/iconfont.eot
--------------------------------------------------------------------------------
/src/assets/lay-date/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/lay-date/font/iconfont.ttf
--------------------------------------------------------------------------------
/src/assets/lay-date/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kouchao/vue-layui/HEAD/src/assets/lay-date/font/iconfont.woff
--------------------------------------------------------------------------------
/src/components/time-picker/src/utils/index.js:
--------------------------------------------------------------------------------
1 | // 获取数字 补零
2 | export const getText = (num) => {
3 | return num < 10 ? `0${num}` : `${num}`;
4 | };
5 |
--------------------------------------------------------------------------------
/src/components/row/index.js:
--------------------------------------------------------------------------------
1 | import Row from './src/row';
2 | /* istanbul ignore next */
3 | Row.install = function (Vue) {
4 | Vue.component(Row.name, Row);
5 | };
6 |
7 | export default Row;
8 |
--------------------------------------------------------------------------------
/src/components/col/index.js:
--------------------------------------------------------------------------------
1 | import Col from './src/col';
2 |
3 | /* istanbul ignore next */
4 | Col.install = function (Vue) {
5 | Vue.component(Col.name, Col);
6 | };
7 |
8 | export default Col;
9 |
--------------------------------------------------------------------------------
/src/components/body/src/body.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/doc/views/Admin.vue:
--------------------------------------------------------------------------------
1 |
2 |
4 |
4 |
11 |
12 |
13 |
14 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/components/table/src/table-colgroup.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 | {{ item }}
9 |
10 |
3 |
10 |
11 |
12 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/components/container/src/container.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 | {{ data[item.prop] }}
8 |
9 |
2 |
3 | # vue-layui
4 | 这是一个基于vue的ui框架,引用了layui的样式(逻辑重新编写,非jquery)
5 | 注意:本框架用于学习,不适用于生产。
6 | 注意:本框架用于学习,不适用于生产。
7 | 注意:本框架用于学习,不适用于生产。
8 |
9 | 点击预览: [文档和演示](https://kouchao.github.io/vue-layui)
10 |
11 | 基于 [layui](https://github.com/sentsin/layui/) 2.4.0版本
12 |
13 | ### Install
14 | npm i vue-layui -S
15 |
16 | ### Quick Start
17 | import layui from 'vue-layui'
18 | import 'vue-layui/lib/vue-layui.css'
19 |
20 | Vue.use(layui)
21 |
--------------------------------------------------------------------------------
/examples/doc/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import layui from '@';
3 | import App from './App.vue';
4 | import router from './router';
5 |
6 | import '@/assets/layui.css';
7 | import '@/assets/layer.css';
8 | import '@/assets/lay-date/laydate.css';
9 | import '@/assets/vue-layui.css';
10 | import 'highlight.js/styles/atom-one-dark.css';
11 |
12 | import demoBlock from './components/demo-block.vue';
13 | Vue.use(layui);
14 | Vue.config.productionTip = false;
15 | Vue.component('demo-block', demoBlock);
16 |
17 | new Vue({
18 | router,
19 | render: h => h(App)
20 | }).$mount('#app');
21 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const merge = require('webpack-merge');
2 | const baseConfig = require('./build/webpack.base.js');
3 | const devConfig = require('./build/webpack.dev.js');
4 | const proConfig = require('./build/webpack.pro.js');
5 | const demoConfig = require('./build/webpack.demo.js');
6 |
7 | const getConfig = (env) => {
8 | console.log(env);
9 | if (env === 'demo') {
10 | return merge(baseConfig, demoConfig);
11 | } else if (env === 'pro') {
12 | return merge(baseConfig, proConfig);
13 | } else {
14 | return merge(baseConfig, devConfig);
15 | }
16 | };
17 | module.exports = getConfig(process.env.NODE_ENV);
18 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: ['plugin:vue/recommended', 'standard'],
7 | rules: {
8 | // allow paren-less arrow functions
9 | 'arrow-parens': 0,
10 | // allow async-await
11 | 'generator-star-spacing': 'off',
12 | // allow debugger during development
13 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
14 | // 关闭语句强制分号结尾
15 | 'semi': [2, 'always'],
16 | // 两个空行
17 | 'indent': ['error', 2],
18 | // 判断无等号
19 | 'padded-blocks': 0,
20 | 'no-useless-escape': 0,
21 |
22 | // 全等于
23 | eqeqeq: 0
24 | },
25 | parserOptions: {
26 | parser: 'babel-eslint'
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/components/breadcrumb/src/breadcrumb-item.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
36 |
--------------------------------------------------------------------------------
/src/components/breadcrumb/src/breadcrumb.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/components/color-picker/src/color.js:
--------------------------------------------------------------------------------
1 | // RGB转HEX
2 | export const rgb2hex = function (rgb) {
3 | var aRgb = rgb instanceof Array ? rgb : rgb.split(',') || [0, 0, 0];
4 | var temp;
5 | return [
6 | (temp = Number(aRgb[0]).toString(16)).length == 1 ? '0' + temp : temp,
7 | (temp = Number(aRgb[1]).toString(16)).length == 1 ? '0' + temp : temp,
8 | (temp = Number(aRgb[2]).toString(16)).length == 1 ? '0' + temp : temp
9 | ].join('');
10 | };
11 |
12 | // HEX转RGB
13 | export const hex2rgb = hex => {
14 | if (hex.length == 3) {
15 | hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
16 | }
17 | return [
18 | parseInt(hex[0] + hex[1], 16),
19 | parseInt(hex[2] + hex[3], 16),
20 | parseInt(hex[4] + hex[5], 16)
21 | ].join();
22 | };
23 |
--------------------------------------------------------------------------------
/src/mixins/eventHub.js:
--------------------------------------------------------------------------------
1 | /**
2 | * kouchao 创建于 2018/8/27
3 | */
4 | import Vue from 'vue';
5 | const eventHub = new Vue();
6 |
7 | export default {
8 | methods: {
9 | eventEmit (eventName, data, isGlobal) {
10 | const parent = isGlobal ? this.$root : this.$parent || this.$root;
11 |
12 | if (parent && parent._uid) {
13 | const uid = parent._uid;
14 | eventHub.$emit(eventName + uid, data);
15 | }
16 | },
17 | eventOn (eventName, cb) {
18 | eventHub.$on(eventName + this._uid, cb);
19 | },
20 | eventOnGlobal (eventName, cb) {
21 | const parent = this.$root;
22 | eventHub.$on(eventName + parent._uid, cb);
23 | },
24 | eventEmitGlobal (eventName, data) {
25 | this.eventEmit(eventName, data, true);
26 | }
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/components/carousel/src/carousel-item.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |26 | 27 | 28 | 54 | 55 | 60 | -------------------------------------------------------------------------------- /examples/doc/views/Auxiliar.vue: -------------------------------------------------------------------------------- 1 | 2 |25 |
猿强,则国强。国强,则猿更强!
9 |——孟子(好吧。。这是贤心大大说的)
10 |border-radius: 100%;
43 |——这句是我说的
44 |
7 | layui 2.0 的一切准备工作似乎都已到位。发布之弦,一触即发。
8 |
不枉近百个日日夜夜与之为伴。因小而大,因弱而强。
9 |
无论它能走多远,抑或如何支撑?至少我曾倾注全心,无怨无悔
10 |
14 | 杜甫的思想核心是儒家的仁政思想,他有“致君尧舜上,再使风俗淳”的宏伟抱负。个人最爱的名篇有: 15 |
16 |
23 | 中国人民抗日战争胜利日
24 |
常常在想,尽管对这个国家有这样那样的抱怨,但我们的确生在了最好的时代
25 |
铭记、感恩
所有为中华民族浴血奋战的英雄将士
永垂不朽
26 |
时
6 |分
20 |秒
34 |', '');
12 | };
13 | };
14 |
15 | const vueMarkdown = {
16 | raw: true,
17 | // 定义处理规则
18 | preprocess: function (MarkdownIt, source) {
19 | // 表格
20 | MarkdownIt.renderer.rules.table_open = function () {
21 | return '';
22 | };
23 |
24 | // ```html``` 给这种样式加个class hljs
25 | MarkdownIt.renderer.rules.fence = wrapCustomClass(
26 | MarkdownIt.renderer.rules.fence
27 | );
28 | // ```code``` 给这种样式加个class code_inline
29 | const codeInline = MarkdownIt.renderer.rules.code_inline;
30 | MarkdownIt.renderer.rules.code_inline = function (...args) {
31 | args[0][args[1]].attrJoin('class', 'code_inline');
32 | return codeInline(...args);
33 | };
34 | return source;
35 | },
36 | use: [
37 | // 'markdown-it-container'的作用是自定义代码块
38 | [
39 | MarkdownItContainer,
40 | 'demo',
41 | {
42 | validate: params => params.trim().match(/^demo\s*(.*)$/),
43 | render: function (tokens, idx) {
44 | if (tokens[idx].nesting === 1) {
45 | return `
46 | `;
47 | }
48 | return ' \n';
49 | }
50 | }
51 | ],
52 | [require('markdown-it-container'), 'tip'],
53 | [require('markdown-it-container'), 'warning'],
54 | [
55 | MarkdownItCheckBox,
56 | {
57 | disabled: true
58 | }
59 | ],
60 | [MarkdownItDec]
61 | ]
62 | };
63 |
64 | module.exports = {
65 | outputDir: 'dist',
66 | publicPath: '/',
67 | css: {
68 | extract: true
69 | },
70 | // 扩展 webpack 配置,使 packages 加入编译
71 | chainWebpack: config => {
72 | config.module
73 | .rule('md')
74 | .test(/\.md/)
75 | .use('vue-loader')
76 | .loader('vue-loader')
77 | .end()
78 | .use('vue-markdown-loader')
79 | .loader('vue-markdown-loader/lib/markdown-compiler')
80 | .options(vueMarkdown);
81 | },
82 | productionSourceMap: false
83 | };
84 |
--------------------------------------------------------------------------------
/examples/doc/views/DatePicker.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
19 |
20 |
21 |
25 |
26 |
27 |
32 |
33 |
38 |
39 |
40 |
41 |
47 |
48 |
49 |
53 |
54 |
55 |
59 |
60 |
61 |
62 |
63 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-layui",
3 | "version": "1.0.2",
4 | "private": false,
5 | "author": "kouchao",
6 | "scripts": {
7 | "dev": "cross-env NODE_ENV=dev webpack-dev-server --open",
8 | "build": "cross-env NODE_ENV=pro webpack",
9 | "build:demo": "cross-env NODE_ENV=demo webpack",
10 | "lint": "eslint src/**/*.vue src/**/*.js build/**/* --quiet",
11 | "fix": "eslint src/**/*.vue src/**/*.js build/**/* --fix"
12 | },
13 | "dependencies": {
14 | "@babel/runtime": "^7.7.7",
15 | "async-validator": "^3.2.3",
16 | "dayjs": "^1.8.18",
17 | "popper.js": "^1.16.0",
18 | "vue": "^2.6.11"
19 | },
20 | "devDependencies": {
21 | "@babel/core": "^7.7.7",
22 | "@babel/plugin-transform-runtime": "^7.7.6",
23 | "@babel/preset-env": "^7.7.7",
24 | "axios": "^0.19.0",
25 | "babel-eslint": "^10.0.3",
26 | "babel-loader": "^8.0.6",
27 | "cache-loader": "^4.1.0",
28 | "cheerio": "^1.0.0-rc.3",
29 | "clean-webpack-plugin": "^3.0.0",
30 | "cross-env": "^6.0.3",
31 | "css-loader": "^3.4.0",
32 | "cssnano": "^4.1.10",
33 | "eslint": "^6.7.2",
34 | "eslint-plugin-vue": "^6.0.1",
35 | "file-loader": "^5.0.2",
36 | "highlight.js": "^9.17.1",
37 | "html-webpack-plugin": "^3.2.0",
38 | "markdown-it": "^10.0.0",
39 | "markdown-it-chain": "^1.3.0",
40 | "markdown-it-container": "^2.0.0",
41 | "markdown-it-decorate": "^1.2.2",
42 | "markdown-it-task-checkbox": "^1.0.6",
43 | "mini-css-extract-plugin": "^0.8.2",
44 | "optimize-css-assets-webpack-plugin": "^5.0.3",
45 | "progress-bar-webpack-plugin": "^1.12.1",
46 | "standard": "^14.3.1",
47 | "style-loader": "^1.0.2",
48 | "thread-loader": "^2.1.3",
49 | "url-loader": "^3.0.0",
50 | "vue-loader": "^15.8.3",
51 | "vue-markdown-loader": "^2.4.1",
52 | "vue-router": "^3.1.3",
53 | "vue-template-compiler": "^2.6.11",
54 | "webpack": "^4.41.3",
55 | "webpack-cli": "^3.3.10",
56 | "webpack-dev-server": "^3.10.0",
57 | "webpack-merge": "^4.2.2"
58 | },
59 | "browserslist": [
60 | "> 1%",
61 | "last 2 versions",
62 | "not ie <= 8"
63 | ],
64 | "homepage": "https://kouchao.github.io/vue-layui",
65 | "keywords": [
66 | "vue",
67 | "layui",
68 | "vue-layui",
69 | "vue layui"
70 | ],
71 | "license": "MIT",
72 | "main": "lib/vue-layui.common.js",
73 | "repository": {
74 | "type": "git",
75 | "url": "git+https://github.com/kouchao/vue-layui.git"
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/examples/doc/views/ColorPicker.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
22 |
26 |
27 |
28 |
29 |
33 |
34 |
35 |
36 |
37 |
41 |
42 |
43 |
44 |
45 |
49 |
50 |
51 |
55 |
56 |
60 |
61 |
62 |
66 |
70 |
71 |
72 |
73 |
77 |
78 |
79 |
83 |
84 |
85 |
86 |
87 |
88 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/src/components/menu/src/menu-item.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
15 |
19 | {{ title }}
20 |
21 |
25 |
29 |
30 |
35 |
36 |
37 |
38 |
39 |
40 |
89 |
90 |
113 |
--------------------------------------------------------------------------------
/examples/doc/views/Laypage.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
22 |
23 |
29 |
30 |
36 |
37 |
45 |
46 |
52 |
53 |
59 |
60 |
66 |
67 |
73 |
74 |
80 |
81 |
82 |
83 | 修改pageSize就可以了。
84 |
85 |
86 |
87 |
88 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/src/components/tabs/src/tabs.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
18 | -
26 | {{ item.title }}
27 |
32 |
33 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
60 |
115 |
116 |
125 |
--------------------------------------------------------------------------------
/examples/doc/views/Badge.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 小圆点:
8 |
9 |
13 |
17 |
21 |
25 |
29 |
33 |
34 |
35 | 常规弧形徽章:
36 | 6
37 | 99
38 | 61728
39 | 赤
40 |
41 | 橙
42 |
43 |
44 | 绿
45 |
46 |
47 | 青
48 |
49 |
50 | 蓝
51 |
52 |
53 | 黑
54 |
55 |
56 | 灰
57 |
58 |
59 |
60 | 边框徽章:
61 |
62 | 6
63 |
64 |
65 | Hot
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | 查看消息
74 | 1
75 |
76 |
77 |
78 | 动态
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | 控制台9
90 |
91 |
92 |
93 |
94 | 个人中心
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | 暂缺tab的徽章展示
103 |
104 |
105 |
106 |
107 |
112 |
113 |
120 |
--------------------------------------------------------------------------------
/examples/doc/views/Progress.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 温馨提示:进度条的宽度是100%适配于它的父级元素,如上面的进度条是在一个300px的父容器中。
11 |
12 |
13 |
17 |
21 |
22 |
26 |
27 |
31 |
32 |
36 |
37 |
41 |
42 |
46 |
50 |
51 |
56 |
57 |
62 |
63 |
67 |
68 |
72 |
73 |
74 |
79 |
80 |
81 |
86 |
87 |
88 | 正如你上述看到的,除了百分数,还有分数,但是这不是计算的,而是自定义文字
89 |
90 |
91 |
95 |
101 |
102 |
103 |
104 | 设置50%
105 |
106 |
107 | 模拟loading
108 |
109 |
110 |
111 |
112 |
113 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/src/assets/lay-date/font/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
46 |
--------------------------------------------------------------------------------
/examples/doc/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Router from 'vue-router';
3 | import Home from './views/Home.vue';
4 | import Grid from './views/Grid.md';
5 | import Button from './views/Button.vue';
6 | import Form from './views/Form.vue';
7 | import Nav from './views/Nav.vue';
8 | import Badge from './views/Badge.vue';
9 | import Auxiliar from './views/Auxiliar.vue';
10 | import Progress from './views/Progress.vue';
11 | import Panel from './views/Panel.vue';
12 | import Timeline from './views/Timeline.vue';
13 | import Table from './views/Table.vue';
14 | import Tabs from './views/Tabs.vue';
15 | import Animation from './views/Animation.vue';
16 | import Admin from './views/Admin.vue';
17 | import Layer from './views/Layer.vue';
18 | import Laypage from './views/Laypage.vue';
19 | import Rate from './views/Rate.vue';
20 | import Slider from './views/Slider.vue';
21 | import Carousel from './views/Carousel.vue';
22 | import ColorPicker from './views/ColorPicker.vue';
23 | import DatePicker from './views/DatePicker.md';
24 | import Test from './views/Test.vue';
25 |
26 | Vue.use(Router);
27 |
28 | export default new Router({
29 | routes: [
30 | {
31 | path: '/',
32 | name: 'home',
33 | component: Home
34 | },
35 | {
36 | path: '/grid',
37 | name: 'grid',
38 | component: Grid
39 | },
40 | {
41 | path: '/button',
42 | name: 'button',
43 | component: Button
44 | },
45 | {
46 | path: '/form',
47 | name: 'form',
48 | component: Form
49 | },
50 | {
51 | path: '/nav',
52 | name: 'nav',
53 | component: Nav
54 | },
55 | {
56 | path: '/badge',
57 | name: 'badge',
58 | component: Badge
59 | },
60 | {
61 | path: '/auxiliar',
62 | name: 'auxiliar',
63 | component: Auxiliar
64 | },
65 | {
66 | path: '/progress',
67 | name: 'progress',
68 | component: Progress
69 | },
70 | {
71 | path: '/panel',
72 | name: 'panel',
73 | component: Panel
74 | },
75 | {
76 | path: '/timeline',
77 | name: 'timeline',
78 | component: Timeline
79 | },
80 | {
81 | path: '/table',
82 | name: 'table',
83 | component: Table
84 | },
85 | {
86 | path: '/tabs',
87 | name: 'tabs',
88 | component: Tabs
89 | },
90 | {
91 | path: '/animation',
92 | name: 'animation',
93 | component: Animation
94 | },
95 | {
96 | path: '/admin',
97 | name: 'admin',
98 | component: Admin
99 | },
100 | {
101 | path: '/layer',
102 | name: 'layer',
103 | component: Layer
104 | },
105 | {
106 | path: '/laypage',
107 | name: 'laypage',
108 | component: Laypage
109 | },
110 | {
111 | path: '/rate',
112 | name: 'rate',
113 | component: Rate
114 | },
115 | {
116 | path: '/slider',
117 | name: 'slider',
118 | component: Slider
119 | },
120 | {
121 | path: '/carousel',
122 | name: 'carousel',
123 | component: Carousel
124 | },
125 | {
126 | path: '/colorPicker',
127 | name: 'colorPicker',
128 | component: ColorPicker
129 | },
130 | {
131 | path: '/datePicker',
132 | name: 'datePicker',
133 | component: DatePicker
134 | },
135 | {
136 | path: '/test',
137 | name: 'test',
138 | component: Test
139 | }
140 | ]
141 | });
142 |
--------------------------------------------------------------------------------
/examples/doc/views/Slider.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 | v-model
10 |
11 |
17 |
18 |
25 |
33 |
34 |
40 |
41 | {{ scope.value }}GB
42 |
43 |
44 |
51 |
52 | 当前数值:{{ slider4 }}
53 |
54 |
55 |
62 |
63 |
64 |
68 |
69 | 开始值:{{ slider6[0] }}、结尾值:{{ slider6[1] }}
70 |
71 |
72 |
73 |
78 |
83 |
92 |
100 |
101 |
108 |
115 |
116 |
117 |
125 |
126 |
127 |
128 |
144 |
145 |
155 |
--------------------------------------------------------------------------------
/src/components/rate/src/rate.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | -
13 |
27 |
28 |
29 |
33 |
34 |
35 |
36 | {{
37 | texts[value] || ""
38 | }}
39 |
40 |
41 |
42 |
43 |
142 |
143 |
144 |
--------------------------------------------------------------------------------
/src/components/time-picker/src/main/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
22 |
23 |
24 |
46 |
47 |
48 |
49 |
153 |
--------------------------------------------------------------------------------
/src/components/slider/src/slider-btn.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * kouchao 创建于 2018/8/27
3 | */
4 | import '@/assets/layui.css';
5 | import '@/assets/layer.css';
6 | import '@/assets/lay-date/laydate.css';
7 | import '@/assets/vue-layui.css';
8 |
9 | import LayRow from '@/components/row';
10 | import LayCol from '@/components/col';
11 | import LayContainer from '@/components/container';
12 | import LayButton from '@/components/button';
13 | import LayButtonGroup from '@/components/button-group';
14 | import LayButtonContainer from '@/components/button-container';
15 | import LayForm from '@/components/form';
16 | import LayFormItem from '@/components/form-item';
17 | import LayRadio from '@/components/radio';
18 | import LayInput from '@/components/input';
19 | import LayCheckbox from '@/components/checkbox';
20 | import LaySelect from '@/components/select';
21 | import LayTextarea from '@/components/textarea';
22 | import LayTabs from '@/components/tabs';
23 | import LayTabPane from '@/components/tab-pane';
24 | import LayLine from '@/components/line';
25 | import LayMenu from '@/components/menu';
26 | import LayMenuItem from '@/components/menu-item';
27 | import LayMenuChildItem from '@/components/menu-child-item';
28 | import LayAdmin from '@/components/admin';
29 | import LayHeader from '@/components/header';
30 | import LayLogo from '@/components/logo';
31 | import LaySide from '@/components/side';
32 | import LayBody from '@/components/body';
33 | import LayFooter from '@/components/footer';
34 | import LayBlock from '@/components/block';
35 | import LayBadge from '@/components/badge';
36 | import LayBreadcrumb from '@/components/breadcrumb';
37 | import LayBreadcrumbItem from '@/components/breadcrumb-item';
38 | import LayProgress from '@/components/progress';
39 | import LayCard from '@/components/card';
40 | import LayCollapse from '@/components/collapse';
41 | import LayCollapseItem from '@/components/collapse-item';
42 | import LayTimeline from '@/components/timeline';
43 | import LayTimelineItem from '@/components/timeline-item';
44 | import LayTable from '@/components/table';
45 | import LayTableColumn from '@/components/table-column';
46 | import LayAlert from '@/components/alert';
47 | import LaySwitch from '@/components/switch';
48 | import LayPagination from '@/components/pagination';
49 | import LayRate from '@/components/rate';
50 | import LaySlider from '@/components/slider';
51 | import LayCarousel from '@/components/carousel';
52 | import LayCarouselItem from '@/components/carousel-item';
53 | import LayColorPicker from '@/components/color-picker';
54 | import LayDatePicker from '@/components/date-picker';
55 | import LayTimePicker from '@/components/time-picker';
56 |
57 | const install = (Vue) => {
58 | const components = [
59 | LayRow,
60 | LayCol,
61 | LayContainer,
62 | LayButton,
63 | LayButtonContainer,
64 | LayButtonGroup,
65 | LayForm,
66 | LayFormItem,
67 | LayRadio,
68 | LayInput,
69 | LayCheckbox,
70 | LaySelect,
71 | LayTextarea,
72 | LayTabs,
73 | LayTabPane,
74 | LayLine,
75 | LayMenu,
76 | LayMenuItem,
77 | LayMenuChildItem,
78 | LayAdmin,
79 | LayHeader,
80 | LayLogo,
81 | LaySide,
82 | LayBody,
83 | LayFooter,
84 | LayBlock,
85 | LayBadge,
86 | LayBreadcrumb,
87 | LayBreadcrumbItem,
88 | LayProgress,
89 | LayCard,
90 | LayCollapse,
91 | LayCollapseItem,
92 | LayTimeline,
93 | LayTimelineItem,
94 | LayTable,
95 | LayTableColumn,
96 | LayAlert,
97 | LaySwitch,
98 | LayPagination,
99 | LayRate,
100 | LaySlider,
101 | LayCarousel,
102 | LayCarouselItem,
103 | LayColorPicker,
104 | LayDatePicker,
105 | LayTimePicker
106 | ];
107 | components.forEach(function (component) {
108 | Vue.component(component.name, component);
109 | });
110 | console.log('install layui ok');
111 | };
112 |
113 | export default {
114 | install
115 | };
116 |
--------------------------------------------------------------------------------
/src/components/date-picker/src/date-picker.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
21 |
37 |
38 |
39 |
40 |
168 |
169 |
171 |
--------------------------------------------------------------------------------
/src/components/select/src/select.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
14 |
27 |
28 |
29 |
30 |
37 | -
38 | {{ placeholder }}
39 |
40 |
44 | - {{ g.title }}
45 | -
53 | {{ item[prop.lable || "lable"] }}
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
156 |
157 |
158 |
--------------------------------------------------------------------------------
/examples/doc/views/Carousel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 1
6 | 2
7 | 3
8 | 4
9 |
10 |
11 |
15 | 1
16 | 2
17 | 3
18 | 4
19 |
20 |
21 |
22 |
23 |
28 |
29 |
30 |
35 |
36 |
37 |
41 | 左右切换
42 |
43 |
47 | 上下切换
48 |
49 |
53 | 渐隐渐现
54 |
55 |
56 |
57 |
61 | 悬停显示
62 |
63 |
67 | 始终显示
68 |
69 |
73 | 不显示
74 |
75 |
76 |
77 |
81 | 容器内部
82 |
83 |
87 | 容器外部
88 |
89 |
93 | 不显示
94 |
95 |
96 |
97 |
98 |
99 |
100 |
105 |
106 |
107 |
108 |
118 | 1
119 | 2
120 | 3
121 | 4
122 |
123 |
124 |
125 |
126 |
142 |
143 |
157 |
--------------------------------------------------------------------------------
/src/components/time-picker/src/date-picker.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
21 |
37 |
38 |
39 |
40 |
170 |
171 |
173 |
--------------------------------------------------------------------------------
/examples/doc/views/Tabs.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 | 1. 高度默认自适应,也可以随意固宽。
10 |
2. Tab进行了响应式处理,所以无需担心数量多少。
11 |
12 |
16 | 内容2
17 |
18 |
22 | 内容3
23 |
24 |
28 | 内容4
29 |
30 |
34 | 内容5
35 |
36 |
37 |
41 |
46 |
52 | {{ item.content }}
53 |
54 |
55 |
56 | 新增Tab项
57 |
58 |
59 | 删除: 商品管理
60 |
61 |
62 | 切换到: 用户管理
63 |
64 |
65 |
69 | 设置activeName即可
70 |
71 |
75 |
79 |
85 | {{ item.content }}
86 |
87 |
88 |
89 |
93 |
97 |
103 | {{ item.content }}
104 |
105 |
106 |
107 |
111 |
117 |
123 | {{ item.content }}
124 |
125 |
126 |
130 |
137 |
143 | {{ item.content }}
144 |
145 |
146 |
147 |
148 |
149 |
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/components/form/src/form-item.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
15 |
16 | {{ value }}
17 |
18 |
22 | {{ wordAux }}
23 |
24 |
28 | {{ message }}
29 |
30 |
31 |
32 |
33 |
153 |
154 |
186 |
--------------------------------------------------------------------------------
/src/components/date-picker/src/content/date-table.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 日
7 | 一
8 | 二
9 | 三
10 | 四
11 | 五
12 | 六
13 |
14 |
15 |
16 |
20 |
31 | {{ (festival || importantDays) && date.festival || date.day }}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
177 |
--------------------------------------------------------------------------------
/examples/doc/views/Table.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 表格是一个大工程,bug肯定会有,欢迎提交bug。。
4 |
8 |
9 |
10 |
15 |
20 |
25 |
29 |
30 |
31 |
35 |
39 |
44 |
49 |
54 |
58 |
59 |
63 |
68 |
73 |
78 |
83 |
87 |
88 |
92 |
97 |
102 |
107 |
112 |
116 |
117 |
121 |
125 |
130 |
135 |
140 |
144 |
145 |
149 |
154 |
159 |
164 |
168 |
169 |
170 |
171 |
172 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/src/components/carousel/src/carousel.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
17 |
21 |
22 |
27 |
28 |
29 |
43 |
57 |
58 |
59 |
60 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/examples/doc/views/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
12 | vue-layui
13 |
14 |
17 | 一个基于layui样式的vue组件库
18 |
19 |
20 |
25 | github
26 |
27 |
28 |
33 |
34 | star {{ star }}
35 |
36 |
37 |
38 |
39 |
40 |
41 | 还不是很完美
42 |
43 |
44 | 他还是一个demo级别的组件库
45 | 正在一步步的走向健壮
46 | 还需要努力
47 | 当然这也需要时间
48 |
49 |
50 |
51 |
52 | 关注的人也很少
53 |
54 |
55 | 可能关注的人其实并没有
56 | 可以看到只有{{ star }}Star
57 | 但是这并不重要
58 | 会越来越多越来越好
59 |
60 |
61 |
62 |
63 | 一个人的开发
64 |
65 |
66 | 需要更多地人来帮助
67 | 只有短暂的下班时间
68 | 能力虽然不大
69 | 好在大家都在一起加油
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
108 |
109 |
221 |
--------------------------------------------------------------------------------
/src/components/color-picker/src/color-picker.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
15 |
16 |
20 |
26 |
35 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
49 |
54 |
55 |
56 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
220 |
221 |
226 |
--------------------------------------------------------------------------------
/examples/doc/views/Panel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 卡片面板
10 |
11 |
12 | 卡片式面板面板通常用于非白色背景色的主体内
13 | 从而映衬出边框投影
14 |
15 |
16 |
17 |
18 |
19 |
20 | 卡片面板
21 |
22 |
23 | 结合 layui 的栅格系统
24 | 轻松实现响应式布局
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 标题
33 |
34 |
35 | 内容
36 |
37 |
38 |
39 |
40 |
41 |
45 |
46 |
47 |
50 | 为什么JS社区大量采用未发布或者未广泛支持的语言特性?
51 |
52 |
53 | 有不少其他答案说是因为JS太差。我下面的答案已经说了,这不是根本性的原因。但除此之外,我还要纠正一些对JS具体问题的误解。JS当初是被作为脚本语言设计的,所以某些问题并不是JS设计得差或者是JS设计者的失误。比如var的作用域问题,并不是“错误”,而是当时绝大部分脚本语言都是这样的,如perl/php/sh等。模块的问题也是,脚本语言几乎都没有模块/命名空间功能。弱类型、for-in之类的问题也是,只不过现在用那些老的脚本语言的人比较少,所以很多人都误以为是JS才有的坑。另外有人说JS是半残语言,满足不了开发需求,1999年就该死。半残这个嘛,就夸张了。JS虽然有很多问题,但是设计总体还是优秀的。——来自知乎@贺师俊
54 |
55 |
56 |
57 |
60 | 为什么前端工程师多不愿意用 Bootstrap 框架?
61 |
62 |
63 | 因为不适合。如果希望开发长期的项目或者制作产品类网站,那么就需要实现特定的设计,为了在维护项目中可以方便地按设计师要求快速修改样式,肯定会逐步编写出各种业务组件、工具类,相当于为项目自行开发一套框架。——来自知乎@Kayo
64 |
65 |
66 |
67 |
70 | vue-layui 更适合哪些开发者?
71 |
72 |
73 | layui是前后端开发者都比较喜欢的框架,由于各种不可描述的原因,有的老板要求前端开发者既要使用vue又要用layui,因此vue-layui诞生了。
74 |
75 |
76 |
77 |
80 | 贤心是男是女?
81 |
82 | 反正他自己说是个男的。。。
83 |
84 |
85 |
86 |
90 |
91 |
92 |
95 | 为什么JS社区大量采用未发布或者未广泛支持的语言特性?
96 |
97 |
98 | 有不少其他答案说是因为JS太差。我下面的答案已经说了,这不是根本性的原因。但除此之外,我还要纠正一些对JS具体问题的误解。JS当初是被作为脚本语言设计的,所以某些问题并不是JS设计得差或者是JS设计者的失误。比如var的作用域问题,并不是“错误”,而是当时绝大部分脚本语言都是这样的,如perl/php/sh等。模块的问题也是,脚本语言几乎都没有模块/命名空间功能。弱类型、for-in之类的问题也是,只不过现在用那些老的脚本语言的人比较少,所以很多人都误以为是JS才有的坑。另外有人说JS是半残语言,满足不了开发需求,1999年就该死。半残这个嘛,就夸张了。JS虽然有很多问题,但是设计总体还是优秀的。——来自知乎@贺师俊
99 |
100 |
101 |
102 |
105 | 为什么前端工程师多不愿意用 Bootstrap 框架?
106 |
107 |
108 | 因为不适合。如果希望开发长期的项目或者制作产品类网站,那么就需要实现特定的设计,为了在维护项目中可以方便地按设计师要求快速修改样式,肯定会逐步编写出各种业务组件、工具类,相当于为项目自行开发一套框架。——来自知乎@Kayo
109 |
110 |
111 |
112 |
115 | vue-layui 更适合哪些开发者?
116 |
117 |
118 | layui是前后端开发者都比较喜欢的框架,由于各种不可描述的原因,有的老板要求前端开发者既要使用vue又要用layui,因此vue-layui诞生了。
119 |
120 |
121 |
122 |
125 | 贤心是男是女?
126 |
127 | 反正他自己说是个男的。。。
128 |
129 |
130 |
131 |
135 |
136 |
137 |
140 | 文豪
141 |
142 |
143 |
144 |
147 | 唐代
148 |
149 |
150 |
151 |
154 | 杜甫
155 |
156 | 伟大的诗人
157 |
158 |
159 |
162 | 李白
163 |
164 | 据说是韩国人
165 |
166 |
167 |
170 | 王勃
171 |
172 | 千古绝唱《滕王阁序》
173 |
174 |
175 |
176 |
177 |
180 | 宋代
181 |
182 | 比如苏轼、李清照
183 |
184 |
185 |
188 | 当代
189 |
190 | 比如贤心
191 |
192 |
193 |
194 |
195 |
198 | 科学家
199 |
200 | 伟大的科学家
201 |
202 |
203 |
206 | 艺术家
207 |
208 | 浑身散发着艺术细胞
209 |
210 |
211 |
212 |
213 | 支持无限嵌套,应用场景非常多!
214 |
215 |
216 |
217 |
222 |
223 |
228 |
--------------------------------------------------------------------------------
/src/components/slider/src/slider.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
96 |
97 |
98 |
99 |
251 |
252 |
274 |
--------------------------------------------------------------------------------