不是光設(shè)置viewport就行的吧,頁(yè)面內(nèi)容本來(lái)就多,如果要適應(yīng)小屏幕,得用自適應(yīng)布局之類的
可以貼出你的數(shù)據(jù)么,因?yàn)楦鶕?jù)報(bào)錯(cuò)信息來(lái)看應(yīng)該是你的數(shù)據(jù)里面沒有 ver_list 這個(gè)屬性
原因應(yīng)該是雙重for中this的指向題
我改了下你看看
主要是吧 this.$parent 當(dāng)做一個(gè)變量來(lái)處理 ,現(xiàn)在可以達(dá)到你要的效果了
path:'/add',
component:{
data(){
return {
goods_id:'',
goods_name:'',
ver_id:'',
ver_name:'',
ver_introduction:'',
color_name:'',
goods_price:'',
ver_list1:[],
color_list:[],
$parent: this.$parent
}
},
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>小米商品管理</title>
<link rel="stylesheet" type="text/css" >
<script src="https://cdn.bootcss.com/vue/2.4.4/vue.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/vue-router/2.7.0/vue-router.min.js"></script>
<style>
.ver_box li{width: 33%;float: left;}
.border{border: 1px solid black}
</style>
</head>
<body>
<div class="container">
<h2>商品管理</h2>
<router-link to="/" class="btn btn-primary">列表</router-link>
<router-link to="/add" class="btn btn-info">添加</router-link>
<router-view></router-view>
</div>
<template id="list_box">
<div>
<table class="table table-hover">
<tr>
<th>ID</th>
<th>商品名稱</th>
<th>屬性</th>
<th>操作</th>
</tr>
<tr v-for="(info,index) in $parent.goods_list" >
<td>{{index+1}}</td>
<td>{{info.goods_name}}</td>
<td>
<!-- 加上這個(gè)就報(bào)錯(cuò)-->
<p v-model="1+1"></p>
<ul v-for="(info1,index1) in $parent.ver_list">
<li>{{info1.ver_name}}</li>
</ul>
</td>
<td>
<a href="">修改</a>
</td>
</tr>
<!-- 測(cè)試,直接打印ver_list,沒問題 -->
<tr v-for="(info1,index1) in $parent.ver_list" >
<td>{{index1+1}}</td>
<td>{{info1.ver_name}}</td>
<td>
</td>
<td>
<a href="">修改</a>
</td>
</tr>
</table>
</template>
<template id="add_box">
<div>
<form action="" class="from">
<div class="form-group">
<label >商品名稱</label>
<input type="text" class="form-control" v-model="goods_name"></div>
<div class="form-group">
<label >
版本
<a @click="add_version()" class="btn btn-info">添加版本</a>
</label>
<ul class="ver_box">
<li v-for="(ver_info,index) in ver_list1">
版本{{index+1}}:
<input type="text" v-model="ver_info.ver_name">
</li>
</ul>
</div>
<div class="form-group" style="clear: both">
<input type="button" :disabled="goods_name=='' " class="btn btn-primary" value="保存" v-on:click="save()"></div>
</form>
</div>
</template>
</template>
<script type="text/javascript">
var router = new VueRouter({
routes:[
{
path:'/add',
component:{
data(){
return {
goods_id:'',
goods_name:'',
ver_id:'',
ver_name:'',
ver_introduction:'',
color_name:'',
goods_price:'',
ver_list1:[],
color_list:[],
$parent: this.$parent
}
},
methods:{
save:function () {
debugger
var goods_name = this.goods_name
var ver_list = this.ver_list1
var n=ver_list.length
this.$parent.goods_list.push({
goods_name
})
for(var i=0;n>0;i++){
console.log(ver_list[i].ver_name)
this.$parent.ver_list.push({
ver_name:ver_list[i].ver_name
})
n--
}
localStorage.setItem('goods_list',JSON.stringify(this.$parent.goods_list))
localStorage.setItem('ver_list',JSON.stringify(this.$parent.ver_list))
this.$router.push('/')
},
add_version:function () {
// 添加版本方法
this.ver_list1.push({
ver_name:'',
})
},
},
template:'#add_box'
}
},
{
path:'/',
component:{
template:'#list_box',
}
}
]
})
new Vue({
router,
el:".container",
data:{
goods_list:[],
ver_list:[]
},
created(){
debugger
this.goods_list = JSON.parse(localStorage.getItem('goods_list'))
if (this.goods_list==null) {
this.goods_list = []
}
this.ver_list = JSON.parse(localStorage.getItem('ver_list'))
if (this.ver_list==null) {
this.ver_list = []
}
console.log(this.ver_list)
},
methods:{
}
})
</script>
</body>
</html>感覺你這打開方式不太對(duì),maven filter機(jī)制是在maven處理資源文件的時(shí)候,使用profile文件的值,替換@key@ ,這個(gè)是maven的行為,profile讀取的是properties文件。
spring-boot本身也提供了一套環(huán)境管理:
比如講環(huán)境分為:
application-dev.properties 或 application-dev.yml
application-product.properties 或 application-product.yml
每個(gè)環(huán)境的配置信息單獨(dú)配置
在啟動(dòng)的時(shí)候通過spring.profiles.active=dev|product的方式進(jìn)行環(huán)境識(shí)別
1.你改的文件不對(duì)吧,不是php5.6.32.ini是php.ini
2.你的服務(wù)器是什么,apache的話請(qǐng)重啟apache,nginx的話,請(qǐng)重啟php-fpm
foreach ($arrayorser as $key=> $value){
$ser[] = $value['order_id'];
}
foreach ($search_order as $k=>$v){
$sers[] = $v['order_id'];
}
foreach ($ser as $key=> $item){
if(in_array($item,$sers)){
$arr[$key]['order_id'] = $item;
}
}
這是我寫的很low,測(cè)試了你代碼 你的在時(shí)間上相對(duì)平穩(wěn) 8.4s 我的在 8.3~8.49s 之間 最后還是采用了你的
使用dangerouslySetInnerHTML,見官方文檔Dangerously Set innerHTML
做了一下實(shí)驗(yàn),用node多運(yùn)行幾次,發(fā)現(xiàn)執(zhí)行順序誰(shuí)先誰(shuí)后都是不一定的,但是大多數(shù)情況,setTimeout更快。
var recordA = {};
var recordB = {};
var MAX = 100;
function output(index) {
if (index === MAX) {
console.log('setImmediate:' + Object.keys(recordA).length);
console.log('setTimeout: ' + Object.keys(recordB).length);
}
}
for (var i = 0; i <= MAX; ++i) {
(function (_i) {
setImmediate(function A() {
if (!recordB.hasOwnProperty(_i)) {
recordA[_i] = 'done';
output(_i);
}
});
setTimeout(function B() {
if (!recordA.hasOwnProperty(_i)) {
recordB[_i] = 'done';
output(_i);
}
}, 0);
})(i);
}
node版本9.2.0
然后這個(gè)setImmediate目前在瀏覽器里只有IE自?shī)首詷贰?/p>
沒必要那么麻煩,直接在router/index.js里配置就好
index.js
...
routes: [
{
path: '/',
redirect: '/weixin'
},
{
path: '/weixin',
name: 'Weixin',
component: Weixin,
meta: {title: '微信'}
},
{
path: '/contact',
name: 'Contact',
component: Contact,
meta: {title: '通訊錄'}
},
{
path: '/find',
name: 'Find',
component: Find,
meta: {title: '發(fā)現(xiàn)'}
},
{
path: '/my',
name: 'My',
component: My,
meta: {title: '我'}
},
]
組件里獲取標(biāo)題
this.$route.metawebsocket
@Configuration會(huì)創(chuàng)建一個(gè)Bean實(shí)例;@Bean會(huì)再創(chuàng)建一個(gè)Bean實(shí)例;
所以就導(dǎo)致創(chuàng)建了兩個(gè)對(duì)象,故@PostConstruct被執(zhí)行了兩次。
知道原因了,類名不能包含大寫,用advertblock就行了,另外advert_block也不行,要求蠻多
是否父容器給了 box-sizing: border-box 這樣子會(huì)出現(xiàn)滾動(dòng)條的, 因?yàn)槟慵恿诉吙?/p>
id和AccessToken不都是data的成員么?還是說你在哪又單獨(dú)定義過?
一看正則就是錯(cuò)誤的
babel-loader 8.x版本的,使用@babel/core,而不是babel-core了。
urlStr.replace(/^http/,"https")
寫了幾個(gè)view測(cè)試看起來(lái)像是指抗壓縮優(yōu)先級(jí),但這個(gè)方法本身不會(huì)改變視圖的約束,只是根據(jù)targetSize和約束的優(yōu)先級(jí)計(jì)算內(nèi)容的width、height。
我們常用的func systemLayoutSizeFitting(_ targetSize: CGSize) -> CGSize方法文檔中說明就是執(zhí)行了func systemLayoutSizeFitting(_ targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority) -> CGSize方法,只不過其中兩個(gè)約束參數(shù)都為50,也就是說其抗壓縮優(yōu)先級(jí)很低,會(huì)根據(jù)內(nèi)容約束計(jì)算出合適的width和height。-------- 不知道說的對(duì)不對(duì)!
建議使用官方鏡像,或者mariadb可能是更好的選擇
https://store.docker.com/imag...
你為什么 duang 一下就覺得“避免歧義并不是它的原因”?
Most Vexing Parse 了解一下?想用小括號(hào)初始化必然會(huì)面對(duì)失敗。引入列表初始化還不是為了克服這些問題。
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
北大課工場(chǎng)是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國(guó)家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國(guó)制造2025”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級(jí)產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國(guó)職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問,美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。