mirror of https://github.com/ElemeFE/element
Update template
parent
6644207668
commit
ac06bff847
|
@ -8,6 +8,7 @@
|
|||
- 修复结合 `vue-i18n` 使用时会提示不能覆盖 `$t` 方法的问题
|
||||
- 新增 Loading 自定义加载文案的功能,并优化了视觉表现
|
||||
- 修复 Input blur 事件的参数不是 event 对象的问题
|
||||
- `window.ELEMENT.locale.use` 改成 `window.ELEMENT.locale`
|
||||
|
||||
### 1.0.0-rc.9
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ var uppercamelcase = require('uppercamelcase');
|
|||
var path = require('path');
|
||||
|
||||
var OUTPUT_PATH = path.join(__dirname, '../../src/index.js');
|
||||
var IMPORT_TEMPLATE = 'import {{name}} from \'../packages/{{package}}/index.js\';';
|
||||
var IMPORT_TEMPLATE = 'import {{name}} from \'../packages/{{package}}\';';
|
||||
var INSTALL_COMPONENT_TEMPLATE = ' Vue.component({{name}}.name, {{name}});';
|
||||
var MAIN_TEMPLATE = `/* Automatic generated by './build/bin/build-entry.js' */
|
||||
|
||||
|
@ -36,7 +36,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|||
|
||||
module.exports = {
|
||||
version: '{{version}}',
|
||||
locale,
|
||||
locale: locale.use,
|
||||
install,
|
||||
{{list}}
|
||||
};
|
||||
|
|
|
@ -20,14 +20,14 @@ const PackagePath = path.resolve(__dirname, '../../packages', componentname);
|
|||
const Files = [
|
||||
{
|
||||
filename: 'index.js',
|
||||
content: `const ${ComponentName} = require('./src/main');
|
||||
content: `import ${ComponentName} from './src/main';
|
||||
|
||||
/* istanbul ignore next */
|
||||
${ComponentName}.install = function(Vue) {
|
||||
Vue.component(${ComponentName}.name, ${ComponentName});
|
||||
};
|
||||
|
||||
module.exports = ${ComponentName};`
|
||||
export default ${ComponentName};`
|
||||
},
|
||||
{
|
||||
filename: 'cooking.conf.js',
|
||||
|
@ -82,6 +82,24 @@ export default {
|
|||
{
|
||||
filename: path.join('../../examples/docs/zh-CN', `${componentname}.md`),
|
||||
content: `## ${chineseName}`
|
||||
},
|
||||
{
|
||||
filename: path.join('../../test/unit/specs', `${componentname}.spec.js`),
|
||||
content: `import { createTest, destroyVM } from '../util';
|
||||
import Alert from 'packages/{{componentname}}';
|
||||
|
||||
describe('{{ComponentName}}', () => {
|
||||
let vm;
|
||||
afterEach(() => {
|
||||
destroyVM(vm);
|
||||
});
|
||||
|
||||
it('create', () => {
|
||||
vm = createTest({{ComponentName}}, true);
|
||||
expect(vm.$el).to.exist;
|
||||
});
|
||||
});
|
||||
`
|
||||
}
|
||||
];
|
||||
|
||||
|
|
112
src/index.js
112
src/index.js
|
@ -1,60 +1,60 @@
|
|||
/* Automatic generated by './build/bin/build-entry.js' */
|
||||
|
||||
import Pagination from '../packages/pagination/index.js';
|
||||
import Dialog from '../packages/dialog/index.js';
|
||||
import Autocomplete from '../packages/autocomplete/index.js';
|
||||
import Dropdown from '../packages/dropdown/index.js';
|
||||
import DropdownMenu from '../packages/dropdown-menu/index.js';
|
||||
import DropdownItem from '../packages/dropdown-item/index.js';
|
||||
import Menu from '../packages/menu/index.js';
|
||||
import Submenu from '../packages/submenu/index.js';
|
||||
import MenuItem from '../packages/menu-item/index.js';
|
||||
import MenuItemGroup from '../packages/menu-item-group/index.js';
|
||||
import Input from '../packages/input/index.js';
|
||||
import InputNumber from '../packages/input-number/index.js';
|
||||
import Radio from '../packages/radio/index.js';
|
||||
import RadioGroup from '../packages/radio-group/index.js';
|
||||
import RadioButton from '../packages/radio-button/index.js';
|
||||
import Checkbox from '../packages/checkbox/index.js';
|
||||
import CheckboxGroup from '../packages/checkbox-group/index.js';
|
||||
import Switch from '../packages/switch/index.js';
|
||||
import Select from '../packages/select/index.js';
|
||||
import Option from '../packages/option/index.js';
|
||||
import OptionGroup from '../packages/option-group/index.js';
|
||||
import Button from '../packages/button/index.js';
|
||||
import ButtonGroup from '../packages/button-group/index.js';
|
||||
import Table from '../packages/table/index.js';
|
||||
import TableColumn from '../packages/table-column/index.js';
|
||||
import DatePicker from '../packages/date-picker/index.js';
|
||||
import TimeSelect from '../packages/time-select/index.js';
|
||||
import TimePicker from '../packages/time-picker/index.js';
|
||||
import Popover from '../packages/popover/index.js';
|
||||
import Tooltip from '../packages/tooltip/index.js';
|
||||
import MessageBox from '../packages/message-box/index.js';
|
||||
import Breadcrumb from '../packages/breadcrumb/index.js';
|
||||
import BreadcrumbItem from '../packages/breadcrumb-item/index.js';
|
||||
import Form from '../packages/form/index.js';
|
||||
import FormItem from '../packages/form-item/index.js';
|
||||
import Tabs from '../packages/tabs/index.js';
|
||||
import TabPane from '../packages/tab-pane/index.js';
|
||||
import Tag from '../packages/tag/index.js';
|
||||
import Tree from '../packages/tree/index.js';
|
||||
import Alert from '../packages/alert/index.js';
|
||||
import Notification from '../packages/notification/index.js';
|
||||
import Slider from '../packages/slider/index.js';
|
||||
import Loading from '../packages/loading/index.js';
|
||||
import Icon from '../packages/icon/index.js';
|
||||
import Row from '../packages/row/index.js';
|
||||
import Col from '../packages/col/index.js';
|
||||
import Upload from '../packages/upload/index.js';
|
||||
import Progress from '../packages/progress/index.js';
|
||||
import Spinner from '../packages/spinner/index.js';
|
||||
import Message from '../packages/message/index.js';
|
||||
import Badge from '../packages/badge/index.js';
|
||||
import Card from '../packages/card/index.js';
|
||||
import Rate from '../packages/rate/index.js';
|
||||
import Steps from '../packages/steps/index.js';
|
||||
import Step from '../packages/step/index.js';
|
||||
import Pagination from '../packages/pagination';
|
||||
import Dialog from '../packages/dialog';
|
||||
import Autocomplete from '../packages/autocomplete';
|
||||
import Dropdown from '../packages/dropdown';
|
||||
import DropdownMenu from '../packages/dropdown-menu';
|
||||
import DropdownItem from '../packages/dropdown-item';
|
||||
import Menu from '../packages/menu';
|
||||
import Submenu from '../packages/submenu';
|
||||
import MenuItem from '../packages/menu-item';
|
||||
import MenuItemGroup from '../packages/menu-item-group';
|
||||
import Input from '../packages/input';
|
||||
import InputNumber from '../packages/input-number';
|
||||
import Radio from '../packages/radio';
|
||||
import RadioGroup from '../packages/radio-group';
|
||||
import RadioButton from '../packages/radio-button';
|
||||
import Checkbox from '../packages/checkbox';
|
||||
import CheckboxGroup from '../packages/checkbox-group';
|
||||
import Switch from '../packages/switch';
|
||||
import Select from '../packages/select';
|
||||
import Option from '../packages/option';
|
||||
import OptionGroup from '../packages/option-group';
|
||||
import Button from '../packages/button';
|
||||
import ButtonGroup from '../packages/button-group';
|
||||
import Table from '../packages/table';
|
||||
import TableColumn from '../packages/table-column';
|
||||
import DatePicker from '../packages/date-picker';
|
||||
import TimeSelect from '../packages/time-select';
|
||||
import TimePicker from '../packages/time-picker';
|
||||
import Popover from '../packages/popover';
|
||||
import Tooltip from '../packages/tooltip';
|
||||
import MessageBox from '../packages/message-box';
|
||||
import Breadcrumb from '../packages/breadcrumb';
|
||||
import BreadcrumbItem from '../packages/breadcrumb-item';
|
||||
import Form from '../packages/form';
|
||||
import FormItem from '../packages/form-item';
|
||||
import Tabs from '../packages/tabs';
|
||||
import TabPane from '../packages/tab-pane';
|
||||
import Tag from '../packages/tag';
|
||||
import Tree from '../packages/tree';
|
||||
import Alert from '../packages/alert';
|
||||
import Notification from '../packages/notification';
|
||||
import Slider from '../packages/slider';
|
||||
import Loading from '../packages/loading';
|
||||
import Icon from '../packages/icon';
|
||||
import Row from '../packages/row';
|
||||
import Col from '../packages/col';
|
||||
import Upload from '../packages/upload';
|
||||
import Progress from '../packages/progress';
|
||||
import Spinner from '../packages/spinner';
|
||||
import Message from '../packages/message';
|
||||
import Badge from '../packages/badge';
|
||||
import Card from '../packages/card';
|
||||
import Rate from '../packages/rate';
|
||||
import Steps from '../packages/steps';
|
||||
import Step from '../packages/step';
|
||||
import locale from 'element-ui/src/locale';
|
||||
|
||||
const install = function(Vue, opts = {}) {
|
||||
|
@ -131,7 +131,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|||
|
||||
module.exports = {
|
||||
version: '1.0.0-rc.9',
|
||||
locale,
|
||||
locale: locale.use,
|
||||
install,
|
||||
Pagination,
|
||||
Dialog,
|
||||
|
|
Loading…
Reference in New Issue