如何将多个vue项目vue合并视频起来共用一份配置文件进行管理

Vue.js中用webpack合并打包多个组件并实现按需加载
转载 &更新时间:日 09:35:18 & 作者:KingMario
对于现在前端插件的频繁更新,我也是无力吐槽,但是既然入了前端的坑就得认嘛,所以多多少少要对组件化有点了解,下面这篇文章主要给大家介绍了在Vue.js中用webpack合并打包多个组件并实现按需加载的相关资料,需要的朋友可以参考下。
随着移动设备的升级、网络速度的提高,用户对于web应用的要求越来越高,web应用要提供的功能越来越。功能的增加导致的最直观的后果就是资源文件越来越大。为了维护越来越庞大的客户端代码,提出了模块化的概念来组织代码。webpack作为一种模块化打包工具,随着react的流行也越来越流行。
使用 Vue 开发项目时,如果要使用其单文件组件特性,必然要使用 webpack 或者 browserify 进行打包,对于大型应用,为了提升加载速度,可以使用 webpack 的 code split 功能进行分割打包,生成较小的模块并按需加载,这在 Vue 文档及 vue-router 文档中均有介绍:、。
webpack 的 code split 可以使用 webpack 的 require.ensure 特殊语法或者使用 AMD 风格的 callback-require 语法,以 AMD 风格的 callback-require 语法为例——
全局注册 Async Component:
let myAsyncComponent = resolve =& {
require(['./my-async-component'], resolve)
Vue.component('async-webpack-example', myAsyncComponent)
局部注册 Async Component,单文件组件中 script 块内容:
let myAsyncComponent = resolve =& {
require(['./my-async-component'], resolve)
// Vue 扩展实例选项,其他选项略
export default {
components: {
'async-webpack-example': myAsyncComponent
在使用 vue-router 时,为实现不同路由下的组件异步加载,在路由映射中可以使用同样的方式来设置路由项的 component 属性。
这里的 myAsyncComponent 被定义为一个工厂函数,在需要时才会以 Vue 或者 vue-router 定义的用于解析组件选项的 resolve 回调函数(是的,在 Vue 和 vue-router 中有两个不同的解析组件选项的函数)为参数执行 callback-require 函数(resolve 回调函数的参数是组件选项),这样,在执行打包脚本时,my-async-component.vue 文件会被单独打包成一个文件,并且仅当该组件被使用时才会加载。
当要求异步加载的组件较多时,将会生成更多的单个文件,对于前端性能而言,虽然每个文件更小了,但可能意味着更多的网络连接建立和关闭的开销,因此在前端优化的实践中,通常需要在文件数量和单个文件大小之间取得平衡。
本文介绍如何将多个组件合并打包成一个单独的文件,一方面可以减少代码块的数量,另一方面,如果合并打包的这些组件在不同地方多次重复使用,由于 Vue 的缓存机制,可以加快后续组件的加载速度,并且如果这些通用组件长时间不会变化(如 UI 相关的组件),打包生成的文件也长期不会变化,可以充分利用浏览器的缓存功能,实现前端加载速度的优化。
先上效果图,在使用 vue-router 的 SPA 应用中,将除根路由之外的路由项对应的 ComponentA、ComponentB、ComponentC 等三个组件合并打包成一个文件。初次加载页面时,从开发者工具的 Network 面板上可以看到,此时未加载包含 ComponentA、ComponentB、ComponentC 这三个组件的 0.a5a1bae6addad442ac82.js 文件,当点击 Page A 链接时,加载了该文件,然后再点击 Page B、Page C 链接时,没有重新加载该文件。
我们首先通过 vue-cli 命令行工具使用 webpack 项目模板创建一个包含 vue-router 的项目,在其 src/components 目录下创建一个 CommonComponents 目录,在该目录中创建 ComponentA、ComponentB、ComponentC 这三个组件。
同时在 CommonComponents 目录下创建 index.js,其内容如下:
exports.ComponentA = require('./ComponentA')
exports.ComponentB = require('./ComponentB')
exports.ComponentC = require('./ComponentC')
这样,我们只需要使用 webpack 的 require.ensure 特殊语法或者使用 AMD 风格的 callback-require 语法异步加载 CommonComponents 目录下的 index.js,在使用 webpack 进行打包时,就可以实现将 ComponentA、ComponentB、ComponentC 这三个组件合并打包。以 AMD 风格的 callback-require 语法为例示范如下,这里的 callback 回调函数的形式没有任何特殊要求。
require(['component/CommonComponents'], function (CommonComponents) {
// do whatever you want with CommonComponents
component/CommonComponents 模块加载成功时,这里的回调函数中的 CommonComponents 参数将会是一个包含 ComponentA、ComponentB、ComponentC 这三个组件选项的对象。
在定义异步解析组件时,我们使用的是一个工厂函数 resolve =& {require(['./my-async-component'], resolve)},如果需要在路由配置文件中添加 component 属性为 ComponentA 组件的路由项,应该定义什么样的工厂函数呢?记住这里的 resolve 是一个用于解析组件选项的回调函数,其参数是所获取的组件选项,而上一段代码中的 CommonComponents 恰好是包含若干个组件选项的对象,因此我们可以将 CommonComponents 的子属性作为参数用于 resolve 调用,我们编写一个函数 getCommonComponent,用于根据组件名称返回获取相应的组件选项的工厂函数。
let getCommonComponent = componentName =& resolve =& require(['components/CommonComponents'], components =& resolve(components[componentName]))
在组件模板或者路由映射等使用其中某一个组件的地方,可以使用类似于 getCommonComponent('ComponentA') 这样的函数调用进行组件设置,在路由映射中的使用示例如下:
path: '/',
name: 'Hello',
component: Hello
path: '/a',
name: 'A',
component: getCommonComponent('ComponentA')
path: '/b',
name: 'B',
component: getCommonComponent('ComponentB')
path: '/c',
name: 'C',
component: getCommonComponent('ComponentC')
最终打包生成的文件列表如下图所示,其中的 0.a5a1bae6addad442ac82.js 包含了 ComponentA、ComponentB、ComponentC 这三个组件。
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流,谢谢大家对脚本之家的支持。
您可能感兴趣的文章:
大家感兴趣的内容
12345678910
最近更新的内容
常用在线小工具Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式。它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。
在 Vue 之后引入 vuex 会进行自动安装:
&script src="/path/to/vue.js"&&/script&
&script src="/path/to/vuex.js"&&/script&
可以通过 https://unpkg.com/vuex@2.0.0 这样的方式指定特定的版本。
npm install vuex --save
在 Vue 组件中获得 Vuex 状态
const Counter = {
template: `&div&{{ count }}&/div&`,
computed: {
count () {
return this.$store.state.count
mapState 辅助函数
当一个组件需要获取多个状态时候,将这些状态都声明为计算属性会有些重复和冗余。为了解决这个问题,我们可以使用 mapState 辅助函数帮助我们生成计算属性,让你少按几次键:
// 在单独构建的版本中辅助函数为 Vuex.mapState
import { mapState } from 'vuex'
export default {
computed: mapState({
// 箭头函数可使代码更简练
count: state =& state.count,
// 传字符串参数 'count' 等同于 `state =& state.count`
countAlias: 'count',
// 为了能够使用 `this` 获取局部状态,必须使用常规函数
countPlusLocalState (state) {
return state.count + this.localCount
当映射的计算属性的名称与 state 的子节点名称相同时,我们也可以给 mapState 传一个字符串数组。
computed: mapState([
// 映射 this.count 为 store.state.count
对象展开运算符
mapState 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 computed 属性。
computed: {
localComputed () { /* ... */ },
// 使用对象展开运算符将此对象混入到外部对象中
...mapState({
有时候我们需要从 store 中的 state 中派生出一些状态,例如对列表进行过滤并计数:
computed: {
doneTodosCount () {
return this.$store.state.todos.filter(todo =& todo.done).length
如果有多个组件需要用到此属性,我们要么复制这个函数,或者抽取到一个共享函数然后在多处导入它&&无论哪种方式都不是很理想。
Vuex 允许我们在 store 中定义&getter&(可以认为是 store 的计算属性)。就像计算属性一样,getter 的返回值会根据它的依赖被缓存起来,且只有当它的依赖值发生了改变才会被重新计算。
Getter 接受 state 作为其第一个参数:
const store = new Vuex.Store({
{ id: 1, text: '...', done: true },
{ id: 2, text: '...', done: false }
getters: {
doneTodos: state =& {
return state.todos.filter(todo =& todo.done)
Getter 会暴露为 store.getters 对象:
store.getters.doneTodos // -& [{ id: 1, text: '...', done: true }]
Getter 也可以接受其他 getter 作为第二个参数:
getters: {
doneTodosCount: (state, getters) =& {
return getters.doneTodos.length
store.getters.doneTodosCount // -& 1
我们可以很容易地在任何组件中使用它:
computed: {
doneTodosCount () {
return this.$store.getters.doneTodosCount
你也可以通过让 getter 返回一个函数,来实现给 getter 传参。在你对 store 里的数组进行查询时非常有用。
getters: {
getTodoById: (state) =& (id) =& {
return state.todos.find(todo =& todo.id === id)
store.getters.getTodoById(2) // -& { id: 2, text: '...', done: false }
mapGetters 辅助函数
mapGetters 辅助函数仅仅是将 store 中的 getter 映射到局部计算属性:
import { mapGetters } from 'vuex'
export default {
computed: {
// 使用对象展开运算符将 getter 混入 computed 对象中
...mapGetters([
'doneTodosCount',
'anotherGetter',
如果你想将一个 getter 属性另取一个名字,使用对象形式:
mapGetters({
// 映射 `this.doneCount` 为 `store.getters.doneTodosCount`
doneCount: 'doneTodosCount'
更改 Vuex 的 store 中的状态的唯一方法是提交 mutation。Vuex 中的 mutation 非常类似于事件:每个 mutation 都有一个字符串的 事件类型 (type) 和 一个 回调函数 (handler)。这个回调函数就是我们实际进行状态更改的地方,并且它会接受 state 作为第一个参数:
const store = new Vuex.Store({
mutations: {
increment (state) {
// 变更状态
state.count++
store.commit('increment')
当使用对象风格的提交方式,整个对象都作为载荷传给 mutation 函数,因此 handler 保持不变:
mutations: {
increment (state, payload) {
state.count += payload.amount
使用常量替代 Mutation 事件类型
// mutation-types.js
export const SOME_MUTATION = 'SOME_MUTATION'
// store.js
import Vuex from 'vuex'
import { SOME_MUTATION } from './mutation-types'
const store = new Vuex.Store({
state: { ... },
mutations: {
// 我们可以使用 ES2015 风格的计算属性命名功能来使用一个常量作为函数名
[SOME_MUTATION] (state) {
// mutate state
在组件中提交 Mutation
你可以在组件中使用 this.$store.commit('xxx') 提交 mutation,或者使用 mapMutations 辅助函数将组件中的 methods 映射为 store.commit 调用(需要在根节点注入 store)。
import { mapMutations } from 'vuex'
export default {
methods: {
...mapMutations([
'increment', // 将 `this.increment()` 映射为 `this.$store.commit('increment')`
// `mapMutations` 也支持载荷:
'incrementBy' // 将 `this.incrementBy(amount)` 映射为 `this.$store.commit('incrementBy', amount)`
...mapMutations({
add: 'increment' // 将 `this.add()` 映射为 `this.$store.commit('increment')`
Action 类似于 mutation,不同在于:
Action 提交的是 mutation,而不是直接变更状态。
Action 可以包含任意异步操作。
让我们来注册一个简单的 action:
const store = new Vuex.Store({
mutations: {
increment (state) {
state.count++
actions: {
increment (context) {
context.commit('increment')
Action 函数接受一个与 store 实例具有相同方法和属性的 context 对象,因此你可以调用 context.commit 提交一个 mutation,或者通过 context.state 和 context.getters 来获取 state 和 getters。
实践中,我们会经常用到 ES2015 的
来简化代码(特别是我们需要调用 commit 很多次的时候):
actions: {
increment ({ commit }) {
commit('increment')
分发 Action
Action 通过 store.dispatch 方法触发:
store.dispatch('increment')
乍一眼看上去感觉多此一举,我们直接分发 mutation 岂不更方便?实际上并非如此,还记得 mutation 必须同步执行这个限制么?Action 就不受约束!我们可以在 action 内部执行异步操作:
actions: {
incrementAsync ({ commit }) {
setTimeout(() =& {
commit('increment')
Actions 支持同样的载荷方式和对象方式进行分发:
// 以载荷形式分发
store.dispatch('incrementAsync', {
amount: 10
// 以对象形式分发
store.dispatch({
type: 'incrementAsync',
amount: 10
来看一个更加实际的购物车示例,涉及到调用异步 API 和分发多重 mutation:
actions: {
checkout ({ commit, state }, products) {
// 把当前购物车的物品备份起来
const savedCartItems = [...state.cart.added]
// 发出结账请求,然后乐观地清空购物车
commit(types.CHECKOUT_REQUEST)
// 购物 API 接受一个成功回调和一个失败回调
shop.buyProducts(
// 成功操作
() =& commit(types.CHECKOUT_SUCCESS),
// 失败操作
() =& commit(types.CHECKOUT_FAILURE, savedCartItems)
在组件中分发 Action
你在组件中使用 this.$store.dispatch('xxx') 分发 action,或者使用 mapActions 辅助函数将组件的 methods 映射为 store.dispatch 调用(需要先在根节点注入 store):
import { mapActions } from 'vuex'
export default {
methods: {
...mapActions([
'increment', // 将 `this.increment()` 映射为 `this.$store.dispatch('increment')`
// `mapActions` 也支持载荷:
'incrementBy' // 将 `this.incrementBy(amount)` 映射为 `this.$store.dispatch('incrementBy', amount)`
...mapActions({
add: 'increment' // 将 `this.add()` 映射为 `this.$store.dispatch('increment')`
由于使用单一状态树,应用的所有状态会集中到一个比较大的对象。当应用变得非常复杂时,store 对象就有可能变得相当臃肿。
为了解决以上问题,Vuex 允许我们将 store 分割成模块(module)。每个模块拥有自己的 state、mutation、action、getter、甚至是嵌套子模块&&从上至下进行同样方式的分割:
const moduleA = {
state: { ... },
mutations: { ... },
actions: { ... },
getters: { ... }
const moduleB = {
state: { ... },
mutations: { ... },
actions: { ... }
const store = new Vuex.Store({
modules: {
a: moduleA,
b: moduleB
store.state.a // -& moduleA 的状态
store.state.b // -& moduleB 的状态
一般项目结构
Vuex 并不限制你的代码结构。但是,它规定了一些需要遵守的规则:
应用层级的状态应该集中到单个 store 对象中。
提交 mutation 是更改状态的唯一方法,并且这个过程是同步的。
异步逻辑都应该封装到 action 里面。
只要你遵守以上规则,如何组织代码随你便。如果你的 store 文件太大,只需将 action、mutation 和 getter 分割到单独的文件。
对于大型应用,我们会希望把 Vuex 相关代码分割到模块中。下面是项目结构示例:
├── index.html
├── main.js
├── api
└── ... # 抽取出API请求
├── components
├── App.vue
└── ...
└── store
├── index.js
# 我们组装模块并导出 store 的地方
├── actions.js
# 根级别的 action
├── mutations.js
# 根级别的 mutation
└── modules
├── cart.js
# 购物车模块
└── products.js
# 产品模块
npm install --save vuex
&!--这里假定你已经搭好vue的开发环境了--&
1、首先创建一个js文件,假定这里取名为store.js
2、在main.js文件中引入上面创建的store.js
//main.js内部对store.js的配置
import store from '"@/store/store.js'
//具体地址具体路径
el: '#app',
store, //将store暴露出来
template: '&App&&/App&',
components: { App }
import Vue from 'vue'; //首先引入vue
import Vuex from 'vuex'; //引入vuex
Vue.use(Vuex)
export default new Vuex.Store({
// state 类似 data
//这里面写入数据
// getters 类似 computed
// 在这里面写个方法
mutations:{
// mutations 类似methods
// 写方法对数据做出更改(同步操作)
// actions 类似methods
// 写方法对数据做出更改(异步操作)
我们约定store中的数据是以下形式
totalPrice: 0,
totalNum:0,
goodsData: [
title: '好吃的苹果',
price: 8.00,
image: 'https://www.shangdian.com/static/pingguo.jpg',
title: '美味的香蕉',
price: 5.00,
image: 'https://www.shangdian.com/static/xiangjiao.jpg',
gettles:{ //其实这里写上这个主要是为了让大家明白他是怎么用的,
totalNum(state){
let aTotalNum = 0;
state.goods.goodsData.forEach((value,index) =& {
aTotalNum += value.
return aTotalN
totalPrice(state){
let aTotalPrice = 0;
state.goods.goodsData.forEach( (value,index) =& {
aTotalPrice += value.num * value.price
return aTotalPrice.toFixed(2);
mutations:{
reselt(state,msg){
console.log(msg) //我执行了一次;
state.goods.totalPrice = this.getters.totalP
state.goods.totalNum = this.getters.totalN
reduceGoods(state,index){
//第一个参数为默认参数,即上面的state,后面的参数为页面操作传过来的参数
state.goodsData[index].num-=1;
let msg = '我执行了一次'
this.commit('reselt',msg);
addGoods(state,index){
state.goodsData[index].num+=1;
let msg = '我执行了一次'
this.commit('reselt',msg);
想要重新渲染store中的方法,一律使用commit 方法
你可以这样写 commit('reselt',{
state: state
也可以这样写 commit({
type: 'reselt',
state: state
主要看你自己的风格
//这里主要是操作异步操作的,使用起来几乎和mutations方法一模一样
//除了一个是同步操作,一个是异步操作,这里就不多介绍了,
//有兴趣的可以自己去试一试
//比如你可以用setTimeout去尝试一下
好了,简单的数据我们就这样配置了,接下来看看购物车页面吧;
&template&
&div id="goods" class="goods-box"&
&ul class="goods-body"&
&li v-for="(list,index) in goods.goodsData" :key="list.id"&
&div class="goods-main"&
&img :src="list.image"&
&div class="goods-info"&
&h3 class="goods-title"&{{ list.title }}&/h3&
&p class="goods-price"&& {{ list.price }}&/p&
&div class="goods-compute"&
&!--在dom中使用方法为:$store.commit()加上store.js中的属性的名称,示例如下--&
&span class="goods-reduce" @click="$store.commit('reduceGoods',index)"&-&/span&
&input readonly v-model="list.num" /&
&span class="goods-add" @click="$store.commit('addGoods',index)"&+&/span&
&div class="goods-footer"&
&div class="goods-total"&
合计:& {{ goods.totalPrice }}
如果你想要直接使用一些数据,但是在computed中没有给出来怎么办?
可以写成这样
{{ $store.state.goods.totalPrice }}
或者直接获取gettles里面的数据
{{ $store.gettles.totalPrice }}
&button class="goods-check" :class="{activeChecke: goods.totalNum &= 0}"&去结账({{ goods.totalNum }})&/button&
&/template&
export default {
name: 'Goods',
computed:{
return this.$store.state.
如果上面的方式写参数让你看的很别扭,我们继续看第二种方式
&!--goods.vue 购物车页面--&
&template&
&div id="goods" class="goods-box"&
&ul class="goods-body"&
&li v-for="(list,index) in goods.goodsData" :key="list.id"&
&div class="goods-main"&
&img :src="list.image"&
&div class="goods-info"&
&h3 class="goods-title"&{{ list.title }}&/h3&
&p class="goods-price"&& {{ list.price }}&/p&
&div class="goods-compute"&
&span class="goods-reduce" @click="goodsReduce(index)"&-&/span&
&input readonly v-model="list.num" /&
&span class="goods-add" @click="goodsAdd(index)"&+&/span&
&div class="goods-footer"&
&div class="goods-total"&
合计:& {{ goods.totalPrice }}
gettles里面的数据可以直接这样写
{{ totalPrice }}
&button class="goods-check" :class="{activeChecke: goods.totalNum &= 0}"&去结账({{ goods.totalNum }})&/button&
&/template&
import {mapState,mapGetters,mapMutations} from 'vuex';
上面大括弧里面的三个参数,便是一一对应着store.js中的state,gettles,mutations
这三个参数必须规定这样写,写成其他的单词无效,切记
毕竟是这三个属性的的辅助函数
export default {
name: 'Goods',
computed:{
...mapState(['goods'])
...mapGetters(['totalPrice','totalNum'])
&...& 为ES6中的扩展运算符,不清楚的可以百度查一下
如果使用的名称和store.js中的一样,直接写成上面数组的形式就行,
如果你想改变一下名字,写法如下
...mapState({
goodsData: state =& stata.goods
...mapMutations(['goodsReduce','goodsAdd']),
这里你可以直接理解为如下形式,相当于直接调用了store.js中的方法
goodsReduce(index){
// 这样是不是觉得很熟悉了?
goodsAdd(index){
好,还是不熟悉,我们换下面这种写法
onReduce(index){
//我们在methods中定义了onReduce方法,相应的Dom中的click事件名要改成onReduce
this.goodsReduce(index)
//这相当于调用了store.js的方法,这样是不是觉得满意了
const moduleA = {
state: { /*data**/ },
mutations: { /**方法**/ },
actions: { /**方法**/ },
getters: { /**方法**/ }
const moduleB = {
state: { /*data**/ },
mutations: { /**方法**/ },
actions: { /**方法**/ }
export default new Vuex.Store({
modules: {
a: moduleA,
b: moduleB
//那怎么调用呢?看下面!
//在模块内部使用
state.goods //这种使用方式和单个使用方式样,直接使用就行
//在组件中使用
store.state.a.goods //先找到模块的名字,再去调用属性
store.state.b.goods //先找到模块的名字,再去调用属性
参考地址:
阅读(...) 评论()温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(13856)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_095068',
blogTitle:'jQuery.extend()的合并对象功能',
blogAbstract:'jQuery.extend( [ deep ], target, object1, [ objectN ] )合并对象到第一个对象&&&&//deep为boolean类型,其它参数为object类型 \r\nvar object1 = { apple: 0, banana: {weight: 52, price: 100}, cherry: 97};\r\nvar object2 = { banana: {price: 200}, durian: 100};\r\n&\r\n实例1:\r\n$.extend(object1, object2); //合并对象,修改第一个对象\r\n',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:7,
publishTime:3,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}

我要回帖

更多关于 vue合并视频 的文章

 

随机推荐