From 8692336547015efb7ed1f972472f448671ac5e5f Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Mon, 11 Feb 2019 22:22:46 +0800 Subject: [PATCH] update site --- components/tabs/index.en-US.md | 2 +- components/tabs/index.zh-CN.md | 2 +- site/dev.js | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/components/tabs/index.en-US.md b/components/tabs/index.en-US.md index 072889d6d..b0ec22d71 100644 --- a/components/tabs/index.en-US.md +++ b/components/tabs/index.en-US.md @@ -5,7 +5,7 @@ | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | -| activeKey | Current TabPane's key | string | - | +| activeKey(v-model) | Current TabPane's key | string | - | | animated | Whether to change tabs with animation. Only works while `tabPosition="top"\|"bottom"` | boolean \| {inkBar:boolean, tabPane:boolean} | `true`, `false` when `type="card"` | | defaultActiveKey | Initial active TabPane's key, if `activeKey` is not set. | string | - | | hideAdd | Hide plus icon or not. Only works while `type="editable-card"` | boolean | `false` | diff --git a/components/tabs/index.zh-CN.md b/components/tabs/index.zh-CN.md index 62b60261d..e34575750 100644 --- a/components/tabs/index.zh-CN.md +++ b/components/tabs/index.zh-CN.md @@ -5,7 +5,7 @@ | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| activeKey | 当前激活 tab 面板的 key | string | 无 | +| activeKey(v-model) | 当前激活 tab 面板的 key | string | 无 | | animated | 是否使用动画切换 Tabs,在 `tabPosition=top|bottom` 时有效 | boolean \| {inkBar:boolean, tabPane:boolean} | true, 当 type="card" 时为 false | | defaultActiveKey | 初始化选中面板的 key,如果没有设置 activeKey | string | 第一个面板 | | hideAdd | 是否隐藏加号图标,在 `type="editable-card"` 时有效 | boolean | false | diff --git a/site/dev.js b/site/dev.js index b9e2675d0..51a709555 100644 --- a/site/dev.js +++ b/site/dev.js @@ -3,6 +3,7 @@ import '../components/style.js'; import './index.less'; import 'highlight.js/styles/solarized-light.css'; import Vue from 'vue'; +import Vuex from 'vuex'; import VueI18n from 'vue-i18n'; import VueRouter from 'vue-router'; import VueClipboard from 'vue-clipboard2'; @@ -11,9 +12,10 @@ import Api from './components/api'; import './components'; import demoBox from './components/demoBox'; import demoContainer from './components/demoContainer'; -import Test from '../components/test/index.vue'; +import Test from '../components/form/demo/index.vue'; import zhCN from './theme/zh-CN'; import enUS from './theme/en-US'; +Vue.use(Vuex); Vue.use(VueClipboard); Vue.use(VueRouter); Vue.use(VueI18n); @@ -34,8 +36,20 @@ const router = new VueRouter({ mode: 'history', routes: [{ path: '/*', component: Test }], }); + +const store = new Vuex.Store({ + state: { + username: 'zeka', + }, + mutations: { + update(state, payload) { + state.username = payload.username; + }, + }, +}); new Vue({ el: '#app', i18n, router, + store, });