guixue пре 3 година
родитељ
комит
30ac823a3d
5 измењених фајлова са 10 додато и 36 уклоњено
  1. 0 4
      src/App.vue
  2. 5 6
      src/components/Container.vue
  3. 2 2
      src/components/WidgetConfig.vue
  4. 3 17
      src/index.js
  5. 0 7
      src/main.js

+ 0 - 4
src/App.vue

@@ -72,10 +72,6 @@ export default {
     .action-item{
       display: inline-block;
       margin-left: 15px;
-      .el-dropdown{
-        // font-size: 16px;
-        // font-weight: 500;
-      }
       .el-dropdown-link{
         cursor: pointer;
         color: #fff;

+ 5 - 6
src/components/Container.vue

@@ -5,6 +5,7 @@
         <el-container>
           <el-aside width="250px">
             <div class="components-list">
+              <!-- 基础控件 -->
               <template v-if="basicFields.length">
                 <div class="widget-cate">{{$t('fm.components.basic.title')}}</div>
                 <draggable tag="ul" :list="basicComponents" 
@@ -22,7 +23,9 @@
                     </li>
                   </template>                
                 </draggable>
-              </template>            
+              </template> 
+              
+              <!-- 高级控件 -->
               <template v-if="advanceFields.length">
                 <div class="widget-cate">{{$t('fm.components.advance.title')}}</div>
                 <draggable tag="ul" :list="advanceComponents" 
@@ -42,7 +45,7 @@
                 </draggable>
               </template>
 
-              
+              <!-- 布局控件 -->
               <template v-if="layoutFields.length">
                 <div class="widget-cate">{{$t('fm.components.layout.title')}}</div>
                 <draggable tag="ul" :list="layoutComponents" 
@@ -311,9 +314,6 @@ export default {
         }
       })
     },
-    handleGoGithub () {
-      window.location.href = 'https://github.com/GavinZhuLei/vue-form-making'
-    },
     handleConfigSelect (value) {
       this.configTab = value
     },
@@ -360,7 +360,6 @@ export default {
       })
     },
     handleGenerateCode () {
-
       this.codeVisible = true
       this.htmlTemplate = generateCode(JSON.stringify(this.widgetForm), 'html')
       this.vueTemplate = generateCode(JSON.stringify(this.widgetForm), 'vue')

+ 2 - 2
src/components/WidgetConfig.vue

@@ -34,9 +34,9 @@
         </el-radio-group>
       </el-form-item>
       <!-- 分数汇总 scoreTo -->
-      <!-- <el-form-item :label="$t('单项分数')" v-if="Object.keys(data.options).indexOf('scoreTo')>=0">
+      <el-form-item :label="$t('计分到')" v-if="Object.keys(data.options).indexOf('scoreTo')>=0">
         <el-input v-model="data.options.scoreTo"></el-input>
-      </el-form-item> -->
+      </el-form-item>
       <!-- 分数汇总 totalScore -->
       <el-form-item :label="$t('总分')" v-if="Object.keys(data.options).indexOf('score')>=0">
         <el-input v-model="this.data.totalScore"></el-input>

+ 3 - 17
src/index.js

@@ -3,8 +3,6 @@ import 'normalize.css/normalize.css'
 
 import MakingForm from './components/Container.vue'
 import GenerateForm from './components/GenerateForm.vue'
-import TotalScore from './components/TotalScore.vue'
-
 
 import enUS from './lang/en-US'
 import zhCN from './lang/zh-CN'
@@ -39,15 +37,6 @@ MakingForm.install = function (Vue, opts = {
   Vue.component(MakingForm.name, MakingForm)
 }
 
-TotalScore.install = function (Vue, opts = {
-  lang: 'zh-CN',
-  locale: null,
-  i18n: null
-}) {
-  loadLang(Vue, opts.lang, opts.locale, opts.i18n)
-  Vue.component(TotalScore.name, TotalScore)
-}
-
 GenerateForm.install = function (Vue, opts = {
   lang: 'zh-CN',
   locale: null,
@@ -59,8 +48,7 @@ GenerateForm.install = function (Vue, opts = {
 
 const components = [
   MakingForm,
-  GenerateForm,
-  TotalScore
+  GenerateForm
 ]
 
 const install = function (Vue, opts = {
@@ -81,13 +69,11 @@ if (typeof window !== 'undefined' && window.Vue) {
 export {
   install,
   MakingForm,
-  GenerateForm,
-  TotalScore
+  GenerateForm
 }
 
 export default {
   install,
   MakingForm,
-  GenerateForm,
-  TotalScore
+  GenerateForm
 }

+ 0 - 7
src/main.js

@@ -7,18 +7,12 @@ import VueEditor from 'vue2-editor'
 
 import 'element-ui/lib/theme-chalk/index.css'
 
-import enLocale from 'element-ui/lib/locale/lang/en'
 import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
 
 Vue.use(VueI18n)
 Vue.use(VueEditor)
 
 const messages = {
-  'en-US': {
-    header: {
-      title: 'D-Form',
-    }
-  },
   'zh-CN': {
     header: {
       title: 'D-From 拖拽式表单设计器',
@@ -26,7 +20,6 @@ const messages = {
   }
 }
 
-Vue.locale('en-US', {...enLocale, ...messages['en-US']})
 Vue.locale('zh-CN', {...zhLocale, ...messages['zh-CN']})
 Vue.config.lang = 'zh-CN'