diff --git a/README.ja.md b/README.ja.md new file mode 100644 index 00000000..e601291a --- /dev/null +++ b/README.ja.md @@ -0,0 +1,210 @@ +<p align="center"> + <img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg"> +</p> + +<p align="center"> + <a href="https://github.com/vuejs/vue"> + <img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue"> + </a> + <a href="https://github.com/ElemeFE/element"> + <img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui"> + </a> + <a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow"> + <img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status"> + </a> + <a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE"> + <img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license"> + </a> + <a href="https://github.com/PanJiaChen/vue-element-admin/releases"> + <img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="GitHub release"> + </a> + <a href="https://gitter.im/vue-element-admin/discuss"> + <img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter"> + </a> + <a href="https://panjiachen.gitee.io/vue-element-admin-site/zh/donate"> + <img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate"> + </a> +</p> + +日本語 | [English](./README.md) | [简体中文](./README.zh-CN.md) + +## 概要 + +[vue-element-admin](https://panjiachen.github.io/vue-element-admin) は管理画面のフロントエンドのインタフェース,[vue](https://github.com/vuejs/vue) と [element-ui](https://github.com/ElemeFE/element)を使っています。i18nの多言語対応、可変ルート、権限、典型的なビジネスアプリテンプレートであり、豊富なコンポーネントを提供しています、素早くビジネス用の管理画面の現型を構築に役立ちます。 + +- [デモページ](https://panjiachen.github.io/vue-element-admin) + +- [ドキュメント](https://panjiachen.github.io/vue-element-admin-site/) + +- [Gitter](https://gitter.im/vue-element-admin/discuss) + +- [Donate](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate) + +- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki) + +- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) +- デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) +- Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) + +**現在のバージョン `v4.0+` は `vue-cli` で構築,バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。`vue-cli`に依存しないです。** + +**低いバージョンのブラウザはサーポートしないです(例えば ie),必要があれば polyfill を追加してください。 [詳細はこちら](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)** + +## 前準備 + +ローカル環境に [node](http://nodejs.org/) と [git](https://git-scm.com/)をインストールが必要です。[ES2015+](http://es6.ruanyifeng.com/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element)で開発しています。Requestは[Mock.js](https://github.com/nuysoft/Mock)のモックデータを使っています。 + +**バグ修正や新規機能追加のissue と pull requestは大歓迎です。** + + <p align="center"> + <img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png"> +</p> + +## Sponsors + +Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen) + +<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p> + +## 機能一覧 + +``` +- ログイン / ログアウト + +- Auth認証 + - ページ権限 + - 権限パーミッション + - 権限設定 + - 外部IDでログイン + +- 複数環境デプロイ + - dev sit stage prod + +- 共通機能 + - 多言語切替 + - テーマ切替 + - サイトメニュー(ルートから生成) + - Breadcrumb Navigation + - Tag Navigation + - Svg Sprite Icon + - ローカル/バックエンド モック データ + - Screenfull + +- WYSIWYG + - TinyMCE + - Markdown + - JSON + +- Excel + - エクスポート + - インポート + - リード + - Zip + +- Table + - Dynamic Table + - Drag And Drop Table + - Inline Edit Table + +- Error Page + - 401 + - 404 + +- コンポーネント + - Avatar Upload + - Back To Top + - Drag Dialog + - Drag Select + - Drag Kanban + - Drag List + - SplitPane + - Dropzone + - Sticky + - CountTo + +- Advanced Example +- Error Log +- Dashboard +- Guide Page +- ECharts +- Clipboard +- Markdown to html +``` + +## Getting started + +```bash +# clone the project +git clone https://github.com/PanJiaChen/vue-element-admin.git + +# enter the project directory +cd vue-element-admin + +# install dependency +npm install + +# develop +npm run dev +``` + +This will automatically open http://localhost:9527 + +## Build + +```bash +# build for test environment +npm run build:stage + +# build for production environment +npm run build:prod +``` + +## Advanced + +```bash +# preview the release environment effect +npm run preview + +# preview the release environment effect + static resource analysis +npm run preview -- --report + +# code format check +npm run lint + +# code format check and auto fix +npm run lint -- --fix +``` + +Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information + +## Changelog + +Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases). + +## Online Demo + +[Preview](https://panjiachen.github.io/vue-element-admin) + +## Donate + +If you find this project useful, you can buy author a glass of juice :tropical_drink: + + + +[Paypal Me](https://www.paypal.me/panfree23) + +[Buy me a coffee](https://www.buymeacoffee.com/Pan) + +## Browsers support + +Modern browsers and Internet Explorer 10+. + +| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari | +| --------- | --------- | --------- | --------- | +| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions + +## License + +[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) + +Copyright (c) 2017-present PanJiaChen \ No newline at end of file diff --git a/README.md b/README.md index 01034b51..0388b0d0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ </a> </p> -English | [简体中文](./README.zh-CN.md) +English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) ## Introduction diff --git a/src/lang/ja.js b/src/lang/ja.js new file mode 100644 index 00000000..7dccd124 --- /dev/null +++ b/src/lang/ja.js @@ -0,0 +1,175 @@ +export default { + route: { + dashboard: 'トップ', + documentation: 'ドキュメント', + guide: 'ガイド', + permission: '権限', + rolePermission: '権限ロール', + pagePermission: 'ページ権限', + directivePermission: 'ディレクティブ権限', + icons: 'アイコン', + components: 'コンポーネント', + tinymce: 'TinyMCE', + markdown: 'Markdown', + jsonEditor: 'JSON Editor', + dndList: 'Drag-And-Drop', + splitPane: 'パネル', + avatarUpload: 'アバターアップロード', + dropzone: 'Dropzone', + sticky: 'Sticky', + countTo: 'Count To', + componentMixin: 'コンポーネントMixin', + backToTop: 'BackToTop', + dragDialog: 'Drag Dialog', + dragSelect: 'Drag Select', + dragKanban: 'Drag 看板', + charts: 'チャート', + keyboardChart: 'Keyboardチャート', + lineChart: 'Lineチャート', + mixChart: 'Mixチャート', + example: 'Example', + nested: 'Nested Routes', + menu1: 'メニュー1', + 'menu1-1': 'メニュー 1-1', + 'menu1-2': 'メニュー 1-2', + 'menu1-2-1': 'メニュー 1-2-1', + 'menu1-2-2': 'メニュー 1-2-2', + 'menu1-3': 'メニュー 1-3', + menu2: 'メニュー 2', + Table: 'Table', + dynamicTable: '可変 Table', + dragTable: 'Drag Table', + inlineEditTable: 'Inline Edit Table', + complexTable: 'Complex Table', + tab: 'Tab', + form: 'フォーム', + createArticle: '投稿作成', + editArticle: '投稿編集', + articleList: '投稿リスト', + errorPages: 'エラーページ', + page401: '401', + page404: '404', + errorLog: 'エラーログ', + excel: 'Excel', + exportExcel: '一括エクスポート', + selectExcel: '複数選択エクスポート', + mergeHeader: 'ヘッダーマージ', + uploadExcel: 'アップロード', + zip: 'Zip', + pdf: 'PDF', + exportZip: 'Export Zip', + theme: 'テーマ変更', + clipboardDemo: 'Clipboard', + i18n: '多言語', + externalLink: '外部リンク', + profile: 'プロフィール' + }, + navbar: { + dashboard: 'トップ', + github: 'GitHub', + logOut: 'ログアウト', + profile: 'プロフィール', + theme: 'テーマ変更', + size: '画面サイズ' + }, + login: { + title: 'ユーザログイン', + logIn: 'ログイン', + username: 'ユーザ名', + password: 'パスワード', + any: 'password', + thirdparty: '外部IDでログイン', + thirdpartyTips: 'ローカル環境ではログインできません。実装が必要です。' + }, + documentation: { + documentation: 'ドキュメント', + github: 'Github Link' + }, + permission: { + addRole: 'ロール追加', + editPermission: 'ロール変更', + roles: 'ロール', + switchRoles: 'ロール切替', + tips: 'v-permissionは使えない時があります。例えば: Element-UI の el-tab、 el-table-column 及び他の dom。v-ifを使う必要があります。', + delete: '削除', + confirm: '確認', + cancel: 'キャンセル' + }, + guide: { + description: 'ガイドは各機能の説明です。', + button: 'ガイドを見る' + }, + components: { + documentation: 'ドキュメント', + tinymceTips: 'tinymceは管理画面に重要な機能ですが、その同時に落とし穴がありあす。tinymceを使う道のりが大変でした。Tinymceを使う時に各自のプロジェクト状況で判断が必要です。ドキュメントはこちら', + dropzoneTips: 'Third partyのパッケージを使わず、独自の実装しています。詳細は @/components/Dropzone', + stickyTips: 'ページの指定位置へスクロールした場合、表示されます。', + backToTopTips1: 'トップへスクロールが表示されます。', + backToTopTips2: 'ボタンのスタイルはカスタマイズできます。例えば、show/hide、height、position。 またはElementのel-tooltipを使って、ツールチップを実装できます。', + imageUploadTips: 'mockjsは使えないため、カスタマイズしています。公式の最新バージョンを使ってください。' + }, + table: { + dynamicTips1: '先頭は固定、最後に追加', + dynamicTips2: '戦後に追加せず、指定列に追加', + dragTips1: 'デフォルト順番', + dragTips2: 'Drag後の順番', + title: 'タイトル', + importance: '重要', + type: 'タイプ', + remark: '評価', + search: '検索', + add: '追加', + export: 'エクスポート', + reviewer: 'レビュアー', + id: '番号', + date: '日時', + author: '作成者', + readings: '閲覧数', + status: 'ステータス', + actions: '操作', + edit: '編集', + publish: '公開', + draft: '下書き', + delete: 'キャンセル', + cancel: 'キャンセル', + confirm: '確認' + }, + example: { + warning: '新規作成と編集画面は keep-alive を使えないです。keep-alive の include はrouteのキャッシュは使えないです。そのため、component name を使ってキャッシュさせるようにします。このようなキャッシュ機能を作りたい場合,localStorageを使う手があります。もしくは keep-alive の includeを使って、全ページキャッシュする方法はあります。' + }, + errorLog: { + tips: '右上のbugアイコンをクリックしてください。', + description: '管理画面はspaを使う場合が多い、ユーザ体現向上はできますが、想定外エラーが発生する場合があります。Vueはそのエラーハンドリング機能を提供し、エラーレポートができます。', + documentation: 'ドキュメント' + }, + excel: { + export: 'エクスポート', + selectedExport: 'エクスポート対象を選択してください。', + placeholder: 'ファイル名を入力してください。' + }, + zip: { + export: 'エクスポート', + placeholder: 'ファイル名を入力してください。' + }, + pdf: { + tips: 'window.print() を使ってPDFダウンロードしています。' + }, + theme: { + change: 'テーマ切替', + documentation: 'ドキュメント', + tips: 'Tips: テーマの切り替え方法はnavbarのtheme-pickと異なります、使い方はドキュメントを確認してください。' + }, + tagsView: { + refresh: '更新', + close: '閉じる', + closeOthers: 'その他閉じる', + closeAll: 'すべて閉じる' + }, + settings: { + title: 'システムテーマ', + theme: 'テーマ色', + tagsView: 'Tags-View 開く', + fixedHeader: 'Fixed Header', + sidebarLogo: 'Sidebar Logo' + } +} diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue index 7e94e505..40d78489 100644 --- a/src/views/example/components/ArticleDetail.vue +++ b/src/views/example/components/ArticleDetail.vue @@ -37,7 +37,7 @@ <el-col :span="10"> <el-form-item label-width="120px" label="Publush Time:" class="postInfo-container-item"> - <el-date-picker v-model="postForm.display_time" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" /> + <el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" /> </el-form-item> </el-col> @@ -155,6 +155,18 @@ export default { }, lang() { return this.$store.getters.language + }, + displayTime: { + // set and get is useful when the data + // returned by the back end api is different from the front end + // back end return => "2013-06-25 06:59:25" + // front end need timestamp => 1372114765000 + get() { + return (+new Date(this.postForm.display_time)) + }, + set(val) { + this.postForm.display_time = new Date(val) + } } }, created() { @@ -190,7 +202,6 @@ export default { this.$store.dispatch('tagsView/updateVisitedView', route) }, submitForm() { - this.postForm.display_time = parseInt(this.display_time / 1000) console.log(this.postForm) this.$refs.postForm.validate(valid => { if (valid) {